I am trying to make a custom bar like this
However those red boxes are actually images ( nicely designed segments) and the arrow is an image indicator to clarify the progress. I am just showing the image above as an illustration.
I know how to do custom progress bar using gredients and colors but in case of something like that with images. How would I do it? Can it be done through xml or should I create custom view and override the ondraw method to do things from scratch? Any design help is appreciated
Thanks
Related
I have a viewpager with many images in my app. Below viewpager I need to show a progress indicator as shown in image. whenever the image is changed the dark blue part also will change its position accordingly. I am not sure which component to use here. Does it require a custom component? Will customizing progress bar work? Any help would be appreciated.
I'm using ProgressBar in android for providing a progress bar. At the moment I have a common progress bar, like you can see in the attached picture at the top - just a blue bar. What techniques are possible to have a bar style with stripes like attaced in the picture? do I have to use an image with stripes as background for solving this? or do I have to provide a special "android:progressDrawable"? Thx for your hints.
Create a custom progressbar with your own drawable. look at this topic: Custom Drawable for ProgressBar/ProgressDialog
I am trying to create a seekbar with horizontal progress bar on thumb. Visually it should look something like this.
So when i seek the thumb left to right the progress bar will act according to the value of seekbar.
So far i had try to overlap a progress bar on the top of seekbar, but this is not working as expected. Also i am not able to pass the touch event from progress bar to seekbar. As progress bar is overlapping the thumb i need to bypass the touch event from progress bar to seekbar thumb, which i am not able to achieve it.
Can anyone help me changing existing code or completely create a new custom seekbar by extending base class.
If you don't want to code the wohle thing yourself, there is a github project that displays the value inside the thumb. However, this is not very similar to the image you provided, but maybe could be styled.
The other option is coding it yourself. You will basically have to extend SeekBar and override the most important methods ( onDraw, onMeasure etc. )
There are plenty of tutorials on how to make custom views, like this one from the android developer pages.
I want to create a custom progress bar that looks like this
http://i.stack.imgur.com/NK5Px.png
it should progress until it reaches one of the circles light it up and continue towards the next one until it reaches the last one.
What is the best approach to implement this?
- whether to extend progress bar and override onMeasure() & onDraw()
- or to create compound component with layout as root and populate it with progress bar
and some circle like views.
Update
on the first approach i wonder how to make the progress bar half the size of the control and center it?
the other approach will make me use nested layouts, and seems to be more complex to create..What do you think? there is a completely different way to do it properly and easily?
I need some help about progress bar customization.
I want any idea about how to do like these 2 pictures:
Click here to view pictures
1.On left-side picture, there is a red vertical line on the progress bar.
2.On Right-Side picture, there is an arrow picture with vertical line on the progress bar. Also, there are many colors on one progress bar.
What are classes ,methods or whatever idea should be implement for drawing these?
Thanks in advance :)
P.S. Picture Source,
Left: My Diet Diary Calorie Counter,
Right: Calorie Counter,Viaden Gaming Limited
The only way I figure out is to extend ProgressBar with a custom class of your own and override the ondraw method to draw what you want in your progress bar.
Examples here and here.