diff --git a/app/build.gradle b/app/build.gradle
index 06c5c00..e85e6c5 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -49,5 +49,6 @@ dependencies {
implementation project(path: ':library-serialPort')
//添加excel
implementation rootProject.ext.dependencies.jxl
+ implementation 'com.google.android.material:material:1.5.0'
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.0.0'
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 1e2eab9..7ac5171 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -25,10 +25,9 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
-
+ android:screenOrientation="portrait">
@@ -36,7 +35,11 @@
+
@@ -50,11 +53,11 @@
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
-
+
\ No newline at end of file
diff --git a/app/src/main/java/com/yinuo/safetywatcher/watcher/HomeActivity.kt b/app/src/main/java/com/yinuo/safetywatcher/watcher/HomeActivity.kt
new file mode 100644
index 0000000..905a973
--- /dev/null
+++ b/app/src/main/java/com/yinuo/safetywatcher/watcher/HomeActivity.kt
@@ -0,0 +1,16 @@
+package com.yinuo.safetywatcher.watcher
+
+import android.view.View
+import com.yinuo.safetywatcher.databinding.ActivityHomeBinding
+import com.yinuo.safetywatcher.watcher.base.BaseActivity
+
+class HomeActivity : BaseActivity() {
+
+ private val mBinding: ActivityHomeBinding by lazy {
+ ActivityHomeBinding.inflate(layoutInflater)
+ }
+
+ override fun generateContentView(): View {
+ return mBinding.root
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/yinuo/safetywatcher/watcher/base/BaseActivity.kt b/app/src/main/java/com/yinuo/safetywatcher/watcher/base/BaseActivity.kt
new file mode 100644
index 0000000..b6d61ae
--- /dev/null
+++ b/app/src/main/java/com/yinuo/safetywatcher/watcher/base/BaseActivity.kt
@@ -0,0 +1,22 @@
+package com.yinuo.safetywatcher.watcher.base
+
+import androidx.appcompat.app.AppCompatActivity
+import android.os.Bundle
+import android.view.View
+import com.yinuo.safetywatcher.R
+import com.yinuo.safetywatcher.databinding.ActivityBaseBinding
+
+abstract class BaseActivity : AppCompatActivity() {
+
+ private val baseBinding: ActivityBaseBinding by lazy {
+ ActivityBaseBinding.inflate(layoutInflater)
+ }
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(baseBinding.root)
+ baseBinding.container.addView(generateContentView())
+ }
+
+ open abstract fun generateContentView(): View
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/yinuo/safetywatcher/watcher/view/CommonTopBar.kt b/app/src/main/java/com/yinuo/safetywatcher/watcher/view/CommonTopBar.kt
new file mode 100644
index 0000000..8abd3d2
--- /dev/null
+++ b/app/src/main/java/com/yinuo/safetywatcher/watcher/view/CommonTopBar.kt
@@ -0,0 +1,8 @@
+package com.yinuo.safetywatcher.watcher.view
+
+import android.content.Context
+import android.widget.LinearLayout
+
+class CommonTopBar(context: Context) : LinearLayout(context) {
+
+}
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_base.xml b/app/src/main/res/layout/activity_base.xml
new file mode 100644
index 0000000..7f5cde8
--- /dev/null
+++ b/app/src/main/res/layout/activity_base.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_home.xml b/app/src/main/res/layout/activity_home.xml
new file mode 100644
index 0000000..24f3d6b
--- /dev/null
+++ b/app/src/main/res/layout/activity_home.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..2a6f1db
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,4 @@
+
+
+ 87dp
+
\ No newline at end of file
diff --git a/buildCommon/commonLibConfig.gradle b/buildCommon/commonLibConfig.gradle
index 15a9516..ffb89b5 100644
--- a/buildCommon/commonLibConfig.gradle
+++ b/buildCommon/commonLibConfig.gradle
@@ -131,6 +131,7 @@ project.ext {
extension.apply plugin: 'kotlin-android'
extension.apply plugin: 'kotlin-parcelize'
extension.apply plugin: 'kotlin-kapt'
+ extension.apply plugin: 'org.jetbrains.kotlin.android'
extension.description "lib"
setAndroidConfig extension.android