diff --git a/LoveVegetable/.gitignore b/LoveVegetable/.gitignore
new file mode 100644
index 0000000..e76c77c
--- /dev/null
+++ b/LoveVegetable/.gitignore
@@ -0,0 +1,13 @@
+*.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
diff --git a/LoveVegetable/.idea/.gitignore b/LoveVegetable/.idea/.gitignore
new file mode 100644
index 0000000..eaf91e2
--- /dev/null
+++ b/LoveVegetable/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/LoveVegetable/.idea/compiler.xml b/LoveVegetable/.idea/compiler.xml
new file mode 100644
index 0000000..7d7ec2e
--- /dev/null
+++ b/LoveVegetable/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LoveVegetable/.idea/dbnavigator.xml b/LoveVegetable/.idea/dbnavigator.xml
new file mode 100644
index 0000000..d66c246
--- /dev/null
+++ b/LoveVegetable/.idea/dbnavigator.xml
@@ -0,0 +1,519 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LoveVegetable/.idea/encodings.xml b/LoveVegetable/.idea/encodings.xml
new file mode 100644
index 0000000..f13fa33
--- /dev/null
+++ b/LoveVegetable/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/LoveVegetable/.idea/gradle.xml b/LoveVegetable/.idea/gradle.xml
new file mode 100644
index 0000000..f848e49
--- /dev/null
+++ b/LoveVegetable/.idea/gradle.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LoveVegetable/.idea/jarRepositories.xml b/LoveVegetable/.idea/jarRepositories.xml
new file mode 100644
index 0000000..17c8136
--- /dev/null
+++ b/LoveVegetable/.idea/jarRepositories.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LoveVegetable/.idea/misc.xml b/LoveVegetable/.idea/misc.xml
new file mode 100644
index 0000000..3b0a0d9
--- /dev/null
+++ b/LoveVegetable/.idea/misc.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LoveVegetable/.idea/modules/app/app.plantuml b/LoveVegetable/.idea/modules/app/app.plantuml
new file mode 100644
index 0000000..c9996fd
--- /dev/null
+++ b/LoveVegetable/.idea/modules/app/app.plantuml
@@ -0,0 +1,314 @@
+@startuml
+
+title __GUOSHU34.APP's Class Diagram__\n
+
+ namespace com.example.lib {
+ class com.example.lib.TCPServer {
+ }
+ }
+
+
+ namespace com.example.lib {
+ class com.example.lib.TCPServer {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.BuildConfig {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.CustomVideoView {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.Data {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.DatabaseHelper {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.DescriptionActivity {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.FragmentFive {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.FragmentOne {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.FragmentThree {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.FragmentTwo {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.FrgmentFour {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.Infor {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.Main2Activity {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.Main3Activity {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.Main4Activity {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivity {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityorder {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityt1 {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityt1t {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityt2 {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityt2t {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityt3 {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityt3t {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityt4 {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityt4t {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityt5 {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityt5t {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityt6t {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivitytxqym1 {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivitytxqym2 {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivitytxqym3 {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivitytypede {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityxqym {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityxzzffs {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MainActivityzfcg {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MianActivityset {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MianActivityxx {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MyPagerAdapter {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.MyScrollView {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.UnScrollListView {
+ }
+ }
+
+
+ namespace com.example.myapplication {
+ class com.example.myapplication.WebActivity {
+ }
+ }
+
+
+ com.example.myapplication.CustomVideoView -up-|> android.widget.VideoView
+ com.example.myapplication.DatabaseHelper -up-|> android.database.sqlite.SQLiteOpenHelper
+ com.example.myapplication.DescriptionActivity -up-|> androidx.appcompat.app.AppCompatActivity
+ com.example.myapplication.FragmentFive -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.FragmentOne -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.FragmentThree -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.FragmentTwo -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.FrgmentFour .up.|> android.view.GestureDetector.OnGestureListener
+ com.example.myapplication.FrgmentFour -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.Main2Activity .up.|> android.view.View.OnClickListener
+ com.example.myapplication.Main2Activity -up-|> androidx.appcompat.app.AppCompatActivity
+ com.example.myapplication.Main3Activity -up-|> androidx.appcompat.app.AppCompatActivity
+ com.example.myapplication.Main4Activity -up-|> androidx.appcompat.app.AppCompatActivity
+ com.example.myapplication.MainActivity .up.|> android.view.View.OnClickListener
+ com.example.myapplication.MainActivity -up-|> androidx.appcompat.app.AppCompatActivity
+ com.example.myapplication.MainActivityorder -up-|> androidx.appcompat.app.AppCompatActivity
+ com.example.myapplication.MainActivityorder o-- com.example.myapplication.FragmentOne : oneFragment
+ com.example.myapplication.MainActivityorder o-- com.example.myapplication.FragmentTwo : twoFragment
+ com.example.myapplication.MainActivityt1 -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivityt1t -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivityt2 -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivityt2t -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivityt3 -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivityt3t -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivityt4 -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivityt4t -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivityt5 -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivityt5t -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivityt6t -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivitytxqym1 -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivitytxqym2 -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivitytxqym3 -up-|> androidx.fragment.app.Fragment
+ com.example.myapplication.MainActivitytypede -up-|> androidx.appcompat.app.AppCompatActivity
+ com.example.myapplication.MainActivitytypede o-- com.example.myapplication.FragmentOne : oneFragment
+ com.example.myapplication.MainActivitytypede o-- com.example.myapplication.FragmentTwo : twoFragment
+ com.example.myapplication.MainActivityxqym -up-|> androidx.appcompat.app.AppCompatActivity
+ com.example.myapplication.MainActivityxzzffs -up-|> androidx.appcompat.app.AppCompatActivity
+ com.example.myapplication.MainActivityxzzffs o-- com.example.myapplication.FragmentOne : oneFragment
+ com.example.myapplication.MainActivityxzzffs o-- com.example.myapplication.FragmentTwo : twoFragment
+ com.example.myapplication.MainActivityzfcg -up-|> androidx.appcompat.app.AppCompatActivity
+ com.example.myapplication.MainActivityzfcg o-- com.example.myapplication.FragmentOne : oneFragment
+ com.example.myapplication.MainActivityzfcg o-- com.example.myapplication.FragmentTwo : twoFragment
+ com.example.myapplication.MianActivityset -up-|> androidx.appcompat.app.AppCompatActivity
+ com.example.myapplication.MianActivityxx -up-|> androidx.appcompat.app.AppCompatActivity
+ com.example.myapplication.MyPagerAdapter -up-|> androidx.viewpager.widget.PagerAdapter
+ com.example.myapplication.MyScrollView -up-|> android.widget.ScrollView
+ com.example.myapplication.UnScrollListView -up-|> android.widget.ListView
+ com.example.myapplication.WebActivity -up-|> androidx.appcompat.app.AppCompatActivity
+
+
+right footer
+
+
+PlantUML diagram generated by SketchIt! (https://bitbucket.org/pmesmeur/sketch.it)
+For more information about this tool, please contact philippe.mesmeur@gmail.com
+endfooter
+
+@enduml
diff --git a/LoveVegetable/app/.gitignore b/LoveVegetable/app/.gitignore
new file mode 100644
index 0000000..3543521
--- /dev/null
+++ b/LoveVegetable/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/LoveVegetable/app/build.gradle b/LoveVegetable/app/build.gradle
new file mode 100644
index 0000000..25b3ab7
--- /dev/null
+++ b/LoveVegetable/app/build.gradle
@@ -0,0 +1,37 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 29
+ buildToolsVersion "29.0.2"
+ defaultConfig {
+ applicationId "com.example.myapplicationloign"
+ minSdkVersion 15
+ targetSdkVersion 29
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'androidx.appcompat:appcompat:1.1.0'
+ implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
+ testImplementation 'junit:junit:4.12'
+ androidTestImplementation 'androidx.test:runner:1.2.0'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
+ implementation 'com.google.android.material:material:1.0.0'
+ implementation 'com.google.code.gson:gson:2.8.6'
+ implementation 'com.github.bumptech.glide:glide:4.3.1'
+ annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
+ implementation 'net.lingala.zip4j:zip4j:1.3.2'
+ implementation 'net.qiujuer.genius:ui:2.0.0-beta4'
+
+
+}
diff --git a/LoveVegetable/app/lib/.gitignore b/LoveVegetable/app/lib/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/LoveVegetable/app/lib/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/LoveVegetable/app/lib/build.gradle b/LoveVegetable/app/lib/build.gradle
new file mode 100644
index 0000000..0abb137
--- /dev/null
+++ b/LoveVegetable/app/lib/build.gradle
@@ -0,0 +1,8 @@
+plugins {
+ id 'java-library'
+}
+
+java {
+ sourceCompatibility = JavaVersion.VERSION_1_7
+ targetCompatibility = JavaVersion.VERSION_1_7
+}
\ No newline at end of file
diff --git a/LoveVegetable/app/lib/src/main/java/com/example/lib/TCPServer.java b/LoveVegetable/app/lib/src/main/java/com/example/lib/TCPServer.java
new file mode 100644
index 0000000..425aada
--- /dev/null
+++ b/LoveVegetable/app/lib/src/main/java/com/example/lib/TCPServer.java
@@ -0,0 +1,108 @@
+package com.example.lib;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+class TCPServer {
+ private static final int PORT = 6666;
+ private List mList = new ArrayList<>();
+ private ServerSocket server = null;
+ private ExecutorService mExecutorService = null; // 创建一个线程池
+
+ public static void main(String[] args) {
+ new TCPServer();
+ }
+
+ public TCPServer() {
+ try {
+ server = new ServerSocket(PORT);
+ mExecutorService = Executors.newCachedThreadPool(); // 实例化一个线程池
+ System.out.println("服务器已启动,等待加入...");
+ Socket client = null;
+ while (true) {
+ client = server.accept();
+ // 把客户端放入客户端集合中
+ mList.add(client);
+ mExecutorService.execute(new Service(client)); // 开启一个新线程
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /// 扩展Runnable接口
+ class Service implements Runnable {
+ private Socket socket;
+ private BufferedReader in = null;
+ private String msg = " ";
+
+ public Service(Socket socket) {
+ this.socket = socket;
+ try {
+ in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+ // 客户端只要一连到服务器,便向客户端发送下面的信息。
+ msg = "服务器" + this.socket.getInetAddress() + "加入;此时总连接:" + mList.size() + "(服务器发送)";
+ this.sendmsg();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ public void run() {
+ try {
+ while (true) {
+ if ((msg = in.readLine()) != null) {
+ // 当客户端发送的信息为:exit时,关闭连接
+ if (msg.trim().equals("exit")) {
+ System.out.println("GAME OVER");
+ mList.remove(socket);
+ in.close();
+ msg = "服务器" + socket.getInetAddress() + "退出;此时总连接:" + mList.size() + "(服务器发送)";
+ socket.close();
+ this.sendmsg();
+ break;
+ } else {
+ // 接收客户端发过来的信息msg,然后发送给客户端。
+ msg = socket.getInetAddress() + ":" + msg + "(服务器发送)";
+ this.sendmsg();
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * 循环遍历客户端集合,给每个客户端都发送信息。
+ */
+ public void sendmsg() {
+ // 在服务器上打印
+ System.out.println(msg);
+ // 遍历打印到每个客户端上
+ int num = mList.size();
+ for (int i = 0; i < num; i++) {
+ Socket mSocket = mList.get(i);
+
+ PrintWriter out = null;
+ try {
+ out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(mSocket.getOutputStream())), true);
+ out.println(msg);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/LoveVegetable/app/lib/src/main/java/com/example/lib/lib.plantuml b/LoveVegetable/app/lib/src/main/java/com/example/lib/lib.plantuml
new file mode 100644
index 0000000..5dde85b
--- /dev/null
+++ b/LoveVegetable/app/lib/src/main/java/com/example/lib/lib.plantuml
@@ -0,0 +1,40 @@
+@startuml
+
+title __LIB's Class Diagram__\n
+
+ namespace com.example.lib {
+ class com.example.lib.TCPServer {
+ {static} - PORT : int
+ - mExecutorService : ExecutorService
+ - mList : List
+ - server : ServerSocket
+ + TCPServer()
+ {static} + main()
+ }
+ }
+
+
+ namespace com.example.lib {
+ class com.example.lib.TCPServer.Service {
+ - in : BufferedReader
+ - msg : String
+ - socket : Socket
+ + Service()
+ + run()
+ + sendmsg()
+ }
+ }
+
+
+ com.example.lib.TCPServer +-down- com.example.lib.TCPServer.Service
+ com.example.lib.TCPServer.Service .up.|> Runnable
+
+
+right footer
+
+
+PlantUML diagram generated by SketchIt! (https://bitbucket.org/pmesmeur/sketch.it)
+For more information about this tool, please contact philippe.mesmeur@gmail.com
+endfooter
+
+@enduml
diff --git a/LoveVegetable/app/proguard-rules.pro b/LoveVegetable/app/proguard-rules.pro
new file mode 100644
index 0000000..6e7ffa9
--- /dev/null
+++ b/LoveVegetable/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
diff --git a/LoveVegetable/app/release/app-release.apk b/LoveVegetable/app/release/app-release.apk
new file mode 100644
index 0000000..22541e8
Binary files /dev/null and b/LoveVegetable/app/release/app-release.apk differ
diff --git a/LoveVegetable/app/release/output-metadata.json b/LoveVegetable/app/release/output-metadata.json
new file mode 100644
index 0000000..5ab982d
--- /dev/null
+++ b/LoveVegetable/app/release/output-metadata.json
@@ -0,0 +1,18 @@
+{
+ "version": 2,
+ "artifactType": {
+ "type": "APK",
+ "kind": "Directory"
+ },
+ "applicationId": "com.example.myapplicationloign",
+ "variantName": "processReleaseResources",
+ "elements": [
+ {
+ "type": "SINGLE",
+ "filters": [],
+ "versionCode": 1,
+ "versionName": "1.0",
+ "outputFile": "app-release.apk"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/LoveVegetable/app/release/output.json b/LoveVegetable/app/release/output.json
new file mode 100644
index 0000000..c429e31
--- /dev/null
+++ b/LoveVegetable/app/release/output.json
@@ -0,0 +1 @@
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
diff --git a/LoveVegetable/app/src/androidTest/java/com/example/myapplicationloign/ExampleInstrumentedTest.java b/LoveVegetable/app/src/androidTest/java/com/example/myapplicationloign/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..3a7548c
--- /dev/null
+++ b/LoveVegetable/app/src/androidTest/java/com/example/myapplicationloign/ExampleInstrumentedTest.java
@@ -0,0 +1,27 @@
+package com.example.myapplicationloign;
+
+import android.content.Context;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("com.example.myapplicationloign", appContext.getPackageName());
+ }
+}
diff --git a/LoveVegetable/app/src/androidTest/java/com/example/myapplicationloign/myapplicationloign.plantuml b/LoveVegetable/app/src/androidTest/java/com/example/myapplicationloign/myapplicationloign.plantuml
new file mode 100644
index 0000000..c3b355a
--- /dev/null
+++ b/LoveVegetable/app/src/androidTest/java/com/example/myapplicationloign/myapplicationloign.plantuml
@@ -0,0 +1,14 @@
+@startuml
+
+title __MYAPPLICATIONLOIGN's Class Diagram__\n
+
+
+
+right footer
+
+
+PlantUML diagram generated by SketchIt! (https://bitbucket.org/pmesmeur/sketch.it)
+For more information about this tool, please contact philippe.mesmeur@gmail.com
+endfooter
+
+@enduml
diff --git a/LoveVegetable/app/src/main/AndroidManifest.xml b/LoveVegetable/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..ba251d0
--- /dev/null
+++ b/LoveVegetable/app/src/main/AndroidManifest.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LoveVegetable/app/src/main/java/com/example/myapplication/CustomVideoView.java b/LoveVegetable/app/src/main/java/com/example/myapplication/CustomVideoView.java
new file mode 100644
index 0000000..cba9b48
--- /dev/null
+++ b/LoveVegetable/app/src/main/java/com/example/myapplication/CustomVideoView.java
@@ -0,0 +1,42 @@
+package com.example.myapplication;
+
+import android.content.Context;
+import android.media.MediaPlayer;
+import android.util.AttributeSet;
+import android.view.KeyEvent;
+import android.widget.VideoView;
+
+/**
+ * Created by DaQiE on 2017/2/20 0020.
+ */
+
+public class CustomVideoView extends VideoView {
+ public CustomVideoView(Context context) {
+ super(context);
+ }
+
+ public CustomVideoView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public CustomVideoView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ //我们重新计算高度
+ int width = getDefaultSize(0, widthMeasureSpec);
+ int height = getDefaultSize(0, heightMeasureSpec);
+ setMeasuredDimension(width, height);
+ }
+ @Override
+ public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) {
+ super.setOnPreparedListener(l);
+ }
+
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ return super.onKeyDown(keyCode, event);
+ }
+}
diff --git a/LoveVegetable/app/src/main/java/com/example/myapplication/Data.java b/LoveVegetable/app/src/main/java/com/example/myapplication/Data.java
new file mode 100644
index 0000000..e1cd123
--- /dev/null
+++ b/LoveVegetable/app/src/main/java/com/example/myapplication/Data.java
@@ -0,0 +1,113 @@
+package com.example.myapplication;
+
+public class Data{
+ private static int a;
+ private static int b;
+ private static int c;
+ private static int f;
+ private static int g;
+
+ public static String getUsername() {
+ return username;
+ }
+
+ public static void setUsername(String username) {
+ Data.username = username;
+ }
+
+ private static String username;
+ public static int getK() {
+ return K;
+ }
+
+ public static void setK(int k) {
+ K = k;
+ }
+
+ private static int K;
+
+ public static int getF() {
+ return f;
+ }
+
+ public static void setF(int f) {
+ Data.f = f;
+ }
+
+ public static int getG() {
+ return g;
+ }
+
+ public static void setG(int g) {
+ Data.g = g;
+ }
+
+ public static int getH() {
+ return h;
+ }
+
+ public static void setH(int h) {
+ Data.h = h;
+ }
+
+ public static int getI() {
+ return i;
+ }
+
+ public static void setI(int i) {
+ Data.i = i;
+ }
+
+ public static int getJ() {
+ return j;
+ }
+
+ public static void setJ(int j) {
+ Data.j = j;
+ }
+
+ private static int h;
+ private static int i;
+ private static int j;
+ public static int getB() {
+ return b;
+ }
+
+ public static void setB(int b) {
+ Data.b = b;
+ }
+
+ public static int getC() {
+ return c;
+ }
+
+ public static void setC(int c) {
+ Data.c = c;
+ }
+
+ public static int getD() {
+ return d;
+ }
+
+ public static void setD(int d) {
+ Data.d = d;
+ }
+
+ public static int getE() {
+ return e;
+ }
+
+ public static void setE(int e) {
+ Data.e = e;
+ }
+
+ private static int d;
+ private static int e;
+ public static int getA() {
+ return a;
+ }
+
+ public static void setA(int a) {
+ Data.a = a;
+ }
+}
\ No newline at end of file
diff --git a/LoveVegetable/app/src/main/java/com/example/myapplication/DatabaseHelper.java b/LoveVegetable/app/src/main/java/com/example/myapplication/DatabaseHelper.java
new file mode 100644
index 0000000..8f03d25
--- /dev/null
+++ b/LoveVegetable/app/src/main/java/com/example/myapplication/DatabaseHelper.java
@@ -0,0 +1,66 @@
+package com.example.myapplication;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteOpenHelper;
+/**
+ * Created by Administrator on 2019/10/30 0030.
+ */
+
+public class DatabaseHelper extends SQLiteOpenHelper {
+ private static final String DB_NAME="flowerDB2";//定义数据库名
+ private static final String TABLE_NAME="tb_flower";//定义表名
+ private static final String CREATE_TABLE="create table "+TABLE_NAME+"( _id integer primary key autoincrement,fname text,type text,info text)";//创建表
+ //创建SQLiteDatabase实例
+ private SQLiteDatabase db;
+ //构造方法
+ public DatabaseHelper(Context context){
+ super(context,DB_NAME,null,1);
+ }
+ @Override
+ public void onCreate(SQLiteDatabase sqLiteDatabase) {
+ //实例化SQLiteDatabase
+ db=sqLiteDatabase;
+ //创建表
+ db.execSQL(CREATE_TABLE);
+ }
+
+ @Override
+ public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
+
+ }
+ //添加数据
+ public void insert(ContentValues values){
+ //将数据库设置为可读写的
+ db=getWritableDatabase();
+ db.insert(TABLE_NAME,null,values);
+ db.close();
+ }
+ //修改数据
+ public void update(Infor infor){
+ db=getWritableDatabase();
+ //获得对象的属性
+ ContentValues values=new ContentValues();
+ values.put("type",infor.getContent());
+ db.update(TABLE_NAME,values,"_id=?",new String[]{infor.getId()+""});
+ db.close();
+ }
+ //删除数据
+ public void del(int id){
+ db=getWritableDatabase();
+ db.delete(TABLE_NAME,"_id=?",new String[]{String.valueOf(id)});
+ db.close();
+ }
+ //查询数据
+ public Cursor query(){
+ db=getWritableDatabase();
+ Cursor cursor=db.query(TABLE_NAME,null,null,null,null,null,"_id desc");
+ //db.close();
+ return cursor;
+ }
+
+
+}
+
diff --git a/LoveVegetable/app/src/main/java/com/example/myapplication/DescriptionActivity.java b/LoveVegetable/app/src/main/java/com/example/myapplication/DescriptionActivity.java
new file mode 100644
index 0000000..5fdab6f
--- /dev/null
+++ b/LoveVegetable/app/src/main/java/com/example/myapplication/DescriptionActivity.java
@@ -0,0 +1,162 @@
+package com.example.myapplication;
+
+import android.content.ContentValues;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.database.Cursor;
+import android.os.Build;
+import android.os.Bundle;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.SimpleCursorAdapter;
+import android.widget.TextView;
+import android.widget.Toast;
+import android.os.AsyncTask;
+
+import android.os.Bundle;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import androidx.appcompat.app.AlertDialog;
+import androidx.appcompat.app.AppCompatActivity;
+
+public class DescriptionActivity extends AppCompatActivity {
+ ImageView iv_flowerB,fhj;
+ TextView tv_flowerB,t_price;
+ EditText et_name,et_type,et_info;
+ImageView t_sc,t_fx;
+Button jrgwc;
+int n;
+
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_desc);
+ iv_flowerB=(ImageView)findViewById(R.id.iv_flowerB);
+ tv_flowerB=(TextView)findViewById(R.id.tv_descB);
+ t_price=(TextView)findViewById(R.id.t_price);
+ fhj=findViewById( R.id.fhj );
+ Intent intent=getIntent();
+ final int num=intent.getIntExtra("num",0);
+ //声明数据
+ int[] imageB={R.drawable.ta,R.drawable.t5,R.drawable.t3,R.drawable.t7,R.drawable.t6,R.drawable.v14,R.drawable.v13,R.drawable.v11,R.drawable.v5,R.drawable.v4,R.drawable.v7};
+ String[] descB={"正宗极品李子","新鲜优质橘子","甘甜硬实草莓","进口速运菠萝","盆地川派西瓜","优质水生莴苣","绿色新鲜菠菜","新鲜速运茄子","优良种胡萝卜","极品丝瓜","完美蔬菜搭配"};
+ String[] descM={"3.0","3.0","8.5","2.5","1.5","3.0","3.5","3.5","2.5","6.5","9.5"};
+ iv_flowerB.setImageResource(imageB[num]);
+ tv_flowerB.setText(descB[num]);
+ t_price.setText( descM[num] );
+ //查询所有的花信息
+ DatabaseHelper helper=new DatabaseHelper(this);
+ Cursor cursor=helper.query();
+ //定义SimpleCursorAdapter
+ // Collections.reverse();
+ SimpleCursorAdapter simpleCursorAdapter=new SimpleCursorAdapter(this,R.layout.layouta,cursor,new String[]{"_id","info"},new int[]{R.id.infor_name,R.id.infor_content},0);
+
+fhj.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v){
+ finish();
+ }
+} );
+ t_sc=findViewById( R.id.t_sc );
+ t_fx=findViewById( R.id.t_fx );
+ jrgwc=findViewById( R.id.jrgwc );
+ t_sc.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ n++;
+ if (n % 2 == 1) {
+ t_sc.setBackgroundResource( R.drawable.sctbd );
+ Toast.makeText( getBaseContext(), "已收藏!", Toast.LENGTH_SHORT ).show();
+ }else{
+ t_sc.setBackgroundResource( R.drawable.sctb );
+ Toast.makeText( getBaseContext(), "取消收藏!", Toast.LENGTH_SHORT ).show();
+ }
+ }
+ } );
+ t_fx.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Toast.makeText( getBaseContext(),"已分享!",Toast.LENGTH_SHORT ).show();
+ }
+ } );
+ jrgwc.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if(num==0)
+ Data.setA( 11 );
+ if(num==1)
+ Data.setB(num);
+ if (num==2)
+ Data.setC( num );
+ if (num==3)
+ Data.setD( num );
+ if (num==4)
+ Data.setE( num );
+ if (num==5)
+ Data.setF( num );
+ if (num==6)
+ Data.setG( num );
+ if (num==7)
+ Data.setH( num );
+ if (num==8)
+ Data.setI( num );
+ if (num==9)
+ Data.setJ( num );
+ if (num==10)
+ Data.setK( num );
+ Toast.makeText( getBaseContext(),"已加入购物车!",Toast.LENGTH_SHORT ).show();
+ }
+ } );
+ }
+
+
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0){
+
+//这里重写返回键
+
+ return true;
+
+ }
+
+ return false;
+ }
+ public void showdialog(View view) {
+//Toast.makeText(this,"clickme",Toast.LENGTH_LONG).show();
+ AlertDialog.Builder alertdialogbuilder=new AlertDialog.Builder(this);
+ alertdialogbuilder.setIcon( R.drawable.tubiao);
+ alertdialogbuilder.setTitle( "提示:" );
+ alertdialogbuilder.setMessage("您已选择该商品,是否购买?");
+ alertdialogbuilder.setPositiveButton("确定", click1);
+ alertdialogbuilder.setNegativeButton("取消", click2);
+ AlertDialog alertdialog1=alertdialogbuilder.create();
+ alertdialog1.show();
+ }
+ private DialogInterface.OnClickListener click1= new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ Intent intent=new Intent(DescriptionActivity.this,MainActivityxzzffs.class);
+ startActivity( intent );
+ dialog.cancel();
+ }
+ };
+ private DialogInterface.OnClickListener click2= new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.cancel();
+ }
+ };
+
+}
diff --git a/LoveVegetable/app/src/main/java/com/example/myapplication/FragmentFive.java b/LoveVegetable/app/src/main/java/com/example/myapplication/FragmentFive.java
new file mode 100644
index 0000000..f8b7668
--- /dev/null
+++ b/LoveVegetable/app/src/main/java/com/example/myapplication/FragmentFive.java
@@ -0,0 +1,305 @@
+package com.example.myapplication;
+
+import android.app.UiModeManager;
+import android.content.Intent;
+import android.graphics.Color;
+import android.net.Uri;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.ImageButton;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.RadioButton;
+import android.widget.Switch;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+
+
+public class FragmentFive extends Fragment{
+
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View view=inflater.inflate( R.layout.activity_mainshopcar,container,false);
+ return view;
+ }
+ ImageButton ibu1,ibu2,plus,minus,plus1,minus1;
+ ImageView img;
+ CheckBox rb,rb1,rb2,rb3,rb4,rb5,rb6,rb7,rb8,rb9,rb10;
+ Switch switch1,switch2;
+ boolean blFlag=false;
+ Button qq,wx;
+ TextView tv_sz,number,number1;
+ private int count,count1;
+ private UiModeManager mUiModeManager = null;
+ Button surebuy;
+ TextView bj;
+ LinearLayout layx,gwc1,gwc2,gwc3,gwc4,gwc5,gwc6,gwc7,gwc8,gwc9,gwc10,gwc11;
+ int n;
+ @Override
+ public void onActivityCreated(Bundle savedInstanceState) {
+ super.onActivityCreated( savedInstanceState );
+ number = getActivity().findViewById(R.id.number);
+ plus = getActivity().findViewById(R.id.plus);
+ minus = getActivity().findViewById(R.id.minus);
+ number1 = getActivity().findViewById(R.id.number1);
+ plus1 = getActivity().findViewById(R.id.plus1);
+ minus1= getActivity().findViewById(R.id.minus1);
+ ButtonPlus buttonlistener = new ButtonPlus();
+ plus.setOnClickListener(buttonlistener);
+ ButtonMinus buttonMinus = new ButtonMinus();
+ minus.setOnClickListener(buttonMinus);
+ ButtonPlus1 buttonlistener1 = new ButtonPlus1();
+ plus1.setOnClickListener(buttonlistener1);
+ ButtonMinus1 buttonMinus1 = new ButtonMinus1();
+ minus1.setOnClickListener(buttonMinus1);
+ surebuy=getActivity().findViewById( R.id.surebuy );
+ layx=getActivity().findViewById( R.id.layx );
+ gwc1=getActivity().findViewById( R.id.gwc1 );
+ gwc2=getActivity().findViewById( R.id.gwc2 );
+ gwc3=getActivity().findViewById( R.id.gwc3 );
+ gwc4=getActivity().findViewById( R.id.gwc4 );
+ gwc5=getActivity().findViewById( R.id.gwc5 );
+ gwc6=getActivity().findViewById( R.id.gwc6 );
+ gwc7=getActivity().findViewById( R.id.gwc7 );
+ gwc8=getActivity().findViewById( R.id.gwc8 );
+ gwc9=getActivity().findViewById( R.id.gwc9 );
+ gwc10=getActivity().findViewById( R.id.gwc10 );
+ gwc11=getActivity().findViewById( R.id.gwc11 );
+ bj=getActivity().findViewById( R.id.bj );
+ rb=getActivity().findViewById( R.id.rb );
+ rb1=getActivity().findViewById( R.id.rb1 );
+ rb2=getActivity().findViewById( R.id.rb2 );
+ rb3=getActivity().findViewById( R.id.rb3 );
+ rb4=getActivity().findViewById( R.id.rb4 );
+ rb5=getActivity().findViewById( R.id.rb5 );
+ rb6=getActivity().findViewById( R.id.rb6 );
+ rb7=getActivity().findViewById( R.id.rb7 );
+ rb8=getActivity().findViewById( R.id.rb8 );
+ rb9=getActivity().findViewById( R.id.rb9 );
+ rb10=getActivity().findViewById( R.id.rb10 );
+
+
+ bj.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ n++;
+ if (n % 2==1) {
+ surebuy.setVisibility( View.VISIBLE );
+ rb.setVisibility( View.VISIBLE );
+ rb1.setVisibility( View.VISIBLE );
+ rb2.setVisibility( View.VISIBLE );
+ rb3.setVisibility( View.VISIBLE );
+ rb4.setVisibility( View.VISIBLE );
+ rb5.setVisibility( View.VISIBLE );
+ rb6.setVisibility( View.VISIBLE );
+ rb7.setVisibility( View.VISIBLE );
+ rb8.setVisibility( View.VISIBLE );
+ rb9.setVisibility( View.VISIBLE );
+ rb10.setVisibility( View.VISIBLE );
+ bj.setText( "取消" );
+ }
+ else {
+ surebuy.setVisibility( View.INVISIBLE );
+ rb.setVisibility( View.INVISIBLE );
+ rb1.setVisibility( View.INVISIBLE );
+ rb2.setVisibility( View.INVISIBLE );
+ rb3.setVisibility( View.INVISIBLE );
+ rb4.setVisibility( View.INVISIBLE );
+ rb5.setVisibility( View.INVISIBLE );
+ rb6.setVisibility( View.INVISIBLE );
+ rb7.setVisibility( View.INVISIBLE );
+ rb8.setVisibility( View.INVISIBLE );
+ rb9.setVisibility( View.INVISIBLE );
+ rb10.setVisibility( View.INVISIBLE );
+ rb.setChecked( false );
+ rb1.setChecked( false );
+ rb2.setChecked( false );
+ rb3.setChecked( false );
+ rb4.setChecked( false );
+ rb5.setChecked( false );
+ rb6.setChecked( false );
+ rb7.setChecked( false );
+ rb8.setChecked( false );
+ rb9.setChecked( false );
+ rb10.setChecked( false );
+ bj.setText( "编辑" );
+ }
+
+ }
+ } );
+ int b=Data.getB();
+ if(b!=1){
+ gwc2.setVisibility( View.GONE );
+ }
+ int a=Data.getA();
+ if(a!=11){
+ gwc1.setVisibility( View.GONE );
+ }
+ int c=Data.getC();
+ if(c!=2){
+ gwc3.setVisibility( View.GONE );
+ }
+
+ int d=Data.getD();
+ if(d!=3){
+ gwc4.setVisibility( View.GONE );
+ }
+ int e=Data.getE();
+ if(e!=4){
+ gwc5.setVisibility( View.GONE );
+ }
+ int f=Data.getF();
+ if(f!=5){
+ gwc6.setVisibility( View.GONE );
+ }
+ int g=Data.getG();
+ if(g!=6){
+ gwc7.setVisibility( View.GONE );
+ }
+ int h=Data.getH();
+ if(h!=7){
+ gwc8.setVisibility( View.GONE );
+ }
+ final int i=Data.getI();
+ if(i!=8){
+ gwc9.setVisibility( View.GONE );
+ }
+ int j=Data.getJ();
+ if(j!=9){
+ gwc10.setVisibility( View.GONE );
+ }
+ int k=Data.getK();
+ if(k!=10){
+ gwc11.setVisibility( View.GONE );
+ }
+surebuy.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if(rb.isChecked()||rb1.isChecked()||rb2.isChecked()||rb3.isChecked()||rb4.isChecked()||rb5.isChecked()||rb6.isChecked()||rb7.isChecked()||rb8.isChecked()||rb9.isChecked()||rb10.isChecked()){
+ if(rb.isChecked()==true){
+ gwc2.setVisibility( View.GONE );
+ Data.setB( 0 );}
+ if(rb1.isChecked()==true){
+ gwc1.setVisibility( View.GONE );
+ Data.setA( 0 );}
+ if(rb2.isChecked()==true){
+ gwc3.setVisibility( View.GONE );
+ Data.setC( 0 );}
+ if(rb3.isChecked()==true){
+ gwc4.setVisibility( View.GONE );
+ Data.setD( 0 );}
+ if(rb4.isChecked()==true){
+ gwc5.setVisibility( View.GONE );
+ Data.setE( 0 );}
+ if(rb5.isChecked()==true){
+ gwc6.setVisibility( View.GONE );
+ Data.setF( 0 );}
+ if(rb6.isChecked()==true){
+ gwc7.setVisibility( View.GONE );
+ Data.setG( 0 );}
+ if(rb7.isChecked()==true){
+ gwc8.setVisibility( View.GONE );
+ Data.setH( 0 );}
+ if(rb8.isChecked()==true){
+ gwc9.setVisibility( View.GONE );
+ Data.setI( 0 );}
+ if(rb9.isChecked()==true){
+ gwc10.setVisibility( View.GONE );
+ Data.setJ( 0 );}
+ if(rb10.isChecked()==true){
+ gwc11.setVisibility( View.GONE );
+ Data.setK( 0 );}
+ Intent intent=new Intent(getActivity(),MainActivityxzzffs.class);
+ startActivity( intent );
+ }
+ else{
+ Toast.makeText(getActivity(), "请选择需要购买的物品!", Toast.LENGTH_SHORT ).show();
+ }
+ }
+} );
+ }
+
+
+
+
+
+ class ButtonMinus implements View.OnClickListener {
+ @Override
+ public void onClick(View view){
+ //得到输入框里的数字{
+ String numString = number.getText().toString();
+ //进行判断为空或是没文字设置为0
+ if (numString == null || numString.equals("")) {
+ count = 0;
+ } else {
+ int numInt = Integer.parseInt(numString);
+ //判断,当小于1时提示输入一个大于0的数
+ if (numInt < 2) {
+ Toast.makeText(getActivity(), "您选择的数量已经是最小", Toast.LENGTH_SHORT).show();
+ } else {
+ //设置EditText光标位置为文本末端
+
+ //为numInt进行减的操作
+ numInt--;
+ count = numInt;
+ number.setText(count + "");
+ }
+ }
+
+ }
+}
+
+class ButtonPlus implements View.OnClickListener {
+ @Override
+ public void onClick(View view) {
+ //为numInt进行加的操作
+ count++;
+ number.setText(count + "");
+ }
+}
+ class ButtonMinus1 implements View.OnClickListener {
+ @Override
+ public void onClick(View view){
+ //得到输入框里的数字{
+ String numString = number1.getText().toString();
+ //进行判断为空或是没文字设置为0
+ if (numString == null || numString.equals("")) {
+ count1 = 0;
+ } else {
+ int numInt = Integer.parseInt(numString);
+ //判断,当小于1时提示输入一个大于0的数
+ if (numInt < 2) {
+ Toast.makeText(getActivity(), "您选择的数量已经是最小", Toast.LENGTH_SHORT).show();
+ } else {
+ //设置EditText光标位置为文本末端
+
+ //为numInt进行减的操作
+ numInt--;
+ count1 = numInt;
+ number1.setText(count1 + "");
+ }
+ }
+
+ }
+ }
+
+ class ButtonPlus1 implements View.OnClickListener {
+ @Override
+ public void onClick(View view) {
+ //为numInt进行加的操作
+ count1++;
+ number1.setText(count1 + "");
+ }
+ }
+
+}
diff --git a/LoveVegetable/app/src/main/java/com/example/myapplication/FragmentOne.java b/LoveVegetable/app/src/main/java/com/example/myapplication/FragmentOne.java
new file mode 100644
index 0000000..56d1c73
--- /dev/null
+++ b/LoveVegetable/app/src/main/java/com/example/myapplication/FragmentOne.java
@@ -0,0 +1,63 @@
+package com.example.myapplication;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.text.Layout;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentActivity;
+import androidx.fragment.app.FragmentTransaction;
+
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * @author yihuanxing
+ *
+ */
+/**
+ *
+ * @author yihuanxing
+ *
+ */
+public class FragmentOne extends Fragment {
+ LinearLayout layout1,layout2;
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View view = inflater.inflate( R.layout.activity_main22, container, false );
+ return view;
+
+ }
+ public void onActivityCreated(Bundle savedInstanceState) {
+ super.onActivityCreated( savedInstanceState );
+ layout1 = getActivity().findViewById( R.id.layout1 );
+ layout2 = getActivity().findViewById( R.id.layout2 );
+ layout1.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent= new Intent(getActivity(), MainActivitytypede.class);
+ startActivity( intent );
+ }
+ } );
+ layout2.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent= new Intent(getActivity(), MainActivitytypede.class);
+ startActivity( intent );
+ }
+ } );
+ }
+}
diff --git a/LoveVegetable/app/src/main/java/com/example/myapplication/FragmentThree.java b/LoveVegetable/app/src/main/java/com/example/myapplication/FragmentThree.java
new file mode 100644
index 0000000..52981e0
--- /dev/null
+++ b/LoveVegetable/app/src/main/java/com/example/myapplication/FragmentThree.java
@@ -0,0 +1,108 @@
+package com.example.myapplication;
+
+import android.app.UiModeManager;
+import android.content.Intent;
+import android.graphics.Color;
+import android.net.Uri;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.ImageButton;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.Switch;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+
+
+public class FragmentThree extends Fragment {
+
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View view=inflater.inflate( R.layout.activity_main2,container,false);
+ return view;
+ }
+ ImageButton ibu1,ibu2;
+ ImageView imgtx,i_sz,i_xx;
+ Switch switch1,switch2;
+ boolean blFlag=false;
+ Button qq,wx;
+ TextView t_username,t_ljlq;
+ LinearLayout lay;
+ private UiModeManager mUiModeManager = null;
+ @Override
+ public void onActivityCreated(Bundle savedInstanceState) {
+ super.onActivityCreated( savedInstanceState );
+ imgtx = getActivity().findViewById( R.id.imgtx );
+ t_username = getActivity().findViewById( R.id.t_username );
+ lay = getActivity().findViewById( R.id.lay1 );
+ t_ljlq = getActivity().findViewById( R.id.t_ljlq );
+ i_sz = getActivity().findViewById( R.id.i_sz );
+ i_xx = getActivity().findViewById( R.id.i_xx );
+
+ if (Data.getUsername() == null){
+ t_username.setText( "请登录!" );
+ }else {
+ t_username.setText( Data.getUsername() );
+ }
+ i_xx.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent=new Intent( getActivity(),MianActivityxx.class );
+ startActivity( intent );
+ }
+ } );
+ i_sz.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent=new Intent( getActivity(),MianActivityset.class );
+ Bundle bundle = new Bundle();
+ String s = getActivity().getIntent().getStringExtra("username");
+ bundle.putString("username", s);
+ intent.putExtras(bundle);
+ startActivity( intent );
+ }
+ } );
+ t_ljlq.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Toast.makeText( getContext(),"领取成功",Toast.LENGTH_SHORT ).show();
+ }
+ } );
+ lay.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent=new Intent( getActivity(),MainActivityorder.class );
+ startActivity( intent );
+ }
+ } );
+ imgtx.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent=new Intent( getActivity(),MainActivity.class );
+ startActivity( intent );
+ }
+ } );
+ t_username.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent=new Intent( getActivity(),MainActivity.class );
+ startActivity( intent );
+ }
+ } );
+
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ }
+}
diff --git a/LoveVegetable/app/src/main/java/com/example/myapplication/FragmentTwo.java b/LoveVegetable/app/src/main/java/com/example/myapplication/FragmentTwo.java
new file mode 100644
index 0000000..025b9a0
--- /dev/null
+++ b/LoveVegetable/app/src/main/java/com/example/myapplication/FragmentTwo.java
@@ -0,0 +1,323 @@
+package com.example.myapplication;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewParent;
+import android.widget.AdapterView;
+import android.widget.FrameLayout;
+import android.widget.ImageButton;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.SimpleAdapter;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.viewpager.widget.PagerAdapter;
+import androidx.viewpager.widget.ViewPager;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class FragmentTwo extends Fragment {
+
+
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View view=inflater.inflate( R.layout.activity_loginok,container,false);
+ return view;
+ }
+ ListView list;
+ TextView tv_login;
+ ImageView iM_liz,i_tb;
+ ImageButton ibu1,ibu3;
+ private LinearLayout ll_dots;
+ private TextView viewpager_tv;
+
+ // 将ViewPager定义为全局变量,方便使用.
+ private ViewPager viewpager_vp;
+
+ // 建立一个ArrayList集合.泛型指定为ImageView.
+ ArrayList imageViews = new ArrayList();
+ public void onActivityCreated(Bundle savedlnstanceState){
+ super.onActivityCreated( savedlnstanceState );
+ init();
+ ibu1=getActivity().findViewById( R.id.ibu1 );
+ ibu3=getActivity().findViewById( R.id.ibu3 );
+ list=getActivity().findViewById( R.id.list );
+ iM_liz=getActivity().findViewById( R.id.iM_liz );
+ i_tb=getActivity().findViewById( R.id.i_tb );
+ i_tb.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent=new Intent( getActivity(),MianActivityset.class );
+ startActivity( intent );
+ }
+ } );
+
+ iM_liz.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent=new Intent( getActivity(),MainActivityxqym.class );
+ startActivity( intent );
+ }
+ } );
+ //构建SimpleAdapter
+
+ String []title={"正宗极品李子","新鲜优质橘子","甘甜硬实草莓","进口速运菠萝","盆地川派西瓜","优质水生莴苣","绿色新鲜菠菜","新鲜速运茄子","优良种胡萝卜","极品丝瓜","完美蔬菜搭配"};
+ String []desc={"¥3.0元/斤","¥3.0元/斤","¥8.5元/斤","¥2.5元/斤","¥1.5元/斤","¥3.0元/斤","¥3.5元/斤","¥3.5元/斤","¥2.5元/斤","¥6.5元/斤","¥9.0元/斤"};
+ String []num={"已售1.5万件","已售1.6万件","已售1.3万件","已售1.9万件","已售2.1万件","已售1.8万件","已售3.5万件","已售0.5万件","已售3.3万件","已售2.6万件","已售1.3万件"};
+ int [] img={R.drawable.ta,R.drawable.t5,R.drawable.t3,R.drawable.t7,R.drawable.t6,R.drawable.v14,R.drawable.v13,R.drawable.v11,R.drawable.v5,R.drawable.v4,R.drawable.v7};
+ List