custom seek bar

by Vaibhav Goel » Tue, 16 Feb 2010 02:30:07 GMT


Sponsored Links
 Hi

I want to make a custom seek bar having color gradient as shown in the
below image url.

 http://i49.tinypic.com/2mi5lsh.jpg 

For this I tried to make background as

seek_background.xml

<shape xmlns:android=" http://schemas.android.com/apk/res/android" ;
android:shape="rectangle">
    <gradient android:startColor="#FFFFAA00"
android:endColor="#FFFF0000"
            android:angle="0"/>
    <stroke android:width="1dp" android:color="#AAFFFFFF" />
    <padding android:left="7dp" android:top="7dp"
            android:right="7dp" android:bottom="7dp" />
    <corners android:radius="4dp" />
</shape>


and Seekbar in layout xml as

    <SeekBar
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:padding="20sp"
    android:progressDrawable="@drawable/seek_background"/>

But it makes the complete background colored as shown in below url.

 http://i47.tinypic.com/104ktxe.jpg 

Please help me out.

Thanks

--



custom seek bar

by Mark Murphy » Tue, 16 Feb 2010 02:41:23 GMT


 


Since SeekBar extends ProgressBar, you may wish to start with
progress_horizontal.xml as your base point. You'll notice that it
defines a few layers in a <layer-list> drawable resource,
differentiating the true background from the "progress". I'm not 100%
certain this is the background used by SeekBar by default, but it's an
educated guess.

You can find this file in
$ANDROID_HOME/platforms/$API/data/res/drawable, where $ANDROID_HOME is
where you have the SDK installed and $API is one of the API versions you
have installed (e.g., android-2.1).

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android Development Wiki:  http://wiki.andmob.org 

--


Sponsored Links


custom seek bar

by Vaibhav Goel » Tue, 16 Feb 2010 02:45:59 GMT


 Hi

I want to make a custom seek bar having color gradient as shown in the
below image url.

 http://i49.tinypic.com/2mi5lsh.jpg 

For this I tried to make background as

seek_background.xml

<shape xmlns:android=" http://schemas.android.com/apk/res/android" ;
android:shape="rectangle">
    <gradient android:startColor="#FFFFAA00"
android:endColor="#FFFF0000"
            android:angle="0"/>
    <stroke android:width="1dp" android:color="#AAFFFFFF" />
    <padding android:left="7dp" android:top="7dp"
            android:right="7dp" android:bottom="7dp" />
    <corners android:radius="4dp" />
</shape>


and Seekbar in layout xml as

    <SeekBar
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:padding="20sp"
    android:progressDrawable="@drawable/seek_background"/>

But it makes the complete background colored as shown in below url.

 http://i47.tinypic.com/104ktxe.jpg 

Please help me out.

Thanks

--



custom seek bar

by skink » Tue, 16 Feb 2010 04:21:50 GMT


 


Hi,

for more extensive/sophisticated customization you coukd take a look
into tutorial i once wrote @anddev

 http://www.anddev.org/decorated_and_animated_seekbar_tutorial-t10937.html 

i'm not sure if you can download sources attached if you are not
logged

pskink

--



custom seek bar

by Vaibhav Goel » Tue, 16 Feb 2010 11:33:26 GMT


 Thanks Mark.

By changing in <layer-list> drawable resource, I got the desired
result.

--



custom seek bar

by Vaibhav Goel » Tue, 16 Feb 2010 11:34:09 GMT


 Thanks skink






--



custom seek bar

by Renuka Deshpande » Thu, 10 Jun 2010 00:31:43 GMT


 Hello All,

I am new to android. I want to customize a seek bar like attached
image.white and brown portions are the images.
Can anybdy tell me how to do that?

-- 
Thanks & Regards,
Renuka

--



custom seek bar

by peeyush varshney » Thu, 10 Jun 2010 01:44:45 GMT


 Hi,
you just need to set the thumb and progress bar as @drawable/seeker" in xml
file.
and if you want more customization then you have to extend ur class from
View class.

On Wed, Jun 9, 2010 at 2:21 PM, Renuka Deshpande <



>



Other Threads

1. Any standard "Available on Android Market" graphic?

Hey guys-

I'm wondering if there is any sort of standard "Available on Market"
graphic, similar to Apple's "Available on the App Store" graphic.. Or
does every dev just make their own?

Thanks!
Nick

-- 

2. SOLVED by bos SA - HELP: Nexus One tidak bisa bootloading

Wah, akhirnya Nexus One saya sudah bisa Recovery. Berkat bantuan bos SA yang
sabar banget nuntunin saya step-by-step via Gtalk, akhirnya Nexusnya sembuh
sudah :D

Terima kasih banyak ke bos SA atas bantuannya... Berasa banget deh...
*pengen ngasi cendol kyk di forum tetanga deh*

standing applaus buat bos SA


2010/6/14 Subanindiyo Ardi <subanindiyo.a...@gmail.com>










-- 
"Indonesian Android Community [id-android]" 

Join:  http://www.***.com/ 
Moderator: id.andr...@gmail.com
ID Android Developer:  http://www.***.com/ 
ID Android Surabaya:  http://www.***.com/ 
ID Android on FB:  http://www.***.com/ 

3. Cursor position to the start of the text

4. Tolong donk cara aktif kan Swap di Spica

5. Bisakah kartu IM3 menggunakan Layanan IM2?

6. VOOT : Point Blank Droiders Clan

7. PC Suite For LG GW620 aka for All Android Phone :D