Class DynamicSliderPreference
java.lang.Object
android.view.View
android.view.ViewGroup
android.widget.FrameLayout
com.pranavpandey.android.dynamic.support.widget.DynamicFrameLayout
com.pranavpandey.android.dynamic.support.view.base.DynamicView
com.pranavpandey.android.dynamic.support.setting.base.DynamicPreference
com.pranavpandey.android.dynamic.support.setting.base.DynamicSimplePreference
com.pranavpandey.android.dynamic.support.setting.base.DynamicSpinnerPreference
com.pranavpandey.android.dynamic.support.setting.base.DynamicSliderPreference
- All Implemented Interfaces:
SharedPreferences.OnSharedPreferenceChangeListener
,Drawable.Callback
,AccessibilityEventSource
,KeyEvent.Callback
,ViewManager
,ViewParent
,BaseWidget
,DynamicTintWidget
,DynamicWidget
- Direct Known Subclasses:
DynamicSliderCompact
,DynamicSliderFloat
A
DynamicSpinnerPreference
to provide the functionality of a slider preference with
control buttons to modify the value.-
Nested Class Summary
Nested classes/interfaces inherited from class com.pranavpandey.android.dynamic.support.setting.base.DynamicPreference
DynamicPreference.OnPromptListener
Nested classes/interfaces inherited from class android.widget.FrameLayout
FrameLayout.LayoutParams
Nested classes/interfaces inherited from class android.view.ViewGroup
ViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListener
Nested classes/interfaces inherited from class android.view.View
View.AccessibilityDelegate, View.BaseSavedState, View.DragShadowBuilder, View.MeasureSpec, View.OnApplyWindowInsetsListener, View.OnAttachStateChangeListener, View.OnCapturedPointerListener, View.OnClickListener, View.OnContextClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnScrollChangeListener, View.OnSystemUiVisibilityChangeListener, View.OnTouchListener, View.OnUnhandledKeyEventListener
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Default maximum threshold to enable tick.static final int
Default value for the maximum seek value.static final int
Default value for the minimum seek value.static final boolean
Default value for the seek controls.static final int
Default value for the seek interval.Fields inherited from class com.pranavpandey.android.dynamic.support.setting.base.DynamicPreference
DEFAULT_ENABLED
Fields inherited from class com.pranavpandey.android.dynamic.support.widget.DynamicFrameLayout
mAppliedColor, mBackgroundAware, mColor, mColorType, mContrast, mContrastWithColor, mContrastWithColorType, mStyleBorderless, mTintBackground
Fields inherited from class android.view.ViewGroup
CLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
Fields inherited from class android.view.View
ACCESSIBILITY_DATA_SENSITIVE_AUTO, ACCESSIBILITY_DATA_SENSITIVE_NO, ACCESSIBILITY_DATA_SENSITIVE_YES, ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTOFILL_HINT_CREDIT_CARD_NUMBER, AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTOFILL_HINT_EMAIL_ADDRESS, AUTOFILL_HINT_NAME, AUTOFILL_HINT_PASSWORD, AUTOFILL_HINT_PHONE, AUTOFILL_HINT_POSTAL_ADDRESS, AUTOFILL_HINT_POSTAL_CODE, AUTOFILL_HINT_USERNAME, AUTOFILL_TYPE_DATE, AUTOFILL_TYPE_LIST, AUTOFILL_TYPE_NONE, AUTOFILL_TYPE_TEXT, AUTOFILL_TYPE_TOGGLE, CONTENT_SENSITIVITY_AUTO, CONTENT_SENSITIVITY_NOT_SENSITIVE, CONTENT_SENSITIVITY_SENSITIVE, DRAG_FLAG_ACCESSIBILITY_ACTION, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_SAME_APPLICATION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLE, FOCUSABLE_AUTO, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, IMPORTANT_FOR_AUTOFILL_AUTO, IMPORTANT_FOR_AUTOFILL_NO, IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_AUTOFILL_YES, IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_CONTENT_CAPTURE_AUTO, IMPORTANT_FOR_CONTENT_CAPTURE_NO, IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_CONTENT_CAPTURE_YES, IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, NOT_FOCUSABLE, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, REQUESTED_FRAME_RATE_CATEGORY_DEFAULT, REQUESTED_FRAME_RATE_CATEGORY_HIGH, REQUESTED_FRAME_RATE_CATEGORY_LOW, REQUESTED_FRAME_RATE_CATEGORY_NO_PREFERENCE, REQUESTED_FRAME_RATE_CATEGORY_NORMAL, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_CAPTURE_HINT_AUTO, SCROLL_CAPTURE_HINT_EXCLUDE, SCROLL_CAPTURE_HINT_EXCLUDE_DESCENDANTS, SCROLL_CAPTURE_HINT_INCLUDE, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z
-
Constructor Summary
ConstructorDescriptionDynamicSliderPreference
(Context context) DynamicSliderPreference
(Context context, AttributeSet attrs) DynamicSliderPreference
(Context context, AttributeSet attrs, int defStyleAttr) -
Method Summary
Modifier and TypeMethodDescriptionvoid
animateSlider
(int value) Set the preference value after animating the slider.Get the shared preferences key for alternate preference.Get the image view to show the decrease button used by this preference.Get the image view to show the increase button used by this preference.int
Get the default value for this preference.Returns the slider change listener to get the callback for seek events.protected int
This method will be called to get the layout resource for this view.int
Get the maximum value for this preference.int
Get the minimum value for this preference.Returns the slider change listener and value resolver to get the various callbacks.Get the shared preferences key used by this preference.Get the text view to show the value.int
Returns the current slider progress.int
getProgressFromValue
(int value) Returns the slider progress according to the supplied value.int
Get the seek interval for the slider.Get the slider to display and modify the preference value.getUnit()
Get the optional unit text for the preference value.int
getValidValue
(int value) Returns the valid value after performing various checks.int
Returns the preference value according to the slider progress.boolean
Returns whether the slider slider buttons to increase or decrease the value are enabled.boolean
Returns whether the slider is enabled.boolean
Returns whether the slider tick marks are enabled.protected void
onEnabled
(boolean enabled) This method will be called whenever there is a change in the view state.protected void
This method will be called after loading the attributed.protected void
onLoadAttributes
(AttributeSet attrs) Load values from the supplied attribute set.void
onSharedPreferenceChanged
(SharedPreferences sharedPreferences, String key) protected void
onUpdate()
This method will be called whenever there is a change in the view attributes or parameters.void
setColor()
Set color for this widget according to the supplied values.void
setColor
(int color) Set the value of color for this widget.void
setControls
(boolean controls) Set the slider controls to be enabled or disabled.void
setDefaultValue
(int defaultValue) Set the default value for this preference.void
setDynamicSliderResolver
(DynamicSliderChangeListener<Slider> dynamicSliderResolver) Set the slider change listener and value resolver to get the various callbacks.void
setMaxValue
(int maxValue) Set the maximum value for this preference.void
setMinValue
(int minValue) Set the minimum value for this preference.void
setOnSliderControlListener
(DynamicSliderChangeListener<Slider> onSliderControlListener) Set the slider change listener to get the callback for control events.void
setProgress
(int progress) Get the current slider progress.void
setSeekEnabled
(boolean seekEnabled) Enable or disable the slider.void
setSeekInterval
(int seekInterval) Set the seek interval for the slider.void
setTickVisible
(boolean tickVisible) Enable or disable the slider tick marks.void
setUnit
(CharSequence unit) Set the optional unit text for the preference value.void
setValue
(int value) Set the value for this preference.Methods inherited from class com.pranavpandey.android.dynamic.support.setting.base.DynamicSpinnerPreference
getEntries, getPopupType, getPreferenceValue, getValues, setEntries, setPopupType, setPreferenceValue, setValues, updateValueString
Methods inherited from class com.pranavpandey.android.dynamic.support.setting.base.DynamicSimplePreference
getActionView, getDescriptionView, getIconFooterView, getIconView, getPreferenceView, getSummaryView, getTitleView, getValueView, getViewFrame, setActionButton, setDescription, setIcon, setOnPreferenceClickListener, setSummary, setTitle, setValueString, setViewFrame
Methods inherited from class com.pranavpandey.android.dynamic.support.setting.base.DynamicPreference
getActionString, getBackgroundView, getDependency, getDescription, getIcon, getOnActionClickListener, getOnPreferenceClickListener, getOnPromptListener, getSummary, getTitle, getValueString, initialize, onAttachedToWindow, onDetachedFromWindow, onFinishInflate, setActionButton, setAltPreferenceKey, setDependency, setDescription, setEnabled, setIcon, setImageView, setOnPreferenceClickListener, setOnPromptListener, setPreferenceKey, setSummary, setTextView, setTitle, setValueString
Methods inherited from class com.pranavpandey.android.dynamic.support.view.base.DynamicView
loadFromAttributes, postUpdate, setClickable, setLongClickable, setOnClickListener, setOnLongClickListener, update
Methods inherited from class com.pranavpandey.android.dynamic.support.widget.DynamicFrameLayout
getBackgroundAware, getColor, getColor, getColorType, getContrast, getContrast, getContrastRatio, getContrastWithColor, getContrastWithColorType, isBackgroundAware, isStyleBorderless, isTintBackground, setBackgroundAware, setBackgroundColor, setColorType, setContrast, setContrastWithColor, setContrastWithColorType, setStyleBorderless, setTintBackground
Methods inherited from class android.widget.FrameLayout
checkLayoutParams, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getAccessibilityClassName, getConsiderGoneChildrenWhenMeasuring, getMeasureAllChildren, onLayout, onMeasure, setForegroundGravity, setMeasureAllChildren, shouldDelayChildPressedState
Methods inherited from class android.view.ViewGroup
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchScrollCaptureSearch, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findOnBackInvokedDispatcherForChild, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isLayoutSuppressed, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onCreateDrawableState, onDescendantInvalidated, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, setWindowInsetsAnimationCallback, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, suppressLayout, updateViewLayout
Methods inherited from class android.view.View
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, autofill, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearPendingCredentialRequest, clearViewTranslationCallback, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findOnBackInvokedDispatcher, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateDisplayHash, generateViewId, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAllowedHandwritingDelegatePackageName, getAllowedHandwritingDelegatorPackageName, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContentSensitivity, getContext, getContextMenuInfo, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getFrameContentVelocity, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHandwritingBoundsOffsetBottom, getHandwritingBoundsOffsetLeft, getHandwritingBoundsOffsetRight, getHandwritingBoundsOffsetTop, getHandwritingDelegateFlags, getHandwritingDelegatorCallback, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPendingCredentialCallback, getPendingCredentialRequest, getPivotX, getPivotY, getPointerIcon, getPreferKeepClearRects, getReceiveContentMimeTypes, getRequestedFrameRate, getResources, getRevealOnFocusHint, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootSurfaceControl, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTranslationResponse, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityDataSensitive, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isAutoHandwritingEnabled, isClickable, isContentSensitive, isContextClickable, isCredential, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHandwritingDelegate, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPivotSet, isPreferKeepClear, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onCreateViewTranslationRequest, onCreateVirtualViewTranslationRequests, onDisplayHint, onDragEvent, onDraw, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onReceiveContent, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollCaptureSearch, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onViewTranslationResponse, onVirtualViewTranslationResponses, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requestUnbufferedDispatch, requireViewById, resetPivot, resolveSize, resolveSizeAndState, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDataSensitive, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, setAllowedHandwritingDelegatePackage, setAllowedHandwritingDelegatorPackage, setAlpha, setAnimation, setAnimationMatrix, setAutofillHints, setAutofillId, setAutoHandwritingEnabled, setBackground, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContentSensitivity, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setFrameContentVelocity, setHandwritingBoundsOffsets, setHandwritingDelegateFlags, setHandwritingDelegatorCallback, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setIsCredential, setIsHandwritingDelegate, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnReceiveContentListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPendingCredentialRequest, setPivotX, setPivotY, setPointerIcon, setPreferKeepClear, setPreferKeepClearRects, setPressed, setRenderEffect, setRequestedFrameRate, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setViewTranslationCallback, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.pranavpandey.android.dynamic.support.widget.base.BaseWidget
loadFromAttributes
Methods inherited from interface com.pranavpandey.android.dynamic.support.widget.base.DynamicWidget
getBackgroundAware, getColor, getColor, getColorType, getContrast, getContrast, getContrastRatio, getContrastWithColor, getContrastWithColorType, isBackgroundAware, setBackgroundAware, setColorType, setContrast, setContrastWithColor, setContrastWithColorType
Methods inherited from interface android.view.ViewParent
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, keyboardNavigationClusterSearch, requestFitSystemWindows, requestLayout
-
Field Details
-
DEFAULT_MIN_VALUE
public static final int DEFAULT_MIN_VALUEDefault value for the minimum seek value.- See Also:
-
DEFAULT_MAX_VALUE
public static final int DEFAULT_MAX_VALUEDefault value for the maximum seek value.- See Also:
-
DEFAULT_SEEK_INTERVAL
public static final int DEFAULT_SEEK_INTERVALDefault value for the seek interval.- See Also:
-
DEFAULT_SEEK_CONTROLS
public static final boolean DEFAULT_SEEK_CONTROLSDefault value for the seek controls.- See Also:
-
DEFAULT_MAX_TICK_THRESHOLD
public static final int DEFAULT_MAX_TICK_THRESHOLDDefault maximum threshold to enable tick.- See Also:
-
-
Constructor Details
-
DynamicSliderPreference
-
DynamicSliderPreference
-
DynamicSliderPreference
public DynamicSliderPreference(@NonNull Context context, @Nullable AttributeSet attrs, @AttrRes int defStyleAttr)
-
-
Method Details
-
onLoadAttributes
Description copied from class:DynamicView
Load values from the supplied attribute set.- Overrides:
onLoadAttributes
in classDynamicSpinnerPreference
- Parameters:
attrs
- The attribute set to load the values.
-
getLayoutRes
Description copied from class:DynamicView
This method will be called to get the layout resource for this view.Supply the view layout resource here to do the inflation.
- Overrides:
getLayoutRes
in classDynamicSimplePreference
- Returns:
- The layout resource for this view.
-
onInflate
protected void onInflate()Description copied from class:DynamicView
This method will be called after loading the attributed.Initialize the view layout here.
- Overrides:
onInflate
in classDynamicSpinnerPreference
-
getPreferenceKey
Description copied from class:DynamicPreference
Get the shared preferences key used by this preference.- Overrides:
getPreferenceKey
in classDynamicPreference
- Returns:
- The shared preferences key used by this preference.
-
getAltPreferenceKey
Description copied from class:DynamicPreference
Get the shared preferences key for alternate preference.- Overrides:
getAltPreferenceKey
in classDynamicPreference
- Returns:
- The shared preferences key for alternate preference.
-
onUpdate
protected void onUpdate()Description copied from class:DynamicView
This method will be called whenever there is a change in the view attributes or parameters.It is better to do any real time calculation like updating the value string or checked state in this method.
- Overrides:
onUpdate
in classDynamicSpinnerPreference
-
onEnabled
protected void onEnabled(boolean enabled) Description copied from class:DynamicView
This method will be called whenever there is a change in the view state.Either
enabled
ordisabled
, other views like icon, title, color, etc. must be updated here to reflect the overall view state.- Overrides:
onEnabled
in classDynamicSimplePreference
- Parameters:
enabled
-true
if this view is enabled and can receive click events.
-
setColor
Description copied from interface:DynamicWidget
Set the value of color for this widget.- Specified by:
setColor
in interfaceDynamicWidget
- Overrides:
setColor
in classDynamicFrameLayout
- Parameters:
color
- Color for this widget.
-
setColor
public void setColor()Description copied from interface:DynamicWidget
Set color for this widget according to the supplied values.- Specified by:
setColor
in interfaceDynamicWidget
- Overrides:
setColor
in classDynamicSimplePreference
-
isSeekEnabled
public boolean isSeekEnabled()Returns whether the slider is enabled.- Returns:
true
if slider is enabled.
-
setSeekEnabled
public void setSeekEnabled(boolean seekEnabled) Enable or disable the slider.- Parameters:
seekEnabled
-true
to enable the slider.
-
setTickVisible
public void setTickVisible(boolean tickVisible) Enable or disable the slider tick marks.- Parameters:
tickVisible
-true
to enable the slider tick marks.
-
isTickVisible
public boolean isTickVisible()Returns whether the slider tick marks are enabled.- Returns:
true
if slider tick mark are enabled.
-
getMinValue
public int getMinValue()Get the minimum value for this preference.- Returns:
- The minimum value for this preference.
-
setMinValue
public void setMinValue(int minValue) Set the minimum value for this preference.- Parameters:
minValue
- The minimum value to be set.
-
getMaxValue
public int getMaxValue()Get the maximum value for this preference.- Returns:
- The maximum value for this preference.
-
setMaxValue
public void setMaxValue(int maxValue) Set the maximum value for this preference.- Parameters:
maxValue
- The maximum value to be set.
-
getDefaultValue
public int getDefaultValue()Get the default value for this preference.- Overrides:
getDefaultValue
in classDynamicSpinnerPreference
- Returns:
- The default value for this preference.
-
setDefaultValue
public void setDefaultValue(int defaultValue) Set the default value for this preference.- Overrides:
setDefaultValue
in classDynamicSpinnerPreference
- Parameters:
defaultValue
- The default value to be set.
-
getProgress
public int getProgress()Returns the current slider progress.- Returns:
- The current slider progress.
-
setProgress
public void setProgress(int progress) Get the current slider progress.- Parameters:
progress
- The progress to be set.
-
getSeekInterval
public int getSeekInterval()Get the seek interval for the slider.- Returns:
- The seek interval for the slider.
-
setSeekInterval
public void setSeekInterval(int seekInterval) Set the seek interval for the slider.- Parameters:
seekInterval
- The seek interval to be set.
-
getUnit
Get the optional unit text for the preference value.- Returns:
- The optional unit text for the preference value.
-
setUnit
Set the optional unit text for the preference value.- Parameters:
unit
- The unit to be set.
-
setValue
public void setValue(int value) Set the value for this preference.- Parameters:
value
- The value to be set.
-
getValidValue
public int getValidValue(int value) Returns the valid value after performing various checks.- Parameters:
value
- The value to be checked.- Returns:
- The valid value after performing various checks.
-
isControls
public boolean isControls()Returns whether the slider slider buttons to increase or decrease the value are enabled.- Returns:
true
to show slider buttons to increase or decrease the value.
-
setControls
public void setControls(boolean controls) Set the slider controls to be enabled or disabled.- Parameters:
controls
-true
to show slider buttons to increase or decrease the value.
-
getDynamicSliderResolver
Returns the slider change listener to get the callback for seek events.- Returns:
- The slider change listener to get the callback for seek events.
-
getOnSliderControlListener
Returns the slider change listener and value resolver to get the various callbacks.- Returns:
- The slider change listener and value resolver to get the various callbacks.
-
getProgressFromValue
public 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.
-
getValueFromProgress
public int getValueFromProgress()Returns the preference value according to the slider progress.- Returns:
- The preference value according to the slider progress.
-
getSlider
Get the slider to display and modify the preference value.- Returns:
- The slider to display and modify the preference value.
-
getPreferenceValueView
Get the text view to show the value.- Returns:
- The text view to show the value.
-
getControlLeftView
Get the image view to show the decrease button used by this preference.- Returns:
- The image view to show the decrease button used by this preference.
-
getControlRightView
Get the image view to show the increase button used by this preference.- Returns:
- The image view to show the increase button used by this preference.
-
animateSlider
public void animateSlider(int value) Set the preference value after animating the slider.- Parameters:
value
- The preference value to be set.
-