Quellcode durchsuchen

添加首页基础页面

Frankensteinly vor 10 Monaten
Ursprung
Commit
e1a95dfebc

+ 4 - 1
app/src/main/AndroidManifest.xml

@@ -22,6 +22,9 @@
         android:supportsRtl="true"
         android:theme="@style/Theme.ISCS"
         tools:targetApi="31">
+        <activity
+            android:name=".activity.HomeActivity"
+            android:exported="false" />
         <activity
             android:name=".activity.test.ProcessDemoActivity"
             android:exported="false" />
@@ -56,7 +59,7 @@
             android:name=".activity.test.SopActivity"
             android:exported="false" />
         <activity
-            android:name=".activity.HomeActivity"
+            android:name=".activity.CustomHomeActivity"
             android:exported="false" />
         <activity
             android:name=".activity.AuthActivity"

+ 61 - 0
app/src/main/java/com/grkj/iscs/activity/CustomHomeActivity.kt

@@ -0,0 +1,61 @@
+package com.grkj.iscs.activity
+
+import android.content.Intent
+import android.view.View
+import com.grkj.iscs.base.BaseMvpActivity
+import com.grkj.iscs.databinding.ActivityCustomHomeBinding
+import com.grkj.iscs.iview.ICustomHomeView
+import com.grkj.iscs.model.Constants.USER_ROLE_COLOCKER
+import com.grkj.iscs.model.Constants.USER_ROLE_DRAWER
+import com.grkj.iscs.model.Constants.USER_ROLE_GUARD
+import com.grkj.iscs.model.Constants.USER_ROLE_LOCKER
+import com.grkj.iscs.model.vo.card.CardInfoRespVO
+import com.grkj.iscs.presenter.CustomHomePresenter
+import com.grkj.iscs.util.NetApi
+
+class CustomHomeActivity : BaseMvpActivity<ICustomHomeView, CustomHomePresenter, ActivityCustomHomeBinding>() {
+
+    override val viewBinding: ActivityCustomHomeBinding
+        get() = ActivityCustomHomeBinding.inflate(layoutInflater)
+
+    override fun initView() {
+        mBinding?.tvExit?.setOnClickListener {
+            NetApi.logout()
+            finish()
+        }
+
+        val cardInfo = intent.getSerializableExtra("cardInfo") ?: return
+        (cardInfo as CardInfoRespVO).roleKeyList?.let {
+            if (it.contains(USER_ROLE_DRAWER)) {
+                mBinding?.tvCreate?.visibility = View.VISIBLE
+                mBinding?.tvCreate?.setOnClickListener {
+                    startActivity(Intent(this, CreateTicketActivity::class.java))
+                }
+            }
+            if (it.contains(USER_ROLE_LOCKER) || it.contains(USER_ROLE_COLOCKER)) {
+                mBinding?.tvCurrent?.visibility = View.VISIBLE
+                mBinding?.tvCurrent?.setOnClickListener {
+                    startActivity(Intent(this, TicketListActivity::class.java).apply {
+                        putExtra("role", USER_ROLE_LOCKER)
+                    })
+                }
+            }
+            if (it.contains(USER_ROLE_GUARD)) {
+                mBinding?.tvHistory?.visibility = View.VISIBLE
+                mBinding?.tvHistory?.setOnClickListener {
+                    startActivity(Intent(this, TicketListActivity::class.java).apply {
+                        putExtra("role", USER_ROLE_GUARD)
+                    })
+                }
+            }
+        }
+
+        presenter?.getTicketCount(null) {
+            mBinding?.tvCount?.text = it.toString()
+        }
+    }
+
+    override fun initPresenter(): CustomHomePresenter {
+        return CustomHomePresenter()
+    }
+}

+ 1 - 42
app/src/main/java/com/grkj/iscs/activity/HomeActivity.kt

@@ -1,17 +1,9 @@
 package com.grkj.iscs.activity
 
-import android.content.Intent
-import android.view.View
 import com.grkj.iscs.base.BaseMvpActivity
 import com.grkj.iscs.databinding.ActivityHomeBinding
 import com.grkj.iscs.iview.IHomeView
-import com.grkj.iscs.model.Constants.USER_ROLE_COLOCKER
-import com.grkj.iscs.model.Constants.USER_ROLE_DRAWER
-import com.grkj.iscs.model.Constants.USER_ROLE_GUARD
-import com.grkj.iscs.model.Constants.USER_ROLE_LOCKER
-import com.grkj.iscs.model.vo.card.CardInfoRespVO
 import com.grkj.iscs.presenter.HomePresenter
