This is a know TextView bug that we fixed internally. The fix will be part of an Android update. On Jul 30, 2012 11:20 PM, "Shogun" <[email protected]> wrote:
> Hello. > I have worked with Android 4.0 and my application has worked very well. > But after updating to 4.1 I found that an activity in my application not > working. > LogCat shows exception: > "07-31 09:54:41.008: E/AndroidRuntime(11886): > java.lang.ArrayIndexOutOfBoundsException: length=244; index=339 > 07-31 09:54:41.008: E/AndroidRuntime(11886): at > android.text.MeasuredText.addStyleRun(MeasuredText.java:168) > 07-31 09:54:41.008: E/AndroidRuntime(11886): at > android.text.MeasuredText.addStyleRun(MeasuredText.java:204) > 07-31 09:54:41.008: E/AndroidRuntime(11886): at > android.text.StaticLayout.generate(StaticLayout.java:281) > 07-31 09:54:41.008: E/AndroidRuntime(11886): at > android.text.StaticLayout.<init>(StaticLayout.java:140) > 07-31 09:54:41.008: E/AndroidRuntime(11886): at > android.text.StaticLayout.<init>(StaticLayout.java:80) > 07-31 09:54:41.008: E/AndroidRuntime(11886): at > android.text.StaticLayout.<init>(StaticLayout.java:59)" > > My activity contains ScrollView component and I think, that problem in it: > "<?xml version="1.0" encoding="utf-8"?> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" > android:layout_width="match_parent" > android:layout_height="fill_parent" > android:orientation="vertical" > > > <LinearLayout > android:layout_width="match_parent" > android:layout_height="wrap_content" > android:orientation="horizontal" > > > <Button > android:id="@+id/agreementRejectButton" > android:layout_width="149dp" > android:layout_height="wrap_content" > android:onClick="onRejectButtonClick" > android:text="@string/agreement_decline" /> > > <Button > android:id="@+id/agreementAcceptButton" > android:layout_width="match_parent" > android:layout_height="wrap_content" > android:onClick="onAcceptButtonClick" > android:text="@string/agreement_accept" /> > </LinearLayout> > > <ScrollView > android:id="@+id/scrollView" > android:layout_width="match_parent" > android:layout_height="fill_parent" > > > > > <TextView > android:id="@+id/agreementTextView" > android:layout_width="fill_parent" > android:layout_height="match_parent" > android:text="" /> > > </ScrollView> > > </LinearLayout>" > > Note, that all working in Android 2.3, 3.2 and 4.0. This problem occurs > only in Android 4.1. > > -- > 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 -- 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

