6.3 Mobile WidgetBuilders

Metawidget supports multiple WidgetBuilders for each mobile framework, targeting specific widget libraries within each environment.

6.3.1 Android WidgetBuilders

AndroidWidgetBuilder

AndroidWidgetBuilder is the default WidgetBuilder for AndroidMetawidget. It instantiates the following widgets for the following Metawidget attributes:

Widget Metawidget Attribute
android.widget
CheckBox type="boolean" (and type="java.lang.Boolean" when also required)
DatePicker type="java.utils.Date" when also required
EditText type of primitive wrapper (e.g. Integer or Float) except java.lang.Boolean. Also if property is of unknown type but dont-expand. If large, calls setMinLines. If masked, sets a PasswordTransformationMethod. If numeric, sets a DigitsKeyListener. If maximum-length, sets a InputFilter.LengthFilter. If type is a Date, sets a DateKeyListener
PasswordTextBox masked (except when also read-only)
Spinner lookup
org.metawidget.gwt.client.ui
Stub hidden

OverriddenWidgetBuilder

OverriddenWidgetBuilder locates child widgets designed to override default generation. It matches Views whose tag equals the same tag Metawidget would have generated.

ReadOnlyWidgetBuilder

ReadOnlyWidgetBuilder returns read-only widgets when either the business property is read-only or the Metawidget has setReadOnly. It instantiates the following widgets for the following Metawidget attributes:

Widget Metawidget Attribute
android.widget
TextView read-only (except when also type="java.util.Collection"). If masked sets View.INVISIBLE
org.metawidget.gwt.client.ui
Stub action when also read-only, masked when also read-only, type="java.util.Collection" when also read-only