I am using RangeSlider in android ,I want display both thumb values. Can anyone help me how I can obtain it?
I want to setText as piece between 20 to 70
I don't think the library allows you to show this value simultaneously but you can get values of both the thumbs at all times from rangeSlider.values
You can then use a custom label on top of the thumbs to display the values at the same time. Other than that, several libraries are available which provide target tooltips on a screen.
Related
Thank you for this powerful library.
I have a problem when the values are near to each other and every value has several amount of digits, the value would overlap each others like in the below snapshot.
I tried to make some values upper and some lower the line, or to make values written in vertical way (like x labels in the snapshot), but I didn't find way to do that.
If there is any advice or other workaround, it will be appreciated.
Snapshot is in the link below
Image Shows the problem
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
I have provided a picture below so you can get a better understanding. Basically I want the user to pick a number from 1-10 which is shown by circles (Only 1 number can be picked at a time). Lets say I pick number 10, as you can see on the picture I want the circle to stroke and change the color when the number is picked (indicating to the user that the number has been chosen). After the number is picked and you press the "blue button", I want to get the value picked to do other calculations.
This is how I want it to be
I feel having a touch based circle is the best way to do it, rather than using a spinner because it take more time. Now the question is how to do this without code duplication or redundancy and how to achieve this in the best way possible. I am thinking I have to create a circle object (Possibly button shaped like circles) 10 times and put text on them, group them in array?..etc or is there a more efficient way to do this.
I'm sure there's better ways to achieve this but I suggest a simple solution as you wanted !!!
Now the question is how to do this without code duplication or redundancy?
You can create a xml file in your drawable folder and put two different oval shapes in that: defaultShape and pickedShape, Use <solid> and <stroke> tags to customize your shapes as you like, and then apply it to your buttons' background.
In order to handle the picking of your button you should implement same onClickListenerfor all 10 buttons, if one of them is picked save it to a temp variable like Button pickedButton, in your listener your check if pickedButton is not null change its background to defaultShape, and assign the new picked one to the pickedButton and then change its background to pickedShape.
Hope you find it helpful.
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
I'm going to make an app for which I need to know how does android split the text in it's TextView.Because of the splitting the text doesn't go out of the window it retains in side a bound.
The help what I need is like the image
In the image the text didn't overlap with the triangle. So I need a sample code spinnet which will help me to do that. Or idea to how to do it will also help me.
One of the easiest way, I think - split one TextView on several ones (for example - 3, or more if you need precise approximation).