From a824b62bde75373c9b6b8d3a60b3a279895c8675 Mon Sep 17 00:00:00 2001 From: Administrator <123> Date: Sat, 06 Nov 2021 08:17:44 +0000 Subject: [PATCH] 广场 帖子 UI --- app/src/main/res/layout/activity_main.xml | 34 ++++++++++++++-------------------- 1 files changed, 14 insertions(+), 20 deletions(-) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index a57477b..9db3053 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -5,31 +5,25 @@ android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" - android:paddingTop="?attr/actionBarSize" > + android:orientation="vertical"> + <androidx.viewpager2.widget.ViewPager2 + android:id="@+id/view_pager_2" + android:layout_width="match_parent" + android:layout_height="0dp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintBottom_toTopOf="@id/nav_view" /> <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/nav_view" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginStart="0dp" - android:layout_marginEnd="0dp" - android:background="?android:attr/windowBackground" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintRight_toRightOf="parent" - app:menu="@menu/bottom_nav_menu"/> - - <fragment - android:id="@+id/nav_host_fragment_activity_main" - android:name="androidx.navigation.fragment.NavHostFragment" android:layout_width="match_parent" - android:layout_height="match_parent" - app:defaultNavHost="true" - app:layout_constraintBottom_toTopOf="@id/nav_view" + android:layout_height="wrap_content" + android:background="?android:attr/windowBackground" + app:layout_constraintTop_toBottomOf="@id/view_pager_2" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:navGraph="@navigation/mobile_navigation" - /> + app:layout_constraintBottom_toBottomOf="parent" + app:menu="@menu/bottom_nav_menu"/> </androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file -- Gitblit v1.9.1