При переходе между активити(используется ActivityGroup в табах) возникает ошибка:
04-26 08:46:04.599: ERROR/AndroidRuntime(992): java.lang.StackOverflowError<br/>
04-26 08:46:04.599: ERROR/AndroidRuntime(992): at android.text.Layout.measureText(Layout.java:1601)<br/>
04-26 08:46:04.599: ERROR/AndroidRuntime(992): at android.text.Layout.getLineMax(Layout.java:655)<br/>
04-26 08:46:04.599: ERROR/AndroidRuntime(992): at android.text.Layout.draw(Layout.java:311)<br/>
04-26 08:46:04.599: ERROR/AndroidRuntime(992): at android.text.BoringLayout.draw(BoringLayout.java:365)<br/>
04-26 08:46:04.599: ERROR/AndroidRuntime(992): at android.widget.TextView.onDraw(TextView.java:4052)<br/>
04-26 08:46:04.599: ERROR/AndroidRuntime(992): at android.view.View.draw(View.java:6535)<br/>
04-26 08:46:04.599: ERROR/AndroidRuntime(992): at android.view.ViewGroup.drawChild(ViewGroup.java:1531)<br/>
04-26 08:46:04.599: ERROR/AndroidRuntime(992): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)<br/>
...<br/>
код:
...<br/>
private ListView _lv;<br/>
...<br/>
@Override<br/>
public void onCreate(Bundle savedInstanceState) {<br/>
super.onCreate(savedInstanceState);<br/>
...<br/>
List cats = Category.getAllCategories(this);<br/>
_lv = (ListView)findViewById(android.R.id.list);<br/>
_lv.setAdapter(new CategoryAdapter(getBaseContext(),R.layout.list_item_layout, cats)); <br/>
_lv.setOnItemClickListener(new ListClickListener());<br/>
...<br/>
}<br/>
public void replaceContentView(String id, Intent newIntent/*,int result*/) {<br/>
View view = getLocalActivityManager().startActivity(id,newIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)) <br/>
.getDecorView(); <br/>
this.setContentView(view);<br/>
} <br/>
<br/>
<br/>
Нужный кусок взят отсюда: <a href="http://www.gamma-point.com/content/android-how-have-multiple-activities-under-single-tab-tabactivity">www.gamma-point.com/content/android-how-have-multiple-activities-under-single-tab-tabactivity</a><br/>
<br/>
Код лэйаутов:<br/>
<code><?xml version="1.0" encoding="utf-8"?><br/>
<LinearLayout<br/>
xmlns:android="http://schemas.android.com/apk/res/android"<br/>
android:id="@+id/recipes_in_cat_list"<br/>
android:orientation="vertical"<br/>
android:layout_width="fill_parent"<br/>
android:layout_height="fill_parent"><br/>
<LinearLayout<br/>
android:layout_width="fill_parent"<br/>
android:layout_height="wrap_content"<br/>
android:gravity="left" <br/>
android:background="@drawable/tab_upper_bar"><br/>
<Button<br/>
android:id="@+id/back_to_cats_button"<br/>
android:layout_width="wrap_content"<br/>
android:layout_height="wrap_content"<br/>
android:layout_marginLeft="5dip"<br/>
android:background="@drawable/android_info_button" /><br/>
</code><br/>
<ListView<br/>
android:id="@android:id/list"<br/>
android:layout_width="fill_parent"<br/>
android:layout_height="fill_parent"<br/>
android:gravity="center"<br/>
android:divider = "#00000000"<br/>
android:cacheColorHint="#00000000" /><br/>
и лэйаут для списка:
<?xml version=«1.0» encoding=«utf-8»?>
<LinearLayout
xmlns:android=«
schemas.android.com/apk/res/android»
android:orientation=«horizontal»
android:layout_width=«fill_parent»
android:layout_height=«40dip»
android:layout_weight=«1»
android:padding = «10dip»
android:background ="@drawable/list_item_bg"
android:layout_centerHorizontal=«true»>
<ImageView
android:id="@+id/recipe_list_left"
android:layout_width=«wrap_content»
android:layout_height=«fill_parent»
android:src="@drawable/list_left"
android:layout_weight=«0» />
<TextView
android:id="@+id/recipe_list_text"
android:layout_width=«fill_parent»
android:layout_height=«fill_parent»
style = "@style/RecipeListText"
android:layout_weight=«1»
android:gravity=«center_horizontal» />
<ImageView
android:id="@+id/recipe_list_right"
android:layout_width=«wrap_content»
android:layout_height=«fill_parent»
android:src="@drawable/list_right"
android:layout_weight=«0» />
Из-за чего может возникнуть такая ошибка и в какую сторону копать?
Слишком большая вложенность вью?