Class DynamicThemeDialog<T extends DynamicAppTheme,V>
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.theme.dialog.DynamicThemeDialog<T,V>
- Type Parameters:
T
- The type of the dynamic app theme this dialog will handle.V
- The type of the theme source.
- All Implemented Interfaces:
ComponentCallbacks
,DialogInterface.OnCancelListener
,DialogInterface.OnDismissListener
,SharedPreferences.OnSharedPreferenceChangeListener
,View.OnCreateContextMenuListener
,ActivityResultCaller
,HasDefaultViewModelProviderFactory
,LifecycleOwner
,ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
,DynamicProductFlavor
A dialog fragment to import a dynamic theme.
-
Nested Class Summary
Nested classes/interfaces inherited from class androidx.fragment.app.Fragment
Fragment.InstantiationException, Fragment.SavedState
-
Field Summary
Fields inherited from class com.pranavpandey.android.dynamic.support.dialog.fragment.DynamicDialogFragment
ADS_DEFAULT_BUTTON_COLOR
Fields inherited from class androidx.fragment.app.DialogFragment
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Fields inherited from class androidx.fragment.app.Fragment
mPreviousWho
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the message used by this dialog.int
Get the theme action used by this dialog.Get the theme code listener used by this dialog.Get the theme import (from file) listener used by this dialog.Get the dynamic theme listener used by this dialog.Get the theme select listener used by this dialog.static <T extends DynamicAppTheme>
DynamicThemeDialog<T,Intent> Initialize the new instance of this fragment.static <T extends DynamicAppTheme>
DynamicThemeDialog<T,Uri> Initialize the new instance of this fragment.static DynamicThemeDialog<DynamicAppTheme,
Void> Initialize the new instance of this fragment.static <T extends DynamicAppTheme>
DynamicThemeDialog<T,Void> Initialize the new instance of this fragment.protected DynamicDialog.Builder
onCustomiseBuilder
(DynamicDialog.Builder dialogBuilder, Bundle savedInstanceState) Override this method to customise the dynamic dialog builder before creating the dialog.void
onDismiss
(DialogInterface dialog) void
onSaveInstanceState
(Bundle outState) setMessage
(CharSequence message) Get the optional message for this dialog.setThemeAction
(int themeAction) Set the theme action for this dialog.setThemeCodeListener
(ThemeListener.Code themeCodeListener) Set the theme code listener for this dialog.setThemeImportFileListener
(ThemeListener.Import.File<V> themeImportFileListener) Set the theme import (from file) listener for this dialog.setThemeListener
(ThemeListener<T> themeListener) Set the dynamic theme listener for this dialog.setThemeSelectListener
(ThemeListener.Select themeSelectListener) Set the theme select listener for this dialog.void
showDialog
(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, getLayoutRes, getNegativeButtonText, getNeutralButtonText, getOnCancelListener, getOnDismissListener, getOnKeyListener, getOnShowListener, getParcelableFromArguments, getPositiveButtonText, getProductFlavor, getStringFromArguments, isAutoDismiss, isCancelable, isOnSharedPreferenceChangeListener, onCancel, onCreate, onCreateDialog, onCustomiseDialog, onDestroyView, onPause, onResume, onSharedPreferenceChanged, setAutoDismiss, setBuilder, setButtonColor, setIsCancelable, setNegativeButtonText, setNeutralButtonText, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setPositiveButtonText, setResult, setResult, setResult, setResult, showDialog
Methods inherited from class androidx.appcompat.app.AppCompatDialogFragment
setupDialog
Methods 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, showNow
Methods 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
-
DynamicThemeDialog
public DynamicThemeDialog()
-
-
Method Details
-
newInstance
Initialize the new instance of this fragment.- Returns:
- An instance of
DynamicThemeDialog
.
-
newThemeInstance
Initialize the new instance of this fragment.- Type Parameters:
T
- The type of the dynamic app theme.- Returns:
- An instance of
DynamicThemeDialog
.
-
newImportIntentInstance
@NonNull public static <T extends DynamicAppTheme> DynamicThemeDialog<T,Intent> newImportIntentInstance()Initialize the new instance of this fragment.- Type Parameters:
T
- The type of the dynamic app theme.- Returns:
- An instance of
DynamicThemeDialog
.
-
newImportUriInstance
Initialize the new instance of this fragment.- Type Parameters:
T
- The type of the dynamic app theme.- Returns:
- An instance of
DynamicThemeDialog
.
-
onSaveInstanceState
- Overrides:
onSaveInstanceState
in classDialogFragment
-
showDialog
Description copied from class:DynamicDialogFragment
Show this dialog fragment and attach it to the supplied activity.- Overrides:
showDialog
in classDynamicDialogFragment
- Parameters:
fragmentActivity
- The fragment activity to attach this dialog fragment.
-
onDismiss
- Specified by:
onDismiss
in interfaceDialogInterface.OnDismissListener
- Overrides:
onDismiss
in classDynamicDialogFragment
-
getThemeAction
public int getThemeAction()Get the theme action used by this dialog.- Returns:
- The theme action used by this dialog.
-
setThemeAction
Set the theme action for this dialog.- Parameters:
themeAction
- The theme action to be set.- Returns:
- The
DynamicThemeDialog
object to allow for chaining of calls to set methods.
-
getMessage
Get the message used by this dialog.- Returns:
- The message used by this dialog.
-
setMessage
Get the optional message for this dialog.- Parameters:
message
- The message to be set.- Returns:
- The
DynamicThemeDialog
object to allow for chaining of calls to set methods.
-
getThemeListener
Get the dynamic theme listener used by this dialog.- Returns:
- The dynamic theme listener used by this dialog.
-
getThemeCodeListener
Get the theme code listener used by this dialog.- Returns:
- The theme code listener used by this dialog.
-
getThemeImportFileListener
Get the theme import (from file) listener used by this dialog.- Returns:
- The theme import (from file) listener used by this dialog.
-
getThemeSelectListener
Get the theme select listener used by this dialog.- Returns:
- The theme select listener used by this dialog.
-