Class DynamicSliderDialog
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.DynamicSliderDialog
- All Implemented Interfaces:
- ComponentCallbacks,- DialogInterface.OnCancelListener,- DialogInterface.OnDismissListener,- SharedPreferences.OnSharedPreferenceChangeListener,- View.OnCreateContextMenuListener,- ActivityResultCaller,- HasDefaultViewModelProviderFactory,- LifecycleOwner,- ViewModelStoreOwner,- androidx.savedstate.SavedStateRegistryOwner,- DynamicProductFlavor
- Direct Known Subclasses:
- DynamicSizeDialog
A 
DynamicDialogFragment to provide value picker functionality
 via DynamicSliderPreference.- 
Nested Class SummaryNested classes/interfaces inherited from class androidx.fragment.app.FragmentFragment.InstantiationException, Fragment.SavedState
- 
Field SummaryFieldsFields inherited from class com.pranavpandey.android.dynamic.support.dialog.fragment.DynamicDialogFragmentADS_DEFAULT_BUTTON_COLORFields inherited from class androidx.fragment.app.DialogFragmentSTYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMALFields inherited from class androidx.fragment.app.FragmentmPreviousWho
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetIcon()Get the icon used by the slider preference.intGet the interval used by the slider preference.intReturns the layout resource for this dialog.intgetMax()Get the maximum value used by the slider preference.intgetMin()Get the minimum value used by the slider preference.Get the slider change listener used by this dialog.intgetProgressFromValue(int value) Returns the slider progress according to the supplied value.Get the slider preference used by this dialog.Get the summary used by the slider preference.getTitle()Get the title used by the slider preference.getUnit()Get the unit used by the slider preference.intgetValue()Get the current value of the slider preference.intReturns the preference value according to the slider progress.Get the value listener used by this dialog.static DynamicSliderDialogInitialize the new instance of this 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) Set the icon used by the slider preference.setInterval(int interval) Set the interval used by the slider preference.setMax(int max) Set the maximum value used by the slider preference.setMin(int min) Set the minimum value used by the slider preference.setOnSliderChangeListener(DynamicSliderChangeListener<Slider> onSliderChangeListener) Set the slider change listener used by this dialog.setSummary(String summary) Set the summary used by the slider preference.Set the title used by the slider preference.Set the unit used by the slider preference.setValue(int value) Set the current value of the slider preference.Set the current value of the slider preference.setValueListener(DynamicValueListener<Integer> valueListener) Set the value listener used by 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.DynamicDialogFragmentfinishActivity, 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.AppCompatDialogFragmentsetupDialogMethods inherited from class androidx.fragment.app.DialogFragmentdismiss, 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.Fragmentdump, 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- 
TAGTag for this dialog fragment.- See Also:
 
 
- 
- 
Constructor Details- 
DynamicSliderDialogpublic DynamicSliderDialog()
 
- 
- 
Method Details- 
newInstanceInitialize the new instance of this fragment.- Returns:
- An instance of DynamicSliderDialog.
 
- 
getLayoutResDescription copied from class:DynamicDialogFragmentReturns the layout resource for this dialog.- Overrides:
- getLayoutResin class- DynamicDialogFragment
- Returns:
- The layout resource for this dialog.
 
- 
showDialogDescription copied from class:DynamicDialogFragmentShow this dialog fragment and attach it to the supplied activity.- Overrides:
- showDialogin class- DynamicDialogFragment
- Parameters:
- fragmentActivity- The fragment activity to attach this dialog fragment.
 
- 
onSaveInstanceState- Overrides:
- onSaveInstanceStatein class- DialogFragment
 
- 
getIconGet the icon used by the slider preference.- Returns:
- The icon used by the slider preference.
 
- 
setIconSet the icon used by the slider preference.- Parameters:
- icon- The icon to be set.
- Returns:
- The DynamicSliderDialogobject to allow for chaining of calls to set methods.
 
- 
getTitleGet the title used by the slider preference.- Returns:
- The title used by the slider preference.
 
- 
setTitleSet the title used by the slider preference.- Parameters:
- title- The title to be set.
- Returns:
- The DynamicSliderDialogobject to allow for chaining of calls to set methods.
 
- 
getSummaryGet the summary used by the slider preference.- Returns:
- The summary used by the slider preference.
 
- 
setSummarySet the summary used by the slider preference.- Parameters:
- summary- The summary to be set.
- Returns:
- The DynamicSliderDialogobject to allow for chaining of calls to set methods.
 
- 
getMinpublic int getMin()Get the minimum value used by the slider preference.- Returns:
- The minimum value used by the slider preference.
 
- 
setMinSet the minimum value used by the slider preference.- Parameters:
- min- The minimum value to be set.
- Returns:
- The DynamicSliderDialogobject to allow for chaining of calls to set methods.
 
- 
getMaxpublic int getMax()Get the maximum value used by the slider preference.- Returns:
- The maximum value used by the slider preference.
 
- 
setMaxSet the maximum value used by the slider preference.- Parameters:
- max- The maximum value to be set.
- Returns:
- The DynamicSliderDialogobject to allow for chaining of calls to set methods.
 
- 
getIntervalpublic int getInterval()Get the interval used by the slider preference.- Returns:
- The interval used by the slider preference.
 
- 
setIntervalSet the interval used by the slider preference.- Parameters:
- interval- The interval to be set.
- Returns:
- The DynamicSliderDialogobject to allow for chaining of calls to set methods.
 
- 
getUnitGet the unit used by the slider preference.- Returns:
- The unit used by the slider preference.
 
- 
setUnitSet the unit used by the slider preference.- Parameters:
- unit- The unit to be set.
- Returns:
- The DynamicSliderDialogobject to allow for chaining of calls to set methods.
 
- 
getOnSliderChangeListenerGet the slider change listener used by this dialog.- Returns:
- The slider change listener used by this dialog.
 
- 
getValueListenerGet the value listener used by this dialog.- Returns:
- The value listener used by this dialog.
 
- 
getValuepublic int getValue()Get the current value of the slider preference.- Returns:
- The current value of the slider preference.
 
- 
setValueSet the current value of the slider preference.- Parameters:
- value- The current value to be set.
- Returns:
- The DynamicSliderDialogobject to allow for chaining of calls to set methods.
 
- 
setValueSet the current value of the slider preference.- Parameters:
- value- The current value to be set.
- Returns:
- The DynamicSliderDialogobject to allow for chaining of calls to set methods.
 
- 
getSliderPreferenceGet the slider preference used by this dialog.- Returns:
- The slider preference used by this dialog.
 
- 
getProgressFromValuepublic int getProgressFromValue(int value) Returns the slider progress according to the supplied value.- Parameters:
- value- The value to be converted into slider progress.
- Returns:
- The slider progress according to the supplied value.
 
- 
getValueFromProgresspublic int getValueFromProgress()Returns the preference value according to the slider progress.- Returns:
- The preference value according to the slider progress.
 
 
-