(→Location of strings.xml) |
m (added category) |
||
(4 intermediate revisions by one other user 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">arrays.xml</span> | <span STYLE="font-size: xx-large">arrays.xml</span> | ||
− | + | [[Category:XML_files]] | |
:'''arrays.xml''' is an XML file which holds all translations of specific list for ginstr app. | :'''arrays.xml''' is an XML file which holds all translations of specific list for ginstr app. | ||
:Each array in '''arrays.xml''' can have additional array with values which will be used internally by ginstr launcher, while text array will be displayed to users. | :Each array in '''arrays.xml''' can have additional array with values which will be used internally by ginstr launcher, while text array will be displayed to users. | ||
Line 37: | Line 37: | ||
</resources> | </resources> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | :If above <code>percentages</code> array is used in [[GnDropDown]], in this case it will display values from <code>percentages</code> array, but actually the value from <code>percentages_value</code> array will be e.g. stored into a database. | ||
==Location of arrays.xml== | ==Location of arrays.xml== |
Latest revision as of 21:23, 12 July 2017
arrays.xml
- arrays.xml is an XML file which holds all translations of specific list for ginstr app.
- Each array in arrays.xml can have additional array with values which will be used internally by ginstr launcher, while text array will be displayed to users.
value arrays
must have the same name as text array with additional suffix_value
like in example below.
Example
<?xml version="1.0" encoding="utf-8"?> <resources> <string-array name="percentages"> <item>10%</item> <item>20%</item> <item>30%</item> <item>40%</item> <item>50%</item> <item>60%</item> <item>70%</item> <item>80%</item> <item>90%</item> <item>100%</item> </string-array> <string-array name="percentages_value"> <item>10</item> <item>20</item> <item>30</item> <item>40</item> <item>50</item> <item>60</item> <item>70</item> <item>80</item> <item>90</item> <item>100</item> </string-array> </resources>
- If above
percentages
array is used in GnDropDown, in this case it will display values frompercentages
array, but actually the value frompercentages_value
array will be e.g. stored into a database.
Location of arrays.xml
arrays.xml should be saved in "values" folder in ginstr app root folder.