public class SystemBarTintManager
extends java.lang.Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
SystemBarTintManager.SystemBarConfig
Class which describes system bar sizing and other characteristics for the current
device configuration.
|
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEFAULT_TINT_COLOR
The default system bar tint color value.
|
| 构造器和说明 |
|---|
SystemBarTintManager(android.app.Activity activity)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
SystemBarTintManager.SystemBarConfig |
getConfig()
Get the system bar configuration.
|
boolean |
isNavBarTintEnabled()
Is tinting enabled for the system navigation bar?
|
boolean |
isStatusBarTintEnabled()
Is tinting enabled for the system status bar?
|
void |
setNavigationBarAlpha(float alpha)
Apply the specified alpha to the system navigation bar.
|
void |
setNavigationBarTintColor(int color)
Apply the specified color tint to the system navigation bar.
|
void |
setNavigationBarTintDrawable(android.graphics.drawable.Drawable drawable)
Apply the specified drawable to the system navigation bar.
|
void |
setNavigationBarTintEnabled(boolean enabled)
Enable tinting of the system navigation bar.
|
void |
setNavigationBarTintResource(int res)
Apply the specified drawable or color resource to the system navigation bar.
|
void |
setStatusBarAlpha(float alpha)
Apply the specified alpha to the system status bar.
|
void |
setStatusBarTintColor(int color)
Apply the specified color tint to the system status bar.
|
void |
setStatusBarTintDrawable(android.graphics.drawable.Drawable drawable)
Apply the specified drawable to the system status bar.
|
void |
setStatusBarTintEnabled(boolean enabled)
Enable tinting of the system status bar.
|
void |
setStatusBarTintResource(int res)
Apply the specified drawable or color resource to the system status bar.
|
void |
setTintAlpha(float alpha)
Apply the specified alpha to all system UI bars.
|
void |
setTintColor(int color)
Apply the specified color tint to all system UI bars.
|
void |
setTintDrawable(android.graphics.drawable.Drawable drawable)
Apply the specified drawable to all system UI bars.
|
void |
setTintResource(int res)
Apply the specified drawable or color resource to all system UI bars.
|
public static final int DEFAULT_TINT_COLOR
public SystemBarTintManager(android.app.Activity activity)
activity - The host activity.public void setStatusBarTintEnabled(boolean enabled)
enabled - True to enable tinting, false to disable it (default).public void setNavigationBarTintEnabled(boolean enabled)
enabled - True to enable tinting, false to disable it (default).public void setTintColor(int color)
color - The color of the background tint.public void setTintResource(int res)
res - The identifier of the resource.public void setTintDrawable(android.graphics.drawable.Drawable drawable)
drawable - The drawable to use as the background, or null to remove it.public void setTintAlpha(float alpha)
alpha - The alpha to usepublic void setStatusBarTintColor(int color)
color - The color of the background tint.public void setStatusBarTintResource(int res)
res - The identifier of the resource.public void setStatusBarTintDrawable(android.graphics.drawable.Drawable drawable)
drawable - The drawable to use as the background, or null to remove it.public void setStatusBarAlpha(float alpha)
alpha - The alpha to usepublic void setNavigationBarTintColor(int color)
color - The color of the background tint.public void setNavigationBarTintResource(int res)
res - The identifier of the resource.public void setNavigationBarTintDrawable(android.graphics.drawable.Drawable drawable)
drawable - The drawable to use as the background, or null to remove it.public void setNavigationBarAlpha(float alpha)
alpha - The alpha to usepublic SystemBarTintManager.SystemBarConfig getConfig()
public boolean isStatusBarTintEnabled()
public boolean isNavBarTintEnabled()