| | |
| | | <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> |