public class ColorPreviewDataBinder
extends <any>
| Constructor and Description |
|---|
ColorPreviewDataBinder(android.content.Context context,
android.graphics.drawable.Drawable background,
AbstractColorPickerPreference.PreviewShape shape,
int size,
int borderWidth,
int borderColor)
Creates a new data loader, which allows to create previews of colors.
|
| Modifier and Type | Method and Description |
|---|---|
protected android.graphics.Bitmap |
doInBackground(java.lang.Integer key,
java.lang.Void... params) |
android.graphics.drawable.Drawable |
getBackground()
Returns the background of the preview.
|
int |
getBorderColor()
Returns the border color of the preview.
|
int |
getBorderWidth()
Returns the border width of the preview.
|
AbstractColorPickerPreference.PreviewShape |
getShape()
Returns the shape of the preview.
|
int |
getSize()
Returns the size of the preview.
|
protected void |
onPostExecute(android.widget.ImageView view,
android.graphics.Bitmap data,
long duration,
java.lang.Void... params) |
void |
setBackground(android.graphics.drawable.Drawable background)
Sets the background of the preview.
|
void |
setBorderColor(int borderColor)
Sets the border color of the preview.
|
void |
setBorderWidth(int borderWidth)
Sets the border width of the preview.
|
void |
setShape(AbstractColorPickerPreference.PreviewShape shape)
Sets the shape of the preview.
|
void |
setSize(int size)
Sets the size of the preview.
|
public ColorPreviewDataBinder(android.content.Context context,
android.graphics.drawable.Drawable background,
AbstractColorPickerPreference.PreviewShape shape,
int size,
int borderWidth,
int borderColor)
context - The context, which should be used by the data loader, as an instance of the class
Context. The context may not be nullbackground - The background of the preview as an instance of the class Drawable or null,
if no background should be shownshape - The shape of the preview as a value of the enum AbstractColorPickerPreference.PreviewShape. The shape may
not be nullsize - The size of the preview as an Integer value in pixels. The size must be at
least 1borderWidth - The border width of the preview as an Integer value in pixels. The border
width must be at least 0borderColor - The border color of the preview as an Integer valuepublic final android.graphics.drawable.Drawable getBackground()
Drawablepublic final void setBackground(android.graphics.drawable.Drawable background)
background - The background, which should be set, as an instance of the class Drawable or
null, if no background should be shownpublic final AbstractColorPickerPreference.PreviewShape getShape()
AbstractColorPickerPreference.PreviewShape. The shape may
either be CIRCLE or SQUAREpublic final void setShape(AbstractColorPickerPreference.PreviewShape shape)
shape - The shape, which should be set, as a value of the enum AbstractColorPickerPreference.PreviewShape. The
shape may not be nullpublic final int getSize()
Integer value in pixelspublic final void setSize(int size)
size - The size, which should be set, as an Integer value in pixels. The size must
be at least 1public final int getBorderWidth()
Integer value in pixelspublic final void setBorderWidth(int borderWidth)
borderWidth - The border width, which should be set, as an Integer value in pixels. The
border width must be at least 0public final int getBorderColor()
Integer valuepublic final void setBorderColor(int borderColor)
borderColor - The border color, which should be set, as an Integer valueprotected final android.graphics.Bitmap doInBackground(java.lang.Integer key,
java.lang.Void... params)
protected final void onPostExecute(android.widget.ImageView view,
android.graphics.Bitmap data,
long duration,
java.lang.Void... params)