Moved export/import to settings tab page

pull/212/head
M66B 2 years ago
parent 36317c32dc
commit 91baed2d69

File diff suppressed because it is too large Load Diff

@ -78,7 +78,8 @@ public class FragmentOptions extends FragmentBase {
R.layout.fragment_options_privacy,
R.layout.fragment_options_encryption,
R.layout.fragment_options_notifications,
R.layout.fragment_options_misc
R.layout.fragment_options_misc,
R.layout.fragment_options_backup
};
static final int[] PAGE_TITLES = {
@ -91,7 +92,8 @@ public class FragmentOptions extends FragmentBase {
R.string.title_advanced_section_privacy,
R.string.title_advanced_section_encryption,
R.string.title_advanced_section_notifications,
R.string.title_advanced_section_misc
R.string.title_advanced_section_misc,
R.string.title_advanced_section_backup
};
static final int[] PAGE_ICONS = {
@ -104,7 +106,8 @@ public class FragmentOptions extends FragmentBase {
R.drawable.twotone_account_circle_24,
R.drawable.twotone_lock_24,
R.drawable.twotone_notifications_24,
R.drawable.twotone_more_24
R.drawable.twotone_more_24,
R.drawable.twotone_save_alt_24
};
static final List<String> TAB_LABELS = Collections.unmodifiableList(Arrays.asList(
@ -117,7 +120,8 @@ public class FragmentOptions extends FragmentBase {
"privacy",
"encryption",
"notifications",
"misc"
"misc",
"backup"
));
static String[] OPTIONS_RESTART = new String[]{
@ -506,6 +510,8 @@ public class FragmentOptions extends FragmentBase {
return new FragmentOptionsNotifications();
case 9:
return new FragmentOptionsMisc();
case 10:
return new FragmentOptionsBackup();
default:
throw new IllegalArgumentException();
}

@ -104,7 +104,7 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
public void onClick(View v) {
v.getContext().startActivity(new Intent(v.getContext(), ActivitySetup.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("navigate", true));
.putExtra("tab", "backup"));
}
});

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<eu.faircode.email.ScrollViewEx 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/scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="6dp"
android:paddingTop="12dp"
android:paddingEnd="6dp"
android:paddingBottom="0dp"
android:scrollbarStyle="outsideOverlay"
tools:context=".ActivitySetup">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="24dp">
<TextView
android:id="@+id/tvDefault"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:gravity="center_vertical"
android:minHeight="36dp"
android:text="@string/title_advanced_default"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="italic"
app:layout_constraintEnd_toStartOf="@+id/ibHelp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/ibHelp"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginEnd="3dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:padding="6dp"
android:scaleType="fitCenter"
app:layout_constraintBottom_toBottomOf="@+id/tvDefault"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tvDefault"
app:srcCompat="@drawable/twotone_help_24" />
<androidx.cardview.widget.CardView
android:id="@+id/cardGeneral"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="3dp"
android:layout_marginTop="12dp"
app:cardBackgroundColor="?attr/colorCardBackground"
app:cardCornerRadius="6dp"
app:cardElevation="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDefault">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="6dp"
android:paddingVertical="12dp">
<Button
android:id="@+id/btnExport"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_archive_24"
android:drawablePadding="6dp"
android:text="@string/title_setup_export"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btnImport"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_unarchive_24"
android:drawablePadding="6dp"
android:text="@string/title_setup_import"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnExport" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>

@ -390,6 +390,7 @@
<string name="title_advanced_section_encryption">Encryption</string>
<string name="title_advanced_section_notifications">Notifications</string>
<string name="title_advanced_section_misc">Miscellaneous</string>
<string name="title_advanced_section_backup">Backup</string>
<string name="title_advanced_default">All options have commonly used standard values, which don\'t need to be changed to use the app</string>

Loading…
Cancel
Save