//主Main布局
<?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="match_parent" android:orientation="horizontal"> <android.support.v7.widget.RecyclerView android:id="@+id/type_rvleft" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="2"></android.support.v7.widget.RecyclerView> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="20dp" android:layout_weight="1" android:orientation="vertical"> <ImageView android:id="@+id/iv" android:layout_width="match_parent" android:background="@drawable/w1" android:layout_height="120dp" /> <android.support.v7.widget.RecyclerView android:id="@+id/type_rvright" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"></android.support.v7.widget.RecyclerView> </LinearLayout> </LinearLayout>
//classleft_item.xml
<?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="wrap_content" android:orientation="vertical"> <TextView android:id="@+id/tv" android:text="213" android:gravity="center" android:layout_width="match_parent" android:layout_height="50dp" /> </LinearLayout>
//classright_item.xml
<?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="wrap_content" android:orientation="vertical"> <ScrollView android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:layout_width="4dp" android:layout_height="30dp" android:background="@color/colorAccent" /> <TextView android:id="@+id/tv" android:layout_width="wrap_content" android:layout_height="50dp" android:layout_gravity="center_vertical" android:layout_marginLeft="20dp" android:enabled="true" android:text="234" android:textSize="22sp" /> </RelativeLayout> <android.support.v7.widget.RecyclerView android:id="@+id/item_rlv" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> </ScrollView> </LinearLayout>
//classright_item2.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:padding="15dp" android:orientation="vertical"> <ImageView android:id="@+id/iv" android:layout_width="70dp" android:layout_height="70dp" /> <TextView android:id="@+id/tv" android:text="123" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout>
//model
public interface ClassLeftModel { void classleft(OnNetListener onNetListener); }