1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-22 14:47:29 +00:00
This commit is contained in:
Austin Huang 2020-12-27 22:28:10 -05:00
parent f9bb71b67a
commit 82885102d9
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with 25 additions and 3 deletions

View File

@ -26,10 +26,30 @@ public class BackupPreferencesFragment extends BasePreferencesFragment {
if (context == null) {
return;
}
screen.addPreference(getAboutPreference(context));
screen.addPreference(getWarningPreference(context));
screen.addPreference(getCreatePreference(context));
screen.addPreference(getRestorePreference(context));
}
private Preference getAboutPreference(@NonNull final Context context) {
final Preference preference = new Preference(context);
preference.setSummary(R.string.backup_summary);
preference.setEnabled(false);
preference.setIcon(R.drawable.ic_outline_info_24);
preference.setIconSpaceReserved(true);
return preference;
}
private Preference getWarningPreference(@NonNull final Context context) {
final Preference preference = new Preference(context);
preference.setSummary(R.string.backup_warning);
preference.setEnabled(false);
preference.setIcon(R.drawable.ic_warning);
preference.setIconSpaceReserved(true);
return preference;
}
private Preference getCreatePreference(@NonNull final Context context) {
final Preference preference = new Preference(context);
preference.setTitle(R.string.create_backup);

View File

@ -285,9 +285,11 @@
<string name="locations">Locations</string>
<string name="unknown">Unknown</string>
<string name="removed_from_favs">Removed from Favourites</string>
<string name="backup_and_restore">Settings Backup</string>
<string name="create_backup">Create</string>
<string name="restore_backup">Restore</string>
<string name="backup_and_restore">Backup &amp; Restore User Settings</string>
<string name="backup_summary">Back up app settings, account login information, and/or favorites data to a plain text or encrypted backup file for later restoration.</string>
<string name="backup_warning">If you\'re backing up login info, treat the file as confidential: Keep them somewhere safe!</string>
<string name="create_backup">Create new backup file</string>
<string name="restore_backup">Restore from existing backup file</string>
<string name="file_chosen_label">File:</string>
<string name="enter_password">Enter password</string>
<string name="select_backup_file">Select a backup file (.zaai/.backup)</string>