Note that there are some explanatory texts on larger screens.

plurals
  1. POseekbar thumb center not at the start point
    primarykey
    data
    text
    <p><img src="https://i.stack.imgur.com/cWFVw.png" alt="enter image description here"></p> <p>as my pic,the seekbar progress =0,but the seekbar thumb center not at the start point.my code:</p> <pre><code> &lt;SeekBar android:layout_width="match_parent" android:layout_height="wrap_content" android:progressDrawable="@drawable/seekbar_progress" android:thumb="@drawable/seekbarthumb" android:minHeight="10dip" android:maxHeight="10dip" android:thumbOffset="0px" android:max="100" android:id="@+id/bright_seekbar" android:layout_marginLeft="60dip"/&gt; </code></pre> <p>seekbar_progress</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;item android:id="@android:id/background"&gt; &lt;shape&gt; &lt;corners android:radius="5dip" /&gt; &lt;gradient android:startColor="#ff9d9e9d" android:centerColor="#ff5a5d5a" android:centerY="0.75" android:endColor="#ff747674" android:angle="270" /&gt; &lt;/shape&gt; &lt;/item&gt; &lt;item android:id="@android:id/secondaryProgress"&gt; &lt;clip&gt; &lt;shape&gt; &lt;corners android:radius="5dip" /&gt; &lt;gradient android:startColor="#80ffd300" android:centerColor="#80ffb600" android:centerY="0.75" android:endColor="#a0ffcb00" android:angle="270" /&gt; &lt;/shape&gt; &lt;/clip&gt; &lt;/item&gt; &lt;item android:id="@android:id/progress"&gt; &lt;clip&gt; &lt;shape&gt; &lt;corners android:radius="5dip" /&gt; &lt;gradient android:startColor="#FFD700" android:centerColor="#FFB90F" android:centerY="0.75" android:endColor="#FFA500" android:angle="270" /&gt; &lt;/shape&gt; &lt;/clip&gt; &lt;/item&gt; &lt;/layer-list&gt; </code></pre> <p>seekbarthumb.xml</p> <pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;item android:state_pressed="true" android:drawable="@drawable/pressed_button__volume" /&gt; &lt;item android:state_focused="true" android:drawable="@drawable/pressed_button__volume" /&gt; &lt;item android:drawable="@drawable/default_button__volume" /&gt; &lt;/selector&gt; </code></pre> <p>default_button__volume is image</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload