android TextView 阴影效果,和使用style学习
16lz
2021-01-23
阅读更多
[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"?>
更多相关文章
- UI控件之显示文本控件TextView(上)
- Android 学习1----控件的学习
- android更换控件默认样式
- [整] Android ListView 去除边缘阴影、选中色、拖动背景色等
- Android M新控件之FloatingActionButton,TextInputLayout,Snackbar
- Android TextView的特殊使用:阴影,加样式
- android自学第二天 Android API Guide学习和LinearLayout布局及
- Android 如何自己定义控件的样式 Shape