java.lang.Object | |||
↳ | android.graphics.drawable.Drawable | ||
↳ | android.graphics.drawable.BitmapDrawable | ||
↳ | greendroid.graphics.drawable.ActionBarDrawable |
A specialized Drawable dedicated to ActionBarItem
s. It automatically
adapts its color depending on its current state. By default, the colors are:
The ActionBarDrawable is a great replacement to the StateListDrawable that
should be used in ActionBar
s.
GreenDroid offers a smart way to change the default alternative and normal
colors in an application-wide manner. In order to do that, override the
gdActionBarItemColorNormal
and
gdActionBarItemColorAlt
attributes in your application theme.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new ActionBarDrawable using the specified Drawable.
| |||||||||||
Create a new ActionBarDrawable using the specified Drawable.
| |||||||||||
Create a new ActionBarDrawable using the specified resource identifier.
| |||||||||||
Create a new ActionBarDrawable using the specified resource identifier.
| |||||||||||
This constructor is deprecated.
Use
ActionBarDrawable(Context, Drawable)
as it looks for the default alternative/normal colors in the
theme.
| |||||||||||
This constructor is deprecated.
Use
ActionBarDrawable(Context, Drawable, int, int)
as it looks for the default alternative/normal colors in the
theme.
| |||||||||||
This constructor is deprecated.
Use
ActionBarDrawable(Context, int)
as it looks for the default alternative/normal colors in the
theme.
| |||||||||||
This constructor is deprecated.
Use
ActionBarDrawable(Context, int, int, int)
as it looks for the default alternative/normal colors in the
theme.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.graphics.drawable.BitmapDrawable
| |||||||||||
From class
android.graphics.drawable.Drawable
| |||||||||||
From class
java.lang.Object
|
Create a new ActionBarDrawable using the specified Drawable.
context | The Context used to retrieve resources (Bitmap/theme) |
---|---|
d | The icon's Drawable (should be a BitmapDrawable) |
Create a new ActionBarDrawable using the specified Drawable.
context | The Context used to retrieve resources (Bitmap/theme) |
---|---|
d | The icon's Drawable (should be a BitmapDrawable) |
normalColor | The color used to color the icon in normal mode |
altColor | The color used to color the icon in alternative mode |
Create a new ActionBarDrawable using the specified resource identifier.
context | The Context used to retrieve resources (Bitmap/theme) |
---|---|
resId | The resource identifier pointing to the icon's Bitmap |
Create a new ActionBarDrawable using the specified resource identifier.
context | The Context used to retrieve resources (Bitmap/theme) |
---|---|
resId | The resource identifier pointing to the icon's Bitmap |
normalColor | The color used to color the icon in normal mode |
altColor | The color used to color the icon in alternative mode |
This constructor is deprecated.
Use
ActionBarDrawable(Context, Drawable)
as it looks for the default alternative/normal colors in the
theme.
Create a new ActionBarDrawable
res | The Resources from which the given icon is retrieved |
---|---|
d | The icon's Drawable |
This constructor is deprecated.
Use
ActionBarDrawable(Context, Drawable, int, int)
as it looks for the default alternative/normal colors in the
theme.
Create a new ActionBarDrawable
res | The Resources from which the given icon is retrieved |
---|---|
d | The icon's Drawable |
normalColor | The color used to color the icon in normal mode |
altColor | The color used to color the icon in alternative mode |
This constructor is deprecated.
Use ActionBarDrawable(Context, int)
as it looks for the default alternative/normal colors in the
theme.
Create a new ActionBarDrawable
res | The Resources from which the given icon is retrieved |
---|---|
resId | The icon's resource ID |
This constructor is deprecated.
Use
ActionBarDrawable(Context, int, int, int)
as it looks for the default alternative/normal colors in the
theme.
Create a new ActionBarDrawable
res | The Resources from which the given icon is retrieved |
---|---|
resId | The icon's resource ID |
normalColor | The color used to color the icon in normal mode |
altColor | The color used to color the icon in alternative mode |