Class SliderThumbDrawable
java.lang.Object
icyllis.modernui.graphics.drawable.Drawable
icyllis.modernui.material.MaterialDrawable
icyllis.modernui.material.drawable.SliderThumbDrawable
A thumb drawable for SeekBar, similar to Material Design, vertical bar style.
-
Nested Class Summary
Nested classes/interfaces inherited from class icyllis.modernui.graphics.drawable.Drawable
Drawable.Callback, Drawable.ConstantState
-
Field Summary
Fields inherited from class icyllis.modernui.material.MaterialDrawable
mAlpha, mColor, mTint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Draw in its bounds (set via setBounds) respecting optional effects such as alpha (set via setAlpha).int
Returns the drawable's intrinsic height.int
Returns the drawable's intrinsic width.boolean
Indicates whether this drawable will change its appearance based on state.void
If this Drawable does transition animations between states, ask that it immediately jump to the current state and skip any active animations.protected boolean
onStateChange
(int[] stateSet) Override this in your subclass to change appearance if you recognize the specified state.boolean
setVisible
(boolean visible, boolean restart) Set whether this Drawable is visible.Methods inherited from class icyllis.modernui.material.MaterialDrawable
getAlpha, hasFocusStateSpecified, setAlpha, setTintList
Methods inherited from class icyllis.modernui.graphics.drawable.Drawable
applyTheme, canApplyTheme, clearMutated, copyBounds, copyBounds, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getHotspotBounds, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOutline, getPadding, getState, invalidateSelf, isAutoMirrored, isVisible, mutate, onBoundsChange, onLayoutDirectionChanged, onLevelChange, scaleFromDensity, scaleFromDensity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setTintBlendMode, unscheduleSelf
-
Constructor Details
-
SliderThumbDrawable
-
-
Method Details
-
draw
Description copied from class:Drawable
Draw in its bounds (set via setBounds) respecting optional effects such as alpha (set via setAlpha). -
isStateful
public boolean isStateful()Description copied from class:Drawable
Indicates whether this drawable will change its appearance based on state. Clients can use this to determine whether it is necessary to calculate their state and call setState.- Overrides:
isStateful
in classMaterialDrawable
- Returns:
- True if this drawable changes its appearance based on state, false otherwise.
- See Also:
-
onStateChange
Description copied from class:Drawable
Override this in your subclass to change appearance if you recognize the specified state.- Overrides:
onStateChange
in classMaterialDrawable
- Returns:
- Returns true if the state change has caused the appearance of the Drawable to change (that is, it needs to be drawn), else false if it looks the same and there is no need to redraw it since its last state.
-
setVisible
public boolean setVisible(boolean visible, boolean restart) Description copied from class:Drawable
Set whether this Drawable is visible. This generally does not impact the Drawable's behavior, but is a hint that can be used by some Drawables, for example, to decide whether run animations.- Overrides:
setVisible
in classDrawable
- Parameters:
visible
- Set to true if visible, false if not.restart
- You can supply true here to force the drawable to behave as if it has just become visible, even if it had last been set visible. Used for example to force animations to restart.- Returns:
- true if the new visibility is different from its previous state.
-
jumpToCurrentState
public void jumpToCurrentState()Description copied from class:Drawable
If this Drawable does transition animations between states, ask that it immediately jump to the current state and skip any active animations.- Overrides:
jumpToCurrentState
in classDrawable
-
getIntrinsicWidth
public int getIntrinsicWidth()Description copied from class:Drawable
Returns the drawable's intrinsic width.Intrinsic width is the width at which the drawable would like to be laid out, including any inherent padding. If the drawable has no intrinsic width, such as a solid color, this method returns -1.
- Overrides:
getIntrinsicWidth
in classDrawable
- Returns:
- the intrinsic width, or -1 if no intrinsic width
-
getIntrinsicHeight
public int getIntrinsicHeight()Description copied from class:Drawable
Returns the drawable's intrinsic height.Intrinsic height is the height at which the drawable would like to be laid out, including any inherent padding. If the drawable has no intrinsic height, such as a solid color, this method returns -1.
- Overrides:
getIntrinsicHeight
in classDrawable
- Returns:
- the intrinsic height, or -1 if no intrinsic height
-