From wiki.ginstr.com
Jump to: navigation, search
m (formatting)
Line 10: Line 10:
 
===Change image===
 
===Change image===
  
;<code>[gn:act_setSrcImage]|[drawable;target]</code>
+
:;<code>[gn:act_setSrcImage]|[drawable;target]</code>
  
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
+
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
 
! scope="col" | Parameter
 
! scope="col" | Parameter
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| [https://developer.android.com/guide/topics/resources/drawable-resource.html drawable]
+
| <code>drawable</code>
 
| [[source]] from where image will be taken
 
| [[source]] from where image will be taken
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
 
** [https://developer.android.com/guide/topics/resources/drawable-resource.html drawable]
 
** [https://developer.android.com/guide/topics/resources/drawable-resource.html drawable]
 
|-
 
|-
| [[target]]
+
| <code>[[target]]</code>
 
| [[target]] where the image will be changed
 
| [[target]] where the image will be changed
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
** [[GnImageView]]
+
** <code>[[GnImageView]]</code>
 
|-
 
|-
 
|}
 
|}
  
 
====Example====
 
====Example====
<code>@drawable/logo</code> - drawable<br>
+
:<code>@drawable/logo</code> - drawable<br>
<code>@+id/imgLogo</code> - GnImageView<br><br>
+
:<code>@+id/imgLogo</code> - <code>[[GnImageView]]</code><br>
<code>[gn:act_setSrcImage]|[@drawable/logo;@+id/imgLogo]</code>
+
:; ⤷ <code>[gn:act_setSrcImage]|[@drawable/logo;@+id/imgLogo]</code>
 
<hr>
 
<hr>

Revision as of 14:18, 12 July 2017

gn:act_setSrcImage

Description
Action used to change image drawable for specified GnImageView widget.
Action returns
void

Action signatures

Change image

[gn:act_setSrcImage]|[drawable;target]
Parameter Description
drawable source from where image will be taken
target target where the image will be changed

Example

@drawable/logo - drawable
@+id/imgLogo - GnImageView
[gn:act_setSrcImage]|[@drawable/logo;@+id/imgLogo]