public static interface ObservableHorizontalScrollView.OnScrollChangedListener
+ Modifier and Type | +Method and Description | +
---|---|
void |
+ onScrollChanged(ObservableHorizontalScrollView view,
+ int l,
+ int t)
+ |
+
void |
+ onScrollStopped(int l,
+ int t)
+ |
+
void onScrollChanged(ObservableHorizontalScrollView view, + int l, + int t)+
void onScrollStopped(int l, + int t)+
public final class ObservableHorizontalScrollView +extends HorizontalScrollView+
Modifier and Type + | +Class and + Description + | +
---|---|
static
+ interface |
+ ObservableHorizontalScrollView.OnScrollChangedListener
+ |
+
FrameLayout.LayoutParams
+ ViewGroup.MarginLayoutParams,
+ ViewGroup.OnHierarchyChangeListener
+ 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
+ Modifier and Type + | +Field and + Description + | +
---|---|
private int |
+ initialPosition
+ |
+
private ObservableHorizontalScrollView.OnScrollChangedListener
+ |
+ mOnScrollChangedListener
+ |
+
private int |
+ newCheck
+ |
+
private Runnable
+ |
+ scrollerTask
+ |
+
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
+ 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,
+ DRAG_FLAG_GLOBAL,
+ DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION,
+ DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION,
+ DRAG_FLAG_GLOBAL_URI_READ,
+ DRAG_FLAG_GLOBAL_URI_WRITE,
+ DRAG_FLAG_OPAQUE,
+ 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,
+ 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,
+ 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_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 and + Description + | +
---|
ObservableHorizontalScrollView(Context context)
+ |
+
ObservableHorizontalScrollView(Context context,
+ AttributeSet attrs)
+ |
+
ObservableHorizontalScrollView(Context context,
+ AttributeSet attrs,
+ int defStyleAttr)
+ |
+
ObservableHorizontalScrollView(Context context,
+ AttributeSet attrs,
+ int defStyleAttr,
+ int defStyleRes)
+ |
+
Modifier and Type + | +Method and + Description + | +
---|---|
private void |
+ init()
+ |
+
protected void
+ |
+ onScrollChanged(int l,
+ int t,
+ int oldl,
+ int oldt)
+ |
+
void |
+ setOnScrollChangedListener(ObservableHorizontalScrollView.OnScrollChangedListener l)
+ |
+
void |
+ startScrollerTask()
+ |
+
addView,
+ addView,
+ addView,
+ addView,
+ arrowScroll,
+ computeHorizontalScrollOffset,
+ computeHorizontalScrollRange,
+ computeScroll,
+ computeScrollDeltaToGetChildRectOnScreen,
+ dispatchKeyEvent,
+ draw,
+ executeKeyEvent,
+ fling,
+ fullScroll,
+ getAccessibilityClassName,
+ getLeftFadingEdgeStrength,
+ getMaxScrollAmount,
+ getRightFadingEdgeStrength,
+ isFillViewport,
+ isSmoothScrollingEnabled,
+ measureChild,
+ measureChildWithMargins,
+ onGenericMotionEvent,
+ onInterceptTouchEvent,
+ onLayout,
+ onMeasure,
+ onOverScrolled,
+ onRequestFocusInDescendants,
+ onRestoreInstanceState,
+ onSaveInstanceState,
+ onSizeChanged,
+ onTouchEvent,
+ pageScroll,
+ requestChildFocus,
+ requestChildRectangleOnScreen,
+ requestDisallowInterceptTouchEvent,
+ requestLayout,
+ scrollTo,
+ setFillViewport,
+ setOverScrollMode,
+ setSmoothScrollingEnabled,
+ shouldDelayChildPressedState,
+ smoothScrollBy,
+ smoothScrollTo
+ checkLayoutParams,
+ generateDefaultLayoutParams,
+ generateLayoutParams,
+ generateLayoutParams,
+ getConsiderGoneChildrenWhenMeasuring,
+ getMeasureAllChildren,
+ setForegroundGravity,
+ setMeasureAllChildren
+ addChildrenForAccessibility,
+ addFocusables,
+ addKeyboardNavigationClusters,
+ addStatesFromChildren,
+ addTouchables,
+ addView,
+ addViewInLayout,
+ addViewInLayout,
+ attachLayoutAnimationParameters,
+ attachViewToParent,
+ bringChildToFront,
+ canAnimate,
+ childDrawableStateChanged,
+ childHasTransientStateChanged,
+ cleanupLayoutState,
+ clearChildFocus,
+ clearDisappearingChildren,
+ clearFocus,
+ debug,
+ detachAllViewsFromParent,
+ detachViewFromParent,
+ detachViewFromParent,
+ detachViewsFromParent,
+ dispatchApplyWindowInsets,
+ dispatchCapturedPointerEvent,
+ dispatchConfigurationChanged,
+ dispatchDisplayHint,
+ dispatchDragEvent,
+ dispatchDraw,
+ dispatchDrawableHotspotChanged,
+ dispatchFreezeSelfOnly,
+ dispatchGenericFocusedEvent,
+ dispatchGenericPointerEvent,
+ dispatchHoverEvent,
+ dispatchKeyEventPreIme,
+ dispatchKeyShortcutEvent,
+ dispatchPointerCaptureChanged,
+ dispatchProvideAutofillStructure,
+ dispatchProvideStructure,
+ dispatchRestoreInstanceState,
+ dispatchSaveInstanceState,
+ dispatchSetActivated,
+ dispatchSetPressed,
+ dispatchSetSelected,
+ dispatchSystemUiVisibilityChanged,
+ dispatchThawSelfOnly,
+ dispatchTouchEvent,
+ dispatchTrackballEvent,
+ dispatchUnhandledMove,
+ dispatchVisibilityChanged,
+ dispatchWindowFocusChanged,
+ dispatchWindowSystemUiVisiblityChanged,
+ dispatchWindowVisibilityChanged,
+ drawableStateChanged,
+ drawChild,
+ endViewTransition,
+ findFocus,
+ findViewsWithText,
+ focusableViewAvailable,
+ focusSearch,
+ gatherTransparentRegion,
+ getChildAt,
+ getChildCount,
+ 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,
+ isMotionEventSplittingEnabled,
+ isTransitionGroup,
+ jumpDrawablesToCurrentState,
+ layout,
+ measureChildren,
+ notifySubtreeAccessibilityStateChanged,
+ offsetDescendantRectToMyCoords,
+ offsetRectIntoDescendantCoords,
+ onAttachedToWindow,
+ onCreateDrawableState,
+ onDescendantInvalidated,
+ onDetachedFromWindow,
+ onInterceptHoverEvent,
+ onNestedFling,
+ onNestedPreFling,
+ onNestedPrePerformAccessibilityAction,
+ onNestedPreScroll,
+ onNestedScroll,
+ onNestedScrollAccepted,
+ onRequestSendAccessibilityEvent,
+ onResolvePointerIcon,
+ onStartNestedScroll,
+ onStopNestedScroll,
+ onViewAdded,
+ onViewRemoved,
+ recomputeViewAttributes,
+ removeAllViews,
+ removeAllViewsInLayout,
+ removeDetachedView,
+ removeView,
+ removeViewAt,
+ removeViewInLayout,
+ removeViews,
+ removeViewsInLayout,
+ requestFocus,
+ requestSendAccessibilityEvent,
+ requestTransparentRegion,
+ restoreDefaultFocus,
+ scheduleLayoutAnimation,
+ setAddStatesFromChildren,
+ setAlwaysDrawnWithCacheEnabled,
+ setAnimationCacheEnabled,
+ setChildrenDrawingCacheEnabled,
+ setChildrenDrawingOrderEnabled,
+ setChildrenDrawnWithCacheEnabled,
+ setClipChildren,
+ setClipToPadding,
+ setDescendantFocusability,
+ setLayoutAnimation,
+ setLayoutAnimationListener,
+ setLayoutMode,
+ setLayoutTransition,
+ setMotionEventSplittingEnabled,
+ setOnHierarchyChangeListener,
+ setPersistentDrawingCache,
+ setStaticTransformationsEnabled,
+ setTouchscreenBlocksFocus,
+ setTransitionGroup,
+ showContextMenuForChild,
+ showContextMenuForChild,
+ startActionModeForChild,
+ startActionModeForChild,
+ startLayoutAnimation,
+ startViewTransition,
+ updateViewLayout
+ addExtraDataToAccessibilityNodeInfo,
+ addFocusables,
+ addOnAttachStateChangeListener,
+ addOnLayoutChangeListener,
+ animate,
+ announceForAccessibility,
+ autofill,
+ autofill,
+ awakenScrollBars,
+ awakenScrollBars,
+ awakenScrollBars,
+ bringToFront,
+ buildDrawingCache,
+ buildDrawingCache,
+ buildLayer,
+ callOnClick,
+ cancelDragAndDrop,
+ cancelLongPress,
+ cancelPendingInputEvents,
+ canResolveLayoutDirection,
+ canResolveTextAlignment,
+ canResolveTextDirection,
+ canScrollHorizontally,
+ canScrollVertically,
+ checkInputConnectionProxy,
+ clearAnimation,
+ combineMeasuredStates,
+ computeHorizontalScrollExtent,
+ computeSystemWindowInsets,
+ computeVerticalScrollExtent,
+ computeVerticalScrollOffset,
+ computeVerticalScrollRange,
+ createAccessibilityNodeInfo,
+ createContextMenu,
+ destroyDrawingCache,
+ dispatchFinishTemporaryDetach,
+ dispatchGenericMotionEvent,
+ dispatchNestedFling,
+ dispatchNestedPreFling,
+ dispatchNestedPrePerformAccessibilityAction,
+ dispatchNestedPreScroll,
+ dispatchNestedScroll,
+ dispatchPopulateAccessibilityEvent,
+ dispatchStartTemporaryDetach,
+ drawableHotspotChanged,
+ findViewById,
+ findViewWithTag,
+ fitSystemWindows,
+ focusSearch,
+ forceHasOverlappingRendering,
+ forceLayout,
+ generateViewId,
+ getAccessibilityLiveRegion,
+ getAccessibilityNodeProvider,
+ getAccessibilityTraversalAfter,
+ getAccessibilityTraversalBefore,
+ getAlpha,
+ getAnimation,
+ getApplicationWindowToken,
+ getAutofillHints,
+ getAutofillId,
+ getAutofillType,
+ getAutofillValue,
+ getBackground,
+ getBackgroundTintList,
+ getBackgroundTintMode,
+ getBaseline,
+ getBottom,
+ getBottomFadingEdgeStrength,
+ getBottomPaddingOffset,
+ getCameraDistance,
+ getClipBounds,
+ getClipBounds,
+ getClipToOutline,
+ getContentDescription,
+ getContext,
+ getContextMenuInfo,
+ getDefaultFocusHighlightEnabled,
+ getDefaultSize,
+ getDisplay,
+ getDrawableState,
+ getDrawingCache,
+ getDrawingCache,
+ getDrawingCacheBackgroundColor,
+ getDrawingCacheQuality,
+ getDrawingRect,
+ getDrawingTime,
+ getElevation,
+ getFilterTouchesWhenObscured,
+ getFitsSystemWindows,
+ getFocusable,
+ getFocusables,
+ getFocusedRect,
+ getForeground,
+ getForegroundGravity,
+ getForegroundTintList,
+ getForegroundTintMode,
+ getGlobalVisibleRect,
+ getGlobalVisibleRect,
+ getHandler,
+ getHasOverlappingRendering,
+ getHeight,
+ getHitRect,
+ getHorizontalFadingEdgeLength,
+ getHorizontalScrollbarHeight,
+ getId,
+ getImportantForAccessibility,
+ getImportantForAutofill,
+ getKeepScreenOn,
+ getKeyDispatcherState,
+ getLabelFor,
+ getLayerType,
+ getLayoutDirection,
+ getLayoutParams,
+ getLeft,
+ getLeftPaddingOffset,
+ getLocalVisibleRect,
+ getLocationInWindow,
+ getLocationOnScreen,
+ getMatrix,
+ getMeasuredHeight,
+ getMeasuredHeightAndState,
+ getMeasuredState,
+ getMeasuredWidth,
+ getMeasuredWidthAndState,
+ getMinimumHeight,
+ getMinimumWidth,
+ getNextClusterForwardId,
+ getNextFocusDownId,
+ getNextFocusForwardId,
+ getNextFocusLeftId,
+ getNextFocusRightId,
+ getNextFocusUpId,
+ getOnFocusChangeListener,
+ getOutlineProvider,
+ getOverScrollMode,
+ getPaddingBottom,
+ getPaddingEnd,
+ getPaddingLeft,
+ getPaddingRight,
+ getPaddingStart,
+ getPaddingTop,
+ getParent,
+ getParentForAccessibility,
+ getPivotX,
+ getPivotY,
+ getPointerIcon,
+ getResources,
+ getRevealOnFocusHint,
+ getRight,
+ getRightPaddingOffset,
+ getRootView,
+ getRootWindowInsets,
+ getRotation,
+ getRotationX,
+ getRotationY,
+ getScaleX,
+ getScaleY,
+ getScrollBarDefaultDelayBeforeFade,
+ getScrollBarFadeDuration,
+ getScrollBarSize,
+ getScrollBarStyle,
+ getScrollIndicators,
+ getScrollX,
+ getScrollY,
+ getSolidColor,
+ getStateListAnimator,
+ getSuggestedMinimumHeight,
+ getSuggestedMinimumWidth,
+ getSystemUiVisibility,
+ getTag,
+ getTag,
+ getTextAlignment,
+ getTextDirection,
+ getTooltipText,
+ getTop,
+ getTopFadingEdgeStrength,
+ getTopPaddingOffset,
+ getTouchables,
+ getTouchDelegate,
+ getTransitionName,
+ getTranslationX,
+ getTranslationY,
+ getTranslationZ,
+ getVerticalFadingEdgeLength,
+ getVerticalScrollbarPosition,
+ getVerticalScrollbarWidth,
+ getViewTreeObserver,
+ getVisibility,
+ getWidth,
+ getWindowAttachCount,
+ getWindowId,
+ getWindowSystemUiVisibility,
+ getWindowToken,
+ getWindowVisibility,
+ getWindowVisibleDisplayFrame,
+ getX,
+ getY,
+ getZ,
+ hasExplicitFocusable,
+ hasFocusable,
+ hasNestedScrollingParent,
+ hasOnClickListeners,
+ hasOverlappingRendering,
+ hasPointerCapture,
+ hasWindowFocus,
+ inflate,
+ invalidate,
+ invalidate,
+ invalidate,
+ invalidateDrawable,
+ invalidateOutline,
+ isAccessibilityFocused,
+ isActivated,
+ isAttachedToWindow,
+ isClickable,
+ isContextClickable,
+ isDirty,
+ isDrawingCacheEnabled,
+ isDuplicateParentStateEnabled,
+ isEnabled,
+ isFocusable,
+ isFocusableInTouchMode,
+ isFocused,
+ isFocusedByDefault,
+ isHapticFeedbackEnabled,
+ isHardwareAccelerated,
+ isHorizontalFadingEdgeEnabled,
+ isHorizontalScrollBarEnabled,
+ isHovered,
+ isImportantForAccessibility,
+ isImportantForAutofill,
+ isInEditMode,
+ isInLayout,
+ isInTouchMode,
+ isKeyboardNavigationCluster,
+ isLaidOut,
+ isLayoutDirectionResolved,
+ isLayoutRequested,
+ isLongClickable,
+ isNestedScrollingEnabled,
+ isOpaque,
+ isPaddingOffsetRequired,
+ isPaddingRelative,
+ isPressed,
+ isSaveEnabled,
+ isSaveFromParentEnabled,
+ isScrollbarFadingEnabled,
+ isScrollContainer,
+ isSelected,
+ isShown,
+ isSoundEffectsEnabled,
+ isTemporarilyDetached,
+ isTextAlignmentResolved,
+ isTextDirectionResolved,
+ isVerticalFadingEdgeEnabled,
+ isVerticalScrollBarEnabled,
+ keyboardNavigationClusterSearch,
+ measure,
+ mergeDrawableStates,
+ offsetLeftAndRight,
+ offsetTopAndBottom,
+ onAnimationEnd,
+ onAnimationStart,
+ onApplyWindowInsets,
+ onCancelPendingInputEvents,
+ onCapturedPointerEvent,
+ onCheckIsTextEditor,
+ onConfigurationChanged,
+ onCreateContextMenu,
+ onCreateInputConnection,
+ onDisplayHint,
+ onDragEvent,
+ onDraw,
+ onDrawForeground,
+ onDrawScrollBars,
+ onFilterTouchEventForSecurity,
+ onFinishInflate,
+ onFinishTemporaryDetach,
+ onFocusChanged,
+ onHoverChanged,
+ onHoverEvent,
+ onInitializeAccessibilityEvent,
+ onInitializeAccessibilityNodeInfo,
+ onKeyDown,
+ onKeyLongPress,
+ onKeyMultiple,
+ onKeyPreIme,
+ onKeyShortcut,
+ onKeyUp,
+ onPointerCaptureChange,
+ onPopulateAccessibilityEvent,
+ onProvideAutofillStructure,
+ onProvideAutofillVirtualStructure,
+ onProvideStructure,
+ onProvideVirtualStructure,
+ onRtlPropertiesChanged,
+ onScreenStateChanged,
+ onSetAlpha,
+ onStartTemporaryDetach,
+ onTrackballEvent,
+ onVisibilityAggregated,
+ onVisibilityChanged,
+ onWindowFocusChanged,
+ onWindowSystemUiVisibilityChanged,
+ onWindowVisibilityChanged,
+ overScrollBy,
+ performAccessibilityAction,
+ performClick,
+ performContextClick,
+ performContextClick,
+ performHapticFeedback,
+ performHapticFeedback,
+ performLongClick,
+ performLongClick,
+ playSoundEffect,
+ post,
+ postDelayed,
+ postInvalidate,
+ postInvalidate,
+ postInvalidateDelayed,
+ postInvalidateDelayed,
+ postInvalidateOnAnimation,
+ postInvalidateOnAnimation,
+ postOnAnimation,
+ postOnAnimationDelayed,
+ refreshDrawableState,
+ releasePointerCapture,
+ removeCallbacks,
+ removeOnAttachStateChangeListener,
+ removeOnLayoutChangeListener,
+ requestApplyInsets,
+ requestFitSystemWindows,
+ requestFocus,
+ requestFocus,
+ requestFocusFromTouch,
+ requestPointerCapture,
+ requestRectangleOnScreen,
+ requestRectangleOnScreen,
+ requestUnbufferedDispatch,
+ resolveSize,
+ resolveSizeAndState,
+ restoreHierarchyState,
+ saveHierarchyState,
+ scheduleDrawable,
+ scrollBy,
+ sendAccessibilityEvent,
+ sendAccessibilityEventUnchecked,
+ setAccessibilityDelegate,
+ setAccessibilityLiveRegion,
+ setAccessibilityTraversalAfter,
+ setAccessibilityTraversalBefore,
+ setActivated,
+ setAlpha,
+ setAnimation,
+ setAutofillHints,
+ setBackground,
+ setBackgroundColor,
+ setBackgroundDrawable,
+ setBackgroundResource,
+ setBackgroundTintList,
+ setBackgroundTintMode,
+ setBottom,
+ setCameraDistance,
+ setClickable,
+ setClipBounds,
+ setClipToOutline,
+ setContentDescription,
+ setContextClickable,
+ setDefaultFocusHighlightEnabled,
+ setDrawingCacheBackgroundColor,
+ setDrawingCacheEnabled,
+ setDrawingCacheQuality,
+ setDuplicateParentStateEnabled,
+ setElevation,
+ setEnabled,
+ setFadingEdgeLength,
+ setFilterTouchesWhenObscured,
+ setFitsSystemWindows,
+ setFocusable,
+ setFocusable,
+ setFocusableInTouchMode,
+ setFocusedByDefault,
+ setForeground,
+ setForegroundTintList,
+ setForegroundTintMode,
+ setHapticFeedbackEnabled,
+ setHasTransientState,
+ setHorizontalFadingEdgeEnabled,
+ setHorizontalScrollBarEnabled,
+ setHovered,
+ setId,
+ setImportantForAccessibility,
+ setImportantForAutofill,
+ setKeepScreenOn,
+ setKeyboardNavigationCluster,
+ setLabelFor,
+ setLayerPaint,
+ setLayerType,
+ setLayoutDirection,
+ setLayoutParams,
+ setLeft,
+ setLongClickable,
+ setMeasuredDimension,
+ setMinimumHeight,
+ setMinimumWidth,
+ setNestedScrollingEnabled,
+ setNextClusterForwardId,
+ setNextFocusDownId,
+ setNextFocusForwardId,
+ setNextFocusLeftId,
+ setNextFocusRightId,
+ setNextFocusUpId,
+ setOnApplyWindowInsetsListener,
+ setOnCapturedPointerListener,
+ setOnClickListener,
+ setOnContextClickListener,
+ setOnCreateContextMenuListener,
+ setOnDragListener,
+ setOnFocusChangeListener,
+ setOnGenericMotionListener,
+ setOnHoverListener,
+ setOnKeyListener,
+ setOnLongClickListener,
+ setOnScrollChangeListener,
+ setOnSystemUiVisibilityChangeListener,
+ setOnTouchListener,
+ setOutlineProvider,
+ setPadding,
+ setPaddingRelative,
+ setPivotX,
+ setPivotY,
+ setPointerIcon,
+ setPressed,
+ setRevealOnFocusHint,
+ setRight,
+ setRotation,
+ setRotationX,
+ setRotationY,
+ setSaveEnabled,
+ setSaveFromParentEnabled,
+ setScaleX,
+ setScaleY,
+ setScrollBarDefaultDelayBeforeFade,
+ setScrollBarFadeDuration,
+ setScrollbarFadingEnabled,
+ setScrollBarSize,
+ setScrollBarStyle,
+ setScrollContainer,
+ setScrollIndicators,
+ setScrollIndicators,
+ setScrollX,
+ setScrollY,
+ setSelected,
+ setSoundEffectsEnabled,
+ setStateListAnimator,
+ setSystemUiVisibility,
+ setTag,
+ setTag,
+ setTextAlignment,
+ setTextDirection,
+ setTooltipText,
+ setTop,
+ setTouchDelegate,
+ setTransitionName,
+ setTranslationX,
+ setTranslationY,
+ setTranslationZ,
+ setVerticalFadingEdgeEnabled,
+ setVerticalScrollBarEnabled,
+ setVerticalScrollbarPosition,
+ setVisibility,
+ setWillNotCacheDrawing,
+ setWillNotDraw,
+ setX,
+ setY,
+ setZ,
+ showContextMenu,
+ showContextMenu,
+ startActionMode,
+ startActionMode,
+ startAnimation,
+ startDrag,
+ startDragAndDrop,
+ startNestedScroll,
+ stopNestedScroll,
+ toString,
+ unscheduleDrawable,
+ unscheduleDrawable,
+ updateDragShadow,
+ verifyDrawable,
+ willNotCacheDrawing,
+ willNotDraw
+ clone,
+ equals,
+ finalize,
+ getClass,
+ hashCode,
+ notify,
+ notifyAll,
+ wait,
+ wait,
+ wait
+ canResolveLayoutDirection,
+ canResolveTextAlignment,
+ canResolveTextDirection,
+ createContextMenu,
+ getLayoutDirection,
+ getParent,
+ getParentForAccessibility,
+ getTextAlignment,
+ getTextDirection,
+ isLayoutDirectionResolved,
+ isLayoutRequested,
+ isTextAlignmentResolved,
+ isTextDirectionResolved,
+ keyboardNavigationClusterSearch,
+ requestFitSystemWindows
+ private Runnable scrollerTask+
private int initialPosition+
private int newCheck+
private ObservableHorizontalScrollView.OnScrollChangedListener mOnScrollChangedListener+
public ObservableHorizontalScrollView(Context context)+
public ObservableHorizontalScrollView(Context context, + AttributeSet attrs)+
public ObservableHorizontalScrollView(Context context, + AttributeSet attrs, + int defStyleAttr)+
public ObservableHorizontalScrollView(Context context, + AttributeSet attrs, + int defStyleAttr, + int defStyleRes)+
public void setOnScrollChangedListener(ObservableHorizontalScrollView.OnScrollChangedListener l)+
private void init()+
protected void onScrollChanged(int l, + int t, + int oldl, + int oldt)+
onScrollChanged
in
+ class View
+ public void startScrollerTask()+
final class RulerView +extends View+
+ This is custom View
which
+ will draw a ruler with indicators.
+ There are two types of indicators:
+
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
+ Modifier and Type | +Field and Description | +
---|---|
private int |
+ mIndicatorColor
+ Integer color of the indicators.
+ |
+
private int |
+ mIndicatorInterval
+ Distance interval between two subsequent
+ indicators on the ruler.
+
+ |
+
private Paint
+ |
+ mIndicatorPaint
+ Paint
+ for the line in the ruler view.
+ |
+
private float |
+ mIndicatorWidth
+ Width of the indicator in dp.
+ |
+
private int |
+ mLongIndicatorHeight
+ Actual height of the long indicator in pixels.
+
+ |
+
private float |
+ mLongIndicatorHeightRatio
+ Ratio of long indicator height to the ruler
+ height.
+
+ |
+
private int |
+ mMaxValue
+ Maximum value.
+ |
+
private int |
+ mMinValue
+ Minimum value.
+ |
+
private int |
+ mShortIndicatorHeight
+ Actual height of the short indicator in pixels.
+
+ |
+
private float |
+ mShortIndicatorHeightRatio
+ Ratio of short indicator height to the ruler
+ height.
+
+ |
+
private int |
+ mTextColor
+ Integer color of the text, that is displayed on
+ the ruler.
+
+ |
+
private Paint
+ |
+ mTextPaint
+ Paint
+ to display the text on the ruler view.
+ |
+
private float |
+ mTextSize
+ Height of the text, that is displayed on ruler in
+ dp.
+
+ |
+
private int |
+ mViewHeight
+ Height of the view.
+ |
+
private int |
+ mViewWidth
+ Width of the view.
+ |
+
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,
+ DRAG_FLAG_GLOBAL,
+ DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION,
+ DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION,
+ DRAG_FLAG_GLOBAL_URI_READ,
+ DRAG_FLAG_GLOBAL_URI_WRITE,
+ DRAG_FLAG_OPAQUE,
+ 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,
+ 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,
+ 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_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 and Description | +
---|
RulerView(Context context)
+ |
+
RulerView(Context context,
+ AttributeSet attrs)
+ |
+
RulerView(Context context,
+ AttributeSet attrs,
+ int defStyleAttr)
+ |
+
RulerView(Context context,
+ AttributeSet attrs,
+ int defStyleAttr,
+ int defStyleRes)
+ |
+
Modifier and Type | +Method and Description | +
---|---|
private void |
+ drawLongIndicator(Canvas canvas,
+ int value)
+ Draw the vertical long line.
+ |
+
private void |
+ drawSmallIndicator(Canvas canvas,
+ int value)
+ Draw the vertical short line at every value.
+
+ |
+
private void |
+ drawValueText(Canvas canvas,
+ int value)
+ Draw the value number below the longer
+ indicator.
+
+ |
+
private int |
+ getIndicatorColor()
+ |
+
private int |
+ getIndicatorIntervalWidth()
+ |
+
private float |
+ getIndicatorWidth()
+ |
+
private float |
+ getLongIndicatorHeightRatio()
+ |
+
private int |
+ getMaxValue()
+ |
+
private int |
+ getMinValue()
+ |
+
private float |
+ getShortIndicatorHeightRatio()
+ |
+
private int |
+ getTextColor()
+ |
+
private float |
+ getTextSize()
+ |
+
protected void |
+ onDraw(Canvas canvas)
+ |
+
protected void |
+ onMeasure(int widthMeasureSpec,
+ int heightMeasureSpec)
+ |
+
private void |
+ refreshPaint()
+ Create the indicator paint and value text
+ color.
+
+ |
+
void |
+ setIndicatorColor(int color)
+ Set the indicator color.
+ |
+
void |
+ setIndicatorColorRes(int color)
+ Set the indicator color.
+ |
+
void |
+ setIndicatorHeight(float longHeightRatio,
+ float shortHeightRatio)
+ Set the height of the long and short
+ indicators.
+
+ |
+
void |
+ setIndicatorIntervalDistance(int indicatorIntervalPx)
+ Set the spacing between two vertical
+ lines/indicators.
+
+ |
+
void |
+ setIndicatorWidth(int widthDp)
+ Set the width of the indicator line in the
+ ruler.
+
+ |
+
void |
+ setIndicatorWidthRes(int width)
+ Set the width of the indicator line in the
+ ruler.
+
+ |
+
void |
+ setTextColor(int color)
+ Set the color of the text to display on the
+ ruler.
+
+ |
+
void |
+ setTextColorRes(int color)
+ Set the color of the text to display on the
+ ruler.
+
+ |
+
void |
+ setTextSize(int dimensionDp)
+ Set the size of the text to display on the
+ ruler.
+
+ |
+
void |
+ setTextSizeRes(int dimension)
+ Set the size of the text to display on the
+ ruler.
+
+ |
+
void |
+ setValueRange(int minValue,
+ int maxValue)
+ Set the maximum value to display on the ruler.
+
+ |
+
private void |
+ updateIndicatorHeight(float longIndicatorHeightRatio,
+ float shortIndicatorHeightRatio)
+ Calculate and update the height of the long and
+ the short indicators based on new ratios.
+
+ |
+
addChildrenForAccessibility,
+ addExtraDataToAccessibilityNodeInfo,
+ addFocusables, addFocusables,
+ addKeyboardNavigationClusters,
+ addOnAttachStateChangeListener,
+ addOnLayoutChangeListener,
+ addTouchables, animate, announceForAccessibility,
+ autofill, autofill, awakenScrollBars,
+ awakenScrollBars,
+ awakenScrollBars,
+ bringToFront, buildDrawingCache,
+ buildDrawingCache,
+ buildLayer, callOnClick,
+ cancelDragAndDrop,
+ cancelLongPress,
+ cancelPendingInputEvents,
+ canResolveLayoutDirection,
+ canResolveTextAlignment,
+ canResolveTextDirection,
+ canScrollHorizontally,
+ canScrollVertically,
+ checkInputConnectionProxy,
+ clearAnimation, clearFocus,
+ combineMeasuredStates,
+ computeHorizontalScrollExtent,
+ computeHorizontalScrollOffset,
+ computeHorizontalScrollRange,
+ computeScroll, computeSystemWindowInsets,
+ computeVerticalScrollExtent,
+ computeVerticalScrollOffset,
+ computeVerticalScrollRange,
+ createAccessibilityNodeInfo,
+ createContextMenu,
+ destroyDrawingCache,
+ dispatchApplyWindowInsets,
+ dispatchCapturedPointerEvent,
+ dispatchConfigurationChanged,
+ dispatchDisplayHint,
+ dispatchDragEvent,
+ dispatchDraw, dispatchDrawableHotspotChanged,
+ dispatchFinishTemporaryDetach,
+ dispatchGenericFocusedEvent,
+ dispatchGenericMotionEvent,
+ dispatchGenericPointerEvent,
+ dispatchHoverEvent,
+ dispatchKeyEvent,
+ dispatchKeyEventPreIme,
+ dispatchKeyShortcutEvent,
+ dispatchNestedFling,
+ dispatchNestedPreFling,
+ dispatchNestedPrePerformAccessibilityAction,
+ dispatchNestedPreScroll,
+ dispatchNestedScroll,
+ dispatchPointerCaptureChanged,
+ dispatchPopulateAccessibilityEvent,
+ dispatchProvideAutofillStructure,
+ dispatchProvideStructure,
+ dispatchRestoreInstanceState,
+ dispatchSaveInstanceState,
+ dispatchSetActivated,
+ dispatchSetPressed,
+ dispatchSetSelected,
+ dispatchStartTemporaryDetach,
+ dispatchSystemUiVisibilityChanged,
+ dispatchTouchEvent,
+ dispatchTrackballEvent,
+ dispatchUnhandledMove,
+ dispatchVisibilityChanged,
+ dispatchWindowFocusChanged,
+ dispatchWindowSystemUiVisiblityChanged,
+ dispatchWindowVisibilityChanged,
+ draw, drawableHotspotChanged,
+ drawableStateChanged,
+ findFocus, findViewById,
+ findViewsWithText,
+ findViewWithTag,
+ fitSystemWindows,
+ focusSearch, forceHasOverlappingRendering,
+ forceLayout, generateViewId,
+ getAccessibilityClassName,
+ getAccessibilityLiveRegion,
+ getAccessibilityNodeProvider,
+ getAccessibilityTraversalAfter,
+ getAccessibilityTraversalBefore,
+ getAlpha, getAnimation,
+ getApplicationWindowToken,
+ getAutofillHints,
+ getAutofillId, getAutofillType,
+ getAutofillValue,
+ getBackground, getBackgroundTintList,
+ getBackgroundTintMode,
+ getBaseline, getBottom, getBottomFadingEdgeStrength,
+ getBottomPaddingOffset,
+ getCameraDistance,
+ getClipBounds, getClipBounds,
+ getClipToOutline,
+ getContentDescription,
+ getContext, getContextMenuInfo,
+ getDefaultFocusHighlightEnabled,
+ getDefaultSize, getDisplay,
+ getDrawableState,
+ getDrawingCache,
+ getDrawingCache,
+ getDrawingCacheBackgroundColor,
+ getDrawingCacheQuality,
+ getDrawingRect, getDrawingTime,
+ getElevation, getFilterTouchesWhenObscured,
+ getFitsSystemWindows,
+ getFocusable, getFocusables,
+ getFocusedRect, getForeground,
+ getForegroundGravity,
+ getForegroundTintList,
+ getForegroundTintMode,
+ getGlobalVisibleRect,
+ getGlobalVisibleRect,
+ getHandler, getHasOverlappingRendering,
+ getHeight, getHitRect,
+ getHorizontalFadingEdgeLength,
+ getHorizontalScrollbarHeight,
+ getId, getImportantForAccessibility,
+ getImportantForAutofill,
+ getKeepScreenOn,
+ getKeyDispatcherState,
+ getLabelFor, getLayerType,
+ getLayoutDirection,
+ getLayoutParams,
+ getLeft, getLeftFadingEdgeStrength,
+ getLeftPaddingOffset,
+ getLocalVisibleRect,
+ getLocationInWindow,
+ getLocationOnScreen,
+ getMatrix, getMeasuredHeight,
+ getMeasuredHeightAndState,
+ getMeasuredState,
+ getMeasuredWidth,
+ getMeasuredWidthAndState,
+ getMinimumHeight,
+ getMinimumWidth,
+ getNextClusterForwardId,
+ getNextFocusDownId,
+ getNextFocusForwardId,
+ getNextFocusLeftId,
+ getNextFocusRightId,
+ getNextFocusUpId,
+ getOnFocusChangeListener,
+ getOutlineProvider,
+ getOverlay, getOverScrollMode,
+ getPaddingBottom,
+ getPaddingEnd, getPaddingLeft,
+ getPaddingRight,
+ getPaddingStart,
+ getPaddingTop, getParent, getParentForAccessibility,
+ getPivotX, getPivotY, getPointerIcon,
+ getResources, getRevealOnFocusHint,
+ getRight, getRightFadingEdgeStrength,
+ getRightPaddingOffset,
+ getRootView, getRootWindowInsets,
+ getRotation, getRotationX,
+ getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade,
+ getScrollBarFadeDuration,
+ getScrollBarSize,
+ getScrollBarStyle,
+ getScrollIndicators,
+ getScrollX, getScrollY,
+ getSolidColor, getStateListAnimator,
+ getSuggestedMinimumHeight,
+ getSuggestedMinimumWidth,
+ getSystemUiVisibility,
+ getTag, getTag, getTextAlignment,
+ getTextDirection,
+ getTooltipText, getTop, getTopFadingEdgeStrength,
+ getTopPaddingOffset,
+ getTouchables, getTouchDelegate,
+ getTransitionName,
+ getTranslationX,
+ getTranslationY,
+ getTranslationZ,
+ getVerticalFadingEdgeLength,
+ getVerticalScrollbarPosition,
+ getVerticalScrollbarWidth,
+ getViewTreeObserver,
+ getVisibility, getWidth, getWindowAttachCount,
+ getWindowId, getWindowSystemUiVisibility,
+ getWindowToken, getWindowVisibility,
+ getWindowVisibleDisplayFrame,
+ getX, getY, getZ, hasExplicitFocusable,
+ hasFocus, hasFocusable,
+ hasNestedScrollingParent,
+ hasOnClickListeners,
+ hasOverlappingRendering,
+ hasPointerCapture,
+ hasTransientState,
+ hasWindowFocus, inflate, invalidate,
+ invalidate, invalidate,
+ invalidateDrawable,
+ invalidateOutline,
+ isAccessibilityFocused,
+ isActivated, isAttachedToWindow,
+ isClickable, isContextClickable,
+ isDirty, isDrawingCacheEnabled,
+ isDuplicateParentStateEnabled,
+ isEnabled, isFocusable,
+ isFocusableInTouchMode,
+ isFocused, isFocusedByDefault,
+ isHapticFeedbackEnabled,
+ isHardwareAccelerated,
+ isHorizontalFadingEdgeEnabled,
+ isHorizontalScrollBarEnabled,
+ isHovered, isImportantForAccessibility,
+ isImportantForAutofill,
+ isInEditMode, isInLayout,
+ isInTouchMode, isKeyboardNavigationCluster,
+ isLaidOut, isLayoutDirectionResolved,
+ isLayoutRequested,
+ isLongClickable,
+ isNestedScrollingEnabled,
+ isOpaque, isPaddingOffsetRequired,
+ isPaddingRelative,
+ isPressed, isSaveEnabled,
+ isSaveFromParentEnabled,
+ isScrollbarFadingEnabled,
+ isScrollContainer,
+ isSelected, isShown, isSoundEffectsEnabled,
+ isTemporarilyDetached,
+ isTextAlignmentResolved,
+ isTextDirectionResolved,
+ isVerticalFadingEdgeEnabled,
+ isVerticalScrollBarEnabled,
+ jumpDrawablesToCurrentState,
+ keyboardNavigationClusterSearch,
+ layout, measure, mergeDrawableStates,
+ offsetLeftAndRight,
+ offsetTopAndBottom,
+ onAnimationEnd, onAnimationStart,
+ onApplyWindowInsets,
+ onAttachedToWindow,
+ onCancelPendingInputEvents,
+ onCapturedPointerEvent,
+ onCheckIsTextEditor,
+ onConfigurationChanged,
+ onCreateContextMenu,
+ onCreateDrawableState,
+ onCreateInputConnection,
+ onDetachedFromWindow,
+ onDisplayHint, onDragEvent,
+ onDrawForeground,
+ onDrawScrollBars,
+ onFilterTouchEventForSecurity,
+ onFinishInflate,
+ onFinishTemporaryDetach,
+ onFocusChanged, onGenericMotionEvent,
+ onHoverChanged, onHoverEvent,
+ onInitializeAccessibilityEvent,
+ onInitializeAccessibilityNodeInfo,
+ onKeyDown, onKeyLongPress,
+ onKeyMultiple, onKeyPreIme,
+ onKeyShortcut, onKeyUp, onLayout, onOverScrolled,
+ onPointerCaptureChange,
+ onPopulateAccessibilityEvent,
+ onProvideAutofillStructure,
+ onProvideAutofillVirtualStructure,
+ onProvideStructure,
+ onProvideVirtualStructure,
+ onResolvePointerIcon,
+ onRestoreInstanceState,
+ onRtlPropertiesChanged,
+ onSaveInstanceState,
+ onScreenStateChanged,
+ onScrollChanged,
+ onSetAlpha, onSizeChanged,
+ onStartTemporaryDetach,
+ onTouchEvent, onTrackballEvent,
+ onVisibilityAggregated,
+ onVisibilityChanged,
+ onWindowFocusChanged,
+ onWindowSystemUiVisibilityChanged,
+ onWindowVisibilityChanged,
+ overScrollBy, performAccessibilityAction,
+ performClick, performContextClick,
+ performContextClick,
+ performHapticFeedback,
+ performHapticFeedback,
+ performLongClick,
+ performLongClick,
+ playSoundEffect,
+ post, postDelayed,
+ postInvalidate, postInvalidate,
+ postInvalidateDelayed,
+ postInvalidateDelayed,
+ postInvalidateOnAnimation,
+ postInvalidateOnAnimation,
+ postOnAnimation,
+ postOnAnimationDelayed,
+ refreshDrawableState,
+ releasePointerCapture,
+ removeCallbacks,
+ removeOnAttachStateChangeListener,
+ removeOnLayoutChangeListener,
+ requestApplyInsets,
+ requestFitSystemWindows,
+ requestFocus, requestFocus,
+ requestFocus, requestFocusFromTouch,
+ requestLayout, requestPointerCapture,
+ requestRectangleOnScreen,
+ requestRectangleOnScreen,
+ requestUnbufferedDispatch,
+ resolveSize, resolveSizeAndState,
+ restoreDefaultFocus,
+ restoreHierarchyState,
+ saveHierarchyState,
+ scheduleDrawable,
+ scrollBy, scrollTo, sendAccessibilityEvent,
+ sendAccessibilityEventUnchecked,
+ setAccessibilityDelegate,
+ setAccessibilityLiveRegion,
+ setAccessibilityTraversalAfter,
+ setAccessibilityTraversalBefore,
+ setActivated, setAlpha, setAnimation,
+ setAutofillHints,
+ setBackground, setBackgroundColor,
+ setBackgroundDrawable,
+ setBackgroundResource,
+ setBackgroundTintList,
+ setBackgroundTintMode,
+ setBottom, setCameraDistance,
+ setClickable, setClipBounds,
+ setClipToOutline,
+ setContentDescription,
+ setContextClickable,
+ setDefaultFocusHighlightEnabled,
+ setDrawingCacheBackgroundColor,
+ setDrawingCacheEnabled,
+ setDrawingCacheQuality,
+ setDuplicateParentStateEnabled,
+ setElevation, setEnabled,
+ setFadingEdgeLength,
+ setFilterTouchesWhenObscured,
+ setFitsSystemWindows,
+ setFocusable, setFocusable,
+ setFocusableInTouchMode,
+ setFocusedByDefault,
+ setForeground, setForegroundGravity,
+ setForegroundTintList,
+ setForegroundTintMode,
+ setHapticFeedbackEnabled,
+ setHasTransientState,
+ setHorizontalFadingEdgeEnabled,
+ setHorizontalScrollBarEnabled,
+ setHovered, setId, setImportantForAccessibility,
+ setImportantForAutofill,
+ setKeepScreenOn,
+ setKeyboardNavigationCluster,
+ setLabelFor, setLayerPaint,
+ setLayerType, setLayoutDirection,
+ setLayoutParams,
+ setLeft, setLongClickable,
+ setMeasuredDimension,
+ setMinimumHeight,
+ setMinimumWidth,
+ setNestedScrollingEnabled,
+ setNextClusterForwardId,
+ setNextFocusDownId,
+ setNextFocusForwardId,
+ setNextFocusLeftId,
+ setNextFocusRightId,
+ setNextFocusUpId,
+ setOnApplyWindowInsetsListener,
+ setOnCapturedPointerListener,
+ setOnClickListener,
+ setOnContextClickListener,
+ setOnCreateContextMenuListener,
+ setOnDragListener,
+ setOnFocusChangeListener,
+ setOnGenericMotionListener,
+ setOnHoverListener,
+ setOnKeyListener,
+ setOnLongClickListener,
+ setOnScrollChangeListener,
+ setOnSystemUiVisibilityChangeListener,
+ setOnTouchListener,
+ setOutlineProvider,
+ setOverScrollMode,
+ setPadding, setPaddingRelative,
+ setPivotX, setPivotY, setPointerIcon,
+ setPressed, setRevealOnFocusHint,
+ setRight, setRotation,
+ setRotationX, setRotationY,
+ setSaveEnabled, setSaveFromParentEnabled,
+ setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade,
+ setScrollBarFadeDuration,
+ setScrollbarFadingEnabled,
+ setScrollBarSize,
+ setScrollBarStyle,
+ setScrollContainer,
+ setScrollIndicators,
+ setScrollIndicators,
+ setScrollX, setScrollY,
+ setSelected, setSoundEffectsEnabled,
+ setStateListAnimator,
+ setSystemUiVisibility,
+ setTag, setTag, setTextAlignment,
+ setTextDirection,
+ setTooltipText, setTop, setTouchDelegate,
+ setTransitionName,
+ setTranslationX,
+ setTranslationY,
+ setTranslationZ,
+ setVerticalFadingEdgeEnabled,
+ setVerticalScrollBarEnabled,
+ setVerticalScrollbarPosition,
+ setVisibility, setWillNotCacheDrawing,
+ setWillNotDraw, setX, setY, setZ, showContextMenu,
+ showContextMenu,
+ startActionMode,
+ startActionMode,
+ startAnimation, startDrag, startDragAndDrop,
+ startNestedScroll,
+ stopNestedScroll,
+ toString, unscheduleDrawable,
+ unscheduleDrawable,
+ updateDragShadow,
+ verifyDrawable, willNotCacheDrawing,
+ willNotDraw
+ private int mViewWidth+
onMeasure(int,
+ int)
.
+ onMeasure(int,
+ int)
private int mViewHeight+
onMeasure(int,
+ int)
.
+ onMeasure(int,
+ int)
private Paint mIndicatorPaint+
Paint
+ for the line in the ruler view.
+ refreshPaint()
+ private Paint mTextPaint+
Paint
+ to display the text on the ruler view.
+ refreshPaint()
+ private int mIndicatorInterval+
setIndicatorIntervalDistance(int)
,
+ getIndicatorIntervalWidth()
+ private int mMinValue+
mMaxValue
.
+ setValueRange(int,
+ int)
,
+ getMinValue()
+ private int mMaxValue+
mMinValue
.
+ setValueRange(int,
+ int)
,
+ getMaxValue()
+ private float mLongIndicatorHeightRatio+
mShortIndicatorHeight
.
+ Default value is 0.6 (i.e. 60%).
+ If the value is 0, indicator won't be displayed. If the value is 1,
+ indicator height will be
+ same as the ruler height.
+ setIndicatorHeight(float,
+ float)
,
+ getLongIndicatorHeightRatio()
+ private float mShortIndicatorHeightRatio+
mLongIndicatorHeight
.
+ Default value is 0.4 (i.e. 40%).
+ If the value is 0, indicator won't be displayed. If the value is 1,
+ indicator height will be
+ same as the ruler height.
+ setIndicatorHeight(float,
+ float)
,
+ getShortIndicatorHeightRatio()
+ private int mLongIndicatorHeight+
mLongIndicatorHeightRatio
.
+ updateIndicatorHeight(float,
+ float)
private int mShortIndicatorHeight+
mShortIndicatorHeightRatio
.
+ updateIndicatorHeight(float,
+ float)
private int mTextColor+
setTextColor(int)
,
+ setTextColorRes(int)
,
+ getTextColor()
+ private int mIndicatorColor+
setIndicatorColor(int)
,
+ setIndicatorColorRes(int)
,
+ getIndicatorColor()
+ @Dimension +private float mTextSize+
setTextSize(int)
,
+ setTextSizeRes(int)
,
+ getTextSize()
+ @Dimension +private float mIndicatorWidth+
setIndicatorWidth(int)
,
+ setIndicatorWidthRes(int)
,
+ getIndicatorWidth()
+ public RulerView(@NonNull + Context context, + @NonNull + AttributeSet attrs)+
public RulerView(@NonNull + Context context, + @NonNull + AttributeSet attrs, + int defStyleAttr)+
public RulerView(@NonNull + Context context, + @NonNull + AttributeSet attrs, + int defStyleAttr, + int defStyleRes)+
private void refreshPaint()+
protected void onMeasure(int widthMeasureSpec, + int heightMeasureSpec)+ +
private void updateIndicatorHeight(float longIndicatorHeightRatio, + float shortIndicatorHeightRatio)+
longIndicatorHeightRatio
- Ratio of long indicator
+ height to the ruler height.
+ shortIndicatorHeightRatio
- Ratio of short
+ indicator height to the ruler height.
+ private void drawSmallIndicator(@NonNull + Canvas canvas, + int value)+
canvas
- Canvas
+ on which the line will be drawn.
+ value
- Value to calculate the position of the
+ indicator.
+ private void drawLongIndicator(@NonNull + Canvas canvas, + int value)+
canvas
- Canvas
+ on which the line will be drawn.
+ value
- Value to calculate the position of the
+ indicator.
+ private void drawValueText(@NonNull + Canvas canvas, + int value)+
mTextPaint
+ to draw
+ the text.
+ canvas
- Canvas
+ on which the text will be drawn.
+ value
- Value to draw.public void setTextColorRes(@ColorRes + int color)+
color
- Color resource id.public void setTextSizeRes(@DimenRes + int dimension)+
dimension
- Text size dimension resource.public void setIndicatorColorRes(@ColorRes + int color)+
color
- Color resource id.public void setIndicatorWidthRes(@DimenRes + int width)+
width
- Dimension resource for indicator width.
+ public void setValueRange(int minValue, + int maxValue)+
minValue
- Value to display at the left end of the
+ ruler. This can be positive, negative
+ or zero. Default minimum value is 0.
+ maxValue
- Value to display at the right end of the
+ ruler. This can be positive, negative
+ or zero.This value must be greater than min value. Default
+ minimum value is 100.
+ public void setIndicatorIntervalDistance(int indicatorIntervalPx)+
indicatorIntervalPx
- Distance in pixels. This
+ cannot be negative number or zero.
+ IllegalArgumentException
+ - if interval is negative or zero.
+ public void setIndicatorHeight(float longHeightRatio, + float shortHeightRatio)+
longHeightRatio
- Ratio of long indicator height to
+ the ruler height. This value must
+ be between 0 to 1. The value should greater than mShortIndicatorHeight
.
+ Default value is 0.6 (i.e. 60%). If the value is 0, indicator
+ won't
+ be displayed. If the value is 1, indicator height will be same
+ as the
+ ruler height.
+ shortHeightRatio
- Ratio of short indicator height
+ to the ruler height. This value must
+ be between 0 to 1. The value should less than mLongIndicatorHeight
.
+ Default value is 0.4 (i.e. 40%). If the value is 0, indicator
+ won't
+ be displayed. If the value is 1, indicator height will be same
+ as
+ the ruler height.
+ IllegalArgumentException
+ - if any of the parameter is invalid.
+ @CheckResult +private int getIndicatorColor()+
setIndicatorColor(int)
,
+ setIndicatorColorRes(int)
+ public void setIndicatorColor(int color)+
color
- Color integer value.@CheckResult +private float getIndicatorWidth()+
setIndicatorWidth(int)
,
+ setIndicatorWidthRes(int)
+ public void setIndicatorWidth(@DimenRes + int widthDp)+
widthDp
- Width in dp.@CheckResult +private int getTextColor()+
setTextColor(int)
,
+ setTextColorRes(int)
+ public void setTextColor(int color)+
color
- Color integer value.@CheckResult +private float getTextSize()+
setTextSize(int)
,
+ setTextSizeRes(int)
+ public void setTextSize(@DimenRes + int dimensionDp)+
dimensionDp
- Text size dimension in dp.@CheckResult +private int getIndicatorIntervalWidth()+
setIndicatorIntervalDistance(int)
+ @CheckResult +private int getMinValue()+
setValueRange(int,
+ int)
@CheckResult +private int getMaxValue()+
setValueRange(int,
+ int)
@CheckResult +private float getLongIndicatorHeightRatio()+
setIndicatorHeight(float,
+ float)
@CheckResult +private float getShortIndicatorHeightRatio()+
setIndicatorHeight(float,
+ float)
final class RulerViewUtils +extends Object+
Constructor and Description | +
---|
RulerViewUtils()
+ |
+
Modifier and Type | +Method and Description | +
---|---|
(package private) static int |
+ sp2px(Context context,
+ float spValue)
+ Convert SP to pixel.
+ |
+
public class ScrollingValuePicker +extends FrameLayout+
FrameLayout.LayoutParams
+ ViewGroup.MarginLayoutParams,
+ ViewGroup.OnHierarchyChangeListener
+ 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
+ Modifier and Type + | +Field and + Description + | +
---|---|
private float |
+ maxValue
+ |
+
private ObservableHorizontalScrollView
+ |
+ mHorizontalScrollView
+ |
+
private float |
+ minValue
+ |
+
private View
+ |
+ mLeftSpacer
+ |
+
private Paint
+ |
+ mPathPaint
+ |
+
private View
+ |
+ mRightSpacer
+ |
+
private Path
+ |
+ mRulerStrokePath
+ |
+
private RulerView
+ |
+ mRulerView
+ |
+
private int |
+ valueMultiple
+ |
+
private float |
+ viewMultipleSize
+ |
+
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
+ 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,
+ DRAG_FLAG_GLOBAL,
+ DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION,
+ DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION,
+ DRAG_FLAG_GLOBAL_URI_READ,
+ DRAG_FLAG_GLOBAL_URI_WRITE,
+ DRAG_FLAG_OPAQUE,
+ 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,
+ 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,
+ 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_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 and + Description + | +
---|
ScrollingValuePicker(Context context)
+ |
+
ScrollingValuePicker(Context context,
+ AttributeSet attrs)
+ |
+
ScrollingValuePicker(Context context,
+ AttributeSet attrs,
+ int defStyleAttr)
+ |
+
ScrollingValuePicker(Context context,
+ AttributeSet attrs,
+ int defStyleAttr,
+ int defStyleRes)
+ |
+
Modifier and Type + | +Method and + Description + | +
---|---|
private void |
+ addScrollbar(Context context)
+ |
+
private void |
+ calculateRulerStrokePath()
+ |
+
int |
+ getCurrentValue(int l)
+ Get the currently selected
+ value in the value picker.
+
+ |
+
ObservableHorizontalScrollView
+ |
+ getHorizontalScrollView()
+ |
+
int |
+ getValueAndScrollItemToCenter(int l)
+ Get the currently selected
+ value in the value picker and move that
+ value to the center of
+ the ruler and adjust offsets.
+
+ |
+
float |
+ getViewMultipleSize()
+ |
+
private void |
+ init(Context context)
+ |
+
protected void
+ |
+ onDraw(Canvas canvas)
+ |
+
protected void
+ |
+ onLayout(boolean changed,
+ int left,
+ int top,
+ int right,
+ int bottom)
+ |
+
private void |
+ prepareRuler(Context context)
+ |
+
void |
+ scrollToValue(float value)
+ Scroll the ruler to the given
+ value.
+
+ |
+
void |
+ setMinMaxValue(int minValue,
+ int maxValue)
+ |
+
void |
+ setOnScrollChangedListener(ObservableHorizontalScrollView.OnScrollChangedListener onScrollChangedListener)
+ |
+
void |
+ setViewMultipleSize(float size)
+ |
+
checkLayoutParams,
+ generateDefaultLayoutParams,
+ generateLayoutParams,
+ generateLayoutParams,
+ getAccessibilityClassName,
+ getConsiderGoneChildrenWhenMeasuring,
+ getMeasureAllChildren,
+ onMeasure,
+ setForegroundGravity,
+ setMeasureAllChildren,
+ shouldDelayChildPressedState
+ addChildrenForAccessibility,
+ 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,
+ dispatchDisplayHint,
+ dispatchDragEvent,
+ dispatchDraw,
+ dispatchDrawableHotspotChanged,
+ dispatchFreezeSelfOnly,
+ dispatchGenericFocusedEvent,
+ dispatchGenericPointerEvent,
+ dispatchHoverEvent,
+ dispatchKeyEvent,
+ dispatchKeyEventPreIme,
+ dispatchKeyShortcutEvent,
+ dispatchPointerCaptureChanged,
+ dispatchProvideAutofillStructure,
+ dispatchProvideStructure,
+ dispatchRestoreInstanceState,
+ dispatchSaveInstanceState,
+ dispatchSetActivated,
+ dispatchSetPressed,
+ dispatchSetSelected,
+ dispatchSystemUiVisibilityChanged,
+ dispatchThawSelfOnly,
+ dispatchTouchEvent,
+ dispatchTrackballEvent,
+ dispatchUnhandledMove,
+ dispatchVisibilityChanged,
+ dispatchWindowFocusChanged,
+ dispatchWindowSystemUiVisiblityChanged,
+ dispatchWindowVisibilityChanged,
+ drawableStateChanged,
+ drawChild,
+ endViewTransition,
+ findFocus,
+ findViewsWithText,
+ focusableViewAvailable,
+ focusSearch,
+ gatherTransparentRegion,
+ getChildAt,
+ getChildCount,
+ 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,
+ isMotionEventSplittingEnabled,
+ isTransitionGroup,
+ jumpDrawablesToCurrentState,
+ layout,
+ measureChild,
+ measureChildren,
+ measureChildWithMargins,
+ notifySubtreeAccessibilityStateChanged,
+ offsetDescendantRectToMyCoords,
+ offsetRectIntoDescendantCoords,
+ onAttachedToWindow,
+ onCreateDrawableState,
+ onDescendantInvalidated,
+ onDetachedFromWindow,
+ 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,
+ showContextMenuForChild,
+ showContextMenuForChild,
+ startActionModeForChild,
+ startActionModeForChild,
+ startLayoutAnimation,
+ startViewTransition,
+ updateViewLayout
+ addExtraDataToAccessibilityNodeInfo,
+ addFocusables,
+ addOnAttachStateChangeListener,
+ addOnLayoutChangeListener,
+ animate,
+ announceForAccessibility,
+ autofill,
+ autofill,
+ awakenScrollBars,
+ awakenScrollBars,
+ awakenScrollBars,
+ bringToFront,
+ buildDrawingCache,
+ buildDrawingCache,
+ buildLayer,
+ callOnClick,
+ cancelDragAndDrop,
+ cancelLongPress,
+ cancelPendingInputEvents,
+ canResolveLayoutDirection,
+ canResolveTextAlignment,
+ canResolveTextDirection,
+ canScrollHorizontally,
+ canScrollVertically,
+ checkInputConnectionProxy,
+ clearAnimation,
+ combineMeasuredStates,
+ computeHorizontalScrollExtent,
+ computeHorizontalScrollOffset,
+ computeHorizontalScrollRange,
+ computeScroll,
+ computeSystemWindowInsets,
+ computeVerticalScrollExtent,
+ computeVerticalScrollOffset,
+ computeVerticalScrollRange,
+ createAccessibilityNodeInfo,
+ createContextMenu,
+ destroyDrawingCache,
+ dispatchFinishTemporaryDetach,
+ dispatchGenericMotionEvent,
+ dispatchNestedFling,
+ dispatchNestedPreFling,
+ dispatchNestedPrePerformAccessibilityAction,
+ dispatchNestedPreScroll,
+ dispatchNestedScroll,
+ dispatchPopulateAccessibilityEvent,
+ dispatchStartTemporaryDetach,
+ draw,
+ drawableHotspotChanged,
+ findViewById,
+ findViewWithTag,
+ fitSystemWindows,
+ focusSearch,
+ forceHasOverlappingRendering,
+ forceLayout,
+ generateViewId,
+ getAccessibilityLiveRegion,
+ getAccessibilityNodeProvider,
+ getAccessibilityTraversalAfter,
+ getAccessibilityTraversalBefore,
+ getAlpha,
+ getAnimation,
+ getApplicationWindowToken,
+ getAutofillHints,
+ getAutofillId,
+ getAutofillType,
+ getAutofillValue,
+ getBackground,
+ getBackgroundTintList,
+ getBackgroundTintMode,
+ getBaseline,
+ getBottom,
+ getBottomFadingEdgeStrength,
+ getBottomPaddingOffset,
+ getCameraDistance,
+ getClipBounds,
+ getClipBounds,
+ getClipToOutline,
+ getContentDescription,
+ getContext,
+ getContextMenuInfo,
+ getDefaultFocusHighlightEnabled,
+ getDefaultSize,
+ getDisplay,
+ getDrawableState,
+ getDrawingCache,
+ getDrawingCache,
+ getDrawingCacheBackgroundColor,
+ getDrawingCacheQuality,
+ getDrawingRect,
+ getDrawingTime,
+ getElevation,
+ getFilterTouchesWhenObscured,
+ getFitsSystemWindows,
+ getFocusable,
+ getFocusables,
+ getFocusedRect,
+ getForeground,
+ getForegroundGravity,
+ getForegroundTintList,
+ getForegroundTintMode,
+ getGlobalVisibleRect,
+ getGlobalVisibleRect,
+ getHandler,
+ getHasOverlappingRendering,
+ getHeight,
+ getHitRect,
+ getHorizontalFadingEdgeLength,
+ getHorizontalScrollbarHeight,
+ getId,
+ getImportantForAccessibility,
+ getImportantForAutofill,
+ getKeepScreenOn,
+ getKeyDispatcherState,
+ getLabelFor,
+ getLayerType,
+ getLayoutDirection,
+ getLayoutParams,
+ getLeft,
+ getLeftFadingEdgeStrength,
+ getLeftPaddingOffset,
+ getLocalVisibleRect,
+ getLocationInWindow,
+ getLocationOnScreen,
+ getMatrix,
+ getMeasuredHeight,
+ getMeasuredHeightAndState,
+ getMeasuredState,
+ getMeasuredWidth,
+ getMeasuredWidthAndState,
+ getMinimumHeight,
+ getMinimumWidth,
+ getNextClusterForwardId,
+ getNextFocusDownId,
+ getNextFocusForwardId,
+ getNextFocusLeftId,
+ getNextFocusRightId,
+ getNextFocusUpId,
+ getOnFocusChangeListener,
+ getOutlineProvider,
+ getOverScrollMode,
+ getPaddingBottom,
+ getPaddingEnd,
+ getPaddingLeft,
+ getPaddingRight,
+ getPaddingStart,
+ getPaddingTop,
+ getParent,
+ getParentForAccessibility,
+ getPivotX,
+ getPivotY,
+ getPointerIcon,
+ getResources,
+ getRevealOnFocusHint,
+ getRight,
+ getRightFadingEdgeStrength,
+ getRightPaddingOffset,
+ getRootView,
+ getRootWindowInsets,
+ getRotation,
+ getRotationX,
+ getRotationY,
+ getScaleX,
+ getScaleY,
+ getScrollBarDefaultDelayBeforeFade,
+ getScrollBarFadeDuration,
+ getScrollBarSize,
+ getScrollBarStyle,
+ getScrollIndicators,
+ getScrollX,
+ getScrollY,
+ getSolidColor,
+ getStateListAnimator,
+ getSuggestedMinimumHeight,
+ getSuggestedMinimumWidth,
+ getSystemUiVisibility,
+ getTag,
+ getTag,
+ getTextAlignment,
+ getTextDirection,
+ getTooltipText,
+ getTop,
+ getTopFadingEdgeStrength,
+ getTopPaddingOffset,
+ getTouchables,
+ getTouchDelegate,
+ getTransitionName,
+ getTranslationX,
+ getTranslationY,
+ getTranslationZ,
+ getVerticalFadingEdgeLength,
+ getVerticalScrollbarPosition,
+ getVerticalScrollbarWidth,
+ getViewTreeObserver,
+ getVisibility,
+ getWidth,
+ getWindowAttachCount,
+ getWindowId,
+ getWindowSystemUiVisibility,
+ getWindowToken,
+ getWindowVisibility,
+ getWindowVisibleDisplayFrame,
+ getX,
+ getY,
+ getZ,
+ hasExplicitFocusable,
+ hasFocusable,
+ hasNestedScrollingParent,
+ hasOnClickListeners,
+ hasOverlappingRendering,
+ hasPointerCapture,
+ hasWindowFocus,
+ inflate,
+ invalidate,
+ invalidate,
+ invalidate,
+ invalidateDrawable,
+ invalidateOutline,
+ isAccessibilityFocused,
+ isActivated,
+ isAttachedToWindow,
+ isClickable,
+ isContextClickable,
+ isDirty,
+ isDrawingCacheEnabled,
+ isDuplicateParentStateEnabled,
+ isEnabled,
+ isFocusable,
+ isFocusableInTouchMode,
+ isFocused,
+ isFocusedByDefault,
+ isHapticFeedbackEnabled,
+ isHardwareAccelerated,
+ isHorizontalFadingEdgeEnabled,
+ isHorizontalScrollBarEnabled,
+ isHovered,
+ isImportantForAccessibility,
+ isImportantForAutofill,
+ isInEditMode,
+ isInLayout,
+ isInTouchMode,
+ isKeyboardNavigationCluster,
+ isLaidOut,
+ isLayoutDirectionResolved,
+ isLayoutRequested,
+ isLongClickable,
+ isNestedScrollingEnabled,
+ isOpaque,
+ isPaddingOffsetRequired,
+ isPaddingRelative,
+ isPressed,
+ isSaveEnabled,
+ isSaveFromParentEnabled,
+ isScrollbarFadingEnabled,
+ isScrollContainer,
+ isSelected,
+ isShown,
+ isSoundEffectsEnabled,
+ isTemporarilyDetached,
+ isTextAlignmentResolved,
+ isTextDirectionResolved,
+ isVerticalFadingEdgeEnabled,
+ isVerticalScrollBarEnabled,
+ keyboardNavigationClusterSearch,
+ measure,
+ mergeDrawableStates,
+ offsetLeftAndRight,
+ offsetTopAndBottom,
+ onAnimationEnd,
+ onAnimationStart,
+ onApplyWindowInsets,
+ onCancelPendingInputEvents,
+ onCapturedPointerEvent,
+ onCheckIsTextEditor,
+ onConfigurationChanged,
+ onCreateContextMenu,
+ onCreateInputConnection,
+ onDisplayHint,
+ onDragEvent,
+ onDrawForeground,
+ onDrawScrollBars,
+ onFilterTouchEventForSecurity,
+ onFinishInflate,
+ onFinishTemporaryDetach,
+ onFocusChanged,
+ onGenericMotionEvent,
+ onHoverChanged,
+ onHoverEvent,
+ onInitializeAccessibilityEvent,
+ onInitializeAccessibilityNodeInfo,
+ onKeyDown,
+ onKeyLongPress,
+ onKeyMultiple,
+ onKeyPreIme,
+ onKeyShortcut,
+ onKeyUp,
+ onOverScrolled,
+ onPointerCaptureChange,
+ onPopulateAccessibilityEvent,
+ onProvideAutofillStructure,
+ onProvideAutofillVirtualStructure,
+ onProvideStructure,
+ onProvideVirtualStructure,
+ onRestoreInstanceState,
+ onRtlPropertiesChanged,
+ onSaveInstanceState,
+ onScreenStateChanged,
+ onScrollChanged,
+ onSetAlpha,
+ onSizeChanged,
+ onStartTemporaryDetach,
+ onTouchEvent,
+ onTrackballEvent,
+ onVisibilityAggregated,
+ onVisibilityChanged,
+ onWindowFocusChanged,
+ onWindowSystemUiVisibilityChanged,
+ onWindowVisibilityChanged,
+ overScrollBy,
+ performAccessibilityAction,
+ performClick,
+ performContextClick,
+ performContextClick,
+ performHapticFeedback,
+ performHapticFeedback,
+ performLongClick,
+ performLongClick,
+ playSoundEffect,
+ post,
+ postDelayed,
+ postInvalidate,
+ postInvalidate,
+ postInvalidateDelayed,
+ postInvalidateDelayed,
+ postInvalidateOnAnimation,
+ postInvalidateOnAnimation,
+ postOnAnimation,
+ postOnAnimationDelayed,
+ refreshDrawableState,
+ releasePointerCapture,
+ removeCallbacks,
+ removeOnAttachStateChangeListener,
+ removeOnLayoutChangeListener,
+ requestApplyInsets,
+ requestFitSystemWindows,
+ requestFocus,
+ requestFocus,
+ requestFocusFromTouch,
+ requestLayout,
+ requestPointerCapture,
+ requestRectangleOnScreen,
+ requestRectangleOnScreen,
+ requestUnbufferedDispatch,
+ resolveSize,
+ resolveSizeAndState,
+ restoreHierarchyState,
+ saveHierarchyState,
+ scheduleDrawable,
+ scrollBy,
+ scrollTo,
+ sendAccessibilityEvent,
+ sendAccessibilityEventUnchecked,
+ setAccessibilityDelegate,
+ setAccessibilityLiveRegion,
+ setAccessibilityTraversalAfter,
+ setAccessibilityTraversalBefore,
+ setActivated,
+ setAlpha,
+ setAnimation,
+ setAutofillHints,
+ setBackground,
+ setBackgroundColor,
+ setBackgroundDrawable,
+ setBackgroundResource,
+ setBackgroundTintList,
+ setBackgroundTintMode,
+ setBottom,
+ setCameraDistance,
+ setClickable,
+ setClipBounds,
+ setClipToOutline,
+ setContentDescription,
+ setContextClickable,
+ setDefaultFocusHighlightEnabled,
+ setDrawingCacheBackgroundColor,
+ setDrawingCacheEnabled,
+ setDrawingCacheQuality,
+ setDuplicateParentStateEnabled,
+ setElevation,
+ setEnabled,
+ setFadingEdgeLength,
+ setFilterTouchesWhenObscured,
+ setFitsSystemWindows,
+ setFocusable,
+ setFocusable,
+ setFocusableInTouchMode,
+ setFocusedByDefault,
+ setForeground,
+ setForegroundTintList,
+ setForegroundTintMode,
+ setHapticFeedbackEnabled,
+ setHasTransientState,
+ setHorizontalFadingEdgeEnabled,
+ setHorizontalScrollBarEnabled,
+ setHovered,
+ setId,
+ setImportantForAccessibility,
+ setImportantForAutofill,
+ setKeepScreenOn,
+ setKeyboardNavigationCluster,
+ setLabelFor,
+ setLayerPaint,
+ setLayerType,
+ setLayoutDirection,
+ setLayoutParams,
+ setLeft,
+ setLongClickable,
+ setMeasuredDimension,
+ setMinimumHeight,
+ setMinimumWidth,
+ setNestedScrollingEnabled,
+ setNextClusterForwardId,
+ setNextFocusDownId,
+ setNextFocusForwardId,
+ setNextFocusLeftId,
+ setNextFocusRightId,
+ setNextFocusUpId,
+ setOnApplyWindowInsetsListener,
+ setOnCapturedPointerListener,
+ setOnClickListener,
+ setOnContextClickListener,
+ setOnCreateContextMenuListener,
+ setOnDragListener,
+ setOnFocusChangeListener,
+ setOnGenericMotionListener,
+ setOnHoverListener,
+ setOnKeyListener,
+ setOnLongClickListener,
+ setOnScrollChangeListener,
+ setOnSystemUiVisibilityChangeListener,
+ setOnTouchListener,
+ setOutlineProvider,
+ setOverScrollMode,
+ setPadding,
+ setPaddingRelative,
+ setPivotX,
+ setPivotY,
+ setPointerIcon,
+ setPressed,
+ setRevealOnFocusHint,
+ setRight,
+ setRotation,
+ setRotationX,
+ setRotationY,
+ setSaveEnabled,
+ setSaveFromParentEnabled,
+ setScaleX,
+ setScaleY,
+ setScrollBarDefaultDelayBeforeFade,
+ setScrollBarFadeDuration,
+ setScrollbarFadingEnabled,
+ setScrollBarSize,
+ setScrollBarStyle,
+ setScrollContainer,
+ setScrollIndicators,
+ setScrollIndicators,
+ setScrollX,
+ setScrollY,
+ setSelected,
+ setSoundEffectsEnabled,
+ setStateListAnimator,
+ setSystemUiVisibility,
+ setTag,
+ setTag,
+ setTextAlignment,
+ setTextDirection,
+ setTooltipText,
+ setTop,
+ setTouchDelegate,
+ setTransitionName,
+ setTranslationX,
+ setTranslationY,
+ setTranslationZ,
+ setVerticalFadingEdgeEnabled,
+ setVerticalScrollBarEnabled,
+ setVerticalScrollbarPosition,
+ setVisibility,
+ setWillNotCacheDrawing,
+ setWillNotDraw,
+ setX,
+ setY,
+ setZ,
+ showContextMenu,
+ showContextMenu,
+ startActionMode,
+ startActionMode,
+ startAnimation,
+ startDrag,
+ startDragAndDrop,
+ startNestedScroll,
+ stopNestedScroll,
+ toString,
+ unscheduleDrawable,
+ unscheduleDrawable,
+ updateDragShadow,
+ verifyDrawable,
+ willNotCacheDrawing,
+ willNotDraw
+ clone,
+ equals,
+ finalize,
+ getClass,
+ hashCode,
+ notify,
+ notifyAll,
+ wait,
+ wait,
+ wait
+ canResolveLayoutDirection,
+ canResolveTextAlignment,
+ canResolveTextDirection,
+ createContextMenu,
+ getLayoutDirection,
+ getParent,
+ getParentForAccessibility,
+ getTextAlignment,
+ getTextDirection,
+ isLayoutDirectionResolved,
+ isLayoutRequested,
+ isTextAlignmentResolved,
+ isTextDirectionResolved,
+ keyboardNavigationClusterSearch,
+ requestFitSystemWindows,
+ requestLayout
+ private View mLeftSpacer+
private View mRightSpacer+
private RulerView mRulerView+
private ObservableHorizontalScrollView mHorizontalScrollView+
private float viewMultipleSize+
private float maxValue+
private float minValue+
private int valueMultiple+
private Paint mPathPaint+
private Path mRulerStrokePath+
public ScrollingValuePicker(Context context)+
public ScrollingValuePicker(Context context, + AttributeSet attrs)+
public ScrollingValuePicker(Context context, + AttributeSet attrs, + int defStyleAttr)+
public ScrollingValuePicker(Context context, + AttributeSet attrs, + int defStyleAttr, + int defStyleRes)+
public void setOnScrollChangedListener(ObservableHorizontalScrollView.OnScrollChangedListener onScrollChangedListener)+
public void setMinMaxValue(int minValue, + int maxValue)+
public float getViewMultipleSize()+
public void setViewMultipleSize(float size)+
private void init(Context context)+
private void calculateRulerStrokePath()+
private void prepareRuler(Context context)+
private void addScrollbar(Context context)+
public ObservableHorizontalScrollView getHorizontalScrollView()+
protected void onLayout(boolean changed, + int left, + int top, + int right, + int bottom)+
onLayout
in
+ class FrameLayout
+ public int getCurrentValue(int l)+
public int getValueAndScrollItemToCenter(int l)+
public void scrollToValue(float value)+
Modifier and Type | +Field and Description | +
---|---|
private ObservableHorizontalScrollView.OnScrollChangedListener
+ |
+ ObservableHorizontalScrollView.mOnScrollChangedListener
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+ ScrollingValuePicker.setOnScrollChangedListener(ObservableHorizontalScrollView.OnScrollChangedListener onScrollChangedListener)
+ |
+
void |
+ ObservableHorizontalScrollView.setOnScrollChangedListener(ObservableHorizontalScrollView.OnScrollChangedListener l)
+ |
+
Modifier and Type | +Field and Description | +
---|---|
private ObservableHorizontalScrollView
+ |
+ ScrollingValuePicker.mHorizontalScrollView
+ |
+
Modifier and Type | +Method and Description | +
---|---|
ObservableHorizontalScrollView
+ |
+ ScrollingValuePicker.getHorizontalScrollView()
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+ ObservableHorizontalScrollView.OnScrollChangedListener.onScrollChanged(ObservableHorizontalScrollView view,
+ int l,
+ int t)
+ |
+
Modifier and Type | +Field and Description | +
---|---|
private RulerView
+ |
+ ScrollingValuePicker.mRulerView
+ |
+
Interface | +Description | +
---|---|
ObservableHorizontalScrollView.OnScrollChangedListener + | ++ |
Class | +Description | +
---|---|
ObservableHorizontalScrollView + | +
+ Created by DWFOX on 2016-09-01.
+ |
+
RulerView | +
+ Created by Keval Patel on 28 Mar 2018.
+ |
+
RulerViewUtils | +
+ Created by Kevalpatel2106 on 28-Mar-18.
+ |
+
ScrollingValuePicker + | +
+ Created by DWFOX on 2016-09-01.
+ |
+
Class and Description | +
---|
ObservableHorizontalScrollView
+ Created by DWFOX on 2016-09-01.
+ |
+
ObservableHorizontalScrollView.OnScrollChangedListener + | +
RulerView
+ Created by Keval Patel on 28 Mar 2018.
+ |
+
Each package has a page that contains a list of its classes and interfaces, with a + summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. + Each of these pages has three sections consisting of a class/interface description, + summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that + item. The summary entries are alphabetical, while the detailed descriptions are in + the order they appear in the source code. This preserves the logical groupings + established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+Each documented package, class and interface has its own Use page. This page + describes what packages, classes, methods, constructors and fields use any part of + the given class or package. Given a class or interface A, its Use page includes + subclasses of A, fields declared as A, methods that return A, and methods and + constructors with parameters of type A. You can access this page by first going to + the package, class or interface, then clicking on the "Use" link in the navigation + bar.
+There is a Class Hierarchy page for all packages,
+ plus a hierarchy for each package. Each hierarchy page contains a list of classes
+ and a list of interfaces. The classes are organized by inheritance structure
+ starting with java.lang.Object
. The interfaces do not inherit from
+ java.lang.Object
.
The Deprecated API page lists all of the API that + have been deprecated. A deprecated API is not recommended for use, generally due to + improvements, and a replacement API is usually given. Deprecated APIs may be removed + in future implementations.
+The Index contains an alphabetic list of all + classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related + page.
+These links show and hide the HTML frames. All pages are available with or without + frames.
+The All Classes link shows all classes and + interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization + fields and methods. This information is of interest to re-implementors, not to + developers using the API. While there is no link in the navigation bar, you can get + to this information by going to any serialized class and clicking "Serialized Form" + in the "See also" section of the class description.
+The Constant Field Values page lists the static + final fields and their values.
+Paint
for the
+ line in the ruler view.
+ Paint
to display
+ the text on the ruler view.
+