Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to create Seek Bar start & end point like this

Tags:

android

xml

In my application I've customized SeekBar .But unable to change Both end style .

I want to create like this [for both end]enter image description here

Here is my XML CODE:

<com.example.androidtesting.VerticalSeekBar
    android:id="@+id/verticalSeekbar"
    android:max="100"
    android:layout_width="wrap_content" 
    android:layout_height="fill_parent"
    android:progressDrawable="@drawable/progress"
    android:layout_marginLeft="10dp"
    android:progress="5" 
    android:thumb="@drawable/thumb"/>

Here is progress.xml

<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
 android:shape="line">
<stroke android:width="12dp" android:color="#33CCFF" />
</shape>

May I know what is the correct way to achieve my objective?

like image 262
IntelliJ Amiya Avatar asked Jan 29 '26 20:01

IntelliJ Amiya


1 Answers

try this code :

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="line" >
   <corners 
        android:radius="100dp"/>
   <solid
    android:color="#3E9EDE"/>
   <size
    android:width="250dp"
    android:height="25dp"/>
 </shape> 
like image 131
MilapTank Avatar answered Jan 31 '26 08:01

MilapTank