Android - TextView添加图片
来源:互联网 发布:超链接执行js 编辑:程序博客网 时间:2024/05/22 07:59
TextView添加图片
本文地址:http://blog.csdn.net/caroline_wendy
Android UI设计时,经常需要在文字周围添加图片。
比较简单的方法是直接使用Layout把View组合到一起:
<ImageView android:layout_width=“wrap_content" android:layout_height="wrap_content" android:src="@drawable/icon_home_askdoc" android:scaleType="fitXY" android:layout_above="@+id/asking_doctor" android:layout_centerHorizontal="true"/>ImageView,适配图片大小,填充"scaleType:fitXY",视图的水平居中"centerHorizontal:true"。
也可以直接在TextView的周围添加图片(drawable):
<TextView style="@style/HomepageGridMenuTextStyle" android:drawablePadding="8dp" android:drawableTop="@drawable/icon_home_avatar" android:text="@string/home_avatar"/>TextView,drawableTop在文字上面添加图片,但是无法调节图片的属性。
2 0
- Android - TextView添加图片
- Android TextView中添加图片
- Android textView文字添加图片 imageSpan使用
- android TextView滚动、添加图片、设置颜色
- Android TextView中添加图片的方法
- Android--EditText/TextView 中添加图片,以及点击图片.
- Android: TextView添加图片(drawable)及动画实例
- Android如何动态的给TextView左右上下添加图片
- android textView添加阴影
- Android TextView 添加链接
- Android动态添加TextView
- android TextView 添加下划线
- 在TextView中添加图片
- 在TextView周围添加图片
- Textview动态添加右图片
- 在TextView中添加图片
- Android TextView 加入图片
- Android TextView显示图片
- VC位拆分与拼接
- SQLServer触发器实例
- 在Windows2008 R2系统中无法看见Microsoft Excel Application的问题解决方案
- css知多少(5)——选择器
- 大数据将对网络诈骗产生威慑力,360网络骗子地图备受关注
- Android - TextView添加图片
- 灰度图像--图像分割 Sobel算子
- 使用Proguard扰乱器保护Java代码
- 练习听力的电视剧和电影
- UML类图几种关系的总结
- 第343天(37W+5)
- 标准建站过程中应该注意CSS的兼容性问题
- Android - 使用PS修改PNG图片大小
- java LinkedList的使用方法介绍