Hi,
I am using Android SDK 1.5. I am developing an activity with multiple
content views. It will call setContentView() with different viewgroup
instance for different functionality. It contains a text input dialog
popped up by an option menu item. I didn't specify anything for IME in
mainfest.xml & EditText attributes. I found at first, the soft
keyboard for the text input dialog will overlap on the activity
content view. But after several content view switch (by calling
setContentView() with different ViewGroup instance), the soft keyboard
will resize the activity content view.
Why this inconsistent behavior happens?

And some times, the activity is also crashed when soft keyborad is
showing for the test input dialog. Here is the log:
07-01 07:30:18.606: WARN/InputManagerService(726): Window already
focused, ignoring focus gain of:
com.android.internal.view.iinputmethodclient$stub$pr...@43807360
07-01 07:30:19.575: WARN/KeyCharacterMap(941): No keyboard for id 0
07-01 07:30:19.585: WARN/KeyCharacterMap(941): Using default keymap: /
system/usr/keychars/qwerty.kcm.bin
07-01 07:30:21.896: WARN/InputManagerService(726): Window already
focused, ignoring focus gain of:
com.android.internal.view.iinputmethodclient$stub$pr...@4380ead8
07-01 07:30:28.106: DEBUG/AndroidRuntime(941): Shutting down VM
07-01 07:30:28.115: WARN/dalvikvm(941): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
07-01 07:30:28.181: ERROR/AndroidRuntime(941): Uncaught handler:
thread main exiting due to uncaught exception
07-01 07:30:28.256: ERROR/AndroidRuntime(941):
java.lang.IllegalArgumentException: parameter must be a descendant of
this view
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
android.view.ViewGroup.offsetRectBetweenParentAndChild(ViewGroup.java:
2454)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
android.view.ViewGroup.offsetDescendantRectToMyCoords(ViewGroup.java:
2391)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
android.view.ViewRoot.scrollToRectOrFocus(ViewRoot.java:1301)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
android.view.ViewRoot.draw(ViewRoot.java:1107)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
android.view.ViewRoot.performTraversals(ViewRoot.java:1030)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1482)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
android.os.Handler.dispatchMessage(Handler.java:99)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
android.os.Looper.loop(Looper.java:123)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
java.lang.reflect.Method.invokeNative(Native Method)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
java.lang.reflect.Method.invoke(Method.java:521)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
07-01 07:30:28.256: ERROR/AndroidRuntime(941):     at
dalvik.system.NativeStart.main(Native Method)
07-01 07:30:28.267: INFO/Process(726): Sending signal. PID: 941 SIG: 3
07-01 07:30:28.267: INFO/dalvikvm(941): threadid=7: reacting to signal
3
07-01 07:30:28.386: INFO/dalvikvm(941): Wrote stack trace to '/data/
anr/traces.txt'
07-01 07:30:28.485: DEBUG/dalvikvm(726): GC freed 9705 objects /
540208 bytes in 178ms
07-01 07:35:28.289: INFO/Process(941): Sending signal. PID: 941 SIG: 9
07-01 07:35:28.325: INFO/ActivityManager(726): Process
com.android.mytest (pid 941) has died.

Please help. Thanks!
--~--~---------~--~----~------------~-------~--~----~
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