views:

25

answers:

1

I have a GridView displaying buttons to different screens of my app. When this grid screen, the first cell is selected. Is there a way to programmatically have no cells selected when the screen launches? Or do I have to hide the selector?

A: 

When this grid screen, the first cell is selected.

That should only be true if the user was using the navigator (D-pad, trackball, etc.) in the previous activity.

Is there a way to programmatically have no cells selected when the screen launches?

Generally, the user determines this based on whether they are in touch mode or not. You could try setSelection(-1) or something, but I would not be surprised if this fails to work.

Or do I have to hide the selector?

I would recommend just following the platform conventions. If the user is using the D-pad or trackball, they probably want to use the D-pad or trackball, and disabling the selector will simply make them frustrated with you and your app. Please see the article I linked to above for more details on touch mode and why it works the way it does.

CommonsWare
Ah, I see why this is happening. When I launch the app, the user is taken to a login screen. One of the EditTexts for username/pw will have focus. I type and then hit the enter button, which moves focus to the login button, but this is apparently also like using the trackpad to scroll to the next object.
Andrew