I know it is possible to change the style of the SeekBar in android apps, but is it possible to change the shape of the progress line of a SeekBar?
I would like it to be like that:
Any ideas on how to achieve this? :)
Similar to this question here How to make custom seek bar in android?
You're not going to be able to do that with the default slider. You're going to have create a custom view. Here's some resources to get you started.
http://www.mokasocial.com/2011/02/create-a-custom-styled-ui-slider-seekbar-in-android/
http://developer.android.com/training/custom-views/create-view.html
Edited to add this other resource the may help you get the curves you want
Give a semi-circular shape to seekbar
Related
I want to make a seekbar like the one in the figure for a music player project I'm working on.
Searched everywhere could not find anything helpful, any help will be appreciated
I think it would be easier to implement with ProgressBar with a horizontal style and not SeekBar. I think the most simple way to implement it is to set the android:progressDrawable xml attribute with a drawable of the pattern above (white background and the bars - invisible).
Is that possible to have a custom ProgressBar in Android like this:
I mean:
Not spinning (static)
Progress with one color and remaining area with another color
With text in center
If that's not possible, what's the nearest result that I can have? Maybe using XML Shapes? Thanks!
There is not a standard Android component for reaching this result.
However, there is a library that you can use to achieve that effect.
Check this library.
You can customize this component as you like and use it on your xml layouts like a Custom View.
Check this library: https://github.com/wasabeef/awesome-android-ui/blob/master/pages/Progress.md. It does what you want.
Now I have this task where I should create a rating bar just like youtube in my app , and so my idea was to have a textview where I set its background to a color but then remove the color according to an equation I will make so it displays only a percentage of it... any idea how can I do this or where to look ?
The simplest way to do this would be to create a selector.xml. You would assign android:background="#drawable/selector". Your selector would decide which background color to show based on what percentage you have assigned.
This link explains how to use selectors with buttons. It should help to get you on the right track...http://developer.android.com/guide/topics/resources/color-list-resource.html
EDIT: You can still accomplish a custom progress bar by xml. It is very similar to the selector. Just think of it as many more selectors based on progress instead of state. Here is a nice example...Custom Drawable for ProgressBar/ProgressDialog
You can also look into xml animations. They are similar.
I'm just wondering if the seekbar changed in Android 2.1 . I tried to create one but it showing up as a green line with a circle on it instead of the usual yellow rectangle. If so, is there any other option to create a similar seekbar to control volume on 2.1? Thanks
You can use the setThumb() and setProgressDrawable() of SeekBar to customize the UI
HI,
I'm trying to achieve a custom buttons . I'm wondering how I can achieve this with Android.
The result should look similar like this,
how I can make special shapes adjacent the problem it is because the image of each button must always be rectangle.
Thanks.
You can create custom backgrounds (shapes, colors, etc..) using xml drawables.
You should check out the documentation and the samples, like this one: