From d5d541f6bc23fd70875bbc706639b7e48d50468a Mon Sep 17 00:00:00 2001
From: Guo_shaoshan <2055829622@qq.com>
Date: 星期二, 04 四月 2023 20:36:41 +0800
Subject: [PATCH] 更改解决冲突
---
app/src/main/res/layout/activity_main.xml | 38 ++++++++++++++++++++++----------------
1 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index bd629de..152a8ec 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -6,31 +6,37 @@
<data>
<variable
name="viewModel"
- type="com.application.zhangshi_app_android.viewmodel.MainViewModel" />
+ type="com.application.zhangshi_app_android.ui.main.MainViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
- <Button
- android:id="@+id/button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Button"
+ <androidx.viewpager2.widget.ViewPager2
+ android:id="@+id/main_vp"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/main_bnv"
+ />
+
+ <com.google.android.material.bottomnavigation.BottomNavigationView
+ android:id="@+id/main_bnv"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/dp_56"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ android:background="@color/white"
+ app:itemBackground="@null"
+ app:itemIconTint="@null"
+ app:itemTextAppearanceActive="@style/bottom_navigation_title_active"
+ app:itemTextAppearanceInactive="@style/bottom_navigation_title_inactive"
+ app:itemTextColor="@drawable/selector_bottom_navigation_text_color"
+ app:labelVisibilityMode="labeled"
+ app:menu="@menu/bottom_nav_menu"
+ />
- <TextView
- android:id="@+id/textView"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="TextView"
- app:layout_constraintBottom_toTopOf="@+id/button"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
\ No newline at end of file
--
Gitblit v1.9.1