Class DynamicRenameDialog
java.lang.Object
androidx.fragment.app.Fragment
androidx.fragment.app.DialogFragment
androidx.appcompat.app.AppCompatDialogFragment
com.pranavpandey.android.dynamic.support.dialog.fragment.DynamicDialogFragment
com.pranavpandey.android.dynamic.support.dialog.fragment.DynamicRenameDialog
- All Implemented Interfaces:
ComponentCallbacks,DialogInterface.OnCancelListener,DialogInterface.OnDismissListener,SharedPreferences.OnSharedPreferenceChangeListener,View.OnCreateContextMenuListener,ActivityResultCaller,HasDefaultViewModelProviderFactory,LifecycleOwner,ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner,DynamicProductFlavor
A dialog fragment to provide the basic rename functionality.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface to listen the rename event.Nested classes/interfaces inherited from class androidx.fragment.app.Fragment
Fragment.InstantiationException, Fragment.SavedState -
Field Summary
FieldsFields inherited from class com.pranavpandey.android.dynamic.support.dialog.fragment.DynamicDialogFragment
ADS_DEFAULT_BUTTON_COLORFields inherited from class androidx.fragment.app.DialogFragment
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMALFields inherited from class androidx.fragment.app.Fragment
mPreviousWho -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the name helper text used by this dialog.intReturns the layout resource for this dialog.getName()Get the current name used by this dialog.Get the rename listener used by this dialog.booleanReturns whether the empty string is allowed.static DynamicRenameDialogInitialize the new instance of this dialog fragment.protected DynamicDialog.BuilderonCustomiseBuilder(DynamicDialog.Builder dialogBuilder, Bundle savedInstanceState) Override this method to customise the dynamic dialog builder before creating the dialog.voidonSaveInstanceState(Bundle outState) setAllowEmpty(boolean allowEmpty) Set whether the empty string is allowed for this dialog.setHelperText(String helperText) Set the name helper text for this dialog.Set the current name for this dialog.setRenameDialogListener(DynamicRenameDialog.RenameListener renameListener) Set the rename listener for this dialog.voidshowDialog(FragmentActivity fragmentActivity) Show this dialog fragment and attach it to the supplied activity.Methods inherited from class com.pranavpandey.android.dynamic.support.dialog.fragment.DynamicDialogFragment
finishActivity, getBooleanFromArguments, getBuilder, getButtonColor, getDynamicDialog, getNegativeButtonText, getNeutralButtonText, getOnCancelListener, getOnDismissListener, getOnKeyListener, getOnShowListener, getParcelableFromArguments, getPositiveButtonText, getProductFlavor, getStringFromArguments, isAutoDismiss, isCancelable, isOnSharedPreferenceChangeListener, onCancel, onCreate, onCreateDialog, onCustomiseDialog, onDestroyView, onDismiss, onPause, onResume, onSharedPreferenceChanged, setAutoDismiss, setBuilder, setButtonColor, setIsCancelable, setNegativeButtonText, setNeutralButtonText, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setPositiveButtonText, setResult, setResult, setResult, setResult, showDialogMethods inherited from class androidx.appcompat.app.AppCompatDialogFragment
setupDialogMethods inherited from class androidx.fragment.app.DialogFragment
dismiss, dismissAllowingStateLoss, dismissNow, getDialog, getShowsDialog, getTheme, onActivityCreated, onAttach, onDetach, onGetLayoutInflater, onStart, onStop, onViewStateRestored, requireComponentDialog, requireDialog, setCancelable, setShowsDialog, setStyle, show, show, showNowMethods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelCreationExtras, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onViewCreated, postponeEnterTransition, postponeEnterTransition, registerForActivityResult, registerForActivityResult, registerForContextMenu, requestPermissions, requireActivity, requireArguments, requireContext, requireFragmentManager, requireHost, requireParentFragment, requireView, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
-
Field Details
-
TAG
Tag for this dialog fragment.- See Also:
-
-
Constructor Details
-
DynamicRenameDialog
public DynamicRenameDialog()
-
-
Method Details
-
newInstance
Initialize the new instance of this dialog fragment.- Returns:
- An instance of
DynamicRenameDialog.
-
getLayoutRes
Description copied from class:DynamicDialogFragmentReturns the layout resource for this dialog.- Overrides:
getLayoutResin classDynamicDialogFragment- Returns:
- The layout resource for this dialog.
-
onSaveInstanceState
- Overrides:
onSaveInstanceStatein classDialogFragment
-
showDialog
Description copied from class:DynamicDialogFragmentShow this dialog fragment and attach it to the supplied activity.- Overrides:
showDialogin classDynamicDialogFragment- Parameters:
fragmentActivity- The fragment activity to attach this dialog fragment.
-
getName
Get the current name used by this dialog.- Returns:
- The current name used by this dialog.
-
setName
Set the current name for this dialog.- Parameters:
name- The current name to be set.- Returns:
- The
DynamicRenameDialogobject to allow for chaining of calls to set methods.
-
getHelperText
Get the name helper text used by this dialog.- Returns:
- The name helper text used by this dialog.
-
setHelperText
Set the name helper text for this dialog.- Parameters:
helperText- The name helper text to be set.- Returns:
- The
DynamicRenameDialogobject to allow for chaining of calls to set methods.
-
isAllowEmpty
public boolean isAllowEmpty()Returns whether the empty string is allowed.- Returns:
trueif the empty string is allowed.
-
setAllowEmpty
Set whether the empty string is allowed for this dialog.- Parameters:
allowEmpty-trueto allow the empty string.- Returns:
- The
DynamicRenameDialogobject to allow for chaining of calls to set methods.
-
getRenameDialogListener
Get the rename listener used by this dialog.- Returns:
- The rename listener used by this dialog.
-