Hi all, I'm (still :) trying to have one page with on top two EditText searchboxes and a searchbutton. When the user then presses the searchbutton, the result should appear below, and during scrolling everything should move up/down, just like a "regular" google search result.
I've been given a good pointer by Mark Murphy in this post: http://groups.google.com/group/android-developers/browse_thread/thread/e4179c4c9cc96c4c/45cd80758b3ef2df?lnk=gst&q=listview#45cd80758b3ef2df and managed to get pretty far. The MergeAdapter works great regarding appending different adapters and views. So now I've got one ListView using the MergeAdapter with on top an (in code inflated) layout with the two EditTexts and the searchbutton. Below that are just the MergeAdapter demo lists. See http://groups.google.com/group/cw-android/browse_thread/thread/b3e8d42c594ee531 for a bit more detail on how I did it. Then the strange stuff (strange to me that is :) occurs: - After starting the app, the focus goes to the first entry in the buildFirstList(). That's already a bit odd, I expected it to go either the first EditText, or have focus on the whole layout that contains those inputboxes + searchbutton. - And then: when I click (or on a real phone tap) any of the two EditTexts, the field gets focus for a splitsecond, then the keyboard pops up and the focus on the selected EditText is gone! To be able to enter text I have to select the EditText field again. Now I've been doing some research, and it seems that focus on a focusable element in a ListView is possibe & allowed. See for example here where Romain Guy says it should work if the element is focusable: http://groups.google.nl/group/android-developers/browse_thread/thread/8cedf0199a958762 Though the ListView is not really meant for it: http://groups.google.com/group/android-developers/browse_thread/thread/50f0fc185da8fe4d It is maybe somehow related to this problem, where the tabs "steal" focus: http://groups.google.com/group/android-developers/browse_thread/thread/f3fdd1eb17288886/0d28c51a6b9ffdfe?lnk=gst&q=tab%2Bfocus#0d28c51a6b9ffdfe So I haven't found the real solution yet (using the ListView headers, as I tried in b) in my other post, has some other focus-issues, see that post). Anybody know what's going wrong here with the focus? Or, actually what is going on with the focus, why it's behaving like this, maybe that helps me getting to a solution? Is there a workaround, where I can tell the runtime where to go after the keyboard shows? Is there some focusable setting I didn't do? I've played around with them, none resolve the problem. Regards, Marco --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

