tonespy / android-wheel

Automatically exported from code.google.com/p/android-wheel
1 stars 0 forks source link

Highlight selected Item #49

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run an application with Text wheel

What is the expected output? What do you see instead?

What I would like to do, is highlight the selected item in a different color. I 
looked at the date examples (which uses a different color for TODAY) and tried 
changing the color is AbstractWheelTextAdapter, this didn't work as don't have 
the notion of selected item. This would mean changing the color each time the 
selection is changed, do you think this is feasible ? Is there an easy way to 
do this ?

What version of the product are you using? On what operating system?
Wheel version 2.1
Android 2.3.3-4.04

Original issue reported on code.google.com by Alexande...@gmail.com on 2 Apr 2013 at 12:30

GoogleCodeExporter commented 8 years ago
Add method for changing current value in your adapter. Then attache 
changelistener to your wheelview. In onChanged(WheelView wheel, int oldValue, 
int newValue) function set the newValue to adapters current value and call 
wheel.invalidateWheel(true). This will clear LinearLayout that holds items, and 
you always get current value be highlighted.

Original comment by Valera.R...@gmail.com on 1 Oct 2013 at 2:13

GoogleCodeExporter commented 8 years ago
In fact I just changed the colors defined in wheel_val.xml this now shows the 
current selected item as I want, so a fairly easy solution.

thanks for your help.

Original comment by Alexande...@gmail.com on 10 Oct 2013 at 6:54

GoogleCodeExporter commented 8 years ago
please explain in detail how to change the color of selected text in wheel 
picker

Original comment by dhaliwal...@gmail.com on 4 Aug 2014 at 12:01

GoogleCodeExporter commented 8 years ago
i want to change the color and text size of current selected value in wheeler 
like ios do.

Original comment by romanuse...@gmail.com on 19 Dec 2014 at 6:01