【发布时间】:2011-09-15 13:17:38
【问题描述】:
您好,我有一个包含两个片段的线性布局,我在此布局中添加了带有代码的选项卡。我想要的是当我单击 tab1 时,可以从指示的类中分段填充自己,但是在 tab2 中我想将这个类更改为另一个类。谢谢
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/frags">
<fragment class="com.tugce.MitsActionBar.DoktorlarFragment"
android:id="@+id/frag_title"
android:visibility="gone"
android:layout_marginTop="?android:attr/actionBarSize"
android:layout_width="@dimen/titles_size"
android:layout_height="match_parent" />
<fragment class="com.tugce.MitsActionBar.ContentFragment"
android:id="@+id/frag_content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
【问题讨论】:
标签: android android-layout android-fragments