Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight selected Item #49

Open
GoogleCodeExporter opened this issue Jun 11, 2015 · 4 comments
Open

Highlight selected Item #49

GoogleCodeExporter opened this issue Jun 11, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

please explain in detail how to change the color of selected text in wheel 
picker

Original comment by dhaliwal...@yahoo.co.in on 4 Aug 2014 at 12:01

@GoogleCodeExporter
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant