| java.lang.Object | |
| ↳ | android.support.v17.leanback.graphics.ColorOverlayDimmer |
Helper class for assigning a dim color to Paint. It holds the alpha value for the current active level.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Change the RGB of the color according to current dim level.
| |||||||||||
Creates a ColorOverlayDimmer for the given color and levels.
| |||||||||||
Creates a default ColorOverlayDimmer.
| |||||||||||
Draw a dim color overlay on top of a child View inside the canvas of
the parent View.
| |||||||||||
Returns the alpha value for the dimmer.
| |||||||||||
Returns the float value between 0 and 1 corresponding to alpha between
0 and 255.
| |||||||||||
Returns the Paint object set to the current alpha value.
| |||||||||||
Returns whether the dimmer needs to draw.
| |||||||||||
Sets the active level of the dimmer.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Change the RGB of the color according to current dim level. Maintains the alpha value of the color.
| color | The color to apply the dim level to. |
|---|
Creates a ColorOverlayDimmer for the given color and levels.
| dimColor | The color for fully dimmed. Only the RGB values are used; the alpha channel is ignored. |
|---|---|
| activeLevel | The level of dimming when the View is in its active state. Must be a float value between 0.0 and 1.0. |
| dimmedLevel | The level of dimming when the View is in its dimmed state. Must be a float value between 0.0 and 1.0. |
Creates a default ColorOverlayDimmer.
Draw a dim color overlay on top of a child View inside the canvas of the parent View.
| c | Canvas of the parent View. |
|---|---|
| v | A child of the parent View. |
| includePadding | Set to true to draw overlay on padding area of the View. |
Returns the alpha value for the dimmer.
Returns the float value between 0 and 1 corresponding to alpha between 0 and 255.
Returns whether the dimmer needs to draw.
Sets the active level of the dimmer. Updates the alpha value based on the level.
| level | A float between 0 (fully dim) and 1 (fully active). |
|---|