From wiki.ginstr.com
Jump to: navigation, search
(Widget references)
(Widget references)
Line 40: Line 40:
 
| title="Attribute" | android:id
 
| title="Attribute" | android:id
 
| title="Value" | @string/${pageName}${widgetLabel}Input
 
| title="Value" | @string/${pageName}${widgetLabel}Input
|-
 
| title="Widget" | Button
 
| title="Attribute" | gn:style
 
| title="Value" | @style/auditAddressInput
 
 
|}
 
|}
  

Revision as of 15:18, 14 October 2016

Gps address (hidden)

Widget obtains gps coordinates from gps module. After location is retrieved nominatim server is contacted to fetch the address and address is stored into the widget. Widget is hidden.

Back to ginstr app composer reference

Widget id:

auditAddress

Predefined user data

PreLoaded

AutoLoaded data which is known:

  • ${pageName} - name of the page to which widgets are added

Properties panel

User will configure this data in properties panels of selected widget:

GENERAL:

  • ${widgetLabel} - name of the widget user added to the screen

Widget references

If widget is added via app composer autogenerated ids will be created according to table below.

Control Attribute Value
GnEditText android:id @string/${pageName}${widgetLabel}Input

Code snippets

Common widget code

<com.ginstr.widgets.GnEditText
    android:id="@+id/${pageName}${widgetName}Input" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"
    gn:s_sourceType="gps"
    gn:dataType="gps"
    gn:visible="false"
    gn:showAddress="true" />