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

Horizontal divider

Widget is used to separate content horizontally on screen.

Widget id, ${gbamID}:

appearanceHorizontalDivider

Back to GBAM widgets table

Predefined user data

PreLoaded

  • -

Properties panel

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

GENERAL
  • "line thickness", values 1 to 100 should be allowed for ${thickness}. Default value 10.
  • "line alignment", allowed values for ${alignment}: "left", "center", "right". Default value "center".
  • "line width", values 1-100 should be allowed for ${width}. Default value 100.
  • usage of layout is decided as follows:
    • user customizes "line thickness" only then default layout should be used
    • user customizes "line alignment" and / or "line width" then custom layout custom layout should be used
VALIDATIONS
  • -
ACTION
  • -
ACTION MESSAGES
  • -

Code snippets

GBAM Code Variables

  • -

Available layouts

default layout

<com.ginstr.widgets.GnImageView
    android:layout_height="${thickness}dp"
    android:layout_width="match_parent"
    gn:style="@style/appearanceHorizontalDivider_line"/>


custom layout

<LinearLayout
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:gravity="${alignment}" 
    android:weightSum="100"> 

    <com.ginstr.widgets.GnImageView
        android:layout_height="${thickness}dp" 
        android:layout_width="0dp" 
        android:layout_weight="${width}" 
        gn:style="@style/appearanceHorizontalDivider_line"/>
</LinearLayout>