Ich möchte wissen, wie man den Daumen in der Mitte einer Suchleiste setzt. Weiß nicht, wie man ausdrückt, also werde ich Link eines Bildes hinzufügen. erste img ist eine Suchleiste von Design-Guides, und die unteren sind meine Suchleisten.android - kann nicht in der Mitte einer Suchleiste Daumen setzen
(ignorieren über Ecken. Ich nach der Erfassung der imgs fixiert.) zunächst von Designer, ich erhielt zwei separate img jener Text, gut und schlecht. also habe ich diese kombiniert. Ich dachte, es würde als Daumen funktionieren. aber jetzt, was ich habe, ist dieses Ergebnis ... bitte hilf mir .. danke!
ziehbar: progressbar_goodbad 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">
<shape>
<gradient
android:startColor="#f5c0bd"
android:centerColor="#f5c0bd"
android:centerY="0.75"
android:endColor="#f5c0bd"
android:angle="270"/>
<padding android:left="10dp"
android:top="1dp"
android:right="10dp"
android:bottom="1dp"/>
<corners
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp"/>
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<gradient
android:startColor="#234"
android:centerColor="#234"
android:centerY="0.75"
android:endColor="#a24"
android:angle="90"/>
<padding android:left="1dp"
android:top="1dp"
android:right="1dp"
android:bottom="1dp"/>
<corners
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp"/>
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<gradient
android:startColor="#fc9a94"
android:centerColor="#fc9a94"
android:centerY="0.75"
android:endColor="#fc9a94"
android:angle="90"/>
<padding android:left="1dp"
android:top="1dp"
android:right="1dp"
android:bottom="1dp"/>
<corners
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp"/>
</shape>
</clip>
</item>
</layer-list>
Teil des Haupt Layout xml
<SeekBar
android:id="@+id/seekBar_fun"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:max="100"
android:progress="60"
android:progressDrawable="@drawable/progressbar_goodbad"
android:thumb="@drawable/f_02_good_bad_text" />
Dupe: http://stackoverflow.com/questions/18995680/seekbar-thumb-center-not-at-the-start-point – greg7gkb