From wiki.ginstr.com
Jump to: navigation, search
(Created page with "<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div> <span STYLE="font-size: xx-large"><code>gn:act_goToLoginScreen</code></span> Category:Action_Library...")
 
Line 3: Line 3:
 
[[Category:Action_Library]]
 
[[Category:Action_Library]]
  
;Description: Action is used to get <code>[[Datatypes#text|text]]</code> value which can be a substring or entire value from source and store it into to a target.
+
;Description: Action is used to returns user to Login screen.
  
  
Line 9: Line 9:
 
==Action signatures==
 
==Action signatures==
  
:;<code>[gn:act_getTextByRegex]|[source,target,regex]</code>
+
:;<code>[gn:act_goToLoginScreen]|[]</code>
:;<code>[gn:act_getTextByRegex]|[source,target,regex,matchNumber]</code>
 
 
 
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
! scope="col" | Parameter
 
! scope="col" | Description
 
|-
 
| <code>source</code>
 
| [[source]] source from which value will be used.
 
* Valid [[source]]:
 
**<code>[[Datatypes#text|text]]</code>
 
|-
 
| <code>target</code>
 
| [[target]] target to which "regexed" value will be stored.
 
* Valid [[target]]:
 
**<code>[[Datatypes#text|text]]</code>
 
|-
 
| <code>regex</code>
 
| [[target]] Regular expression pattern which is used on source value to extract whole or part of text value.
 
* Valid [[target]]:
 
**<code>[[Datatypes#text|text]]</code>
 
|-
 
| (optional)<br><code>matchNumber</code>
 
| <code>matchNumber</code> number of match from which we want to extract text (in case there is more matches by regex pattern), by default first match will be returned (0) if this value is ommited. If number is bigger than count of matches that are returned <code>null</code> will be stored into target. If parameter is omitted value 0 is used.
 
* Valid value:
 
**Integer numerical value, i.e. 1, 2,...10
 
|}
 
 
 
====Example====
 
 
 
=====initial target value=====
 
:<code>@variable/target</code> = <code></code>
 
 
 
=====variables.xml=====
 
<syntaxhighlight lang="xml">
 
<variable id="textualSourceValue" type="text" defaultValue="">this is my text|with some other stuff|and some more stuff|which needs to be stored into somewhere|soome as other |</variable>
 
<variable id="target" type="text" defaultValue=""></variable>
 
</syntaxhighlight>
 
 
 
=====strings.xml=====
 
<syntaxhighlight lang="xml">
 
<string name="pattern">(.+?)\|</string>
 
</syntaxhighlight>
 
 
 
=====screen.xml=====
 
<syntaxhighlight lang="xml">
 
<FrameLayout
 
    android:id="@+id/exampleFrame"
 
    android:layout_width="wrap_content"
 
    android:layout_height="wrap_content"
 
    android:visibility="gone"
 
    gn:act_set="[gn:act_getTextByRegex]|[@variable/textualSourceValue,@variable/target,@string/pattern,1]" />
 
</syntaxhighlight>
 
 
 
=====after action execution target=====
 
:<code>@variable/target</code> = <code>with some other stuff</code>
 
 
<hr>
 
<hr>

Revision as of 09:07, 26 October 2017

gn:act_goToLoginScreen

Description
Action is used to returns user to Login screen.


Action returns
void

Action signatures

[gn:act_goToLoginScreen]|[]