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

Button clean widgets

Widget preforms clean of content from targeted widgets.

Widget id, ${gbamID}:

buttonCleanWidgets

Back to GBAM widgets table

Predefined user data

PreLoaded

Properties panel

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

GENERAL
VALIDATIONS
  • -
ACTION
  • "widgets to clean", ${listofWidgetIds} - comma separated list of @+id/${widgetID}. List represents all widgets which have checkbox "is part of database". User can modify the selection and also select multiple widgets
ACTION MESSAGES
  • -

Code snippets

GBAM Code Variables

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

  • ${widgetID}
  • ${listofVariableIds} - comma separated list of @variable/${widgetID}. Represents all variables (related to widgets) which have checkbox "is part of database"

GBAM Code Events

${eventBefore}

${eventAfter}

Common widget code

<com.ginstr.widgets.GnButton
  android:id="@+id/${widgetID}_button"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:text="@string/${widgetID}"
  gn:act_setClick="${eventBefore}[gn:act_cleanWidgets]|[${listofWidgetIds}],[gn:act_resetVariables]|[${listofVariableIds}]${eventAfter}"
  gn:style="@style/buttonCleanWidgets_button"/>

strings.xml

Lines to be added for each language.

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