Type: protected
abstract
void
Called by the constructor, used to initialize and inflate the child views of the picker layout.
Type: private
void
Called after init()
, used to set up child views that should be
present inmostpickers, such as the "alpha" slider.
Type: public
void
Set the picker's color. Changes to values will not be animated.
Parameter Name | Description |
---|---|
color | The picker's color. |
Type: public
void
Set the picker's color.
Parameter Name | Description |
---|---|
color | The picker's color. |
animate | Whether to animate changes in values. |
Type: @ColorInt
public
abstract
int
Get the current color value.
Returned Value: The current color value.
Type: @NonNull
public
abstract
String
Get the "name" of the type of picker view. For example, an RGBPickerView would return the string "RGB".
Returned Value: The "name" of the type of picker.
Type: public
boolean
Determine whether the view is currently tracking a touch interaction. This is useful for determining when the next color update will occur and deciding whether to animate a value change.
Returned Value: Whether the view is currently tracking a touch interaction.
Type: public
void
Set whether the color's alpha value can be changed.
Parameter Name | Description |
---|---|
isAlpha | Whether the color's alpha value can be changed. |
Type: public
boolean
Determine whether the color's alpha value can be modified.
Returned Value: Whether the color's alpha value can be modified.
Type: public
void
Set the color's alpha, from 0-255. Change in values will not be animated.
Parameter Name | Description |
---|---|
alpha | The color's alpha, from 0-255. |
Type: public
void
Set the color's alpha, between 0-1 (inclusive).
Parameter Name | Description |
---|---|
alpha | The color's alpha, between 0-1 (inclusive). |
animate | Whether to animate the change in values. |
Type: public
int
Gets the color's alpha, from 0-255.
Returned Value: The color's alpha, from 0-255.
Type: public
void
Set an interface to receive updates to color values. This may be called multiple times in succession if a slider is dragged or animated; be wary of performance.
Parameter Name | Description |
---|---|
listener | An interface to receive color updates. |
Type: public
PickerView
Set a permissions handler interface for this view to use for permission requests.
Parameter Name | Description |
---|---|
requestHandler | The interface to pass permission requests to. |
Returned Value: "This" view instance, for method chaining.
Type: public
boolean
Determine whether the PickerView currently has a request handler.
Returned Value: True if the view has a request handler.