public class DrawerUIUtils
extends java.lang.Object
| Constructor and Description |
|---|
DrawerUIUtils() |
| Modifier and Type | Method and Description |
|---|---|
static android.graphics.drawable.StateListDrawable |
getDrawerItemBackground(int selected_color)
helper to create a StateListDrawable for the drawer item background
|
static android.graphics.drawable.StateListDrawable |
getIconStateList(android.graphics.drawable.Drawable icon,
android.graphics.drawable.Drawable selectedIcon)
helper to create a stateListDrawable for the icon
|
static int |
getOptimalDrawerWidth(android.content.Context context)
helper to calculate the optimal drawer width
|
static android.graphics.drawable.Drawable |
getPlaceHolder(android.content.Context ctx)
helper method to get a person placeHolder drawable
|
static android.content.res.ColorStateList |
getTextColorStateList(int text_color,
int selected_text_color)
helper to create a colorStateList for the text
|
static boolean |
isSystemBarOnBottom(android.content.Context ctx)
helper to check if the system bar is on the bottom of the screen
|
static void |
setDrawerVerticalPadding(android.view.View v)
helper to set the vertical padding to the DrawerItems
this is required because on API Level 17 the padding is ignored which is set via the XML
|
static void |
setDrawerVerticalPadding(android.view.View v,
int level)
helper to set the vertical padding including the extra padding for deeper item hirachy level to the DrawerItems
this is required because on API Level 17 the padding is ignored which is set via the XML
|
public static android.content.res.ColorStateList getTextColorStateList(int text_color,
int selected_text_color)
text_color - selected_text_color - public static android.graphics.drawable.StateListDrawable getIconStateList(android.graphics.drawable.Drawable icon,
android.graphics.drawable.Drawable selectedIcon)
icon - selectedIcon - public static android.graphics.drawable.StateListDrawable getDrawerItemBackground(int selected_color)
selected_color - public static int getOptimalDrawerWidth(android.content.Context context)
context - public static android.graphics.drawable.Drawable getPlaceHolder(android.content.Context ctx)
ctx - public static void setDrawerVerticalPadding(android.view.View v)
v - public static void setDrawerVerticalPadding(android.view.View v,
int level)
v - level - public static boolean isSystemBarOnBottom(android.content.Context ctx)
ctx -