From wiki.ginstr.com
Jump to: navigation, search
m (XML Attributes Description)
m
Line 1: Line 1:
 
<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div>
 
<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div>
 +
<span STYLE="font-size: xx-large">GnMediaGallery</span>
 
[[Category:Widget_Library]]
 
[[Category:Widget_Library]]
 
;Inherited classes: <code>[http://developer.android.com/reference/android/view/View.html View]</code>
 
;Inherited classes: <code>[http://developer.android.com/reference/android/view/View.html View]</code>

Revision as of 11:54, 3 July 2016

GnMediaGallery

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