From wiki.ginstr.com
Jump to: navigation, search
m
(Events)
 
(11 intermediate revisions by 2 users not shown)
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"><code>GnImageView</code></span>
 
[[Category:Widget_Library]]
 
[[Category:Widget_Library]]
;Inherited classes: <code>[http://developer.android.com/reference/android/view/View.html View]</code>
 
;Android class type: <code>[http://developer.android.com/reference/android/widget/ImageView.html ImageView]</code>
 
;Widget XML tag: <code><com.ginstr.widgets.GnImageView></code>
 
  
 +
;Widget XML tag
 +
: <code><com.ginstr.widgets.GnImageView></code>
 +
 +
;Description
 +
: <code>[http://developer.android.com/reference/android/widget/ImageView.html ImageView]</code> with some additional features.
  
<code>[[GnImageView]]</code> is <code>[http://developer.android.com/reference/android/widget/ImageView.html ImageView]</code> with some additional features.
 
 
==XML Attributes Description==
 
==XML Attributes Description==
 
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
Line 13: Line 15:
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| title="Attribute" | <code>[[#gn:rotation|gn:rotation]]</code>
+
| title="Attribute" | <code>gn:rotation</code>
 
| title="Description" | Sets rotation angle
 
| title="Description" | Sets rotation angle
 +
Can be
 +
* hardcoded, (Float) values = <code>-90.0</code> to <code>+90.0</code>
 
|-
 
|-
| title="Attribute" | <code>[[#gn:setBackgroundPressed|gn:setBackgroundPressed]]</code>
+
| title="Attribute" | <code>gn:setBackgroundPressed</code>
| title="Description" | Sets pressed background image for [http://developer.android.com/reference/android/widget/ImageView.html ImageView]. It can also be used on standard [http://developer.android.com/reference/android/widget/ImageView.html ImageView]
+
| title="Description" | Sets pressed background image for <code>[http://developer.android.com/reference/android/widget/ImageView.html ImageView]</code>. It can also be used on standard <code>[http://developer.android.com/reference/android/widget/ImageView.html ImageView]</code>
 +
Can be
 +
* <code>@drawable</code>
 
|}
 
|}
  
==gn:rotation==
+
==Events==
Sets rotation angle
+
: <code>[[gn:act_setClick]]</code>
 +
: <code>[[gn:act_setLongClick]]</code>
  
''(Float)'' values = <code>-90.0</code> to <code>+90.0</code>
+
==Data types==
 +
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 +
|-
 +
! scope="col" | Input
 +
|-
 +
| title="Value" | <code>[[Datatypes#pictures|pictures]]</code>
 +
|}
  
==gn:setBackgroundPressed==
+
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
Sets pressed background image for [http://developer.android.com/reference/android/widget/ImageView.html ImageView].
+
|-
It can also be used on standard [http://developer.android.com/reference/android/widget/ImageView.html ImageView]
+
! scope="col" | Output
 +
|-
 +
| title="Value" | <code>[[Datatypes#pictures|pictures]]</code>
 +
|}
  
''(Drawable)'' values = <code>@drawable/nameOfImageFile</code>
+
==Example==
 +
<syntaxhighlight code="xml">
 +
<com.ginstr.widgets.GnImageView
 +
  android:id="@+id/readNfcTagImage"
 +
  android:layout_height="wrap_content"
 +
  android:layout_width="match_parent"
 +
  android:src="@drawable/read"
 +
  gn:style="@style/start_gnImageViewFooter"/>
 +
</syntaxhighlight>

Latest revision as of 10:42, 8 August 2019

GnImageView

Widget XML tag
<com.ginstr.widgets.GnImageView>
Description
ImageView with some additional features.

XML Attributes Description

Attribute Description
gn:rotation Sets rotation angle

Can be

  • hardcoded, (Float) values = -90.0 to +90.0
gn:setBackgroundPressed Sets pressed background image for ImageView. It can also be used on standard ImageView

Can be

  • @drawable

Events

gn:act_setClick
gn:act_setLongClick

Data types

Input
pictures
Output
pictures

Example

<com.ginstr.widgets.GnImageView
  android:id="@+id/readNfcTagImage"
  android:layout_height="wrap_content"
  android:layout_width="match_parent"
  android:src="@drawable/read"
  gn:style="@style/start_gnImageViewFooter"/>