android TextView 阴影效果,和使用style学习
16lz
2021-12-04
阅读更多
[xhtml] view plain copy
- <TextView android:id="@+id/tvText1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="text1"
- android:textSize="28sp"
- android:textStyle="bold"
- android:textColor="#FFFFFF"
- android:shadowColor="#ff000000"
- android:shadowDx="2"
- android:shadowDy="2"
- android:shadowRadius="1"/>
android:shadowColor 阴影颜色
android:shadowDx 阴影的水平偏移量
android:shadowDy 阴影的垂直偏移量
android:shadowRadius 阴影的范围
大多数情况下,某一类的TextView控件需要统一的风格,如加阴影等,那么可以使用style。
android:text="资讯行情" />
然后在values文件夹下创建styles.xml文件,内容为:
<?xml version="1.0" encoding="utf-8"?>
更多相关文章
- Android(安卓)RelativeLayout 相对布局解析
- 控件布局_RelativeLayout
- Android---2---TextView、Button、EditText
- Android中RelativeLayout中各个属性的用法总结
- Android中RelativeLayout各个属性的含义
- Android中RelativeLayout各个属性的含义
- Android开发如何设置文字阴影
- android 所有布局属性和UI控件
- android layout属性介绍