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. gimana kabar di citos Om

gimana neh yang mirink di citos kabarnya

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

2. MapView crushes in satellite mode if android:anydensity is set true

Hi,

On Android 1.6 WVGA device, a map view in satellite mode crushes when
the map zoom-in too much if I specify android:anyDensity="true" in the
manifest file.
But, if I set android:anyDensity="false", then the map does not crush.

I want my app to support a multiple densities and also do not want to
make the map crush.
Is there any way to do this?

I tried to control zoom level of the map, but getMaxZoomLevel() method
in satellite mode does not return a correct value.
Please help me out!!

Thanks

-- 

3. How t o make a magnifying glass On a picture?

4. Date type as a parameter on a SoapObject

5. Google TV frame capture?

6. G1 phone and update firmware 2.0-2.2 - question

7. how to access device contact book from my own application