可以参考以下代码,这是drawable/seekbar_style.xml
里面使用layer-list来实现层叠样式,为seekbar的background和progress设置style
其中shape可以用来配置一些图形,像corners这样设定就相当于是圆角了
solid设置图形的颜色为实心的,如果要设置成渐变的要使用gradient标签

 

<layer-list xmlns:andro />

            <solid android:color="@color/bg_color" />         </shape>     </item>

    <item android: />

                <solid android:color="@color/blue" />             </shape>         </clip>     </item> </layer-list>

相关文章:

  • 2021-04-18
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-12-12
  • 2021-10-07
  • 2021-10-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2022-01-16
  • 2022-12-23
  • 2021-08-21
相关资源
相似解决方案