Fragment

Declaration

class enamlnative.widgets.fragment.Fragment(parent=None, **kwargs)[source]

Bases: enaml.core.conditional.Conditional, enaml.widgets.toolkit_object.ToolkitObject

Fragment a “sub” activity with a lifecycle, view, and state. A fragment has no “widget” but it can have child widgets that will define it’s view. The children are rendered when the fragment’s view is requested.

proxy

A reference to the proxy object.

cached

Don’t destroy the view once loaded

defer_loading

Defer loading of child nodes

refresh_items()[source]

Refresh the items of the pattern. This method destroys the old items and creates and initializes the new items.

It is overridden to NOT insert the children to the parent. The Fragment adapter handles this.

Android Implementation

class enamlnative.android.android_fragment.AndroidFragment[source]

Bases: enamlnative.android.android_toolkit_object.AndroidToolkitObject, enamlnative.widgets.fragment.ProxyFragment

An Android implementation of an Enaml ProxyFragment.

fragment

A reference to the fragment created by the proxy.

ready

Future set when ready

create_widget()[source]

Create the underlying widget.

init_widget()[source]

Initialize the underlying widget.

destroy()[source]

Custom destructor that deletes the fragment and removes itself from the adapter it was added to.

on_create_view()[source]

Trigger the click

get_view()[source]

Get the page to display. If a view has already been created and is cached, use that otherwise initialize the view and proxy. If defer loading is used, wrap the view in a FrameLayout and defer add view until later.

No iOS implementation found.