summaryrefslogtreecommitdiff
path: root/wallet/src/main/res
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2023-11-14 14:13:51 -0600
committerTorsten Grote <t@grobox.de>2023-11-28 13:59:37 -0300
commitba51b5e541d888cafdbf479a7e03a116af7050c5 (patch)
treea8b893bd8dd0212cba11cd0af75e95eb8b7a7bd0 /wallet/src/main/res
parent94ee3a2f114e0345ea7408aacc30e3da9545474c (diff)
downloadtaler-android-ba51b5e541d888cafdbf479a7e03a116af7050c5.tar.gz
taler-android-ba51b5e541d888cafdbf479a7e03a116af7050c5.tar.bz2
taler-android-ba51b5e541d888cafdbf479a7e03a116af7050c5.zip
[wallet] Proper DB import/export functionality
Diffstat (limited to 'wallet/src/main/res')
-rw-r--r--wallet/src/main/res/drawable/ic_archive.xml21
-rw-r--r--wallet/src/main/res/values/strings.xml6
-rw-r--r--wallet/src/main/res/xml/settings_main.xml8
3 files changed, 34 insertions, 1 deletions
diff --git a/wallet/src/main/res/drawable/ic_archive.xml b/wallet/src/main/res/drawable/ic_archive.xml
new file mode 100644
index 0000000..58a032c
--- /dev/null
+++ b/wallet/src/main/res/drawable/ic_archive.xml
@@ -0,0 +1,21 @@
+<!--
+ ~ This file is part of GNU Taler
+ ~ (C) 2023 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/>
+ -->
+
+<vector android:height="24dp" android:tint="?attr/colorControlNormal"
+ android:viewportHeight="24" android:viewportWidth="24"
+ android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M20.54,5.23l-1.39,-1.68C18.88,3.21 18.47,3 18,3H6c-0.47,0 -0.88,0.21 -1.16,0.55L3.46,5.23C3.17,5.57 3,6.02 3,6.5V19c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V6.5c0,-0.48 -0.17,-0.93 -0.46,-1.27zM12,17.5L6.5,12H10v-2h4v2h3.5L12,17.5zM5.12,5l0.81,-1h12l0.94,1H5.12z"/>
+</vector>
diff --git a/wallet/src/main/res/values/strings.xml b/wallet/src/main/res/values/strings.xml
index 3b05ae9..2533820 100644
--- a/wallet/src/main/res/values/strings.xml
+++ b/wallet/src/main/res/values/strings.xml
@@ -257,10 +257,14 @@ GNU Taler is immune against many types of fraud, such as phishing of credit card
<string name="settings_logcat_summary">Save internal log</string>
<string name="settings_logcat_error">Error exporting log</string>
<string name="settings_logcat_success">Log exported to file</string>
- <string name="settings_db_export">Database</string>
+ <string name="settings_db_export">Export database</string>
<string name="settings_db_export_summary">Save internal database</string>
+ <string name="settings_db_import">Import database</string>
+ <string name="settings_db_import_summary">Restore database from file</string>
<string name="settings_db_export_error">Error exporting database</string>
+ <string name="settings_db_import_error">Error importing database</string>
<string name="settings_db_export_success">Database exported to file</string>
+ <string name="settings_db_import_success">Database imported from file</string>
<string name="settings_version_app">App Version</string>
<string name="settings_version_core">Wallet Core Version</string>
<string name="settings_version_protocol_exchange">Supported Exchange Versions</string>
diff --git a/wallet/src/main/res/xml/settings_main.xml b/wallet/src/main/res/xml/settings_main.xml
index 3a6d991..739e119 100644
--- a/wallet/src/main/res/xml/settings_main.xml
+++ b/wallet/src/main/res/xml/settings_main.xml
@@ -56,6 +56,14 @@
tools:isPreferenceVisible="true" />
<Preference
+ app:icon="@drawable/ic_archive"
+ app:isPreferenceVisible="false"
+ app:key="pref_import_db"
+ app:summary="@string/settings_db_import_summary"
+ app:title="@string/settings_db_import"
+ tools:isPreferenceVisible="true" />
+
+ <Preference
app:icon="@drawable/ic_account_balance_wallet"
app:isPreferenceVisible="false"
app:key="pref_version_app"