【发布时间】:2021-02-11 06:45:33
【问题描述】:
我正在使用离散搜索栏。我想更改刻度线的颜色。我正在尝试如下。
<SeekBar
android:id="@+id/seekBar"
style="@style/Widget.AppCompat.SeekBar.Discrete"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="10"
android:thumbTint="@color/colorPrimary"
android:tickMarkTint="@color/colorAccent"/>
我还创建了样式并应用于tickMark。
drw_bg_tickmark.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:tint="@color/colorAccent">
<corners android:radius="4dp"/>
<size android:width="10dp"
android:height="10dp" />
<solid android:color="@color/colorAccent" />
</shape>
应用于搜索栏
android:tickMark="@drawable/drw_bg_tickmark"
但我无法删除搜索栏中的灰色刻度。请帮我解决这个问题。
【问题讨论】: