20111 月26
Android 开发:TextView 文字阴影效果
res/values/styles.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="AudioFileInfoOverlayText"> <item name="android:paddingLeft">4px</item> <item name="android:paddingBottom">4px</item> <item name="android:textColor">#f1f1f1</item> <item name="android:textSize">60sp</item> <item name="android:shadowColor">#4d4d4d</item> <item name="android:shadowDx">0</item> <item name="android:shadowDy">-3</item> <item name="android:shadowRadius">3</item> </style> </resources>
res/layout/main.xml
<TextView style="@style/AudioFileInfoOverlayText" android:id="@+id/title" android:layout_gravity="bottom" android:gravity="center_vertical|center_horizontal" android:layout_width="640px" android:layout_height="151px" android:background="@drawable/compass_bottom" ></TextView>
本文地址:https://wizzer.cn/archives/1571 , 转载请保留.