123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout 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=".ui.main.MainActivity">
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/view_pager"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintBottom_toTopOf="@+id/cs_bottom"
- app:layout_constraintTop_toTopOf="parent" />
- <com.google.android.material.bottomnavigation.BottomNavigationView
- android:id="@+id/navigation"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@color/white"
- android:visibility="invisible"
- app:itemBackground="@null"
- app:itemIconSize="24dp"
- app:itemTextAppearanceActive="@style/bottom_tab_title_active"
- app:itemTextAppearanceInactive="@style/bottom_tab_title_inactive"
- app:labelVisibilityMode="labeled"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/view_pager"
- app:menu="@menu/bottom_nav_item"
- tools:ignore="MissingConstraints"
- tools:visibility="gone" />
- <androidx.constraintlayout.widget.ConstraintLayout
- android:id="@+id/cs_bottom"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@color/white"
- android:elevation="5dp"
- android:orientation="vertical"
- android:paddingBottom="10dp"
- app:layout_constraintBottom_toBottomOf="parent">
- <com.cooleshow.base.widgets.TabAnimationView
- android:layout_marginTop="10dp"
- android:id="@+id/tab_home"
- android:layout_width="24dp"
- android:layout_height="24dp"
- android:layout_marginStart="27dp"
- app:layout_constraintHorizontal_chainStyle="spread_inside"
- app:layout_constraintLeft_toLeftOf="parent"
- app:layout_constraintRight_toLeftOf="@+id/tab_course"
- app:layout_constraintTop_toTopOf="parent"
- app:lottie_autoPlay="false"
- app:lottie_loop="false"
- app:lottie_rawRes="@raw/shouye" />
- <com.cooleshow.base.widgets.TabAnimationView
- android:id="@+id/tab_course"
- android:layout_width="24dp"
- android:layout_height="24dp"
- app:layout_constraintLeft_toRightOf="@+id/tab_home"
- app:layout_constraintRight_toLeftOf="@+id/tab_chat"
- app:layout_constraintTop_toTopOf="@+id/tab_home"
- app:lottie_autoPlay="false"
- app:lottie_loop="false"
- app:lottie_rawRes="@raw/kebiao" />
- <com.cooleshow.base.widgets.TabAnimationView
- android:id="@+id/tab_chat"
- android:layout_width="24dp"
- android:layout_height="24dp"
- app:layout_constraintLeft_toRightOf="@+id/tab_course"
- app:layout_constraintRight_toLeftOf="@+id/tab_mall"
- app:layout_constraintTop_toTopOf="@+id/tab_home"
- app:lottie_autoPlay="false"
- app:lottie_loop="false"
- app:lottie_rawRes="@raw/liaotian" />
- <com.cooleshow.base.widgets.UnreadCountTextView
- app:layout_constraintCircleAngle="45"
- app:layout_constraintCircleRadius="12dp"
- app:layout_constraintCircle="@+id/tab_chat"
- android:includeFontPadding="false"
- android:id="@+id/tv_msg_count"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:gravity="center"
- android:paddingStart="@dimen/dp_4"
- android:paddingEnd="@dimen/dp_4"
- android:text=""
- android:textColor="@color/white"
- android:textSize="@dimen/sp_12"
- android:visibility="gone"
- />
- <com.cooleshow.base.widgets.TabAnimationView
- android:id="@+id/tab_mall"
- android:layout_width="24dp"
- android:layout_height="24dp"
- app:layout_constraintLeft_toRightOf="@+id/tab_chat"
- app:layout_constraintRight_toLeftOf="@+id/tab_mine"
- app:layout_constraintTop_toTopOf="@+id/tab_home"
- app:lottie_autoPlay="false"
- app:lottie_loop="false"
- app:lottie_rawRes="@raw/shangcheng" />
- <com.cooleshow.base.widgets.TabAnimationView
- android:id="@+id/tab_mine"
- android:layout_width="24dp"
- android:layout_height="24dp"
- android:layout_marginEnd="27dp"
- app:layout_constraintLeft_toRightOf="@+id/tab_mall"
- app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintTop_toTopOf="@+id/tab_home"
- app:lottie_autoPlay="false"
- app:lottie_loop="false"
- app:lottie_rawRes="@raw/wode" />
- <TextView
- android:id="@+id/tv_home"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:includeFontPadding="false"
- android:paddingTop="4dp"
- android:text="首页"
- android:textColor="@color/color_999999"
- android:textSize="@dimen/sp_10"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintLeft_toLeftOf="@+id/tab_home"
- app:layout_constraintRight_toRightOf="@+id/tab_home"
- app:layout_constraintTop_toBottomOf="@+id/tab_home" />
- <TextView
- android:id="@+id/tv_course"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:includeFontPadding="false"
- android:text="课表"
- android:textColor="@color/color_999999"
- android:textSize="@dimen/sp_10"
- app:layout_constraintBottom_toBottomOf="@+id/tv_home"
- app:layout_constraintLeft_toLeftOf="@+id/tab_course"
- app:layout_constraintRight_toRightOf="@+id/tab_course"
- app:layout_constraintTop_toTopOf="@+id/tv_home" />
- <TextView
- android:id="@+id/tv_chat"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:includeFontPadding="false"
- android:text="聊天"
- android:textColor="@color/color_999999"
- android:textSize="@dimen/sp_10"
- app:layout_constraintBottom_toBottomOf="@+id/tv_home"
- app:layout_constraintLeft_toLeftOf="@+id/tab_chat"
- app:layout_constraintRight_toRightOf="@+id/tab_chat"
- app:layout_constraintTop_toTopOf="@+id/tv_home" />
- <TextView
- android:id="@+id/tv_mall"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:includeFontPadding="false"
- android:text="商城"
- android:textColor="@color/color_999999"
- android:textSize="@dimen/sp_10"
- app:layout_constraintBottom_toBottomOf="@+id/tv_home"
- app:layout_constraintLeft_toLeftOf="@+id/tab_mall"
- app:layout_constraintRight_toRightOf="@+id/tab_mall"
- app:layout_constraintTop_toTopOf="@+id/tv_home" />
- <TextView
- android:id="@+id/tv_mine"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:includeFontPadding="false"
- android:text="我的"
- android:textColor="@color/color_999999"
- android:textSize="@dimen/sp_10"
- app:layout_constraintBottom_toBottomOf="@+id/tv_home"
- app:layout_constraintLeft_toLeftOf="@+id/tab_mine"
- app:layout_constraintRight_toRightOf="@+id/tab_mine"
- app:layout_constraintTop_toTopOf="@+id/tv_home" />
- <View
- android:onClick="onTabClick"
- android:id="@+id/view_home"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintLeft_toLeftOf="parent"
- app:layout_constraintRight_toLeftOf="@+id/view_course"
- app:layout_constraintTop_toTopOf="parent" />
- <View
- android:onClick="onTabClick"
- android:id="@+id/view_course"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintLeft_toRightOf="@+id/view_home"
- app:layout_constraintRight_toLeftOf="@+id/view_chat"
- app:layout_constraintTop_toTopOf="parent" />
- <View
- android:onClick="onTabClick"
- android:id="@+id/view_chat"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintLeft_toRightOf="@+id/view_course"
- app:layout_constraintRight_toLeftOf="@+id/view_mall"
- app:layout_constraintTop_toTopOf="parent" />
- <View
- android:onClick="onTabClick"
- android:id="@+id/view_mall"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintLeft_toRightOf="@+id/view_chat"
- app:layout_constraintRight_toLeftOf="@+id/view_mine"
- app:layout_constraintTop_toTopOf="parent" />
- <View
- android:onClick="onTabClick"
- android:id="@+id/view_mine"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintLeft_toRightOf="@+id/view_mall"
- app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
- </androidx.constraintlayout.widget.ConstraintLayout>
- </androidx.constraintlayout.widget.ConstraintLayout>
|