public class BootstrapCircleThumbnail
extends ImageView
| Modifier and Type | Field and Description |
|---|---|
protected float |
baselineBorderWidth |
protected float |
baselineOuterBorderWidth |
protected BootstrapBrand |
bootstrapBrand |
protected float |
bootstrapSize |
protected Paint |
borderPaint |
protected boolean |
hasBorder |
protected Paint |
imagePaint |
protected Paint |
placeholderPaint |
protected Bitmap |
sourceBitmap |
KEYKEY_DISPLAYEDKEY| Constructor and Description |
|---|
BootstrapCircleThumbnail(Context context) |
BootstrapCircleThumbnail(Context context,
AttributeSet attrs) |
BootstrapCircleThumbnail(Context context,
AttributeSet attrs,
int defStyle) |
| Modifier and Type | Method and Description |
|---|---|
BootstrapBrand |
getBootstrapBrand() |
float |
getBootstrapSize()
Retrieves the scale factor that should be used to scale a view from its baseline size.
|
ScaleType |
getScaleType() |
protected void |
initialise(AttributeSet attrs) |
boolean |
isBorderDisplayed() |
protected void |
onDraw(Canvas canvas) |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
void |
onRestoreInstanceState(Parcelable state) |
Parcelable |
onSaveInstanceState() |
protected void |
onSizeChanged(int w,
int h,
int oldw,
int oldh) |
void |
setBootstrapBrand(BootstrapBrand bootstrapBrand)
Changes the color of the view to match the given Bootstrap Brand
|
void |
setBootstrapSize(DefaultBootstrapSize bootstrapSize)
Convenience method that sets the scale factor using a default bootstrap size enum value.
|
void |
setBootstrapSize(float bootstrapSize)
Sets the scale factor that should be used to scale a view from its baseline size.
|
void |
setBorderDisplayed(boolean displayed)
Sets whether a border should be displayed or not
|
void |
setImageBitmap(Bitmap bm) |
void |
setImageDrawable(Drawable drawable) |
void |
setImageResource(int resId) |
void |
setImageURI(Uri uri) |
void |
setScaleType(ScaleType scaleType) |
protected void |
updateImageState()
This method is called when the Circle Image needs to be recreated due to changes in size etc.
|
protected BootstrapBrand bootstrapBrand
protected boolean hasBorder
protected float baselineBorderWidth
protected float baselineOuterBorderWidth
protected float bootstrapSize
protected Bitmap sourceBitmap
protected final Paint placeholderPaint
protected final Paint borderPaint
protected final Paint imagePaint
public BootstrapCircleThumbnail(Context context)
public BootstrapCircleThumbnail(Context context,
AttributeSet attrs)
public BootstrapCircleThumbnail(Context context,
AttributeSet attrs,
int defStyle)
protected void initialise(AttributeSet attrs)
protected void updateImageState()
protected void onDraw(@NonNull
Canvas canvas)
protected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
public Parcelable onSaveInstanceState()
public void onRestoreInstanceState(Parcelable state)
protected void onSizeChanged(int w,
int h,
int oldw,
int oldh)
public void setScaleType(ScaleType scaleType)
public ScaleType getScaleType()
public void setImageBitmap(Bitmap bm)
public void setImageDrawable(Drawable drawable)
public void setImageResource(int resId)
public void setImageURI(Uri uri)
public void setBootstrapBrand(@NonNull
BootstrapBrand bootstrapBrand)
BootstrapBrandViewsetBootstrapBrand in interface BootstrapBrandViewbootstrapBrand - the Bootstrap Brand@NonNull public BootstrapBrand getBootstrapBrand()
getBootstrapBrand in interface BootstrapBrandViewpublic void setBorderDisplayed(boolean displayed)
BorderViewsetBorderDisplayed in interface BorderViewdisplayed - whether a border should be displayed or notpublic boolean isBorderDisplayed()
isBorderDisplayed in interface BorderViewpublic float getBootstrapSize()
BootstrapSizeViewgetBootstrapSize in interface BootstrapSizeViewpublic void setBootstrapSize(float bootstrapSize)
BootstrapSizeViewsetBootstrapSize in interface BootstrapSizeViewbootstrapSize - the scale factorpublic void setBootstrapSize(DefaultBootstrapSize bootstrapSize)
BootstrapSizeViewsetBootstrapSize in interface BootstrapSizeViewbootstrapSize - a default scale factor