Hi Justin,

We are changing an activity after already using it the application.
It is not a particular view that does it as we have many different
views and the situation occurs when the virtual keypad is up and we
touch a button that results in a setContentView.  The call to
setContentView is withing a runnable sent to a Handler. This app has
had no problems switching views when the virtual keypad is not used.

Thanks!
steven

On Sep 1, 12:10 am, Justin <[email protected]> wrote:
> Do you know whichviewin your hierarchy cause this issue happened?
> Besides, is this your first time called 'setContentView' in activity?
> or you want to change the contentview(not first time calling
> setContentView) in the same activity?
>
> On 8月28日, 下午10時39分, Steven  Yi <[email protected]> wrote:
>
> > Hi All,
>
> > We are building an app and have run into this problem when the virtual
> > keypad is up and touch a button that ends up calling setContentView.
> > We are targetting Cupcake since that is the current OS deployed.  Are
> > there any workarounds available?
>
> > Thanks!
> > steven
>
> > On Aug 4, 4:52 pm, Romain Guy <[email protected]> wrote:
>
> > > Known bug it's been fixed in Donut
>
> > > On Tue, Aug 4, 2009 at 1:48 PM, Moxor<[email protected]> wrote:
>
> > > > Hi,
> > > > Did you manage to solve it? I have a similar problem.
> > > > Every time I change the focus to a button, and then touch another
> > > > button (I call setContentView()), the application crash with this
> > > > Logcat:
>
> > > > 08-04 17:12:00.251: ERROR/AndroidRuntime(880): Uncaught handler:
> > > > thread main exiting due to uncaught exception
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):
> > > > java.lang.IllegalArgumentException:parametermustbe adescendantof
> > > > thisview
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > android.view.ViewGroup.offsetRectBetweenParentAndChild(ViewGroup.java:
> > > > 2454)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > android.view.ViewGroup.offsetDescendantRectToMyCoords(ViewGroup.java:
> > > > 2391)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > android.view.ViewRoot.scrollToRectOrFocus(ViewRoot.java:1301)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > android.view.ViewRoot.draw(ViewRoot.java:1107)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > android.view.ViewRoot.performTraversals(ViewRoot.java:1030)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > android.view.ViewRoot.handleMessage(ViewRoot.java:1482)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > android.os.Handler.dispatchMessage(Handler.java:99)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > android.os.Looper.loop(Looper.java:123)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > android.app.ActivityThread.main(ActivityThread.java:3948)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > java.lang.reflect.Method.invokeNative(Native Method)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > java.lang.reflect.Method.invoke(Method.java:521)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> > > > (ZygoteInit.java:782)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
> > > > 08-04 17:12:00.292: ERROR/AndroidRuntime(880):     at
> > > > dalvik.system.NativeStart.main(Native Method)
>
> > > > This happens outside my code, once the onClick event is finished.
>
> > > > Thanks in advance.
> > > > Max
>
> > > --
> > > Romain Guy
> > > Android framework engineer
> > > [email protected]
>
> > > Note: please don't send private questions to me, as I don't have time
> > > to provide private support.  All such questions should be posted on
> > > public forums, where I and others can see and answer them
--~--~---------~--~----~------------~-------~--~----~
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