TextView 上顯示的文字超過其最長限制的時候,要如何實作以下效果:
values/styles.xml
4px
4px
#ffffffff
12sp
#ff00ff00
5
3
6
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/AudioFileInfoOverlayText"
android:text="aaaa"
android:gravity="center" />
android:shadowColor指定文本陰影的顔色,需要與shadowRadius一起使用。android:shadowDx設定陰影橫向坐标開始位置。android:shadowDy設定陰影縱向坐标開始位置。android:shadowRadius設定陰影的半徑。設定為0.1就變成字型的顔色了,一般設定為3.0的效果比較好。