Browse Source

close #438

renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
parent
commit
82885102d9
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 20
      app/src/main/java/awais/instagrabber/fragments/settings/BackupPreferencesFragment.java
  2. 8
      app/src/main/res/values/strings.xml

20
app/src/main/java/awais/instagrabber/fragments/settings/BackupPreferencesFragment.java

@ -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);

8
app/src/main/res/values/strings.xml

@ -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>

Loading…
Cancel
Save