//先看看布局
//主页面布局
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="center" tools:context="com.example.weektwo.MainActivity"> <EditText android:id="@+id/et1" android:layout_width="300dp" android:layout_height="wrap_content" android:hint="Username of Email" /> <EditText android:id="@+id/et2" android:layout_width="300dp" android:layout_height="wrap_content" android:hint="PassWord"/> <TextView android:layout_width="match_parent" android:layout_height="30dp" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center"> <Button android:id="@+id/but1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Sign in" android:background="#f0ff00c8"/> <TextView android:layout_width="100dp" android:layout_height="wrap_content" /> <Button android:id="@+id/but2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#f0001eff" android:text="Twitter" /> </LinearLayout> </LinearLayout>
//有一个页面跳转,第二个页面布局,这里主要是recyclerview
<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.weektwo.OtherActivity"> <com.liaoinstan.springview.widget.SpringView android:id="@+id/springview" android:layout_width="wrap_content" android:layout_height=