diff --git a/src/FruitandVegetableGuide/.gitignore b/src/FruitandVegetableGuide/.gitignore
new file mode 100644
index 0000000..aa724b7
--- /dev/null
+++ b/src/FruitandVegetableGuide/.gitignore
@@ -0,0 +1,15 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
+.cxx
+local.properties
diff --git a/src/FruitandVegetableGuide/.idea/.gitignore b/src/FruitandVegetableGuide/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/src/FruitandVegetableGuide/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/src/FruitandVegetableGuide/.idea/compiler.xml b/src/FruitandVegetableGuide/.idea/compiler.xml
new file mode 100644
index 0000000..b589d56
--- /dev/null
+++ b/src/FruitandVegetableGuide/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/.idea/dbnavigator.xml b/src/FruitandVegetableGuide/.idea/dbnavigator.xml
new file mode 100644
index 0000000..2f23ff3
--- /dev/null
+++ b/src/FruitandVegetableGuide/.idea/dbnavigator.xml
@@ -0,0 +1,405 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/.idea/gradle.xml b/src/FruitandVegetableGuide/.idea/gradle.xml
new file mode 100644
index 0000000..a2d7c21
--- /dev/null
+++ b/src/FruitandVegetableGuide/.idea/gradle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/.idea/inspectionProfiles/Project_Default.xml b/src/FruitandVegetableGuide/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..44ca2d9
--- /dev/null
+++ b/src/FruitandVegetableGuide/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/.idea/kotlinc.xml b/src/FruitandVegetableGuide/.idea/kotlinc.xml
new file mode 100644
index 0000000..9a55c2d
--- /dev/null
+++ b/src/FruitandVegetableGuide/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/.idea/misc.xml b/src/FruitandVegetableGuide/.idea/misc.xml
new file mode 100644
index 0000000..773fe0f
--- /dev/null
+++ b/src/FruitandVegetableGuide/.idea/misc.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/.idea/vcs.xml b/src/FruitandVegetableGuide/.idea/vcs.xml
new file mode 100644
index 0000000..b2bdec2
--- /dev/null
+++ b/src/FruitandVegetableGuide/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/.gitignore b/src/FruitandVegetableGuide/app/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/build.gradle b/src/FruitandVegetableGuide/app/build.gradle
new file mode 100644
index 0000000..5376ae4
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/build.gradle
@@ -0,0 +1,91 @@
+plugins {
+ id 'com.android.application'
+ id 'org.jetbrains.kotlin.android'
+}
+
+android {
+ namespace 'com.example.fruitandvegetableguide'
+ compileSdk 34
+
+ defaultConfig {
+ applicationId "com.example.fruitandvegetableguide"
+ minSdk 21
+ targetSdk 34
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ vectorDrawables {
+ useSupportLibrary true
+ }
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+ buildFeatures {
+ compose true
+ }
+ composeOptions {
+ kotlinCompilerExtensionVersion '1.4.8'
+ }
+ packagingOptions {
+ resources {
+ excludes += '/META-INF/{AL2.0,LGPL2.1}'
+ }
+ }
+}
+
+dependencies {
+ implementation("androidx.navigation:navigation-compose:2.5.3")
+
+ implementation "androidx.appcompat:appcompat:1.6.1"
+ implementation "androidx.core:core-ktx:1.10.1"
+ implementation "com.google.android.material:material:1.9.0"
+
+ def composeBom = platform('androidx.compose:compose-bom:2023.08.00')
+ implementation(composeBom)
+ androidTestImplementation(composeBom)
+
+ implementation("androidx.compose.material3:material3")
+ implementation("androidx.compose.material:material-icons-extended")
+ implementation 'androidx.compose.ui:ui-tooling-preview'
+ androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
+ debugImplementation 'androidx.compose.ui:ui-tooling'
+ debugImplementation("androidx.compose.ui:ui-test-manifest")
+
+ implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1")
+ implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.1"
+ implementation("androidx.activity:activity-compose:1.7.2")
+ implementation 'androidx.core:core-ktx:1.10.1'
+ implementation "androidx.window:window:1.1.0"
+ implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1"
+
+ testImplementation 'junit:junit:4.13.2'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.5'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
+
+}
+// implementation("androidx.compose.material:material")
+// implementation("androidx.compose.foundation:foundation")
+// implementation("androidx.compose.ui:ui")
+// implementation("androidx.compose.material:material-icons-core")
+// implementation("androidx.compose.material3:material3-window-size-class")
+// implementation("androidx.compose.runtime:runtime-livedata")
+// implementation("androidx.compose.runtime:runtime-rxjava2")
+// implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')
+// implementation platform('androidx.compose:compose-bom:2022.10.00')
+// implementation 'androidx.compose.ui:ui-graphics'
+// implementation 'androidx.appcompat:appcompat:1.4.1'
+// implementation 'com.google.android.material:material:1.5.0'
+// androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00')
diff --git a/src/FruitandVegetableGuide/app/proguard-rules.pro b/src/FruitandVegetableGuide/app/proguard-rules.pro
new file mode 100644
index 0000000..481bb43
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/androidTest/java/com/example/fruitandvegetableguide/ExampleInstrumentedTest.kt b/src/FruitandVegetableGuide/app/src/androidTest/java/com/example/fruitandvegetableguide/ExampleInstrumentedTest.kt
new file mode 100644
index 0000000..11351c4
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/androidTest/java/com/example/fruitandvegetableguide/ExampleInstrumentedTest.kt
@@ -0,0 +1,24 @@
+package com.example.fruitandvegetableguide
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.AndroidJUnit4
+
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import org.junit.Assert.*
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+@RunWith(AndroidJUnit4::class)
+class ExampleInstrumentedTest {
+ @Test
+ fun useAppContext() {
+ // Context of the app under test.
+ val appContext = InstrumentationRegistry.getInstrumentation().targetContext
+ assertEquals("com.example.fruitandvegetableguide", appContext.packageName)
+ }
+}
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/AndroidManifest.xml b/src/FruitandVegetableGuide/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..b53bc0f
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/AndroidManifest.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/Account.kt b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/Account.kt
new file mode 100644
index 0000000..92a8f04
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/Account.kt
@@ -0,0 +1,7 @@
+package com.example.fruitandvegetableguide.data
+
+data class Account(
+ val username: String,
+ val id:Long,
+ val password:String
+)
diff --git a/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/Guide.kt b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/Guide.kt
new file mode 100644
index 0000000..84d7a9a
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/Guide.kt
@@ -0,0 +1,12 @@
+package com.example.fruitandvegetableguide.data
+
+data class Guide(
+ val id: Long,
+ val imgId: Int,
+ val kind: String,
+ val imgUrl: String,
+ val suitable: String,
+ val taboo: String,
+ val nutritiveValue: String,
+ val recommendedMenu: String
+)
diff --git a/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/Post.kt b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/Post.kt
new file mode 100644
index 0000000..2a068dd
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/Post.kt
@@ -0,0 +1,10 @@
+package com.example.fruitandvegetableguide.data
+
+data class Post(
+ val id: Long,
+ val userId: Long,
+ val title: String,
+ val imgId: Int,
+ val labels: ArrayList,
+ val content: String
+)
diff --git a/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/local/LocalAccountsDataProvider.kt b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/local/LocalAccountsDataProvider.kt
new file mode 100644
index 0000000..1141a6a
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/local/LocalAccountsDataProvider.kt
@@ -0,0 +1,11 @@
+package com.example.fruitandvegetableguide.data.local
+
+import com.example.fruitandvegetableguide.data.Account
+
+object LocalAccountsDataProvider {
+ val allUserAccounts = mutableListOf(
+ Account("aaa",1,"123456"),
+ Account("bbb",2,"123456"),
+ Account("ccc",3,"123456")
+ )
+}
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/local/LocalGuidesDataProvider.kt b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/local/LocalGuidesDataProvider.kt
new file mode 100644
index 0000000..c1f7497
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/local/LocalGuidesDataProvider.kt
@@ -0,0 +1,129 @@
+package com.example.fruitandvegetableguide.data.local
+
+import com.example.fruitandvegetableguide.data.Guide
+import com.example.fruitandvegetableguide.R
+
+object LocalGuidesDataProvider {
+ val allGuides = mutableListOf(
+ Guide(
+ 1,
+ R.drawable.carrots,
+ "胡萝卜",
+ "https://ai-public-console.cdn.bcebos.com/portal-pc-static/1694501570778/images/technology/imagerecognition/ingredient/2.jpg",
+ "一般人皆可食用,尤以[癌症、高血压、夜盲症干眼症、营养不良、皮肤粗糙]者为最。",
+ "[饮酒过量]者不宜食用",
+ "热量: 37千卡, 蛋白质: 1克, 碳水化合物: 8.8克, 膳食纤维3.2克, 胡萝卜素: 4130微克",
+ "炝腌萝卜"
+ ),
+ Guide(
+ 2,
+ R.drawable.cucumbers,
+ "黄瓜",
+ "https://ai-public-console.cdn.bcebos.com/portal-pc-static/1694501570778/images/technology/imagerecognition/ingredient/3.jpg",
+ "一般人群均可食用。尤适宜[热病、肥胖、高血脂、水肿、癌症、嗜酒者、糖尿病 ]患者食用。",
+ "[腰胃虚弱、腹痛腹泻、肺寒咳嗽、 肝病心血管病、肠胃病]患者慎食。",
+ "蛋白质: 0.8克, 维生素A: 15微克, 胡萝卜素: 90微克",
+ "黄瓜玉子烧"
+ ),
+ Guide(
+ 3,
+ R.drawable.tomatoes,
+ "西红柿",
+ "https://bkimg.cdn.bcebos.com/pic/0823dd54564e9258d109b7bb1bd4c658ccbf6c81e012?x-bce-process=image/watermark,image_d2F0ZXIvYmFpa2U5Mg==,g_7,xp_5,yp_5/format,f_auto",
+ "一般人群均可食用。尤适宜于[热性病发热、口渴、食欲不振、习惯性牙龈出血、贫血、头晕心悸、高血压、急慢性肝炎、急慢性肾炎、夜盲症、近视眼]者食用",
+ "[急性肠炎、菌痢、溃疡活动期]病人不宜食",
+ "热量: 19千卡,蛋白质: 0.9 克, 碳水化合物: 4克",
+ "番茄乌冬面"
+ ),
+ Guide(
+ 4,
+ R.drawable.carrots,
+ "胡萝卜",
+ "https://ai-public-console.cdn.bcebos.com/portal-pc-static/1694501570778/images/technology/imagerecognition/ingredient/2.jpg",
+ "一般人皆可食用,尤以[癌症、高血压、夜盲症干眼症、营养不良、皮肤粗糙]者为最。",
+ "[饮酒过量]者不宜食用",
+ "热量: 37千卡, 蛋白质: 1克, 碳水化合物: 8.8克, 膳食纤维3.2克, 胡萝卜素: 4130微克",
+ "炝腌萝卜"
+ ),
+ Guide(
+ 5,
+ R.drawable.cucumbers,
+ "黄瓜",
+ "https://ai-public-console.cdn.bcebos.com/portal-pc-static/1694501570778/images/technology/imagerecognition/ingredient/3.jpg",
+ "一般人群均可食用。尤适宜[热病、肥胖、高血脂、水肿、癌症、嗜酒者、糖尿病 ]患者食用。",
+ "[腰胃虚弱、腹痛腹泻、肺寒咳嗽、 肝病心血管病、肠胃病]患者慎食。",
+ "蛋白质: 0.8克, 维生素A: 15微克, 胡萝卜素: 90微克",
+ "黄瓜玉子烧"
+ ),
+ Guide(
+ 6,
+ R.drawable.tomatoes,
+ "西红柿",
+ "https://bkimg.cdn.bcebos.com/pic/0823dd54564e9258d109b7bb1bd4c658ccbf6c81e012?x-bce-process=image/watermark,image_d2F0ZXIvYmFpa2U5Mg==,g_7,xp_5,yp_5/format,f_auto",
+ "一般人群均可食用。尤适宜于[热性病发热、口渴、食欲不振、习惯性牙龈出血、贫血、头晕心悸、高血压、急慢性肝炎、急慢性肾炎、夜盲症、近视眼]者食用",
+ "[急性肠炎、菌痢、溃疡活动期]病人不宜食",
+ "热量: 19千卡,蛋白质: 0.9 克, 碳水化合物: 4克",
+ "番茄乌冬面"
+ ),
+ Guide(
+ 1,
+ R.drawable.carrots,
+ "胡萝卜",
+ "https://ai-public-console.cdn.bcebos.com/portal-pc-static/1694501570778/images/technology/imagerecognition/ingredient/2.jpg",
+ "一般人皆可食用,尤以[癌症、高血压、夜盲症干眼症、营养不良、皮肤粗糙]者为最。",
+ "[饮酒过量]者不宜食用",
+ "热量: 37千卡, 蛋白质: 1克, 碳水化合物: 8.8克, 膳食纤维3.2克, 胡萝卜素: 4130微克",
+ "炝腌萝卜"
+ ),
+ Guide(
+ 2,
+ R.drawable.cucumbers,
+ "黄瓜",
+ "https://ai-public-console.cdn.bcebos.com/portal-pc-static/1694501570778/images/technology/imagerecognition/ingredient/3.jpg",
+ "一般人群均可食用。尤适宜[热病、肥胖、高血脂、水肿、癌症、嗜酒者、糖尿病 ]患者食用。",
+ "[腰胃虚弱、腹痛腹泻、肺寒咳嗽、 肝病心血管病、肠胃病]患者慎食。",
+ "蛋白质: 0.8克, 维生素A: 15微克, 胡萝卜素: 90微克",
+ "黄瓜玉子烧"
+ ),
+ Guide(
+ 3,
+ R.drawable.tomatoes,
+ "西红柿",
+ "https://bkimg.cdn.bcebos.com/pic/0823dd54564e9258d109b7bb1bd4c658ccbf6c81e012?x-bce-process=image/watermark,image_d2F0ZXIvYmFpa2U5Mg==,g_7,xp_5,yp_5/format,f_auto",
+ "一般人群均可食用。尤适宜于[热性病发热、口渴、食欲不振、习惯性牙龈出血、贫血、头晕心悸、高血压、急慢性肝炎、急慢性肾炎、夜盲症、近视眼]者食用",
+ "[急性肠炎、菌痢、溃疡活动期]病人不宜食",
+ "热量: 19千卡,蛋白质: 0.9 克, 碳水化合物: 4克",
+ "番茄乌冬面"
+ ),
+ Guide(
+ 4,
+ R.drawable.carrots,
+ "胡萝卜",
+ "https://ai-public-console.cdn.bcebos.com/portal-pc-static/1694501570778/images/technology/imagerecognition/ingredient/2.jpg",
+ "一般人皆可食用,尤以[癌症、高血压、夜盲症干眼症、营养不良、皮肤粗糙]者为最。",
+ "[饮酒过量]者不宜食用",
+ "热量: 37千卡, 蛋白质: 1克, 碳水化合物: 8.8克, 膳食纤维3.2克, 胡萝卜素: 4130微克",
+ "炝腌萝卜"
+ ),
+ Guide(
+ 5,
+ R.drawable.cucumbers,
+ "黄瓜",
+ "https://ai-public-console.cdn.bcebos.com/portal-pc-static/1694501570778/images/technology/imagerecognition/ingredient/3.jpg",
+ "一般人群均可食用。尤适宜[热病、肥胖、高血脂、水肿、癌症、嗜酒者、糖尿病 ]患者食用。",
+ "[腰胃虚弱、腹痛腹泻、肺寒咳嗽、 肝病心血管病、肠胃病]患者慎食。",
+ "蛋白质: 0.8克, 维生素A: 15微克, 胡萝卜素: 90微克",
+ "黄瓜玉子烧"
+ ),
+ Guide(
+ 6,
+ R.drawable.tomatoes,
+ "西红柿",
+ "https://bkimg.cdn.bcebos.com/pic/0823dd54564e9258d109b7bb1bd4c658ccbf6c81e012?x-bce-process=image/watermark,image_d2F0ZXIvYmFpa2U5Mg==,g_7,xp_5,yp_5/format,f_auto",
+ "一般人群均可食用。尤适宜于[热性病发热、口渴、食欲不振、习惯性牙龈出血、贫血、头晕心悸、高血压、急慢性肝炎、急慢性肾炎、夜盲症、近视眼]者食用",
+ "[急性肠炎、菌痢、溃疡活动期]病人不宜食",
+ "热量: 19千卡,蛋白质: 0.9 克, 碳水化合物: 4克",
+ "番茄乌冬面"
+ )
+ )
+}
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/local/LocalPostsDataProvider.kt b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/local/LocalPostsDataProvider.kt
new file mode 100644
index 0000000..b83fa9f
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/data/local/LocalPostsDataProvider.kt
@@ -0,0 +1,189 @@
+package com.example.fruitandvegetableguide.data.local
+
+import com.example.fruitandvegetableguide.R
+import com.example.fruitandvegetableguide.data.Post
+
+object LocalPostsDataProvider {
+ val allPosts = mutableListOf(
+ Post(
+ 1,
+ 1,
+ "白菜怎么挑选",
+ R.drawable.cabbage,
+ labels = arrayListOf("挑选方法", "白菜"),
+ "大白菜一般菜心是黄色的,越往外菜叶绿色逐渐增多,黄色菜叶越多,大白菜越好吃。\n" +
+ "黄色菜叶多说明生长周期长,主要是大白菜生长时间越长,黄色菜叶越多,说明长势很好,包的也瓷实。\n" +
+ "黄色菜叶多说明农家肥用得多。一般来说,农家肥种的白菜个头大,菜瓷实,黄色菜叶比较多,吃起来口感也要好一些。颜色发绿的白菜叶片厚实,吃起来口感比较粗,特别耐储存。\n"
+ ),
+ Post(
+ 2,
+ 2,
+ "关于西瓜的挑选经验",
+ R.drawable.watermelon,
+ labels = arrayListOf("西瓜", "经验"),
+ "1、看脐圈: 西瓜底部的脐圈,小、圆而且略微凹陷的西瓜,一般生长时间充分,果实会更甜。\n" +
+ "2、辨颜色: 颜色最好挑青绿色,不要雾雾白白的。\n" +
+ "3、看纹路: 西瓜纹路整齐的,就是好瓜。\n" +
+ "4、看瓜蒂: 西瓜头,就是所谓的瓜蒂头,从蒂部的弯曲程度,一般可判断出是第一茬瓜还是第二茬瓜。 ...\n" +
+ "5、听声音: 将西瓜托在手里,手指轻轻敲,如果发出“咚、咚”的清脆声,并且托瓜的手有震动的感觉就是熟透的瓜,一般瓜味也会比较甜。"
+ ),
+ Post(
+ 3,
+ 3,
+ "生姜怎么挑选?",
+ R.drawable.ginger,
+ labels = arrayListOf("生姜", "提问"),
+ "有没有好心人教教如何挑选生姜,大的和小的有什么区别"
+ ),
+ Post(
+ 4,
+ 1,
+ "白菜怎么挑选",
+ R.drawable.cabbage,
+ labels = arrayListOf("挑选方法", "白菜"),
+ "大白菜一般菜心是黄色的,越往外菜叶绿色逐渐增多,黄色菜叶越多,大白菜越好吃。\n" +
+ "黄色菜叶多说明生长周期长,主要是大白菜生长时间越长,黄色菜叶越多,说明长势很好,包的也瓷实。\n" +
+ "黄色菜叶多说明农家肥用得多。一般来说,农家肥种的白菜个头大,菜瓷实,黄色菜叶比较多,吃起来口感也要好一些。颜色发绿的白菜叶片厚实,吃起来口感比较粗,特别耐储存。\n"
+ ),
+ Post(
+ 5,
+ 2,
+ "关于西瓜的挑选经验",
+ R.drawable.watermelon,
+ labels = arrayListOf("西瓜", "经验"),
+ "1、看脐圈: 西瓜底部的脐圈,小、圆而且略微凹陷的西瓜,一般生长时间充分,果实会更甜。\n" +
+ "2、辨颜色: 颜色最好挑青绿色,不要雾雾白白的。\n" +
+ "3、看纹路: 西瓜纹路整齐的,就是好瓜。\n" +
+ "4、看瓜蒂: 西瓜头,就是所谓的瓜蒂头,从蒂部的弯曲程度,一般可判断出是第一茬瓜还是第二茬瓜。 ...\n" +
+ "5、听声音: 将西瓜托在手里,手指轻轻敲,如果发出“咚、咚”的清脆声,并且托瓜的手有震动的感觉就是熟透的瓜,一般瓜味也会比较甜。"
+ ),
+ Post(
+ 6,
+ 3,
+ "生姜怎么挑选?",
+ R.drawable.ginger,
+ labels = arrayListOf("生姜", "提问"),
+ "有没有好心人教教如何挑选生姜,大的和小的有什么区别"
+ ),
+ Post(
+ 1,
+ 1,
+ "白菜怎么挑选",
+ R.drawable.cabbage,
+ labels = arrayListOf("挑选方法", "白菜"),
+ "大白菜一般菜心是黄色的,越往外菜叶绿色逐渐增多,黄色菜叶越多,大白菜越好吃。\n" +
+ "黄色菜叶多说明生长周期长,主要是大白菜生长时间越长,黄色菜叶越多,说明长势很好,包的也瓷实。\n" +
+ "黄色菜叶多说明农家肥用得多。一般来说,农家肥种的白菜个头大,菜瓷实,黄色菜叶比较多,吃起来口感也要好一些。颜色发绿的白菜叶片厚实,吃起来口感比较粗,特别耐储存。\n"
+ ),
+ Post(
+ 2,
+ 2,
+ "关于西瓜的挑选经验",
+ R.drawable.watermelon,
+ labels = arrayListOf("西瓜", "经验"),
+ "1、看脐圈: 西瓜底部的脐圈,小、圆而且略微凹陷的西瓜,一般生长时间充分,果实会更甜。\n" +
+ "2、辨颜色: 颜色最好挑青绿色,不要雾雾白白的。\n" +
+ "3、看纹路: 西瓜纹路整齐的,就是好瓜。\n" +
+ "4、看瓜蒂: 西瓜头,就是所谓的瓜蒂头,从蒂部的弯曲程度,一般可判断出是第一茬瓜还是第二茬瓜。 ...\n" +
+ "5、听声音: 将西瓜托在手里,手指轻轻敲,如果发出“咚、咚”的清脆声,并且托瓜的手有震动的感觉就是熟透的瓜,一般瓜味也会比较甜。"
+ ),
+ Post(
+ 3,
+ 3,
+ "生姜怎么挑选?",
+ R.drawable.ginger,
+ labels = arrayListOf("生姜", "提问"),
+ "有没有好心人教教如何挑选生姜,大的和小的有什么区别"
+ ),
+ Post(
+ 4,
+ 1,
+ "白菜怎么挑选",
+ R.drawable.cabbage,
+ labels = arrayListOf("挑选方法", "白菜"),
+ "大白菜一般菜心是黄色的,越往外菜叶绿色逐渐增多,黄色菜叶越多,大白菜越好吃。\n" +
+ "黄色菜叶多说明生长周期长,主要是大白菜生长时间越长,黄色菜叶越多,说明长势很好,包的也瓷实。\n" +
+ "黄色菜叶多说明农家肥用得多。一般来说,农家肥种的白菜个头大,菜瓷实,黄色菜叶比较多,吃起来口感也要好一些。颜色发绿的白菜叶片厚实,吃起来口感比较粗,特别耐储存。\n"
+ ),
+ Post(
+ 5,
+ 2,
+ "关于西瓜的挑选经验",
+ R.drawable.watermelon,
+ labels = arrayListOf("西瓜", "经验"),
+ "1、看脐圈: 西瓜底部的脐圈,小、圆而且略微凹陷的西瓜,一般生长时间充分,果实会更甜。\n" +
+ "2、辨颜色: 颜色最好挑青绿色,不要雾雾白白的。\n" +
+ "3、看纹路: 西瓜纹路整齐的,就是好瓜。\n" +
+ "4、看瓜蒂: 西瓜头,就是所谓的瓜蒂头,从蒂部的弯曲程度,一般可判断出是第一茬瓜还是第二茬瓜。 ...\n" +
+ "5、听声音: 将西瓜托在手里,手指轻轻敲,如果发出“咚、咚”的清脆声,并且托瓜的手有震动的感觉就是熟透的瓜,一般瓜味也会比较甜。"
+ ),
+ Post(
+ 6,
+ 3,
+ "生姜怎么挑选?",
+ R.drawable.ginger,
+ labels = arrayListOf("生姜", "提问"),
+ "有没有好心人教教如何挑选生姜,大的和小的有什么区别"
+ ),
+ Post(
+ 1,
+ 1,
+ "白菜怎么挑选",
+ R.drawable.cabbage,
+ labels = arrayListOf("挑选方法", "白菜"),
+ "大白菜一般菜心是黄色的,越往外菜叶绿色逐渐增多,黄色菜叶越多,大白菜越好吃。\n" +
+ "黄色菜叶多说明生长周期长,主要是大白菜生长时间越长,黄色菜叶越多,说明长势很好,包的也瓷实。\n" +
+ "黄色菜叶多说明农家肥用得多。一般来说,农家肥种的白菜个头大,菜瓷实,黄色菜叶比较多,吃起来口感也要好一些。颜色发绿的白菜叶片厚实,吃起来口感比较粗,特别耐储存。\n"
+ ),
+ Post(
+ 2,
+ 2,
+ "关于西瓜的挑选经验",
+ R.drawable.watermelon,
+ labels = arrayListOf("西瓜", "经验"),
+ "1、看脐圈: 西瓜底部的脐圈,小、圆而且略微凹陷的西瓜,一般生长时间充分,果实会更甜。\n" +
+ "2、辨颜色: 颜色最好挑青绿色,不要雾雾白白的。\n" +
+ "3、看纹路: 西瓜纹路整齐的,就是好瓜。\n" +
+ "4、看瓜蒂: 西瓜头,就是所谓的瓜蒂头,从蒂部的弯曲程度,一般可判断出是第一茬瓜还是第二茬瓜。 ...\n" +
+ "5、听声音: 将西瓜托在手里,手指轻轻敲,如果发出“咚、咚”的清脆声,并且托瓜的手有震动的感觉就是熟透的瓜,一般瓜味也会比较甜。"
+ ),
+ Post(
+ 3,
+ 3,
+ "生姜怎么挑选?",
+ R.drawable.ginger,
+ labels = arrayListOf("生姜", "提问"),
+ "有没有好心人教教如何挑选生姜,大的和小的有什么区别"
+ ),
+ Post(
+ 4,
+ 1,
+ "白菜怎么挑选",
+ R.drawable.cabbage,
+ labels = arrayListOf("挑选方法", "白菜"),
+ "大白菜一般菜心是黄色的,越往外菜叶绿色逐渐增多,黄色菜叶越多,大白菜越好吃。\n" +
+ "黄色菜叶多说明生长周期长,主要是大白菜生长时间越长,黄色菜叶越多,说明长势很好,包的也瓷实。\n" +
+ "黄色菜叶多说明农家肥用得多。一般来说,农家肥种的白菜个头大,菜瓷实,黄色菜叶比较多,吃起来口感也要好一些。颜色发绿的白菜叶片厚实,吃起来口感比较粗,特别耐储存。\n"
+ ),
+ Post(
+ 5,
+ 2,
+ "关于西瓜的挑选经验",
+ R.drawable.watermelon,
+ labels = arrayListOf("西瓜", "经验"),
+ "1、看脐圈: 西瓜底部的脐圈,小、圆而且略微凹陷的西瓜,一般生长时间充分,果实会更甜。\n" +
+ "2、辨颜色: 颜色最好挑青绿色,不要雾雾白白的。\n" +
+ "3、看纹路: 西瓜纹路整齐的,就是好瓜。\n" +
+ "4、看瓜蒂: 西瓜头,就是所谓的瓜蒂头,从蒂部的弯曲程度,一般可判断出是第一茬瓜还是第二茬瓜。 ...\n" +
+ "5、听声音: 将西瓜托在手里,手指轻轻敲,如果发出“咚、咚”的清脆声,并且托瓜的手有震动的感觉就是熟透的瓜,一般瓜味也会比较甜。"
+ ),
+ Post(
+ 6,
+ 3,
+ "生姜怎么挑选?",
+ R.drawable.ginger,
+ labels = arrayListOf("生姜", "提问"),
+ "有没有好心人教教如何挑选生姜,大的和小的有什么区别"
+ )
+ )
+}
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/ImgRecognitionPage.kt b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/ImgRecognitionPage.kt
new file mode 100644
index 0000000..132bbe1
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/ImgRecognitionPage.kt
@@ -0,0 +1,2 @@
+package com.example.fruitandvegetableguide.ui
+
diff --git a/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/LoginActivity.kt b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/LoginActivity.kt
new file mode 100644
index 0000000..32212cf
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/LoginActivity.kt
@@ -0,0 +1,397 @@
+@file:OptIn(ExperimentalMaterial3Api::class)
+
+package com.example.fruitandvegetableguide.ui
+
+import android.content.Intent
+import android.os.Bundle
+import android.widget.Toast
+import androidx.activity.compose.setContent
+import androidx.appcompat.app.AppCompatActivity
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.PaddingValues
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.size
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.AccountBox
+import androidx.compose.material.icons.filled.Lock
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonDefaults
+import androidx.compose.material3.ExperimentalMaterial3Api
+import androidx.compose.material3.Icon
+import androidx.compose.material3.IconButton
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Surface
+import androidx.compose.material3.Text
+import androidx.compose.material3.TextField
+import androidx.compose.material3.TextFieldDefaults
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.input.PasswordVisualTransformation
+import androidx.compose.ui.text.input.VisualTransformation
+import androidx.compose.ui.text.style.TextAlign
+import androidx.compose.ui.tooling.preview.Preview
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import com.example.fruitandvegetableguide.R
+import com.example.fruitandvegetableguide.data.local.LocalAccountsDataProvider
+import com.example.fruitandvegetableguide.ui.theme.FruitandVegetableGuideTheme
+
+class LoginActivity : AppCompatActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContent {
+ FruitandVegetableGuideTheme() {
+ Surface(
+ modifier = Modifier.fillMaxSize(),
+ color = MaterialTheme.colorScheme.background
+ ) {
+ var username by remember { mutableStateOf("") }
+ var password by remember { mutableStateOf("") }
+ val pwdVisualTransformation = PasswordVisualTransformation()
+ var showPwd by remember { mutableStateOf(true) }
+
+ val transformation =
+ if (showPwd) pwdVisualTransformation else VisualTransformation.None
+ Box(modifier = Modifier.fillMaxSize()) {
+ Text(
+ text = "注册",
+ fontSize = 20.sp,
+ textAlign = TextAlign.End,
+ modifier = Modifier
+ .fillMaxWidth()
+ .padding(20.dp)
+ )
+ Column() {
+ Spacer(modifier = Modifier.weight(1f))
+ Column(
+ modifier = Modifier
+ .weight(3f)
+ .background(Color.White)
+ .padding(40.dp)
+ .fillMaxWidth(),
+ horizontalAlignment = Alignment.CenterHorizontally,
+ verticalArrangement = Arrangement.Center
+ ) {
+ Column {
+ TextField(
+ modifier = Modifier.fillMaxWidth(),
+ value = username,
+ onValueChange = { str -> username = str },
+ placeholder = {
+ Text("账号")
+ },
+ colors = TextFieldDefaults.colors(focusedTextColor = Color.Black),
+ leadingIcon = {
+ Icon(
+ imageVector = Icons.Default.AccountBox,
+ contentDescription = null
+ )
+ }
+ )
+ TextField(
+ value = password,
+ onValueChange = { str -> password = str },
+ modifier = Modifier.fillMaxWidth(),
+ placeholder = {
+ Text("密码")
+ },
+ visualTransformation = transformation,
+ colors = TextFieldDefaults.colors(focusedTextColor = Color.Black),
+ leadingIcon = {
+ Icon(
+ imageVector = Icons.Default.Lock,
+ contentDescription = null
+ )
+ },
+ trailingIcon = {
+ if (showPwd) {
+ IconButton(onClick = { showPwd = !showPwd }) {
+ Icon(
+ painter = painterResource(id = R.drawable.sleep),
+ contentDescription = null,
+ Modifier.size(30.dp)
+ )
+ }
+ } else {
+ IconButton(onClick = { showPwd = !showPwd }) {
+ Icon(
+ painter = painterResource(id = R.drawable.eye),
+ contentDescription = null,
+ Modifier.size(30.dp)
+ )
+ }
+ }
+ }
+ )
+ }
+ Spacer(modifier = Modifier.height(20.dp))
+ Row(
+ horizontalArrangement = Arrangement.SpaceBetween,
+ modifier = Modifier.fillMaxWidth()
+ ) {
+ Text(text = "快捷登录", fontSize = 16.sp, color = Color.Gray)
+ Text(text = "忘记密码", fontSize = 16.sp, color = Color.Gray)
+ }
+ Spacer(modifier = Modifier.height(20.dp))
+ Row(
+ horizontalArrangement = Arrangement.Center,
+ verticalAlignment = Alignment.CenterVertically
+ ) {
+ Button(
+ onClick = {
+ // TODO 2.此处由验证结果实现页面跳转
+ if (loginVerification(username, password)) {
+ Toast.makeText(
+ this@LoginActivity,
+ "登陆成功",
+ Toast.LENGTH_SHORT
+ ).show()
+ val intent = Intent(
+ this@LoginActivity,
+ MainActivity::class.java
+ )
+ startActivity(intent)
+ }
+ else{
+ Toast.makeText(
+ this@LoginActivity,
+ "登陆失败",
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ },
+ colors = ButtonDefaults.buttonColors(
+ containerColor = Color(
+ 0xff5c59fe
+ )
+ ),
+ contentPadding = PaddingValues(12.dp, 16.dp)
+ ) {
+ Text("登录", color = Color.White, fontSize = 18.sp)
+ }
+ }
+ Spacer(modifier = Modifier.height(100.dp))
+ Column(
+ horizontalAlignment = Alignment.CenterHorizontally,
+ verticalArrangement = Arrangement.Center
+ ) {
+ Row(
+ Modifier
+ .background(Color(0xFFCFC5C5))
+ .padding(end = 10.dp)
+ ) {}
+ Spacer(modifier = Modifier.height(20.dp))
+ Text(text = "第三方登录", fontSize = 16.sp, color = Color.Gray)
+ Row(
+ Modifier
+ .fillMaxWidth()
+ .weight(1f),
+ horizontalArrangement = Arrangement.Center,
+ verticalAlignment = Alignment.Top
+ ) {
+ repeat(3) {
+ Column(
+ Modifier.weight(1f),
+ verticalArrangement = Arrangement.Center,
+ horizontalAlignment = Alignment.CenterHorizontally
+ ) {
+ Image(
+ modifier = Modifier.size(50.dp),
+ painter = painterResource(id = R.drawable.qq),
+ contentDescription = null
+ )
+ Text(
+ "QQ",
+ color = Color(0xffcdcdcd),
+ fontSize = 16.sp,
+ fontWeight = FontWeight.Bold
+ )
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+private fun loginVerification(username: String, password: String): Boolean {
+ // TODO 1.此处需要完成登录验证的相关代码
+ return username == LocalAccountsDataProvider.allUserAccounts[0].username && password == LocalAccountsDataProvider.allUserAccounts[0].password
+}
+
+@Composable
+fun LoginForm() {
+ var username by remember { mutableStateOf("") }
+ var password by remember { mutableStateOf("") }
+ val pwdVisualTransformation = PasswordVisualTransformation()
+ var showPwd by remember { mutableStateOf(true) }
+
+ val transformation = if (showPwd) pwdVisualTransformation else VisualTransformation.None
+
+ Box(modifier = Modifier.fillMaxSize()) {
+ Text(
+ text = "注册",
+ fontSize = 20.sp,
+ textAlign = TextAlign.End,
+ modifier = Modifier
+ .fillMaxWidth()
+ .padding(20.dp)
+ )
+ Column() {
+ Spacer(modifier = Modifier.weight(1f))
+ Column(
+ modifier = Modifier
+ .weight(3f)
+ .background(Color.White)
+ .padding(40.dp)
+ .fillMaxWidth(),
+ horizontalAlignment = Alignment.CenterHorizontally,
+ verticalArrangement = Arrangement.Center
+ ) {
+ Column {
+ TextField(
+ modifier = Modifier.fillMaxWidth(),
+ value = username,
+ onValueChange = { str -> username = str },
+ placeholder = {
+ Text("账号")
+ },
+ colors = TextFieldDefaults.colors(focusedTextColor = Color.Transparent),
+ leadingIcon = {
+ Icon(
+ imageVector = Icons.Default.AccountBox,
+ contentDescription = null
+ )
+ }
+ )
+ TextField(
+ value = password,
+ onValueChange = { str -> password = str },
+ modifier = Modifier.fillMaxWidth(),
+ placeholder = {
+ Text("密码")
+ },
+ visualTransformation = transformation,
+ colors = TextFieldDefaults.colors(focusedTextColor = Color.Transparent),
+ leadingIcon = {
+ Icon(
+ imageVector = Icons.Default.Lock,
+ contentDescription = null
+ )
+ },
+ trailingIcon = {
+ if (showPwd) {
+ IconButton(onClick = { showPwd = !showPwd }) {
+ Icon(
+ painter = painterResource(id = R.drawable.sleep),
+ contentDescription = null,
+ Modifier.size(30.dp)
+ )
+ }
+ } else {
+ IconButton(onClick = { showPwd = !showPwd }) {
+ Icon(
+ painter = painterResource(id = R.drawable.eye),
+ contentDescription = null,
+ Modifier.size(30.dp)
+ )
+ }
+ }
+ }
+ )
+ }
+ Spacer(modifier = Modifier.height(20.dp))
+ Row(
+ horizontalArrangement = Arrangement.SpaceBetween,
+ modifier = Modifier.fillMaxWidth()
+ ) {
+ Text(text = "快捷登录", fontSize = 16.sp, color = Color.Gray)
+ Text(text = "忘记密码", fontSize = 16.sp, color = Color.Gray)
+ }
+ Spacer(modifier = Modifier.height(20.dp))
+ Row(
+ horizontalArrangement = Arrangement.Center,
+ verticalAlignment = Alignment.CenterVertically
+ ) {
+ Button(
+ onClick = {
+// TODO 2.此处由验证结果实现页面跳转
+ },
+ colors = ButtonDefaults.buttonColors(containerColor = Color(0xff5c59fe)),
+ contentPadding = PaddingValues(12.dp, 16.dp)
+ ) {
+ Text("登录", color = Color.White, fontSize = 18.sp)
+ }
+ }
+ Spacer(modifier = Modifier.height(100.dp))
+ Column(
+ horizontalAlignment = Alignment.CenterHorizontally,
+ verticalArrangement = Arrangement.Center
+ ) {
+ Row(
+ Modifier
+ .background(Color(0xFFCFC5C5))
+ .padding(end = 10.dp)
+ ) {}
+ Spacer(modifier = Modifier.height(20.dp))
+ Text(text = "第三方登录", fontSize = 16.sp, color = Color.Gray)
+ Row(
+ Modifier
+ .fillMaxWidth()
+ .weight(1f),
+ horizontalArrangement = Arrangement.Center,
+ verticalAlignment = Alignment.Top
+ ) {
+ repeat(3) {
+ Column(
+ Modifier.weight(1f),
+ verticalArrangement = Arrangement.Center,
+ horizontalAlignment = Alignment.CenterHorizontally
+ ) {
+ Image(
+ modifier = Modifier.size(50.dp),
+ painter = painterResource(id = R.drawable.qq),
+ contentDescription = null
+ )
+ Text(
+ "QQ",
+ color = Color(0xffcdcdcd),
+ fontSize = 16.sp,
+ fontWeight = FontWeight.Bold
+ )
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+@Preview
+@Composable
+fun Login() {
+ LoginForm()
+}
diff --git a/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/MainActivity.kt b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/MainActivity.kt
new file mode 100644
index 0000000..d56ae2a
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/MainActivity.kt
@@ -0,0 +1,250 @@
+package com.example.fruitandvegetableguide.ui
+
+import android.os.Bundle
+import androidx.activity.compose.setContent
+import androidx.annotation.DrawableRes
+import androidx.appcompat.app.AppCompatActivity
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.PaddingValues
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.heightIn
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.paddingFromBaseline
+import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.lazy.grid.GridCells
+import androidx.compose.foundation.lazy.grid.LazyHorizontalGrid
+import androidx.compose.foundation.lazy.grid.items
+import androidx.compose.foundation.rememberScrollState
+import androidx.compose.foundation.shape.CircleShape
+import androidx.compose.foundation.verticalScroll
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.AccountCircle
+import androidx.compose.material.icons.filled.Camera
+import androidx.compose.material.icons.filled.Search
+import androidx.compose.material.icons.filled.Spa
+import androidx.compose.material3.Icon
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.NavigationBar
+import androidx.compose.material3.NavigationBarItem
+import androidx.compose.material3.Scaffold
+import androidx.compose.material3.Surface
+import androidx.compose.material3.Text
+import androidx.compose.material3.TextField
+import androidx.compose.material3.TextFieldDefaults
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.tooling.preview.Preview
+import androidx.compose.ui.unit.dp
+import com.example.fruitandvegetableguide.data.local.LocalGuidesDataProvider.allGuides
+import com.example.fruitandvegetableguide.data.local.LocalPostsDataProvider.allPosts
+import com.example.fruitandvegetableguide.ui.theme.FruitandVegetableGuideTheme
+
+class MainActivity : AppCompatActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContent {
+ FruitandVegetableGuideTheme() {
+ Surface(
+ modifier = Modifier.fillMaxSize(),
+ color = MaterialTheme.colorScheme.background
+ ) {
+ MainPage()
+ }
+ }
+ }
+ }
+}
+
+//主页
+@Composable
+fun MainPage() {
+ FruitandVegetableGuideTheme() {
+ Scaffold(bottomBar = { MyBottomNavigation() }) { padding ->
+ HomeScreen(modifier = Modifier.padding(padding))
+ }
+ }
+}
+
+//主屏幕
+@Composable
+fun HomeScreen(modifier: Modifier = Modifier) {
+ Column(modifier.verticalScroll(rememberScrollState())) {
+ Spacer(modifier = Modifier.height(16.dp))
+ SearchBar(Modifier.padding(horizontal = 16.dp))
+ HomeSection(title = "指南") {
+ GuideRow()
+ }
+ HomeSection(title = "社区") {
+ PostGrid()
+ }
+ Spacer(modifier = Modifier.height(16.dp))
+ }
+}
+
+//搜索框
+@Composable
+fun SearchBar(modifier: Modifier = Modifier) {
+ TextField(
+ value = "", onValueChange = {},
+ leadingIcon = { Icon(imageVector = Icons.Default.Search, contentDescription = null) },
+ colors = TextFieldDefaults.colors(
+ unfocusedContainerColor = MaterialTheme.colorScheme.surface,
+ focusedContainerColor = MaterialTheme.colorScheme.surface
+ ),
+ placeholder = { Text(text = "搜索") },
+ modifier = modifier
+ .fillMaxWidth()
+ .heightIn(56.dp)
+ )
+}
+
+//指南元素
+@Composable
+fun GuideElement(
+ modifier: Modifier = Modifier,
+ @DrawableRes drawable: Int,
+ kind: String
+) {
+ Column(
+ modifier = modifier,
+ horizontalAlignment = Alignment.CenterHorizontally,
+ ) {
+ Image(
+ painter = painterResource(id = drawable),
+ contentDescription = null,
+ contentScale = ContentScale.Crop,
+ modifier = Modifier
+ .size(88.dp)
+ .clip(CircleShape)
+ )
+ Text(
+ text = kind,
+ modifier = Modifier.paddingFromBaseline(top = 24.dp, bottom = 8.dp),
+ style = MaterialTheme.typography.bodyMedium
+ )
+ }
+}
+
+//帖子元素
+@Composable
+fun PostCard(
+ modifier: Modifier = Modifier,
+ @DrawableRes drawable: Int,
+ title: String
+) {
+ Surface(
+ shape = MaterialTheme.shapes.medium,
+ modifier = modifier,
+ color = MaterialTheme.colorScheme.surfaceVariant,
+ ) {
+ Row(
+ verticalAlignment = Alignment.CenterVertically,
+ modifier = Modifier.width(255.dp)
+ ) {
+ Image(
+ painter = painterResource(id = drawable), contentDescription = null,
+ contentScale = ContentScale.Crop,
+ modifier = Modifier.size(80.dp)
+ )
+ Text(
+ text = title,
+ style = MaterialTheme.typography.titleMedium,
+ modifier = Modifier.padding(horizontal = 16.dp)
+ )
+ }
+ }
+}
+
+//指南的网格显示
+@Composable
+fun GuideRow(modifier: Modifier = Modifier) {
+ LazyHorizontalGrid(
+ rows = GridCells.Fixed(2),
+ contentPadding = PaddingValues(horizontal = 16.dp),
+ horizontalArrangement = Arrangement.spacedBy(8.dp),
+ verticalArrangement = Arrangement.spacedBy(16.dp),
+ modifier = modifier.height(240.dp)
+ ) {
+ items(allGuides) { item -> GuideElement(drawable = item.imgId, kind = item.kind) }
+ }
+}
+
+//帖子的网格显示
+@Composable
+fun PostGrid(modifier: Modifier = Modifier) {
+ LazyHorizontalGrid(
+ rows = GridCells.Fixed(4),
+ contentPadding = PaddingValues(horizontal = 16.dp),
+ horizontalArrangement = Arrangement.spacedBy(16.dp),
+ verticalArrangement = Arrangement.spacedBy(16.dp),
+ modifier = modifier.height(288.dp)
+ ) {
+ items(allPosts) { item -> PostCard(drawable = item.imgId, title = item.title) }
+ }
+}
+
+//小组件加上标题
+@Composable
+fun HomeSection(title: String, modifier: Modifier = Modifier, content: @Composable () -> Unit) {
+ Column(modifier) {
+ Text(
+ text = title,
+ style = MaterialTheme.typography.titleMedium,
+ modifier = Modifier
+ .paddingFromBaseline(top = 40.dp, bottom = 16.dp)
+ .padding(horizontal = 16.dp)
+ )
+ content()
+ }
+}
+
+//底部导航栏
+@Composable
+fun MyBottomNavigation(modifier: Modifier = Modifier) {
+ NavigationBar(containerColor = MaterialTheme.colorScheme.surfaceVariant, modifier = modifier) {
+ NavigationBarItem(icon = {
+ Icon(
+ imageVector = Icons.Default.Spa,
+ contentDescription = null
+ )
+ },
+ label = { Text(text = "首页") },
+ selected = true,
+ onClick = { /*TODO*/ })
+ NavigationBarItem(icon = {
+ Icon(
+ imageVector = Icons.Default.Camera,
+ contentDescription = null
+ )
+ },
+ label = { Text(text = "识别")},
+ selected = false,
+ onClick = { /*TODO*/ })
+ NavigationBarItem(icon = {
+ Icon(
+ imageVector = Icons.Default.AccountCircle,
+ contentDescription = null
+ )
+ }, label = { Text(text = "用户") },
+ selected = false,
+ onClick = { /*TODO*/ })
+ }
+}
+
+//预览
+@Preview(showBackground = true, backgroundColor = 0xFFF5F0EE)
+@Composable
+fun PostPrev() {
+ MainPage()
+}
diff --git a/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/theme/Color.kt b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/theme/Color.kt
new file mode 100644
index 0000000..1cbfd8c
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/theme/Color.kt
@@ -0,0 +1,11 @@
+package com.example.fruitandvegetableguide.ui.theme
+
+import androidx.compose.ui.graphics.Color
+
+val Purple80 = Color(0xFFD0BCFF)
+val PurpleGrey80 = Color(0xFFCCC2DC)
+val Pink80 = Color(0xFFEFB8C8)
+
+val Purple40 = Color(0xFF6650a4)
+val PurpleGrey40 = Color(0xFF625b71)
+val Pink40 = Color(0xFF7D5260)
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/theme/Theme.kt b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/theme/Theme.kt
new file mode 100644
index 0000000..3b9c4bc
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/theme/Theme.kt
@@ -0,0 +1,70 @@
+package com.example.fruitandvegetableguide.ui.theme
+
+import android.app.Activity
+import android.os.Build
+import androidx.compose.foundation.isSystemInDarkTheme
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.darkColorScheme
+import androidx.compose.material3.dynamicDarkColorScheme
+import androidx.compose.material3.dynamicLightColorScheme
+import androidx.compose.material3.lightColorScheme
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.SideEffect
+import androidx.compose.ui.graphics.toArgb
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.platform.LocalView
+import androidx.core.view.WindowCompat
+
+private val DarkColorScheme = darkColorScheme(
+ primary = Purple80,
+ secondary = PurpleGrey80,
+ tertiary = Pink80
+)
+
+private val LightColorScheme = lightColorScheme(
+ primary = Purple40,
+ secondary = PurpleGrey40,
+ tertiary = Pink40
+
+ /* Other default colors to override
+ background = Color(0xFFFFFBFE),
+ surface = Color(0xFFFFFBFE),
+ onPrimary = Color.White,
+ onSecondary = Color.White,
+ onTertiary = Color.White,
+ onBackground = Color(0xFF1C1B1F),
+ onSurface = Color(0xFF1C1B1F),
+ */
+)
+
+@Composable
+fun FruitandVegetableGuideTheme(
+ darkTheme: Boolean = isSystemInDarkTheme(),
+ // Dynamic color is available on Android 12+
+ dynamicColor: Boolean = true,
+ content: @Composable () -> Unit
+) {
+ val colorScheme = when {
+ dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
+ val context = LocalContext.current
+ if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
+ }
+
+ darkTheme -> DarkColorScheme
+ else -> LightColorScheme
+ }
+ val view = LocalView.current
+ if (!view.isInEditMode) {
+ SideEffect {
+ val window = (view.context as Activity).window
+ window.statusBarColor = colorScheme.primary.toArgb()
+ WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme
+ }
+ }
+
+ MaterialTheme(
+ colorScheme = colorScheme,
+ typography = Typography,
+ content = content
+ )
+}
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/theme/Type.kt b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/theme/Type.kt
new file mode 100644
index 0000000..0d59622
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/java/com/example/fruitandvegetableguide/ui/theme/Type.kt
@@ -0,0 +1,34 @@
+package com.example.fruitandvegetableguide.ui.theme
+
+import androidx.compose.material3.Typography
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontFamily
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.unit.sp
+
+// Set of Material typography styles to start with
+val Typography = Typography(
+ bodyLarge = TextStyle(
+ fontFamily = FontFamily.Default,
+ fontWeight = FontWeight.Normal,
+ fontSize = 16.sp,
+ lineHeight = 24.sp,
+ letterSpacing = 0.5.sp
+ )
+ /* Other default text styles to override
+ titleLarge = TextStyle(
+ fontFamily = FontFamily.Default,
+ fontWeight = FontWeight.Normal,
+ fontSize = 22.sp,
+ lineHeight = 28.sp,
+ letterSpacing = 0.sp
+ ),
+ labelSmall = TextStyle(
+ fontFamily = FontFamily.Default,
+ fontWeight = FontWeight.Medium,
+ fontSize = 11.sp,
+ lineHeight = 16.sp,
+ letterSpacing = 0.5.sp
+ )
+ */
+)
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/src/FruitandVegetableGuide/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..2b068d1
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/res/drawable/cabbage.png b/src/FruitandVegetableGuide/app/src/main/res/drawable/cabbage.png
new file mode 100644
index 0000000..2ce6663
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/drawable/cabbage.png differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/drawable/carrots.png b/src/FruitandVegetableGuide/app/src/main/res/drawable/carrots.png
new file mode 100644
index 0000000..b869c2b
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/drawable/carrots.png differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/drawable/cucumbers.png b/src/FruitandVegetableGuide/app/src/main/res/drawable/cucumbers.png
new file mode 100644
index 0000000..9c5aee1
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/drawable/cucumbers.png differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/drawable/eye.png b/src/FruitandVegetableGuide/app/src/main/res/drawable/eye.png
new file mode 100644
index 0000000..5defa1b
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/drawable/eye.png differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/drawable/ginger.png b/src/FruitandVegetableGuide/app/src/main/res/drawable/ginger.png
new file mode 100644
index 0000000..bf4e13b
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/drawable/ginger.png differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/drawable/ic_launcher_background.xml b/src/FruitandVegetableGuide/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..07d5da9
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/FruitandVegetableGuide/app/src/main/res/drawable/qq.xml b/src/FruitandVegetableGuide/app/src/main/res/drawable/qq.xml
new file mode 100644
index 0000000..fb9fd6a
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/res/drawable/qq.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/src/FruitandVegetableGuide/app/src/main/res/drawable/sleep.xml b/src/FruitandVegetableGuide/app/src/main/res/drawable/sleep.xml
new file mode 100644
index 0000000..9746c69
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/res/drawable/sleep.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
diff --git a/src/FruitandVegetableGuide/app/src/main/res/drawable/tomatoes.png b/src/FruitandVegetableGuide/app/src/main/res/drawable/tomatoes.png
new file mode 100644
index 0000000..8721fcb
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/drawable/tomatoes.png differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/drawable/watermelon.png b/src/FruitandVegetableGuide/app/src/main/res/drawable/watermelon.png
new file mode 100644
index 0000000..136f09b
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/drawable/watermelon.png differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/src/FruitandVegetableGuide/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..6f3b755
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/src/FruitandVegetableGuide/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..6f3b755
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/src/FruitandVegetableGuide/app/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 0000000..c209e78
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/src/FruitandVegetableGuide/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..b2dfe3d
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/src/FruitandVegetableGuide/app/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 0000000..4f0f1d6
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/src/FruitandVegetableGuide/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..62b611d
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/src/FruitandVegetableGuide/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 0000000..948a307
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/src/FruitandVegetableGuide/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..1b9a695
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/src/FruitandVegetableGuide/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..28d4b77
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/src/FruitandVegetableGuide/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..9287f50
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/src/FruitandVegetableGuide/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..aa7d642
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/src/FruitandVegetableGuide/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..9126ae3
Binary files /dev/null and b/src/FruitandVegetableGuide/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/src/FruitandVegetableGuide/app/src/main/res/values/colors.xml b/src/FruitandVegetableGuide/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..f8c6127
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/res/values/colors.xml
@@ -0,0 +1,10 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/res/values/strings.xml b/src/FruitandVegetableGuide/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..ee94730
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ FruitandVegetableGuide
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/res/values/themes.xml b/src/FruitandVegetableGuide/app/src/main/res/values/themes.xml
new file mode 100644
index 0000000..589b8ec
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/res/values/themes.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/res/xml/backup_rules.xml b/src/FruitandVegetableGuide/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 0000000..fa0f996
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,13 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/main/res/xml/data_extraction_rules.xml b/src/FruitandVegetableGuide/app/src/main/res/xml/data_extraction_rules.xml
new file mode 100644
index 0000000..9ee9997
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/app/src/test/java/com/example/fruitandvegetableguide/ExampleUnitTest.kt b/src/FruitandVegetableGuide/app/src/test/java/com/example/fruitandvegetableguide/ExampleUnitTest.kt
new file mode 100644
index 0000000..ef8a4d7
--- /dev/null
+++ b/src/FruitandVegetableGuide/app/src/test/java/com/example/fruitandvegetableguide/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package com.example.fruitandvegetableguide
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/build.gradle b/src/FruitandVegetableGuide/build.gradle
new file mode 100644
index 0000000..2b3ae73
--- /dev/null
+++ b/src/FruitandVegetableGuide/build.gradle
@@ -0,0 +1,6 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+plugins {
+ id 'com.android.application' version '8.0.2' apply false
+ id 'com.android.library' version '8.0.2' apply false
+ id 'org.jetbrains.kotlin.android' version '1.8.22' apply false
+}
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/gradle.properties b/src/FruitandVegetableGuide/gradle.properties
new file mode 100644
index 0000000..3c5031e
--- /dev/null
+++ b/src/FruitandVegetableGuide/gradle.properties
@@ -0,0 +1,23 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Kotlin code style for this project: "official" or "obsolete":
+kotlin.code.style=official
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true
\ No newline at end of file
diff --git a/src/FruitandVegetableGuide/gradle/wrapper/gradle-wrapper.jar b/src/FruitandVegetableGuide/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..e708b1c
Binary files /dev/null and b/src/FruitandVegetableGuide/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/src/FruitandVegetableGuide/gradle/wrapper/gradle-wrapper.properties b/src/FruitandVegetableGuide/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..558afa1
--- /dev/null
+++ b/src/FruitandVegetableGuide/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Sun Sep 24 23:46:18 CST 2023
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/src/FruitandVegetableGuide/gradlew b/src/FruitandVegetableGuide/gradlew
new file mode 100644
index 0000000..4f906e0
--- /dev/null
+++ b/src/FruitandVegetableGuide/gradlew
@@ -0,0 +1,185 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/src/FruitandVegetableGuide/gradlew.bat b/src/FruitandVegetableGuide/gradlew.bat
new file mode 100644
index 0000000..107acd3
--- /dev/null
+++ b/src/FruitandVegetableGuide/gradlew.bat
@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/src/FruitandVegetableGuide/settings.gradle b/src/FruitandVegetableGuide/settings.gradle
new file mode 100644
index 0000000..c2e9698
--- /dev/null
+++ b/src/FruitandVegetableGuide/settings.gradle
@@ -0,0 +1,16 @@
+pluginManagement {
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+rootProject.name = "FruitandVegetableGuide"
+include ':app'