创建一个style文件在values文件夹下

 

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <style name="styleTest">
        <item name="android:textColor">#FFFFFF</item>
        <item name="android:shadowColor">#ffffff00</item>
        <item name="android:shadowDx">10</item>
        <item name="android:shadowDy">0</item>
        <item name="android:shadowRadius">20</item>
     </style>
</resources>

这里

android:shadowColor 阴影颜色
android:shadowDx 阴影的水平偏移量
android:shadowDy 阴影的垂直偏移量
android:shadowRadius 阴影的范围
然后在控件中引用style

<TextView
      android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        style="@style/styleTest"
        android: />
 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2021-10-07
  • 2022-12-23
  • 2021-06-12
猜你喜欢
  • 2022-12-23
  • 2021-08-10
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
相关资源
相似解决方案