public class FastAdapterUIUtils
extends java.lang.Object
| Constructor and Description |
|---|
FastAdapterUIUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
adjustAlpha(int color,
int alpha)
adjusts the alpha of a color
|
static android.graphics.drawable.Drawable |
getRippleDrawable(int normalColor,
int pressedColor,
int radius)
helper to create an ripple drawable with the given normal and pressed color
|
static int |
getSelectableBackground(android.content.Context ctx)
helper to get the system default selectable background
|
static android.graphics.drawable.StateListDrawable |
getSelectableBackground(android.content.Context ctx,
int selected_color,
boolean animate)
helper to get the system default selectable background inclusive an active state
|
static android.graphics.drawable.StateListDrawable |
getSelectablePressedBackground(android.content.Context ctx,
int selected_color,
int pressed_alpha,
boolean animate)
helper to get the system default selectable background inclusive an active and pressed state
|
public static android.graphics.drawable.StateListDrawable getSelectableBackground(android.content.Context ctx,
int selected_color,
boolean animate)
ctx - the contextselected_color - the selected coloranimate - true if you want to fade over the states (only animates if API newer than Build.VERSION_CODES.HONEYCOMB)public static android.graphics.drawable.StateListDrawable getSelectablePressedBackground(android.content.Context ctx,
int selected_color,
int pressed_alpha,
boolean animate)
ctx - the contextselected_color - the selected colorpressed_alpha - 0-255animate - true if you want to fade over the states (only animates if API newer than Build.VERSION_CODES.HONEYCOMB)public static int adjustAlpha(int color,
int alpha)
color - the coloralpha - the alpha value we want to set 0-255public static int getSelectableBackground(android.content.Context ctx)
ctx - public static android.graphics.drawable.Drawable getRippleDrawable(int normalColor,
int pressedColor,
int radius)
normalColor - the normal colorpressedColor - the pressed colorradius - the button radius