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

GnCheckBox

Widget XML tag
<com.ginstr.widgets.GnCheckBox>
Description
GnCheckBox inherits regular Android CheckBox widget.
It can use action gn:act_setCheck to define events that happen when widget is checked or unchecked.

XML Attributes Description

Attribute Description
gn:s_text Displays text next to checkbox

Can be

  • @string
gn:enabled Changes widget state

Can be

  • true - enables the widget
  • false - disables the widget
gn:backgroundChecked Represents a background of true state

Can be

  • @drawable
gn:backgroundUnchecked Represents a background of false state

Can be

  • @drawable
gn:enabled Changes widget state

Can be

  • true - enables the widget
  • false - disables the widget
android:buttonTint represents a checkbox border color

Can be

  • hardcoded e.g. #00000
gn:stretchBackground stretches the background image

Can be

  • hardcoded e.g. true

Events

gn:act_setClick
gn:act_setLongClick
gn:act_setCheck

Data types

Input
status
text
Output
status

Example

<com.ginstr.widgets.GnCheckBox  
  android:id="@+id/txtToiletServiceToiletCleaningCompletedDATA"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:checked="false" />