Create prefs dialog for backup/restore

This commit is contained in:
jacques 2024-06-11 20:45:07 +02:00
parent 95159673d5
commit b29be4fc8a

View file

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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/cl_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="16dp"
tools:ignore="HardcodedText"
tools:context=".DrugListActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/btn_addFruit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="32dp"
android:src="@drawable/ic_add"
android:contentDescription="Add new Fruit" />
<LinearLayout
android:id="@+id/ll_properties"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="160dp"
android:orientation="vertical"
android:padding="16dp"
app:layout_anchor="@+id/constraintLayout"
app:layout_anchorGravity="center">
<RadioGroup
android:id="@+id/radio_select"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal">
<RadioButton
android:id="@+id/backup_btn"
android:layout_width="194dp"
android:layout_height="wrap_content"
android:text="@string/export_prescriptions"/>
<RadioButton
android:id="@+id/restore_btn"
android:layout_width="194dp"
android:layout_height="wrap_content"
android:text="@string/import_prescriptions" />
</RadioGroup>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/btn_backup_location"
style="@style/Widget.MaterialComponents.Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:background="@drawable/rounded_btn"
android:text="Backup Location"
android:textAllCaps="false"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="@android:color/white" />
<Button
android:id="@+id/btn_properties"
style="@style/Widget.MaterialComponents.Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_weight="1"
android:background="@drawable/rounded_btn"
android:text="Properties"
android:textAllCaps="false"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="@android:color/white" />
</LinearLayout>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>