Implement declarative native UIs. UIs are expressed in standard Android XML and fetched from a remote server. UI XML includes a Purple Robot namespace that enables us to map user interactions to outcomes specified by PR scripts. For example:
<ImageButton src=”@drawable/button_image”
…>
<robot:Argument name=”foo”>bar</robot:Argument>
<robot:OnClick>
// Script that runs when button is pressed here.
PurpleRobot.emitToast(foo, true); // Toasts “bar” on press
</robot:OnClick>
</ImageButton>
Developer needs to identify the existing Android components suitable for inclusion in the XML that the system will adopt as well as appropriate arguments to be passed to the various components. Example:
Implement declarative native UIs. UIs are expressed in standard Android XML and fetched from a remote server. UI XML includes a Purple Robot namespace that enables us to map user interactions to outcomes specified by PR scripts. For example:
Developer needs to identify the existing Android components suitable for inclusion in the XML that the system will adopt as well as appropriate arguments to be passed to the various components. Example:
<ListView android:id=”@+id/listView” …> robot:RowTemplate <LinearLayout android:orientation=”vertical” …> <TextArea android:id=”@+id/text_field1 … /> <TextArea android:id=”@+id/text_field2 … /> /robot:RowTemplate robot:items
Bonus points if the layouts may also be expressed in scripting-friendly data structures, including JSON or S-Expressions.