GnMediaGallery
- Widget XML tag
<com.ginstr.widgets.GnMediaGallery>
- Description
- Widget which shows media items as images in table view. It is a composite control made of
TableLayout
,TableRow
andImageView
. - Clicking on the selected image will display it in full screen mode as a top overlay item.
- It can be used in conjunction with
GnMediaAction
widget, e.g. usegn:act_copyData
action to display a picture in gallery widget just after the picture is taken.
XML Attributes Description
Attribute | Description |
---|---|
gn:numberOfColumns *
|
Defines number of displayed items per row
Can be
|
gn:itemHorizontalSpacing
|
Defines horizontal spacing between columns
Can be
|
gn:itemVerticalSpacing
|
Defines vertical spacing between rows
Can be
|
gn:itemSameSize
|
Defines how the images will be displayed in the widget. By default true is set.
Can be
|
gn:clearOnNewDataAdd
|
If set to true , each time data is added to gallery all previous data will be removed from it
Can be
|
gn:allowPhotoDeletion
|
If set to true , it will allow user to delete photos from related GnMediaAction , in order to use this attribute gn:mediaActionId has to be present on current widget and point to valid GnMediaAction widget. When user long clicks on an image in gallery or image preview it will show dialog to delete image. (milestone 101)
Can be
|
gn:mediaActionId
|
id of GnMediaAction widget which is used to display images in this widget. (milestone 101)
Can be
|
gn:dataType
|
Defines datatype of widget |
gn:customDeleteImageTitle
|
Overrides delete image dialog "title" default message $msgBoxDeleteImageTitle
Can be
|
gn:customDeleteImageContent
|
Overrides delete image dialog "content" default message $msgBoxDeleteImageContent
Can be
|
gn:customDeleteImageYes
|
Overrides delete image dialog "yes" default message $msgBoxDeleteImageYes
Can be
|
gn:customDeleteImageNo
|
Overrides delete image dialog "no" default message $msgBoxDeleteImageNo
Can be
|
gn:editMode (M104)
|
Represents a mode where drawing tools can be used for drawing
Can be
|
Events
Data types
Input |
---|
video
|
audio
|
documents
|
pictures
|
signature
|
Output |
---|
video
|
audio
|
documents
|
pictures
|
signature
|
Example
<com.ginstr.widgets.GnMediaGallery android:id="@+id/cleaningServicePhotosShow" android:layout_width="match_parent" android:layout_height="wrap_content" gn:numberOfColumns="3" gn:itemHorizontalSpacing="5" gn:itemVerticalSpacing="5" gn:itemSameSize="true" />