Ranges on seek bar - android

Hi I want to put the ranges on seek bar. I am able to run seekbar successfully. Even though on sliding i can get the values also. But on the top of it I have to set ranges as it is shown in image. Please let me know how can I do that. It would not be hardcoded because with seekbar I have given plus minus button also, so that If I click on plus button so right now range is from 0 to 100000 with 10000 interval. Then the range value will change to 100000 to 200000 and so on. so with that ranges should also change.
Please suggest.
Thanks in advance.

What you are looking for is simply indicators for the range, so it doesn't need to be part of your seekbar.
I would do it in the layout. Above the seek bar, create 10 textviews that are weighted evenly in a linearlayout.
Then just have some simple logic to update the text on these textviews when the user changes the range.

Related

How to do a grid (10000 x 10000) clickable and zoomable in xamarin forms

I've been looking for a solution to my problem for weeks, and can't find out anything close to what I want. I need a big grid something at least 10000x10000 and even more if I can. The objective is to change the color of the cell that have been clicked. To do so users should be able to zoom in and click in one cell to modify it color. Then obviously zoom out.
I first thought to pick an image and make it clickable but to change the color of only 1 cell it would be impossible in an image.
Then I tried to do a grid with buttons inside and change their color on click, but way to long to create those inside the content page, same for labels.
Any suggestion ?
Thanks for reading
I don't believe you can do this with existing UI & Layout controls.
It will be extremely slow and hard to do.
You should use a graphic library such SkiaSharp. Here is a good tutorial to do it.
You might use pan & pinch gesture for zooming as well(howto).

Android custom horizontal number picker with range selector

I am new to android development.My requirement is to implement a number picker with range selector and the range values will be static as per the image.Is there any libraries or any other ways available to do this.I have researched a lot but cant get any thing related to this.
The section with green color can be scrolled to any where over the blue bar.And also the blue bar is scrollable itself having ranges from -40 to +40.
Please help
May be it can solve you problem
https://github.com/yahoo/android-range-seek-bar

MPAndroidChart bar chart takes full width if one value is to large

I am using MPAndroidChart in one of my projects, i am using horizontal bar charts. Several times if the value of 1 filed it too large the graph kind of shows only that value and rest all other values becomes 0.
Now i understand this is correct behavior since it calculate percentage and divide the values but even in those cases this values should be shown. Is there any way to achieve this ??
Here is what it looks like :
Value of all other fields are pretty small less than 2000 !!
As it is clearly visible in the screenshot you provided, the values are shown. They are just very small (exactly as small as you set them to be) and therefore they are not drawn any bigger on the chart.
I honestly don't know what you expect?
If you want the bars of the small values to be "bigger", then use bigger values.
Something like a logarithmic scale is not yet available for the axes.
In MP Android chart there is no way to handle this issue of 'one-value-is-too-large'. I faced this issue and had to implement a design change. In my chart most values were of range 10 units and only one value was very large around 4000 units. So I decide to not display the large value in chart and display it below the chart. Here is an image view

how to achieve IncrementprogressBy(0.5) in android

My seekbar range is 0-10 , i want to increase the progress by 0.5 for each click on the progress bar. I have browsed and could not find a way.
make it 0-20 and increment it by 1
Unfortunately, the function API does not support float arguments. Kindly use integers and adjust the range accordingly.

Android: Seekbar doesn't scroll all the way to end

Hi I have a seekbar in my app that i need to snap to 7 positions. To achieve this I set the max property of the Seekbar to 7. NOw, to be aesthetically pleasing, i need to be able to drag my seekbar all the way to end of the bar, but when I set a value to the max property, the scroll won't drag all the way to end. Why does this happen and how can I get around it?
try adding some padding to the sides of your seekbar

Categories

Resources