页面切换布局

<?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"
    tools:context=".MainActivity"
    android:orientation="vertical">

    
<FrameLayout
    android:id="@+id/content"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1"
    ></FrameLayout>

  <View
      android:layout_width="match_parent"
      android:layout_height="0.75dp"/>



   <LinearLayout
       android:layout_width="match_parent"
       android:layout_height="50dp"
       android:orientation="horizontal">
<TextView
    android:id="@+id/one"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:text="页面一"
    android:layout_weight="1"
    android:gravity="center"/>

       <View
           android:layout_width="0.75dp"
           android:layout_height="match_parent"/>


       <TextView
           android:id="@+id/two"
           android:layout_width="0dp"
           android:layout_height="match_parent"
           android:text="页面二"
           android:layout_weight="1"
           android:gravity="center"/>
   </LinearLayout>
</LinearLayout>

猜你喜欢

转载自blog.csdn.net/chenyibai/article/details/80289953