首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

把TextView中的文字增添阴影效果及Style的使用

2012-07-01 
把TextView中的文字添加阴影效果及Style的使用?android:shadowColor 阴影颜色android:shadowDx 阴影的水平

把TextView中的文字添加阴影效果及Style的使用

?

android:shadowColor 阴影颜色

android:shadowDx 阴影的水平偏移量

android:shadowDy 阴影的垂直偏移量

android:shadowRadius 阴影的范围

?

大多数情况下,某一类的TextView控件需要统一的风格,如加阴影等,那么可以使用style。

?

??? ??? <TextView style="@style/StyleBarTitle"
??? ??? ??? android:id="@+id/txBarTitle1"
??? ??? ??? android:text="资讯行情" />

?

然后在values文件夹下创建styles.xml文件,内容为:

?这样的最大优点是减低代码冗余度,在需要更改某一类控件的样式时,不用一个一个的改过来,只需要更改styles文件中即可。

摘自:http://blog.csdn.net/xjanker2/article/details/6364770

热点排行