开发者

Losing screen object auto-focus

I have a GridView displaying buttons to different screens of my a开发者_开发百科pp. 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