public class ColorHolder
extends java.lang.Object
| Constructor and Description |
|---|
ColorHolder() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyTo(android.content.Context ctx,
android.graphics.drawable.GradientDrawable drawable)
set the textColor of the ColorHolder to an drawable
|
void |
applyToBackground(android.view.View view)
set the textColor of the ColorHolder to a view
|
static void |
applyToOr(ColorHolder colorHolder,
android.widget.TextView textView,
android.content.res.ColorStateList colorDefault)
a small static helper to set the text color to a textView null save
|
void |
applyToOr(android.widget.TextView textView,
android.content.res.ColorStateList colorDefault)
a small helper to set the text color to a textView null save
|
static void |
applyToOrTransparent(ColorHolder colorHolder,
android.content.Context ctx,
android.graphics.drawable.GradientDrawable gradientDrawable)
a small static helper to set the color to a GradientDrawable null save
|
static int |
color(ColorHolder colorHolder,
android.content.Context ctx)
a small static helper class to get the color from the colorHolder
|
static int |
color(ColorHolder colorHolder,
android.content.Context ctx,
int colorStyle,
int colorDefault)
a small static helper class to get the color from the colorHolder or from the theme or from the default color value
|
int |
color(android.content.Context ctx)
a small helper to get the color from the colorHolder
|
int |
color(android.content.Context ctx,
int colorStyle,
int colorDefaultRes)
a small helper class to get the color from the colorHolder or from the theme or from the default color value
|
static ColorHolder |
fromColor(int colorInt) |
static ColorHolder |
fromColorRes(int colorRes) |
int |
getColorInt() |
int |
getColorRes() |
void |
setColorInt(int mColorInt) |
void |
setColorRes(int mColorRes) |
public int getColorInt()
public void setColorInt(int mColorInt)
public int getColorRes()
public void setColorRes(int mColorRes)
public static ColorHolder fromColorRes(int colorRes)
public static ColorHolder fromColor(int colorInt)
public void applyTo(android.content.Context ctx,
android.graphics.drawable.GradientDrawable drawable)
ctx - drawable - public void applyToBackground(android.view.View view)
view - public void applyToOr(android.widget.TextView textView,
android.content.res.ColorStateList colorDefault)
textView - colorDefault - public int color(android.content.Context ctx,
int colorStyle,
int colorDefaultRes)
ctx - colorStyle - colorDefaultRes - public int color(android.content.Context ctx)
ctx - public static int color(ColorHolder colorHolder, android.content.Context ctx, int colorStyle, int colorDefault)
colorHolder - ctx - colorStyle - colorDefault - public static int color(ColorHolder colorHolder, android.content.Context ctx)
colorHolder - ctx - public static void applyToOr(ColorHolder colorHolder, android.widget.TextView textView, android.content.res.ColorStateList colorDefault)
colorHolder - textView - colorDefault - public static void applyToOrTransparent(ColorHolder colorHolder, android.content.Context ctx, android.graphics.drawable.GradientDrawable gradientDrawable)
colorHolder - ctx - gradientDrawable -