honoru88 / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
0 stars 0 forks source link

ListView.setSelection() stopped working after upgrade to XE22 #619

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create layout with ListView using android:choiceMode="singleChoice".
2. Add some items to the list.
3. Call ListView.setSelection(position) to select wanted item.

What is the expected output? What do you see instead?
1. ListView.getSelectedItemPosition() returning selected item position instead 
of AdapterView.INVALID_POSITION.
2. Selection background color changed to value given in android:listSelector.

What version of the product are you using? On what operating system?
Google Glass XE22.

Please provide any additional information below.
ListView item selection was working fine on XE21.3.

Original issue reported on code.google.com by Michal.S...@gmail.com on 16 Oct 2014 at 9:57

GoogleCodeExporter commented 9 years ago
ListViews, and in particular the notion of selection in a ListView, do not map 
well to Glass UX principles. You should consider presenting your information in 
a different fashion that is more suited for Glass, such as using a 
CardScrollView.

Original comment by allev...@google.com on 16 Oct 2014 at 3:32

GoogleCodeExporter commented 9 years ago
I would like to hear your recommendation for following use case:
1. I need to display 4 rows of data, each of them using same layout, 
instantiated from the code.
2. I want to allow user highlight one of them by moving head up and down, and 
selection to be confirmed with a tap.

I've had non-scrollable ListView with ListAdapter for that, and was working 
fine in XE21.3, before the update.

To be honest I didn't expect breaking random APIs and saying "it's OK, that's a 
Glass feature" could happen at Google. But times are changing, it seems...

Original comment by Michal.S...@gmail.com on 16 Oct 2014 at 4:59

GoogleCodeExporter commented 9 years ago
> ListViews, and in particular the notion of selection in a ListView, do not 
map well to Glass UX principles. You should consider presenting your 
information in a different fashion that is more suited for Glass, such as using 
a CardScrollView.

This isn't the first time this has come up, but it bears repeating: This 
position is utterly unreasonable, and it has generated immense ill will towards 
Glass. You've gone very far out of your way to sabotage compatibility with 
Android, and destroyed Glass' usefulness in the process. Please escalate.

Original comment by jimrandomh@gmail.com on 20 Oct 2014 at 10:20