Activity¶
Declaration¶
- class enamlnative.widgets.activity.Activity(parent=None, **kwargs)[source]¶
Bases:
enaml.widgets.toolkit_object.ToolkitObject
- proxy¶
Reference to the proxy
- app¶
Reference to the application
- started¶
Activity lifecycle events
- state¶
Activity lifecycle state must be set by the implementation
- dp¶
Pixel density of the device Loaded immediately as this is used often.
- width¶
Width of the screen in dp
- height¶
Height of the screen in dp
- orientation¶
Screen orientation
- build_info¶
Build info from https://developer.android.com/reference/android/os/Build.VERSION.html
- api_level¶
SDK version Loaded immediately
Android Implementation¶
- class enamlnative.android.android_activity.AndroidActivity[source]¶
Bases:
enamlnative.widgets.activity.ProxyActivity
- widget¶
Reference to the activty
- window¶
Default window id
- view¶
View currently displayed
- child_added(child)[source]¶
Handle a child being added to the object.
This method will only be called after the proxy tree is active and the UI is running. The default implementation is a no-op.
- Parameters
child (ProxyToolkitObject) – The toolkit proxy child added to the object.
- on_activity_lifecycle_changed(state)[source]¶
Update the state when the android app is paused, resumed, etc..
Widgets can observe this value for changes if they need to react to app lifecycle changes.
No iOS implementation found.