From wiki.ginstr.com
Jump to: navigation, search
(Common widget code)
Line 8: Line 8:
 
Widget is hidden.
 
Widget is hidden.
  
Back to [[ginstr app composer reference]]
+
Widget id, ${widgetID}:
 
 
Widget id:
 
 
<pre>
 
<pre>
 
auditAddress
 
auditAddress
 
</pre>
 
</pre>
 +
 +
Back to [[ginstr app composer reference]]
  
 
== Predefined user data ==
 
== Predefined user data ==
Line 27: Line 27:
 
GENERAL:
 
GENERAL:
 
* ${widgetLabel} - name of the widget user added to the screen
 
* ${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.<br>
 
 
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
! scope="col" | Control
 
! scope="col" | Attribute
 
! scope="col" | Value
 
|-
 
| title="Widget" | GnEditText
 
| title="Attribute" | android:id
 
| title="Value" | @string/${pageName}${widgetLabel}Input
 
|}
 
  
 
== Code snippets ==
 
== Code snippets ==
Line 48: Line 34:
 
<pre>
 
<pre>
 
<com.ginstr.widgets.GnEditText
 
<com.ginstr.widgets.GnEditText
     android:id="@+id/${pageName}${widgetName}Input"  
+
     android:id="@+id/${pageName}$_{widgetLabel}_input"  
 
     android:layout_width="match_parent"  
 
     android:layout_width="match_parent"  
 
     android:layout_height="wrap_content"
 
     android:layout_height="wrap_content"

Revision as of 14:20, 2 November 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.

Widget id, ${widgetID}:

auditAddress

Back to ginstr app composer reference

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

Code snippets

Common widget code

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