Jak dodać skalę liczb w android seekbar?
Próbuję za pomocą niestandardowego paska wyszukiwania wewnątrz mieć skalę liczb, ale nie działa. Ten pasek wyszukiwania musi obsługiwać wszystkie rozdzielczości ekranu. jak mogę to zrobić. Podaj swój cenny pomysł.
Mój custom_seekbar.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+android:id/background"
android:drawable="@drawable/unselect"/>
<item
android:id="@android:id/secondaryProgress"
android:drawable="@drawable/select">
</item>
<item
android:id="@android:id/progress"
android:drawable="@drawable/select">
</item>
activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/default_screen_bg"
android:orientation="vertical"
tools:context=".MainActivity" >
<SeekBar
android:id="@+id/seekBar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:indeterminate="false"
android:max="10"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:progressDrawable="@drawable/custom_seekbar" />
</LinearLayout>
Unselesct.png
select.png
mój ekran wyników w ten sposób
Spodziewam się w ten sposób