Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/presetgroup'
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpoole committed Aug 27, 2018
2 parents 4363c83 + 0e443bd commit be350c5
Show file tree
Hide file tree
Showing 20 changed files with 1,439 additions and 287 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ allprojects {
maven { url 'https://dl.bintray.com/content/simonpoole/div' }
maven { url 'https://dl.bintray.com/content/simonpoole/android' }
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
// flatDir {
// dirs 'lib'
// }
Expand Down Expand Up @@ -309,6 +310,7 @@ dependencies {
implementation 'ch.poole.android:numberpicker:1.0.8'
implementation 'ch.poole.android:numberpickerpreference:1.0.1'
implementation 'de.westnordost:countryboundaries:1.2'
implementation 'com.github.sevar83:indeterminate-checkbox:1.0.5@aar'
// for temp stuff during dev
// implementation(name:'alibrary', ext:'jar')

Expand Down
55 changes: 29 additions & 26 deletions documentation/docs/tutorials/presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@ __<presets>__ | | |
| icon | ignored |
| baselanguage | ignored |
| object_keys | extension | comma separated list of top-level keys
__<!-- comment -->__ | | ignored |
__<group>__ | | supported |
__<!-- comment -->__ | | ignored |
__<group>__ | | supported |
| name | supported | required
| name_context | supported |
| icon | supported | you really should add one for Vespucci
__<item>__ | | supported |
__<item>__ | | supported |
| name | supported | required
| name_context | supported |
| icon | supported | you really should add one for Vespucci
| type | supported |
| name_template | ignored |
| preset_name_label | ignored |
| deprecated | extension | only use the preset for matching and map icon display
__<chunk>__ | | supported |
__<chunk>__ | | supported |
| id | supported | required
__<reference>__ | | supported |
__<reference>__ | | supported |
| ref | supported | required
__<key>__ | | supported |
__<key>__ | | supported |
| value | supported | required
| match | supported | all values supported, "keyvalue!" is the default as in JOSM
| match | partial | "none" is supported
| text | extension | Something to display
| values_context | extension | Translation context
__<text>__ | | supported |
__<text>__ | | supported |
| key | supported | required
| text | supported |
| match | partial | only the "key" and "none" values are supported, all other values are ignored
| match | partial | only the "key", "key!" and "none" values are supported, all other values are ignored
| default | supported |
| use_last_as_default | ignored |
| auto_increment | ignored |
Expand All @@ -59,15 +59,15 @@ __<text>__ | | supported |
| javascript | extension | if value is not set, execute the JS script
| i18n | extension | if set to true this tag has i18n variants
| value_type | extension | indicate the kind of value this tag should have
__<combo>__ | | supported |
__<combo>__ | | supported |
| key | supported | required
| text | supported |
| text_context | supported |
| values | supported |
| values_sort | supported |
| delimiter | supported |
| default | supported |
| match | partial | only the "key" and "none" values are supported, all other values are ignored
| match | supported |
| display_values | supported |
| short_descriptions | partial | will only be used if display_values is not present
| values_context | supported |
Expand All @@ -77,15 +77,15 @@ __<combo>__ | | supported |
| length | ignored |
| values_no_i18n | ignored |
| values_from | supported | extension: if the target method supports a String argument the current key will be passed
__<multiselect>__ | | supported |
__<multiselect>__ | | supported |
| key | supported | required
| text | supported |
| text_context | supported |
| values | supported |
| values_sort | supported |
| delimiter | supported |
| default | supported |
| match | partial | only the "key" and "none" values are supported, all other values are ignored
| match | supported |
| display_values | supported |
| short_descriptions | partial | will only be used if display_values is not present
| values_context | supported |
Expand All @@ -96,38 +96,41 @@ __<multiselect>__ | | supported |
| values_no_i18n | ignored |
| values_from | supported | extension: if the target method supports a String argument the current key will be passed
| rows | ignored |
__<list_entry>__ | | supported |
__<list_entry>__ | | supported |
| value | supported | required
| display_value | supported |
| short_description | supported |
| icon | supported |
| icon_size | ignored |
__&lt;checkgroup&gt;__ | | ignored | but not the included <check> elements
__&lt;check&gt;__ | | supported |
__&lt;checkgroup&gt;__ | | supported |
| columns | ignored |
| text | extension |
| text_context | extension |
__&lt;check&gt;__ | | supported |
| key | supported | required
| text | supported |
| text_context | supported |
| value_on | supported |
| value_off | supported |
| disable_off | supported |
| default | supported |
| match | partial | only the "key" and "none" values are supported, all other values are ignored
__&lt;label&gt;__ | | ignored |
__&lt;space/&gt;__ | | ignored |
__&lt;optional&gt;__ | | supported | doesn't display anything
| match | supported |
__&lt;label&gt;__ | | ignored |
__&lt;space/&gt;__ | | ignored |
__&lt;optional&gt;__ | | supported | doesn't display anything
| text | ignored |
__&lt;separator/&gt;__ | | supported | starts a new row in the preset selection display
__&lt;item_separator/&gt;__ | | ignored |
__&lt;link&gt;__ | | supported |
__&lt;separator/&gt;__ | | supported | starts a new row in the preset selection display
__&lt;item_separator/&gt;__ | | ignored |
__&lt;link&gt;__ | | supported |
| href | supported | including language specific variants
__&lt;roles&gt;__ | | ignored | but not the included <role> elements
__&lt;role&gt;__ | | supported |
__&lt;roles&gt;__ | | ignored | but not the included <role> elements
__&lt;role&gt;__ | | supported |
| key | supported | required
| text | supported |
| text_context | supported |
| requisite | ignored |
| count | ignored |
| type | ignored |
| type | supported |
| member_expression | ignored |


Expand Down
2 changes: 1 addition & 1 deletion src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="25"
tools:overrideLibrary="com.nononsenseapps.filepicker,ch.poole.openinghoursfragment,ch.poole.rangebar,ch.poole.android.numberpickerpreference" />
tools:overrideLibrary="com.nononsenseapps.filepicker,ch.poole.openinghoursfragment,ch.poole.rangebar,ch.poole.android.numberpickerpreference,com.buildware.widget.indeterm" />

<!--
disable for now to see if it solves the Play Store problem of the app not showing up for many devices
Expand Down
20 changes: 10 additions & 10 deletions src/main/assets/preset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11669,14 +11669,14 @@
ja.href="http://wiki.openstreetmap.org/wiki/JA:Key:payment"
ru.href="http://wiki.openstreetmap.org/wiki/RU:Key:payment" />
<space />
<combo key="payment:cash" text="Cash" values="yes,no" display_values="Yes,No" match="keyvalue" />
<checkgroup columns="4">
<check key="payment:cash" text="Cash" match="keyvalue" />
<checkgroup text="Cash accepted" columns="4">
<check key="payment:coins" text="Coins" match="keyvalue" disable_off="true" />
<check key="payment:notes" text="Notes" text_context="payment" match="keyvalue" disable_off="true"/>
</checkgroup>
<space />
<combo key="payment:debit_cards" text="Debit cards" values="yes,no" display_values="Yes,No" match="keyvalue" />
<checkgroup columns="4">
<check key="payment:debit_cards" text="Debit cards" match="keyvalue" />
<checkgroup text="Debit card types" columns="4">
<check key="payment:bankaxess" text="BankAxess" match="keyvalue" disable_off="true" />
<check key="payment:bancomat" text="Bancomat" match="keyvalue" disable_off="true" />
<check key="payment:girocard" text="Girocard" match="keyvalue" disable_off="true" />
Expand All @@ -11686,8 +11686,8 @@
<check key="payment:visa_electron" text="Visa Electron" match="keyvalue" disable_off="true" />
</checkgroup>
<space />
<combo key="payment:credit_cards" text="Credit cards" values="yes,no" display_values="Yes,No" match="keyvalue" />
<checkgroup columns="4">
<check key="payment:credit_cards" text="Credit cards" match="keyvalue" />
<checkgroup text="Credit card types" columns="4">
<check key="payment:american_express" text="American Express" match="keyvalue" disable_off="true" />
<check key="payment:diners_club" text="Diners Club" match="keyvalue" disable_off="true" />
<check key="payment:discover_card" text="Discover Card" match="keyvalue" disable_off="true" />
Expand All @@ -11696,8 +11696,8 @@
<check key="payment:visa" text="Visa" match="keyvalue" disable_off="true" />
</checkgroup>
<space />
<combo key="payment:electronic_purses" text="Electronic purses and Charge cards" values="yes,no" display_values="Yes,No" match="keyvalue" />
<checkgroup columns="4">
<check key="payment:electronic_purses" text="Electronic purses and Charge cards" match="keyvalue" />
<checkgroup text="Electronic purses and Charge card types" columns="4">
<check key="payment:ep_avant" text="Avant (fi)" match="keyvalue" disable_off="true" />
<check key="payment:ep_cash" text="Cash (ch)" match="keyvalue" disable_off="true" />
<check key="payment:ep_chipknip" text="Chipknip (nl)" match="keyvalue" disable_off="true" />
Expand All @@ -11712,8 +11712,8 @@
<check key="payment:ep_quick" text="Quick (au)" match="keyvalue" disable_off="true" />
</checkgroup>
<space />
<combo key="payment:cryptocurrencies" text="Cryptocurrencies" values="yes,no" display_values="Yes,No" match="keyvalue" />
<checkgroup columns="4">
<check key="payment:cryptocurrencies" text="Cryptocurrencies" match="keyvalue" />
<checkgroup text="Cryptocurrencies types" columns="4">
<check key="payment:bitcoin" text="Bitcoin" match="keyvalue" disable_off="true" />
<check key="payment:litecoin" text="Litecoin" match="keyvalue" disable_off="true" />
</checkgroup>
Expand Down

0 comments on commit be350c5

Please sign in to comment.