Bootstrap Thumbnail
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:
最新文章
- Apache设置页面认证(原创贴-转载请注明出处)
- zend studio 的使用
- pycharm运行脚本为何不生成测试报告?
- javascript中可变值与不可变值(原始值)
- 利用ARCHPR明文破解获取PDF
- CentOS7安装mysql5.6.26
- C++ Set &; MultiSet
- 如何用python语句获得Python的安装目录
- 一道C语言面试题:写一个宏,将16位的整数转为Big Endian
- 关于IEDA中的字母与数字的坑
- intellij idea解除svn关联
- 移动端常见bug
- Leetcode 记录(1~100)
- if语句实例
- linux 修改文件内容 vi命令
- WPF自定义控件的自定义属性绑定后不更新问题
- java classpath作用
- u-boot中网口处理--硬件部分
- 修改Yii2的默认语言language为中文zh-CN的方法
- [spring]Bean注入——在XML中配置
热门文章
- IOS8刷机之后
- angular组件间的信息传递
- 【24.67%】【codeforces 551C】 GukiZ hates Boxes
- [JS Compose] 2. Enforce a null check with composable code branching using Either
- C++学习笔记8-操作符&;amp;指针
- JAVA学习路线图---(JAVA1234) 分类: B1_JAVA 2013-10-05 10:22 502人阅读 评论(1) 收藏
- Android RadioGroup的RadioButton 选择改变字体颜色和背景颜色
- Android 自定义RadioButton样式
- 群晖synology的Video Station无法通过浏览器在线播放视频
- centos-mirrors