问题描述
我想要这种类型的视图,我检查了 discrete Seekbar,但即使 Thumb 和 Track 更改,它也会显示每个步骤的点。
如果我使用带有自定义 Thumb 和 Progress Drawable 的 Seekbar,我无法在使用 ProgressDrawable 附加的虚线上正确设置 Progress 以及如何限制用户拖动 Seekbar。
<!-- dotted.xml -->
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android1="http://schemas.android.com/apk/res/android">
<!--Item background and progress order cannot be reversed-->
<item android:id= "@android:id/background" >
<shape android:shape= "line" >
<stroke
android:width= "10dp"
android:color= "#E9EAF5"
android:dashWidth="10dp" android:dashGap="4dp"/>
</shape>
</item>
</layer-list>
<SeekBar
android:id="@+id/seekBar"
android:layout_width="181dp"
android:layout_height="48dp"
android:enabled="false"
android:progress="6"
android:progressDrawable="@drawable/dotted"
android:thumb="@drawable/circle_progress" />
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)