【发布时间】:2015-07-14 17:43:20
【问题描述】:
我想制作环形加载效果,为此我必须更改 dashWidth 值。
我想以编程方式进行。
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<stroke
android:width="3dp"
android:color="#8FFFFFFF"
android:dashWidth="304dp"
android:dashGap="500dp"/>
<size
android:width="100dp"
android:height="100dp"/>
</shape>
【问题讨论】:
-
那看看是什么Drawable,可以通过调用
View#getBackground()获取背景Drawable -
是的,但是如何更改参数?我找不到破折号宽度的设置器!
-
那是什么样的 Drawable?
-
它是 xml 文件中的椭圆形
-
不是 GradientDrawable?你确定吗?
标签: android android-drawable xml-drawable