aboutsummaryrefslogtreecommitdiff
path: root/wallet/src/main/res
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-04-15 10:25:20 -0300
committerTorsten Grote <t@grobox.de>2020-04-15 10:25:20 -0300
commit8e4f85d467c8e8109026a7195757ce9448ad7b19 (patch)
tree24b7e18e7a5620f659bd4fe4a839f7e0ef8f8d40 /wallet/src/main/res
parent8b7947a14349877120e74127a3949a73f917c3d2 (diff)
downloadtaler-android-8e4f85d467c8e8109026a7195757ce9448ad7b19.tar.gz
taler-android-8e4f85d467c8e8109026a7195757ce9448ad7b19.tar.bz2
taler-android-8e4f85d467c8e8109026a7195757ce9448ad7b19.zip
[wallet] move dev mode and TESTKUDOS into proper settings screen
Diffstat (limited to 'wallet/src/main/res')
-rw-r--r--wallet/src/main/res/drawable/ic_cash_usd_outline.xml1
-rw-r--r--wallet/src/main/res/drawable/ic_developer_mode.xml10
-rw-r--r--wallet/src/main/res/layout/fragment_settings.xml104
-rw-r--r--wallet/src/main/res/menu/balance.xml9
-rw-r--r--wallet/src/main/res/values/strings.xml6
-rw-r--r--wallet/src/main/res/xml/settings_main.xml41
6 files changed, 56 insertions, 115 deletions
diff --git a/wallet/src/main/res/drawable/ic_cash_usd_outline.xml b/wallet/src/main/res/drawable/ic_cash_usd_outline.xml
index 0e26eef..aa5b85f 100644
--- a/wallet/src/main/res/drawable/ic_cash_usd_outline.xml
+++ b/wallet/src/main/res/drawable/ic_cash_usd_outline.xml
@@ -17,6 +17,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
+ android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
diff --git a/wallet/src/main/res/drawable/ic_developer_mode.xml b/wallet/src/main/res/drawable/ic_developer_mode.xml
new file mode 100644
index 0000000..c401182
--- /dev/null
+++ b/wallet/src/main/res/drawable/ic_developer_mode.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:tint="?attr/colorControlNormal"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M7,5h10v2h2L19,3c0,-1.1 -0.9,-1.99 -2,-1.99L7,1c-1.1,0 -2,0.9 -2,2v4h2L7,5zM15.41,16.59L20,12l-4.59,-4.59L14,8.83 17.17,12 14,15.17l1.41,1.42zM10,15.17L6.83,12 10,8.83 8.59,7.41 4,12l4.59,4.59L10,15.17zM17,19L7,19v-2L5,17v4c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2v-4h-2v2z" />
+</vector>
diff --git a/wallet/src/main/res/layout/fragment_settings.xml b/wallet/src/main/res/layout/fragment_settings.xml
deleted file mode 100644
index 27c5f57..0000000
--- a/wallet/src/main/res/layout/fragment_settings.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
- ~ This file is part of GNU Taler
- ~ (C) 2020 Taler Systems S.A.
- ~
- ~ GNU Taler is free software; you can redistribute it and/or modify it under the
- ~ terms of the GNU General Public License as published by the Free Software
- ~ Foundation; either version 3, or (at your option) any later version.
- ~
- ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
- ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- ~
- ~ You should have received a copy of the GNU General Public License along with
- ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_margin="10dp"
- android:orientation="vertical"
- tools:context=".SettingsFragment">
-
-
- <TextView
- android:id="@+id/editText2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:text="@string/settings_version"
- android:textSize="18sp" />
-
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
-
- <TextView
- android:id="@+id/textView5"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@string/app_name" />
-
- <TextView
- android:id="@+id/textView4"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- tools:text="0.6.0pre8" />
-
- </LinearLayout>
-
- <Space
- android:layout_width="0dp"
- android:layout_height="15dp" />
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:text="@string/settings_backups"
- android:textSize="18sp"
- android:visibility="gone" />
-
- <Button
- android:id="@+id/button_backup_export"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/settings_export_to_file"
- android:visibility="gone" />
-
- <Button
- android:id="@+id/button_backup_import"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/settings_import_from_file"
- android:visibility="gone" />
-
-
- <TextView
- android:id="@+id/devSettingsTitle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:text="@string/settings_developer"
- android:textSize="18sp" />
-
- <!--
- <Button
- android:text="Withdraw TESTKUDOS"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/button_withdraw_testkudos"/>-->
-
- <Button
- android:id="@+id/button_reset_wallet_dangerously"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/settings_reset" />
-
-</LinearLayout>
diff --git a/wallet/src/main/res/menu/balance.xml b/wallet/src/main/res/menu/balance.xml
index 1685526..d4568d4 100644
--- a/wallet/src/main/res/menu/balance.xml
+++ b/wallet/src/main/res/menu/balance.xml
@@ -16,13 +16,4 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
- <item
- android:id="@+id/reload_balance"
- android:title="@string/menu_balance_reload"
- app:showAsAction="never" />
- <item
- android:id="@+id/developer_mode"
- android:checkable="true"
- android:title="@string/menu_developer_mode"
- app:showAsAction="never" />
</menu>
diff --git a/wallet/src/main/res/values/strings.xml b/wallet/src/main/res/values/strings.xml
index 357aedc..8eec297 100644
--- a/wallet/src/main/res/values/strings.xml
+++ b/wallet/src/main/res/values/strings.xml
@@ -97,7 +97,6 @@
<string name="withdraw_total">Withdraw</string>
<string name="withdraw_fees">Fee</string>
<string name="withdraw_exchange">Exchange</string>
- <string name="withdraw_button_testkudos">Withdraw TESTKUDOS</string>
<string name="withdraw_button_confirm">Confirm Withdraw</string>
<string name="withdraw_button_tos">Review Terms</string>
<string name="withdraw_error_title">Withdrawal Error</string>
@@ -129,8 +128,11 @@
<string name="settings_backups">Backups</string>
<string name="settings_export_to_file">Export wallet to file</string>
<string name="settings_import_from_file">Import from file</string>
- <string name="settings_developer">Developer Settings (use with caution!)</string>
+ <string name="settings_withdraw_testkudos">Withdraw TESTKUDOS</string>
+ <string name="settings_withdraw_testkudos_summary">Get money for testing</string>
<string name="settings_reset">Reset Wallet (dangerous!)</string>
+ <string name="settings_reset_summary">Throws away your money</string>
+ <string name="settings_dev_mode_summary">Shows more information intended for debugging</string>
<string name="refund_error">Error processing refund</string>
<string name="refund_success">Refund received</string>
diff --git a/wallet/src/main/res/xml/settings_main.xml b/wallet/src/main/res/xml/settings_main.xml
new file mode 100644
index 0000000..90f5f6c
--- /dev/null
+++ b/wallet/src/main/res/xml/settings_main.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ This file is part of GNU Taler
+ ~ (C) 2020 Taler Systems S.A.
+ ~
+ ~ GNU Taler is free software; you can redistribute it and/or modify it under the
+ ~ terms of the GNU General Public License as published by the Free Software
+ ~ Foundation; either version 3, or (at your option) any later version.
+ ~
+ ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License along with
+ ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ -->
+
+<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools">
+
+ <SwitchPreferenceCompat
+ app:icon="@drawable/ic_developer_mode"
+ app:key="pref_dev_mode"
+ app:summary="@string/settings_dev_mode_summary"
+ app:title="@string/menu_developer_mode" />
+
+ <Preference
+ app:icon="@drawable/ic_cash_usd_outline"
+ app:isPreferenceVisible="false"
+ app:key="pref_testkudos"
+ app:summary="@string/settings_withdraw_testkudos_summary"
+ app:title="@string/settings_withdraw_testkudos"
+ tools:isPreferenceVisible="true" />
+
+ <Preference
+ app:isPreferenceVisible="false"
+ app:key="pref_reset"
+ app:summary="@string/settings_reset_summary"
+ app:title="@string/settings_reset"
+ tools:isPreferenceVisible="true" />
+
+</PreferenceScreen>