From wiki.ginstr.com
Revision as of 16:39, 28 June 2016 by Mark (talk | contribs) (Created page with "<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div> Category:Widget_Library ;Inherited classes: <code>[http://developer.android.com/reference/android/vi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Inherited classes
View
Android class type
TableLayout
Child elements
TableRow, ImageView
Widget XML tag
<com.ginstr.widgets.GnMediaGallery>

Widget which shows media items as images in table view. It is a composite control made of TableLayout, TableRow and ImageView.

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. 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
#gn:itemHorizontalSpacing Defines horizontal spacing between columns
#gn:itemVerticalSpacing Defines vertical spacing between rows
#gn:itemSameSize Defines how the images will be displayed in the widget
#gn:backgroundItemColor Defines the background color of ImageViews
#gn:clearOnNewDataAdd If set to true, each time data is added to gallery all previous data will be removed from it

gn:numberOfColumns

Defines number of displayed items per row

(Integer) values i.e. = 1, 2, 4, ...

Default value = 3

gn:itemHorizontalSpacing

Defines horizontal spacing between columns

(Integer) values i.e. = 1, 2, 4, ... (expressed in dp)

Default value = 5 (dp)

gn:itemVerticalSpacing

Defines vertical spacing between rows

(Integer) values i.e. = 1, 2, 4, ... (expressed in dp)

Default value = 5 (dp)

gn:itemSameSize

Defines how the images will be displayed in the widget

(Boolean) values = true, false

Value Description
true Images will be cropped to the same size
false Images will be displayed with original aspect ratio

gn:backgroundItemColor

Defines the background color of ImageViews

(Hex) values i.e. = #000000 (hex color value)

Default value = #7FFFFFFF (transparent)

gn:clearOnNewDataAdd

If set to true, each time data is added to gallery all previous data will be removed from it

(Boolean) values = true, false