Skip to content

Bootstrap Circle Thumbnail

fractalwrench edited this page Jan 8, 2016 · 1 revision

###BootstrapCircleThumbnail

See the sample code. This ImageView displays images in a center-cropped circle, whose edges are themed with BootstrapBrand.

<com.beardedhen.androidbootstrap.BootstrapCircleThumbnail
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:src="@drawable/my_drawable"
 app:bootstrapBrand="danger"
 app:hasBorder="true"
 />

Whether the border is shown and its color are defined via the XML attributes, as above. Setters are also available on the view class.

BootstrapCircleThumbnail thumbnail = new BootstrapThumbnail(context);
thumbnail.setImageResource(R.drawable.my_resource);
thumbnail.setBorderDisplayed(true);
BootstrapCircleThumbnail