Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to design and code in android like the following
    text
    copied!<p>in my app i have scale and progress bar as shown in the following figure<img src="https://i.stack.imgur.com/xv8R4.png" alt="enter image description here"></p> <p>i have separate image for progress bar and marker. my need is how to make the marker to be movable over the progress bar in android. please help me.</p> <p>my layout xml is:</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;RelativeLayout android:layout_height="wrap_content" android:background="@drawable/scale_bg" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_width="fill_parent" android:id="@+id/relativeLayout1"&gt; &lt;/RelativeLayout&gt; &lt;FrameLayout android:layout_height="wrap_content" android:layout_marginTop="20dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_width="fill_parent" android:id="@+id/relativeLayout2"&gt; &lt;ImageButton android:layout_width="wrap_content" android:id="@+id/imageButton1" android:layout_height="wrap_content" android:background="@drawable/slider_bg" android:layout_alignParentLeft="true"&gt; &lt;/ImageButton&gt; &lt;ImageButton android:layout_width="wrap_content" android:clickable="true" android:id="@+id/imageButton1" android:layout_height="wrap_content" android:background="@drawable/slider_arrow" android:layout_alignParentLeft="true"&gt; &lt;/ImageButton&gt; &lt;/FrameLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p><strong>updated xml:</strong></p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;RelativeLayout android:layout_height="wrap_content" android:background="@drawable/scale_bg" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_width="fill_parent" android:id="@+id/relativeLayout1"&gt; &lt;/RelativeLayout&gt; &lt;RelativeLayout android:layout_height="wrap_content" android:layout_marginTop="20dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_width="fill_parent" android:id="@+id/relativeLayout2"&gt; &lt;SeekBar android:layout_height="wrap_content" android:id="@+id/seekBar1" android:layout_width="match_parent" android:thumb="@drawable/slider_arrow" android:progressDrawable="@drawable/slider_bg"&gt; &lt;/SeekBar&gt; &lt;/RelativeLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>slider_bg and slider_arrow are png images.</p>
 

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