At 9:01 PM -0400 4/11/09, Mark Murphy wrote:
>devileper wrote:
>  > How can you specify which item gets the default focus on Activity
>>  startup?  Using requestFocus programmatically does not work. On
>>  setContextView the first focusable item listed in the XML is given the
>>  default focus. When using RelativeLayout, the first item listed is not
>>  always the desired item or necessarily on top.
>
>API samples show requestFocus() working in onCreate(), so I am not
>certain where your problem lies.

I have had good luck with requestFocus() in most cases 
(RelativeLayout or otherwise) I've run into trouble where:

1. The focused item was in a ScrollView and caused the view to scroll 
unexpectedly -- confusing me!

2. The activity had a TabHost on it -- the TabHost seems to always 
steal the focus sometime after onCreate(). I've never figured out a 
way around this.

-- Ward

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to