效果图:
布局代码:
left_fragment.xml
<span style="font-family:KaiTi_GB2312;font-size:18px;"><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent"
android:background="#ffeab8"
android:gravity="center"
tools:context="com.example.yu_longji.android17.LeftFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="30sp"
android:text="left_fragment" />
<EditText
android:id="@+id/left_et"
android:layout_width="match_parent"
android:textSize="30sp"
android:layout_height="wrap_content" />
<Button
android:id="@+id/bt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="提交到RightFragment" />
</LinearLayout>
</span>
right_fragment.xml
<