From wiki.ginstr.com
Jump to: navigation, search

Menu bar

Widget that contains settings button, logout button and header text.

Widget id, ${gbamID}:

menuBarLogout

Back to GBAM widgets table

Predefined user data

PreLoaded

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

Properties panel

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

GENERAL
VALIDATIONS
  • -
ACTION
  • -
ACTION MESSAGES
  • -

Code snippets

GBAM Code Variables

Variables which are used in code snippet below but not defined in user modifiable inputs.

Common widget code

  <RelativeLayout
    android:id="@+id/${widgetID}_container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    gn:style="@style/menuBarLogout_relativeLayout">

    <com.ginstr.widgets.GnTextView
      android:id="@+id/${widgetID}_title"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_toLeftOf="@+id/${widgetID}_preferences"
      android:text="@string/${widgetID}"
      gn:style="@style/menuBarLogout_title" />

    <com.ginstr.widgets.GnPreferencesButton
      android:id="@+id/${widgetID}_preferences"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_toLeftOf="@+id/${widgetID}_logout"
      gn:style="@style/menuBarLogout_gnPreferencesButton"/>

    <com.ginstr.widgets.GnImageView
      android:id="@+id/${widgetID}_logout"
      android:adjustViewBounds="true"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentRight="true"
      gn:act_goLayoutBack="@+id/start"
      gn:style="@style/menuBarLogout_logout" />
  </RelativeLayout>

strings.xml

Lines to be added for each language.

<string name="${widgetID}">${widgetLabel}</string>