Square Thumbnail with Image

<!-- Square Thumbnail with Image -->
<com.beardedhen.androidbootstrap.BootstrapThumbnail
android:id="@+id/thumbnailTwo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
bootstrapthumbnail:bt_width="150dp"
bootstrapthumbnail:bt_height="110dp"
bootstrapthumbnail:bt_image="@drawable/image"/>

The above code creates a square thumbnail with an image on the inside.

Examples:

The following attributes can be added to any BootstrapThumbnail:

bt_roundedCorners="true" True if you want round corners on the thumbnail. Default is square corners if not specified

bt_image="@drawable/image" Specify drawable for image. If no image is specified, a default thumbnail will be created with the dimensions overlaying the thumbnail.

bt_width="100dp" Width of thumbnail

bt_height="75dp" Height of thumbnail

bt_inside_padding="8dp" Thumbnail padding. I recommend to just use the default and not specify

You can also set the image programmatically

setImage(drawable) sets the image. Pass in a drawable

Circle Thumbnail with Image

<!-- Circle Thumbnail with Image -->
<com.beardedhen.androidbootstrap.BootstrapCircleThumbnail
android:id="@+id/thumbnailOneTest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
bootstrap:bct_image="@drawable/headshot"
bootstrap:bct_size="xlarge"/>

The above code creates an x-large circle thumbnail with an image inside. Below is an example. The grey background will not be generated, it's just the background of the screenshot

The following attributes can be added to a BootstrapCircleThumbnail:

bct_image="@drawable/image" Image to place inside

bct_size="small" Size of thumbnail. Sizes available are: small medium large xlarge

bct_minimal="true" Set to true if you don't want the white border.

Example of a minimal circle thumbnail below:

最新文章

  1. Apache设置页面认证(原创贴-转载请注明出处)
  2. zend studio 的使用
  3. pycharm运行脚本为何不生成测试报告?
  4. javascript中可变值与不可变值(原始值)
  5. 利用ARCHPR明文破解获取PDF
  6. CentOS7安装mysql5.6.26
  7. C++ Set &amp; MultiSet
  8. 如何用python语句获得Python的安装目录
  9. 一道C语言面试题:写一个宏,将16位的整数转为Big Endian
  10. 关于IEDA中的字母与数字的坑
  11. intellij idea解除svn关联
  12. 移动端常见bug
  13. Leetcode 记录(1~100)
  14. if语句实例
  15. linux 修改文件内容 vi命令
  16. WPF自定义控件的自定义属性绑定后不更新问题
  17. java classpath作用
  18. u-boot中网口处理--硬件部分
  19. 修改Yii2的默认语言language为中文zh-CN的方法
  20. [spring]Bean注入——在XML中配置

热门文章

  1. IOS8刷机之后
  2. angular组件间的信息传递
  3. 【24.67%】【codeforces 551C】 GukiZ hates Boxes
  4. [JS Compose] 2. Enforce a null check with composable code branching using Either
  5. C++学习笔记8-操作符&amp;amp;指针
  6. JAVA学习路线图---(JAVA1234) 分类: B1_JAVA 2013-10-05 10:22 502人阅读 评论(1) 收藏
  7. Android RadioGroup的RadioButton 选择改变字体颜色和背景颜色
  8. Android 自定义RadioButton样式
  9. 群晖synology的Video Station无法通过浏览器在线播放视频
  10. centos-mirrors