-import com.grkj.iscs.util.NetApi
 
 class HomeActivity : BaseMvpActivity<IHomeView, HomePresenter, ActivityHomeBinding>() {
 
@@ -19,40 +11,7 @@ class HomeActivity : BaseMvpActivity<IHomeView, HomePresenter, ActivityHomeBindi
         get() = ActivityHomeBinding.inflate(layoutInflater)
 
     override fun initView() {
-        mBinding?.tvExit?.setOnClickListener {
-            NetApi.logout()
-            finish()
-        }
-
-        val cardInfo = intent.getSerializableExtra("cardInfo") ?: return
-        (cardInfo as CardInfoRespVO).roleKeyList?.let {
-            if (it.contains(USER_ROLE_DRAWER)) {
-                mBinding?.tvCreate?.visibility = View.VISIBLE
-                mBinding?.tvCreate?.setOnClickListener {
-                    startActivity(Intent(this, CreateTicketActivity::class.java))
-                }
-            }
-            if (it.contains(USER_ROLE_LOCKER) || it.contains(USER_ROLE_COLOCKER)) {
-                mBinding?.tvCurrent?.visibility = View.VISIBLE
-                mBinding?.tvCurrent?.setOnClickListener {
-                    startActivity(Intent(this, TicketListActivity::class.java).apply {
-                        putExtra("role", USER_ROLE_LOCKER)
-                    })
-                }
-            }
-            if (it.contains(USER_ROLE_GUARD)) {
-                mBinding?.tvHistory?.visibility = View.VISIBLE
-                mBinding?.tvHistory?.setOnClickListener {
-                    startActivity(Intent(this, TicketListActivity::class.java).apply {
-                        putExtra("role", USER_ROLE_GUARD)
-                    })
-                }
-            }
-        }
-
-        presenter?.getTicketCount(null) {
-            mBinding?.tvCount?.text = it.toString()
-        }
+        mBinding?.vp?.isUserInputEnabled = false
     }
 
     override fun initPresenter(): HomePresenter {

+ 1 - 1
app/src/main/java/com/grkj/iscs/activity/MainActivity.kt

@@ -39,7 +39,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
         }
 
         mBinding?.home?.setOnClickListener {
-            startActivity(Intent(this, HomeActivity::class.java))
+            startActivity(Intent(this, CustomHomeActivity::class.java))
         }
 
         mBinding?.sop?.setOnClickListener {

+ 5 - 0
app/src/main/java/com/grkj/iscs/iview/ICustomHomeView.kt

@@ -0,0 +1,5 @@
+package com.grkj.iscs.iview
+
+import com.grkj.iscs.base.IView
+
+interface ICustomHomeView : IView {}

+ 2 - 1
app/src/main/java/com/grkj/iscs/iview/IHomeView.kt

@@ -2,4 +2,5 @@ package com.grkj.iscs.iview
 
 import com.grkj.iscs.base.IView
 
-interface IHomeView : IView {}
+interface IHomeView : IView {
+}

+ 25 - 0
app/src/main/java/com/grkj/iscs/presenter/CustomHomePresenter.kt

@@ -0,0 +1,25 @@
+package com.grkj.iscs.presenter
+
+import com.grkj.iscs.R
+import com.grkj.iscs.base.BasePresenter
+import com.grkj.iscs.iview.ICustomHomeView
+import com.grkj.iscs.util.Executor
+import com.grkj.iscs.util.NetApi
+import com.grkj.iscs.util.SPUtils
+import com.grkj.iscs.util.ToastUtils
+
+class CustomHomePresenter : BasePresenter<ICustomHomeView>() {
+
+    fun getTicketCount(ticketStatus: Int?, callBack: (Int?) -> Unit) {
+        val userId = SPUtils.getLoginUser(mContext!!)?.userId
+        if (userId == null) {
+            ToastUtils.tip(mContext!!.resources.getString(R.string.please_login))
+            return
+        }
+        NetApi.getTicketPage(0, 10, userId, ticketStatus) {
+            Executor.runOnMain {
+                callBack.invoke(it?.total)
+            }
+        }
+    }
+}

+ 0 - 18
app/src/main/java/com/grkj/iscs/presenter/HomePresenter.kt

@@ -1,25 +1,7 @@
 package com.grkj.iscs.presenter
 
-import com.grkj.iscs.R
 import com.grkj.iscs.base.BasePresenter
 import com.grkj.iscs.iview.IHomeView
-import com.grkj.iscs.util.Executor
-import com.grkj.iscs.util.NetApi
-import com.grkj.iscs.util.SPUtils
-import com.grkj.iscs.util.ToastUtils
 
 class HomePresenter : BasePresenter<IHomeView>() {
-
-    fun getTicketCount(ticketStatus: Int?, callBack: (Int?) -> Unit) {
-        val userId = SPUtils.getLoginUser(mContext!!)?.userId
-        if (userId == null) {
-            ToastUtils.tip(mContext!!.resources.getString(R.string.please_login))
-            return
-        }
-        NetApi.getTicketPage(0, 10, userId, ticketStatus) {
-            Executor.runOnMain {
-                callBack.invoke(it?.total)
-            }
-        }
-    }
 }

+ 177 - 0
app/src/main/res/layout/activity_custom_home.xml

@@ -0,0 +1,177 @@
+<?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:id="@+id/main"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".activity.CustomHomeActivity">
+
+    <!--    <com.grkj.iscs.widget.TitleBar-->
+    <!--        android:id="@+id/title_bar"-->
+    <!--        android:layout_width="match_parent"-->
+    <!--        android:layout_height="wrap_content"-->
+    <!--        app:layout_constraintLeft_toLeftOf="parent"-->
+    <!--        app:layout_constraintTop_toTopOf="parent"-->
+    <!--        app:title="@string/home_page" />-->
+
+    <TextView
+        android:id="@+id/tv_exit"
+        style="@style/CommonTextView"
+        android:layout_margin="@dimen/home_module_margin"
+        android:text="@string/exit"
+        android:textColor="@color/main_color"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintHeight_percent="0.6"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintWidth_percent="0.8">
+
+        <!--    当前时间    -->
+        <LinearLayout
+            android:id="@+id/ll_time"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:layout_margin="3dp"
+            android:background="@color/main_color"
+            android:gravity="center"
+            android:orientation="vertical"
+            app:layout_constraintBottom_toTopOf="@id/ll_sop"
+            app:layout_constraintLeft_toLeftOf="@id/barrier"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintWidth_percent="0.25">
+
+            <TextView
+                style="@style/CommonTextView"
+                android:text="@string/current_time" />
+
+            <TextClock
+                style="@style/CommonTextView"
+                android:format12Hour="HH:mm"
+                android:format24Hour="HH:mm" />
+        </LinearLayout>
+
+        <!--   当前作业票     -->
+        <LinearLayout
+            android:id="@+id/ll_sop"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:layout_margin="3dp"
+            android:background="@color/main_color"
+            android:gravity="center"
+            android:orientation="vertical"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintLeft_toLeftOf="@id/barrier"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toBottomOf="@id/ll_time">
+
+            <TextView
+                style="@style/CommonTextView"
+                android:text="@string/current_sop_number" />
+
+            <TextView
+                android:id="@+id/tv_count"
+                style="@style/CommonTextView" />
+        </LinearLayout>
+
+        <androidx.constraintlayout.widget.Barrier
+            android:id="@+id/barrier"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            app:barrierDirection="start"
+            app:constraint_referenced_ids="ll_time,ll_sop" />
+
+        <!--    2按钮    -->
+        <LinearLayout
+            android:id="@+id/ll_type_two"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:orientation="horizontal"
+            android:visibility="gone"
+            app:layout_constraintHorizontal_weight="1"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toLeftOf="@id/barrier"
+            app:layout_constraintTop_toTopOf="parent">
+
+            <LinearLayout
+                android:id="@+id/ll_module_left"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_margin="3dp"
+                android:layout_weight="1"
+                android:background="@color/main_color"
+                android:orientation="vertical">
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:id="@+id/ll_module_right"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_margin="3dp"
+                android:layout_weight="1"
+                android:background="@color/main_color"
+                android:orientation="vertical">
+
+            </LinearLayout>
+        </LinearLayout>
+
+        <!--    4按钮    -->
+        <LinearLayout
+            android:id="@+id/ll_type_four"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:orientation="horizontal"
+            app:layout_constraintHorizontal_weight="1"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toLeftOf="@id/barrier"
+            app:layout_constraintTop_toTopOf="parent">
+
+            <TextView
+                android:id="@+id/tv_create"
+                style="@style/CommonTextView"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_margin="@dimen/home_module_margin"
+                android:layout_weight="1"
+                android:background="@color/main_color"
+                android:orientation="vertical"
+                android:text="@string/create_ticket"
+                android:visibility="gone" />
+
+            <TextView
+                android:id="@+id/tv_current"
+                style="@style/CommonTextView"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_margin="@dimen/home_module_margin"
+                android:layout_weight="1"
+                android:background="@color/main_color"
+                android:orientation="vertical"
+                android:text="@string/current_tickets"
+                android:visibility="gone" />
+
+            <TextView
+                android:id="@+id/tv_history"
+                style="@style/CommonTextView"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_margin="@dimen/home_module_margin"
+                android:layout_weight="1"
+                android:background="@color/main_color"
+                android:orientation="vertical"
+                android:text="@string/history_tickets"
+                android:visibility="gone" />
+        </LinearLayout>
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 67 - 161
app/src/main/res/layout/activity_home.xml

@@ -5,173 +5,79 @@
     android:id="@+id/main"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="@color/main_color"
     tools:context=".activity.HomeActivity">
 
-    <!--    <com.grkj.iscs.widget.TitleBar-->
-    <!--        android:id="@+id/title_bar"-->
-    <!--        android:layout_width="match_parent"-->
-    <!--        android:layout_height="wrap_content"-->
-    <!--        app:layout_constraintLeft_toLeftOf="parent"-->
-    <!--        app:layout_constraintTop_toTopOf="parent"-->
-    <!--        app:title="@string/home_page" />-->
-
-    <TextView
-        android:id="@+id/tv_exit"
-        style="@style/CommonTextView"
-        android:layout_margin="@dimen/home_module_margin"
-        android:text="@string/exit"
-        android:textColor="@color/main_color"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <androidx.constraintlayout.widget.ConstraintLayout
+    <RelativeLayout
+        android:id="@+id/rl_menu"
         android:layout_width="0dp"
         android:layout_height="0dp"
         app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintHeight_percent="0.6"
+        app:layout_constraintHorizontal_weight="35"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        app:layout_constraintWidth_percent="0.8">
-
-        <!--    当前时间    -->
-        <LinearLayout
-            android:id="@+id/ll_time"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:layout_margin="3dp"
-            android:background="@color/main_color"
-            android:gravity="center"
-            android:orientation="vertical"
-            app:layout_constraintBottom_toTopOf="@id/ll_sop"
-            app:layout_constraintLeft_toLeftOf="@id/barrier"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintWidth_percent="0.25">
-
-            <TextView
-                style="@style/CommonTextView"
-                android:text="@string/current_time" />
-
-            <TextClock
-                style="@style/CommonTextView"
-                android:format12Hour="HH:mm"
-                android:format24Hour="HH:mm" />
-        </LinearLayout>
-
-        <!--   当前作业票     -->
-        <LinearLayout
-            android:id="@+id/ll_sop"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:layout_margin="3dp"
-            android:background="@color/main_color"
-            android:gravity="center"
-            android:orientation="vertical"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="@id/barrier"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toBottomOf="@id/ll_time">
-
-            <TextView
-                style="@style/CommonTextView"
-                android:text="@string/current_sop_number" />
-
-            <TextView
-                android:id="@+id/tv_count"
-                style="@style/CommonTextView" />
-        </LinearLayout>
-
-        <androidx.constraintlayout.widget.Barrier
-            android:id="@+id/barrier"
-            android:layout_width="wrap_content"
+        app:layout_constraintRight_toLeftOf="@id/rl_page"
+        app:layout_constraintTop_toTopOf="parent">
+
+        <TextView
+            android:id="@+id/tv_app_title"
+            style="@style/CommonTextView"
+            android:layout_centerHorizontal="true"
+            android:padding="@dimen/menu_padding"
+            android:text="@string/app_title" />
+
+        <View
+            android:id="@+id/v_divider_title"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/divider_line_width"
+            android:layout_below="@id/tv_app_title"
+            android:layout_margin="@dimen/divider_line_margin"
+            android:background="@color/white" />
+
+        <TextClock
+            android:id="@+id/tc_time"
+            style="@style/CommonTextView"
+            android:layout_alignParentBottom="true"
+            android:layout_centerHorizontal="true"
+            android:format12Hour="yyyy-MM-dd\nhh:mm"
+            android:format24Hour="yyyy-MM-dd\nhh:mm"
+            android:padding="@dimen/menu_padding" />
+
+        <View
+            android:id="@+id/v_divider_time"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/divider_line_width"
+            android:layout_above="@id/tc_time"
+            android:layout_margin="@dimen/divider_line_margin"
+            android:background="@color/white" />
+
+        <include
+            android:id="@+id/item_setting"
+            layout="@layout/item_rv_menu"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            app:barrierDirection="start"
-            app:constraint_referenced_ids="ll_time,ll_sop" />
-
-        <!--    2按钮    -->
-        <LinearLayout
-            android:id="@+id/ll_type_two"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:orientation="horizontal"
-            android:visibility="gone"
-            app:layout_constraintHorizontal_weight="1"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toLeftOf="@id/barrier"
-            app:layout_constraintTop_toTopOf="parent">
-
-            <LinearLayout
-                android:id="@+id/ll_module_left"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_margin="3dp"
-                android:layout_weight="1"
-                android:background="@color/main_color"
-                android:orientation="vertical">
-
-            </LinearLayout>
-
-            <LinearLayout
-                android:id="@+id/ll_module_right"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_margin="3dp"
-                android:layout_weight="1"
-                android:background="@color/main_color"
-                android:orientation="vertical">
-
-            </LinearLayout>
-        </LinearLayout>
-
-        <!--    4按钮    -->
-        <LinearLayout
-            android:id="@+id/ll_type_four"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:orientation="horizontal"
-            app:layout_constraintHorizontal_weight="1"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toLeftOf="@id/barrier"
-            app:layout_constraintTop_toTopOf="parent">
-
-            <TextView
-                android:id="@+id/tv_create"
-                style="@style/CommonTextView"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_margin="@dimen/home_module_margin"
-                android:layout_weight="1"
-                android:background="@color/main_color"
-                android:orientation="vertical"
-                android:text="@string/create_ticket"
-                android:visibility="gone" />
-
-            <TextView
-                android:id="@+id/tv_current"
-                style="@style/CommonTextView"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_margin="@dimen/home_module_margin"
-                android:layout_weight="1"
-                android:background="@color/main_color"
-                android:orientation="vertical"
-                android:text="@string/current_tickets"
-                android:visibility="gone" />
-
-            <TextView
-                android:id="@+id/tv_history"
-                style="@style/CommonTextView"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_margin="@dimen/home_module_margin"
-                android:layout_weight="1"
-                android:background="@color/main_color"
-                android:orientation="vertical"
-                android:text="@string/history_tickets"
-                android:visibility="gone" />
-        </LinearLayout>
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
+            android:layout_above="@id/v_divider_time" />
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/rv_menu"
+            style="@style/CommonRecyclerView"
+            android:layout_above="@id/item_setting"
+            android:layout_below="@id/v_divider_title"
+            tools:listitem="@layout/item_rv_menu" />
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:id="@+id/rl_page"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintHorizontal_weight="200"
+        app:layout_constraintLeft_toRightOf="@id/rl_menu"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent">
 
+        <androidx.viewpager2.widget.ViewPager2
+            android:id="@+id/vp"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"/>
+    </RelativeLayout>
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 13 - 0
app/src/main/res/layout/item_rv_menu.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/root"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_margin="@dimen/rv_item_margin"
+    android:orientation="vertical">
+
+    <TextView
+        android:id="@+id/tv_number"
+        style="@style/CommonTextView" />
+
+</LinearLayout>

+ 4 - 0
app/src/main/res/values/dimens.xml

@@ -51,4 +51,8 @@
 
     <dimen name="dialog_card_login_width">320dp</dimen>
     <dimen name="dialog_card_login_height">180dp</dimen>
+
+    <dimen name="menu_padding">10dp</dimen>
+    <dimen name="divider_line_width">1dp</dimen>
+    <dimen name="divider_line_margin">3dp</dimen>
 </resources>

+ 4 - 0
app/src/main/res/values/strings.xml

@@ -98,4 +98,8 @@
     <string name="presentation_hint_content">请输入作业内容</string>
 
     <string name="presentation_login_tip">请刷卡登录</string>
+
+
+    <!--  设计图  -->
+    <string name="app_title">Mars\n智能锁控</string>
 </resources>