[android-developers] Re: Problem setting focus

2010-10-10 Thread John Gaby
I have a put together a very simple program which exhibits this behavior. Run the following program and then do the following 1) Click in the edit control of the first page which should bring up the soft keyboard 2) Using the soft keyboard type 'aaa' 3) Click the 'Press This' button 4) The view

Re: [android-developers] Re: Problem setting focus

2010-10-10 Thread Mark Murphy
It is possible you are running into an Android bug. Calling setContentView() repeatedly is certainly supported, but AFAIK it's a bit off the mainstream, and so there may be lingering issues. If your goal is simply something that works, consider using a ViewAnimator (e.g., ViewSwitcher) as a

[android-developers] Re: Problem setting focus

2010-10-10 Thread John Gaby
I decided to try using a ViewAnimator, and I discovered that it works, unless I remove the current view before displaying the new one. If I do that, then it behaves the same way as before. This got me to thinking that there must be something I can do to make it work even if I remove the old view

Re: [android-developers] Re: Problem setting focus

2010-10-10 Thread Mark Murphy
That definitely smells like a bug. Glad you have a workaround, though. On Sun, Oct 10, 2010 at 8:36 PM, John Gaby jg...@gabysoft.com wrote: I decided to try using a ViewAnimator, and I discovered that it works, unless I remove the current view before displaying the new one.  If I do that, then