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

Photo read only

Widget is represented by gallery. When data is loaded into widget pictures are displayed. Image is shown in gallery and not editable by user.

Widget id, ${gbamID}:

mediaPhotoReadOnly

Back to GBAM widgets table

Datatypes

Value is stored from widget to database as pictures datatype.

Predefined user data

PreLoaded

Properties panel

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

GENERAL
VALIDATIONS
  • -
ACTION
  • -
ACTION MESSAGES
  • -
DATABASE
  • "is part of database", checkbox option by default is set as checked. When checked database column is created for this widget.
  • "additional ginstr web column settings":
  • "replicate", if true, replicates audios from server to android client, add to configuration.xml:
<columnPicture>
    <replicate>true|false</replicate>
</columnPicture>

Code snippets

GBAM Code Variables

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

Common widget code

<com.ginstr.widgets.GnTextView
        android:id="@+id/${widgetID}_label"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:text="@string/${widgetID}"
        gn:style="@style/mediaPhotoReadOnly_label"/>


<com.ginstr.widgets.GnMediaGallery
    android:id="@+id/${widgetID}_gallery"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    gn:style="@style/mediaPhotoReadOnly_gallery" />

strings.xml

Lines to be added for each language.

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