Soft keyboard errors with 1.5

by Rmac » Wed, 29 Apr 2009 07:53:35 GMT


Sponsored Links
  have views in my application that contain TextView components.  When
clicking them to enter text I will get either one of the two sample
stack traces below (mostly StackOverflowError) before the app is
forced to close. Only happens with the soft keyboard in 1.5
regardless whether the input mode is resize or pan... or compiled with
1.1 or 1.5 targets. Any suggestions?

Stack trace 1:

java.lang.IllegalArgumentException
at android.view.Surface.lockCanvasNative(Native Method)
at android.view.Surface.lockCanvas(Surface.java:196)
at android.view.ViewRoot.draw(ViewRoot.java:1175)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1030)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1482)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3948)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
at dalvik.system.NativeStart.main(Native Method)

Stack trace 2:

java.lang.StackOverflowError
at android.text.Layout.measureText(Layout.java:1477)
at android.text.Layout.getHorizontal(Layout.java:529)
at android.text.Layout.getHorizontal(Layout.java:513)
at android.text.Layout.getPrimaryHorizontal(Layout.java:498)
at android.text.Layout.getCursorPath(Layout.java:1094)
at android.widget.TextView.onDraw(TextView.java:3839)
at android.view.View.draw(View.java:5838)
at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
at android.view.ViewGroup.drawChild(ViewGroup.java:1484)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
at android.view.ViewGroup.drawChild(ViewGroup.java:1484)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
at android.view.View.draw(View.java:5841)
at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
at android.view.View.draw(View.java:5841)
at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
at android.view.ViewGroup.drawChild(ViewGroup.java:1484)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
at android.view.View.draw(View.java:5841)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
at android.view.ViewGroup.drawChild(ViewGroup.java:1484)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
at android.view.View.draw(View.java:5841)
at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
at android.view.View.draw(View.java:5841)
at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
at android.view.View.draw(View.java:5841)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
at



Soft keyboard errors with 1.5

by Dianne Hackborn » Wed, 29 Apr 2009 09:23:26 GMT


 or the second, it's because your view hierarchy is too deep, and doesn't
really have anything to do with the IME.

On Tue, Apr 28, 2009 at 4:53 PM, Rmac <ry...@mac.com> wrote:



--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails. All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. write XML Document to File

This should be trivial, but for whatever reason I can't find any easy way to
do this.  Coming from C# where this is a 1 line call, I don't understand why
Java makes this so complicated, and on top of that android leaves even that
out of its libraries.

Anyway all I want to do is write an

org.w3c.dom.Document

that I have populated to a xml file.  It should be as easy as opening a
stream and writing document.toString().  But that doesn't work.

My hope is I'm just missing something.  Can some one help me out here?

thanks

-- 

2. TabHost text color

Hello

How could I change a text color in my tabs? I tried with custom theme

        <style name="MyTheme" parent="@android:style/Theme.Light.NoTitleBar">
                <item name="android:windowBackground">@color/beige</item>
                <item name="android:tabWidgetStyle">@style/VacationTab</item>
        </style>

        <style name="VacationTab" parent="@android:style/Widget.TabWidget">
                <item name="android:textAppearance">@style/
VacationTabTextApperance</item>
        </style>

        <style name="VacationTabTextApperance" parent="@android:style/
TextAppearance.Widget.TabWidget">
               <item name="android:textSize">15dip</item>
               <item name="android:textStyle">bold</item>
               <item name="android:textColor">#FF0000</item>
        </style>

But nothing changes.. what should I do? Text size and style are
applied, but color not.. why?

-- 

3. Getting the ID of an image in the MediaStore

4. Get more free softwares

5. Issue in streaming and playing video using videoview on Motorola milestone

6. Getting problem in keypad

7. Music