效果图:
布局 :
activity:
<fragment
android:layout_width="0dp"
android:layout_weight="1"
android:name="com.example.administrator.yn_demob.Fragmnet1"
android:layout_height="match_parent"
android:id="@+id/f1"></fragment>
<fragment
android:layout_width="0dp"
android:layout_weight="2"
android:name="com.example.administrator.yn_demob.Fragmnet2"
android:layout_height="match_parent"
android:id="@+id/f2"></fragment>
fragment1:
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/f1_rec"></android.support.v7.widget.RecyclerView>
fragment2:
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/f2_rec"></android.support.v7.widget.RecyclerView>
f1_list布局
<TextView