Class DynamicBackupDialog

All Implemented Interfaces:
ComponentCallbacks, DialogInterface.OnCancelListener, DialogInterface.OnDismissListener, SharedPreferences.OnSharedPreferenceChangeListener, View.OnCreateContextMenuListener, ActivityResultCaller, HasDefaultViewModelProviderFactory, LifecycleOwner, ViewModelStoreOwner, SavedStateRegistryOwner, DynamicProductFlavor

public class DynamicBackupDialog extends DynamicDialogFragment
A DynamicDialogFragment to perform backup related operations.
  • Field Details

  • Constructor Details

    • DynamicBackupDialog

      public DynamicBackupDialog()
  • Method Details

    • newInstance

      @NonNull public static DynamicBackupDialog newInstance()
      Initialize the new instance of this dialog fragment.
      Returns:
      An instance of DynamicBackupDialog.
    • onCustomiseBuilder

      @NonNull protected DynamicDialog.Builder onCustomiseBuilder(@NonNull DynamicDialog.Builder dialogBuilder, @Nullable Bundle savedInstanceState)
      Overrides:
      onCustomiseBuilder in class DynamicDialogFragment
    • onSaveInstanceState

      public void onSaveInstanceState(@NonNull Bundle outState)
      Overrides:
      onSaveInstanceState in class DialogFragment
    • showDialog

      public void showDialog(@NonNull FragmentActivity fragmentActivity)
      Overrides:
      showDialog in class DynamicDialogFragment
    • getType

      public int getType()
      Get the backup type used by this dialog.
      Returns:
      The backup type used by this dialog.
    • setType

      @NonNull public DynamicBackupDialog setType(int type)
      Set the backup type for this dialog.
      Parameters:
      type - The backup type to be set.
      Returns:
      The DynamicBackupDialog object to allow for chaining of calls to set methods.
    • getDynamicBackup

      @Nullable public DynamicBackup getDynamicBackup()
      Get the backup listener used by this dialog.
      Returns:
      The backup listener used by this dialog.
    • setDynamicBackup

      @NonNull public DynamicBackupDialog setDynamicBackup(@Nullable DynamicBackup dynamicBackup)
      Set the backup listener for this dialog.
      Parameters:
      dynamicBackup - The backup listener to be set.
      Returns:
      The DynamicBackupDialog object to allow for chaining of calls to set methods.
    • setBackupsAdapter

      public void setBackupsAdapter()
      Set the backup adapter to show a list of backups.
    • onDestroy

      public void onDestroy()
      Overrides:
      onDestroy in class Fragment
    • saveBackupLocation

      public void saveBackupLocation()
      Save the backup location.
    • getBackupsAdapter

      @Nullable public com.pranavpandey.android.dynamic.backup.dialog.DynamicBackupDialog.BackupsAdapter getBackupsAdapter()
      Returns the backups adapter used by the restore dialog.
      Returns:
      The backups adapter used by the restore dialog.
    • isFilePicker

      public boolean isFilePicker()
      Checks whether the file can be written to the sd card.
      Returns:
      true if the file can be written to the sd card.
    • isFilePickerStrict

      public boolean isFilePickerStrict()
      Checks whether a file picker is available in the system.
      Returns:
      true if a file picker is available in the system.