java.lang.Object | |
↳ | android.support.v17.leanback.graphics.ColorFilterDimmer |
Helper class for applying a dim level to a View. The ColorFilterDimmer uses a ColorFilter in a Paint object to dim the view according to the currently active level.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Apply current the ColorFilter to a View.
| |||||||||||
Creates a ColorFilterDimmer for the given color and levels..
| |||||||||||
Creates a default ColorFilterDimmer.
| |||||||||||
Gets the ColorFilter set to the current dim level.
| |||||||||||
Gets the Paint object set to the current dim level.
| |||||||||||
Sets the active level of the dimmer.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Apply current the ColorFilter to a View. This method will set the hardware layer of the view when applying a filter, and remove it when not applying a filter.
view | The View to apply the ColorFilter to. |
---|
Creates a ColorFilterDimmer for the given color and levels..
dimmer | The ColorFilterCache for dim color. |
---|---|
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 ColorFilterDimmer. Uses the default color and level for the dimmer.
context | A Context used to retrieve Resources. |
---|
Gets the ColorFilter set to the current dim level.
Gets the Paint object set to the current dim level.
Sets the active level of the dimmer. Updates the ColorFilter based on the level.
level | A float between 0 (fully dim) and 1 (fully active). |
---|