mirror of
https://github.com/woheller69/solxpect.git
synced 2026-02-02 22:51:49 +01:00
add backup/restore
This commit is contained in:
parent
67027dc8e6
commit
7a2edcf814
12 changed files with 297 additions and 2 deletions
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M480,560q-33,0 -56.5,-23.5T400,480q0,-33 23.5,-56.5T480,400q33,0 56.5,23.5T560,480q0,33 -23.5,56.5T480,560ZM480,840q-139,0 -241,-91.5T122,520h82q14,104 92.5,172T480,760q117,0 198.5,-81.5T760,480q0,-117 -81.5,-198.5T480,200q-69,0 -129,32t-101,88h110v80L120,400L120,160h80v94q51,-64 124.5,-99T480,120q75,0 140.5,28.5t114,77q48.5,48.5 77,114T840,480q0,75 -28.5,140.5t-77,114q-48.5,48.5 -114,77T480,840Z"/>
|
||||
</vector>
|
||||
15
app/src/main/res/drawable/ic_warning_amber_black_24dp.xml
Normal file
15
app/src/main/res/drawable/ic_warning_amber_black_24dp.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M12,5.99L19.53,19H4.47L12,5.99M12,2L1,21h22L12,2L12,2z"
|
||||
android:fillColor="@color/orange"/>
|
||||
<path
|
||||
android:pathData="M13,16l-2,0l0,2l2,0z"
|
||||
android:fillColor="@color/orange"/>
|
||||
<path
|
||||
android:pathData="M13,10l-2,0l0,5l2,0z"
|
||||
android:fillColor="@color/orange"/>
|
||||
</vector>
|
||||
52
app/src/main/res/layout/activity_backuprestore.xml
Normal file
52
app/src/main/res/layout/activity_backuprestore.xml
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:openDrawer="start">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".activities.BackupRestoreActivity">
|
||||
|
||||
<include layout="@layout/toolbar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/backup_database"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:onClick="performBackup"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/restore_database"
|
||||
android:onClick="performRestore"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:fitsSystemWindows="true"
|
||||
app:headerLayout="@layout/nav_header_main"
|
||||
app:menu="@menu/activity_main_drawer" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
||||
|
|
@ -25,6 +25,10 @@
|
|||
android:id="@+id/nav_help"
|
||||
android:icon="@drawable/ic_help_24px"
|
||||
android:title="@string/activity_help" />
|
||||
<item
|
||||
android:id="@+id/nav_backuprestore"
|
||||
android:icon="@drawable/ic_settings_backup_restore_24px"
|
||||
android:title="@string/activity_backuprestore" />
|
||||
<item
|
||||
android:id="@+id/nav_about"
|
||||
android:icon="@drawable/ic_info_24px"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<string name="about">Über</string>
|
||||
<string name="about_privacy_heading">Privatsphäre-Informationen</string>
|
||||
<string name="about_more_info">Mehr Informationen können gefunden werden auf:</string>
|
||||
<string name="about_license_text">Diese App ist abgeleitet von Privacy Friendly Weather, entwickelt von der Forschungsgruppe SECUSO. Quelltext lizenziert unter GPLv3. Die App benutzt Icons von Google Material Design Icons, lizenziert unter Apache License Version 2.0, die Leaflet Bibliothek, lizenziert unter 2-clause BSD License, AutoSuggestTextViewAPICall, lizenziert unter der Apache License Version 2.0, Solarpositioning (net.e175.klaus:solarpositioning), lizenziert unter MIT Lizenz und die WilliamChart Bibliothek (com.db.chart), lizenziert unter der Apache License Version 2.0</string>
|
||||
<string name="about_license_text">Diese App ist abgeleitet von Privacy Friendly Weather, entwickelt von der Forschungsgruppe SECUSO. Quelltext lizenziert unter GPLv3. Die App benutzt Icons von Google Material Design Icons, lizenziert unter Apache License Version 2.0, die Leaflet Bibliothek, lizenziert unter 2-clause BSD License, AutoSuggestTextViewAPICall, lizenziert unter der Apache License Version 2.0, Solarpositioning (net.e175.klaus:solarpositioning), lizenziert unter MIT Lizenz, Zip4j, lizenziert unter Apache License Version 2.0 und die WilliamChart Bibliothek (com.db.chart), lizenziert unter der Apache License Version 2.0</string>
|
||||
<string name="about_license">Lizenz</string>
|
||||
<string name="about_privacy_answer">solXpect benötigt nur Zugang zum Internet. Es werden weder persönliche Daten gesammelt, noch wird Werbung angezeigt.</string>
|
||||
<string name="about_where_from">Woher kommen die Wetterinformationen?</string>
|
||||
|
|
@ -95,5 +95,12 @@
|
|||
<string name="action_sun_position">Sonnenposition</string>
|
||||
<string name="action_sun_elevation">Elevation [°]</string>
|
||||
<string name="edit_location_hint_cells_temp_coeff">Temperaturkoeffizient [%/K]</string>
|
||||
<string name="activity_backuprestore">Sichern/Wiederherstellen</string>
|
||||
<string name="backup_database">Datenbank sichern</string>
|
||||
<string name="restore_database">Datenbank wiederherstellen</string>
|
||||
<string name="permission_required">Berechtigung erforderlich</string>
|
||||
<string name="permission_message">%s benötigt Zugriff auf den externen Speicher. Bitte die Berechtigung erteilen und erneut versuchen.</string>
|
||||
<string name="toast_delete">Bitte die Datei zuerst löschen und erneut versuchen.</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<string name="about">About</string>
|
||||
<string name="version_number" translatable="false">Version</string>
|
||||
<string name="about_license">License</string>
|
||||
<string name="about_license_text">This application is derived from Privacy Friendly Weather, developed by the research group SECUSO. Sourcecode licensed under GPLv3. The app uses icons from Google Material Design Icons licensed under Apache License Version 2.0, the Leaflet library which is licensed under 2-clause BSD License, AutoSuggestTextViewAPICall which is licensed under Apache License Version 2.0, Solarpositioning (net.e175.klaus:solarpositioning) which is licensed under MIT License, and WilliamChart library (com.db.chart) which is licensed under Apache License Version 2.0</string>
|
||||
<string name="about_license_text">This application is derived from Privacy Friendly Weather, developed by the research group SECUSO. Sourcecode licensed under GPLv3. The app uses icons from Google Material Design Icons licensed under Apache License Version 2.0, the Leaflet library which is licensed under 2-clause BSD License, AutoSuggestTextViewAPICall which is licensed under Apache License Version 2.0, Solarpositioning (net.e175.klaus:solarpositioning) which is licensed under MIT License, Zip4j (https://github.com/srikanth-lingala/zip4j) which is licensed under Apache License Version 2.0, and WilliamChart library (com.db.chart) which is licensed under Apache License Version 2.0</string>
|
||||
<string name="about_more_info">More information can be found on:</string>
|
||||
<string name="about_github" translatable="false"><a href="https://github.com/woheller69/solxpect">Github-Repo</a></string>
|
||||
<string name="about_openmeteo" translatable="false"><a href="https://open-meteo.com">Open-Meteo \n(Attribution 4.0 International CC BY 4.0)</a></string>
|
||||
|
|
@ -98,4 +98,10 @@
|
|||
<string name="action_sun_position">Sun position</string>
|
||||
<string name="action_sun_elevation">Elevation [°]</string>
|
||||
<string name="edit_location_hint_cells_temp_coeff">Temperature coefficient [%/K]</string>
|
||||
<string name="activity_backuprestore">Backup/Restore</string>
|
||||
<string name="backup_database">Backup database</string>
|
||||
<string name="restore_database">Restore database</string>
|
||||
<string name="permission_required">Permission required</string>
|
||||
<string name="permission_message">%s needs access to external storage. Please accept permission and try again.</string>
|
||||
<string name="toast_delete">Please delete file and try again</string>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue