mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-12-23 05:16:58 +00:00
close #438
This commit is contained in:
parent
f9bb71b67a
commit
82885102d9
@ -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);
|
||||
|
@ -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 & 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>
|
||||
|
Loading…
Reference in New Issue
Block a user