From 3e737e716849e08ceac8780499f0692496ebab93 Mon Sep 17 00:00:00 2001 From: zhaojiewen <2421668804@qq.com> Date: Tue, 25 Apr 2023 10:43:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E9=AA=8C=E4=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- navigation/.gitignore | 15 ++ navigation/.idea/.gitignore | 3 + navigation/.idea/compiler.xml | 6 + navigation/.idea/deploymentTargetDropDown.xml | 17 ++ navigation/.idea/gradle.xml | 19 ++ navigation/.idea/misc.xml | 10 + navigation/app/.gitignore | 1 + navigation/app/build.gradle | 40 +++ navigation/app/proguard-rules.pro | 21 ++ .../navigation/ExampleInstrumentedTest.java | 26 ++ navigation/app/src/main/AndroidManifest.xml | 35 +++ .../com/example/navigation/MainActivity.java | 79 ++++++ .../navigation/activity/CategoryActivity.java | 90 +++++++ .../navigation/activity/IndexActivity.java | 128 ++++++++++ .../navigation/activity/RegisterActivity.java | 168 +++++++++++++ .../navigation/activity/UserActivity.java | 66 +++++ .../example/navigation/adapter/Adapter.java | 69 ++++++ .../navigation/adapter/ListViewAdapter.java | 78 ++++++ .../navigation/adapter/ProductAdapter.java | 69 ++++++ .../dataoperation/OrangeDatabase.java | 67 +++++ .../example/navigation/entity/Condition.java | 30 +++ .../example/navigation/entity/OrangeUser.java | 59 +++++ .../example/navigation/entity/Product.java | 43 ++++ .../navigation/entity/ShoppingCart.java | 44 ++++ .../navigation/fragment/IndexFragment.java | 110 ++++++++ .../navigation/fragment/PearsonFragment.java | 64 +++++ .../navigation/fragment/ProductFragment.java | 117 +++++++++ .../fragment/SetDetailFragment.java | 53 ++++ .../fragment/ShoppingCartFragment.java | 61 +++++ .../navigation/netrequest/ImageOkHttp.java | 4 + .../navigation/service/TimeService.java | 82 ++++++ .../drawable-v24/ic_launcher_foreground.xml | 30 +++ .../src/main/res/drawable/activity_main.xml | 29 +++ .../app/src/main/res/drawable/address.png | Bin 0 -> 1028 bytes navigation/app/src/main/res/drawable/all.png | Bin 0 -> 1045 bytes .../app/src/main/res/drawable/apple.png | Bin 0 -> 1988 bytes .../app/src/main/res/drawable/applep.png | Bin 0 -> 8824 bytes .../app/src/main/res/drawable/arrow_down.png | Bin 0 -> 368 bytes .../app/src/main/res/drawable/arrow_left.png | Bin 0 -> 231 bytes .../app/src/main/res/drawable/arrow_right.png | Bin 0 -> 233 bytes .../src/main/res/drawable/button_login.xml | 15 ++ .../src/main/res/drawable/button_register.xml | 14 ++ navigation/app/src/main/res/drawable/cart.png | Bin 0 -> 5573 bytes .../main/res/drawable/cart_have_product.xml | 15 ++ .../src/main/res/drawable/cart_no_product.xml | 45 ++++ .../src/main/res/drawable/category_detail.xml | 16 ++ .../main/res/drawable/category_list_item.xml | 14 ++ .../res/drawable/categoty_detail_content.xml | 32 +++ .../app/src/main/res/drawable/chengzi.png | Bin 0 -> 1666 bytes navigation/app/src/main/res/drawable/city.png | Bin 0 -> 790 bytes .../app/src/main/res/drawable/cloth1.jpg | Bin 0 -> 4505 bytes .../app/src/main/res/drawable/cloth2.jpg | Bin 0 -> 6164 bytes .../app/src/main/res/drawable/cloth3.jpg | Bin 0 -> 19127 bytes .../app/src/main/res/drawable/cloth4.jpg | Bin 0 -> 5960 bytes .../app/src/main/res/drawable/cloth5.jpg | Bin 0 -> 4073 bytes .../app/src/main/res/drawable/cloth6.jpg | Bin 0 -> 5264 bytes .../app/src/main/res/drawable/cloth7.jpg | Bin 0 -> 7548 bytes .../app/src/main/res/drawable/cloth8.jpg | Bin 0 -> 5122 bytes .../main/res/drawable/content_category.xml | 29 +++ .../src/main/res/drawable/content_index.xml | 221 +++++++++++++++++ .../app/src/main/res/drawable/content_nav.xml | 119 +++++++++ .../src/main/res/drawable/content_product.xml | 27 ++ .../res/drawable/content_product_title.xml | 33 +++ .../src/main/res/drawable/content_user.xml | 234 ++++++++++++++++++ .../app/src/main/res/drawable/gouwuche.png | Bin 0 -> 23682 bytes .../res/drawable/ic_launcher_background.xml | 170 +++++++++++++ .../src/main/res/drawable/imformationimg.png | Bin 0 -> 170815 bytes .../app/src/main/res/drawable/index.png | Bin 0 -> 1272 bytes .../src/main/res/drawable/index_famous.xml | 55 ++++ .../app/src/main/res/drawable/index_menu.xml | 16 ++ navigation/app/src/main/res/drawable/juzi.png | Bin 0 -> 1898 bytes .../app/src/main/res/drawable/juzip.png | Bin 0 -> 8150 bytes .../app/src/main/res/drawable/lemon.png | Bin 0 -> 2954 bytes .../app/src/main/res/drawable/lemonp.png | Bin 0 -> 10312 bytes navigation/app/src/main/res/drawable/li.png | Bin 0 -> 1862 bytes .../app/src/main/res/drawable/loginimg.png | Bin 0 -> 796290 bytes .../app/src/main/res/drawable/mangguo.png | Bin 0 -> 2192 bytes .../app/src/main/res/drawable/orange.png | Bin 0 -> 6129 bytes .../app/src/main/res/drawable/password.png | Bin 0 -> 1462 bytes .../app/src/main/res/drawable/pearson.png | Bin 0 -> 3302 bytes .../app/src/main/res/drawable/price.png | Bin 0 -> 1047 bytes .../app/src/main/res/drawable/product.png | Bin 0 -> 1315 bytes .../res/drawable/product_condition_item.xml | 39 +++ .../app/src/main/res/drawable/registerimg.png | Bin 0 -> 2306753 bytes .../app/src/main/res/drawable/salenum.png | Bin 0 -> 1294 bytes .../app/src/main/res/drawable/search.png | Bin 0 -> 1299 bytes .../app/src/main/res/drawable/setting.png | Bin 0 -> 1101 bytes navigation/app/src/main/res/drawable/sex.png | Bin 0 -> 1509 bytes .../app/src/main/res/drawable/shangpin.png | Bin 0 -> 34083 bytes .../res/drawable/shopping_cart_product.xml | 12 + .../src/main/res/drawable/shoppingcart.png | Bin 0 -> 1155 bytes .../main/res/drawable/shoppingcart_title.xml | 32 +++ .../app/src/main/res/drawable/shouye.jpg | Bin 0 -> 8699 bytes .../app/src/main/res/drawable/shuiguo.png | Bin 0 -> 1212 bytes .../res/drawable/spinner_drop_down_shape.xml | 16 ++ .../src/main/res/drawable/sure_apssword.png | Bin 0 -> 799 bytes .../src/main/res/drawable/tab_menu_text.xml | 5 + navigation/app/src/main/res/drawable/time.png | Bin 0 -> 2219 bytes navigation/app/src/main/res/drawable/user.png | Bin 0 -> 2173 bytes .../src/main/res/drawable/user_account.png | Bin 0 -> 1045 bytes .../src/main/res/drawable/user_general.png | Bin 0 -> 402 bytes .../app/src/main/res/drawable/user_icon.png | Bin 0 -> 5995 bytes .../app/src/main/res/drawable/user_login.xml | 99 ++++++++ .../app/src/main/res/drawable/user_pay.png | Bin 0 -> 554 bytes .../src/main/res/drawable/user_register.xml | 168 +++++++++++++ .../app/src/main/res/drawable/user_sex.png | Bin 0 -> 1123 bytes .../app/src/main/res/drawable/xigua.png | Bin 0 -> 2622 bytes .../app/src/main/res/drawable/xiguap.png | Bin 0 -> 6605 bytes navigation/app/src/main/res/drawable/yifu.jpg | Bin 0 -> 1683 bytes .../app/src/main/res/drawable/youzi.png | Bin 0 -> 1798 bytes .../app/src/main/res/drawable/youzip.png | Bin 0 -> 9547 bytes .../app/src/main/res/layout/activity_main.xml | 29 +++ .../src/main/res/layout/cart_have_product.xml | 15 ++ .../src/main/res/layout/cart_no_product.xml | 45 ++++ .../src/main/res/layout/category_detail.xml | 16 ++ .../main/res/layout/category_list_item.xml | 14 ++ .../res/layout/categoty_detail_content.xml | 32 +++ .../src/main/res/layout/content_category.xml | 29 +++ .../app/src/main/res/layout/content_index.xml | 221 +++++++++++++++++ .../app/src/main/res/layout/content_nav.xml | 119 +++++++++ .../src/main/res/layout/content_product.xml | 27 ++ .../main/res/layout/content_product_title.xml | 33 +++ .../app/src/main/res/layout/content_user.xml | 234 ++++++++++++++++++ .../app/src/main/res/layout/index_famous.xml | 57 +++++ .../res/layout/product_condition_item.xml | 39 +++ .../main/res/layout/shopping_cart_product.xml | 12 + .../main/res/layout/shoppingcart_title.xml | 32 +++ .../app/src/main/res/layout/user_login.xml | 99 ++++++++ .../app/src/main/res/layout/user_register.xml | 163 ++++++++++++ .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 + .../res/mipmap-anydpi-v33/ic_launcher.xml | 6 + .../src/main/res/mipmap-hdpi/ic_launcher.webp | Bin 0 -> 1404 bytes .../res/mipmap-hdpi/ic_launcher_round.webp | Bin 0 -> 2898 bytes .../src/main/res/mipmap-mdpi/ic_launcher.webp | Bin 0 -> 982 bytes .../res/mipmap-mdpi/ic_launcher_round.webp | Bin 0 -> 1772 bytes .../main/res/mipmap-xhdpi/ic_launcher.webp | Bin 0 -> 1900 bytes .../res/mipmap-xhdpi/ic_launcher_round.webp | Bin 0 -> 3918 bytes .../main/res/mipmap-xxhdpi/ic_launcher.webp | Bin 0 -> 2884 bytes .../res/mipmap-xxhdpi/ic_launcher_round.webp | Bin 0 -> 5914 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin 0 -> 3844 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin 0 -> 7778 bytes .../app/src/main/res/values-night/themes.xml | 16 ++ navigation/app/src/main/res/values/colors.xml | 10 + .../app/src/main/res/values/strings.xml | 3 + navigation/app/src/main/res/values/themes.xml | 16 ++ .../app/src/main/res/xml/backup_rules.xml | 13 + .../main/res/xml/data_extraction_rules.xml | 19 ++ .../example/navigation/ExampleUnitTest.java | 17 ++ navigation/build.gradle | 5 + navigation/gradle.properties | 21 ++ navigation/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59203 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + navigation/gradlew | 185 ++++++++++++++ navigation/gradlew.bat | 89 +++++++ navigation/settings.gradle | 21 ++ 156 files changed, 4812 insertions(+) create mode 100644 navigation/.gitignore create mode 100644 navigation/.idea/.gitignore create mode 100644 navigation/.idea/compiler.xml create mode 100644 navigation/.idea/deploymentTargetDropDown.xml create mode 100644 navigation/.idea/gradle.xml create mode 100644 navigation/.idea/misc.xml create mode 100644 navigation/app/.gitignore create mode 100644 navigation/app/build.gradle create mode 100644 navigation/app/proguard-rules.pro create mode 100644 navigation/app/src/androidTest/java/com/example/navigation/ExampleInstrumentedTest.java create mode 100644 navigation/app/src/main/AndroidManifest.xml create mode 100644 navigation/app/src/main/java/com/example/navigation/MainActivity.java create mode 100644 navigation/app/src/main/java/com/example/navigation/activity/CategoryActivity.java create mode 100644 navigation/app/src/main/java/com/example/navigation/activity/IndexActivity.java create mode 100644 navigation/app/src/main/java/com/example/navigation/activity/RegisterActivity.java create mode 100644 navigation/app/src/main/java/com/example/navigation/activity/UserActivity.java create mode 100644 navigation/app/src/main/java/com/example/navigation/adapter/Adapter.java create mode 100644 navigation/app/src/main/java/com/example/navigation/adapter/ListViewAdapter.java create mode 100644 navigation/app/src/main/java/com/example/navigation/adapter/ProductAdapter.java create mode 100644 navigation/app/src/main/java/com/example/navigation/dataoperation/OrangeDatabase.java create mode 100644 navigation/app/src/main/java/com/example/navigation/entity/Condition.java create mode 100644 navigation/app/src/main/java/com/example/navigation/entity/OrangeUser.java create mode 100644 navigation/app/src/main/java/com/example/navigation/entity/Product.java create mode 100644 navigation/app/src/main/java/com/example/navigation/entity/ShoppingCart.java create mode 100644 navigation/app/src/main/java/com/example/navigation/fragment/IndexFragment.java create mode 100644 navigation/app/src/main/java/com/example/navigation/fragment/PearsonFragment.java create mode 100644 navigation/app/src/main/java/com/example/navigation/fragment/ProductFragment.java create mode 100644 navigation/app/src/main/java/com/example/navigation/fragment/SetDetailFragment.java create mode 100644 navigation/app/src/main/java/com/example/navigation/fragment/ShoppingCartFragment.java create mode 100644 navigation/app/src/main/java/com/example/navigation/netrequest/ImageOkHttp.java create mode 100644 navigation/app/src/main/java/com/example/navigation/service/TimeService.java create mode 100644 navigation/app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 navigation/app/src/main/res/drawable/activity_main.xml create mode 100644 navigation/app/src/main/res/drawable/address.png create mode 100644 navigation/app/src/main/res/drawable/all.png create mode 100644 navigation/app/src/main/res/drawable/apple.png create mode 100644 navigation/app/src/main/res/drawable/applep.png create mode 100644 navigation/app/src/main/res/drawable/arrow_down.png create mode 100644 navigation/app/src/main/res/drawable/arrow_left.png create mode 100644 navigation/app/src/main/res/drawable/arrow_right.png create mode 100644 navigation/app/src/main/res/drawable/button_login.xml create mode 100644 navigation/app/src/main/res/drawable/button_register.xml create mode 100644 navigation/app/src/main/res/drawable/cart.png create mode 100644 navigation/app/src/main/res/drawable/cart_have_product.xml create mode 100644 navigation/app/src/main/res/drawable/cart_no_product.xml create mode 100644 navigation/app/src/main/res/drawable/category_detail.xml create mode 100644 navigation/app/src/main/res/drawable/category_list_item.xml create mode 100644 navigation/app/src/main/res/drawable/categoty_detail_content.xml create mode 100644 navigation/app/src/main/res/drawable/chengzi.png create mode 100644 navigation/app/src/main/res/drawable/city.png create mode 100644 navigation/app/src/main/res/drawable/cloth1.jpg create mode 100644 navigation/app/src/main/res/drawable/cloth2.jpg create mode 100644 navigation/app/src/main/res/drawable/cloth3.jpg create mode 100644 navigation/app/src/main/res/drawable/cloth4.jpg create mode 100644 navigation/app/src/main/res/drawable/cloth5.jpg create mode 100644 navigation/app/src/main/res/drawable/cloth6.jpg create mode 100644 navigation/app/src/main/res/drawable/cloth7.jpg create mode 100644 navigation/app/src/main/res/drawable/cloth8.jpg create mode 100644 navigation/app/src/main/res/drawable/content_category.xml create mode 100644 navigation/app/src/main/res/drawable/content_index.xml create mode 100644 navigation/app/src/main/res/drawable/content_nav.xml create mode 100644 navigation/app/src/main/res/drawable/content_product.xml create mode 100644 navigation/app/src/main/res/drawable/content_product_title.xml create mode 100644 navigation/app/src/main/res/drawable/content_user.xml create mode 100644 navigation/app/src/main/res/drawable/gouwuche.png create mode 100644 navigation/app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 navigation/app/src/main/res/drawable/imformationimg.png create mode 100644 navigation/app/src/main/res/drawable/index.png create mode 100644 navigation/app/src/main/res/drawable/index_famous.xml create mode 100644 navigation/app/src/main/res/drawable/index_menu.xml create mode 100644 navigation/app/src/main/res/drawable/juzi.png create mode 100644 navigation/app/src/main/res/drawable/juzip.png create mode 100644 navigation/app/src/main/res/drawable/lemon.png create mode 100644 navigation/app/src/main/res/drawable/lemonp.png create mode 100644 navigation/app/src/main/res/drawable/li.png create mode 100644 navigation/app/src/main/res/drawable/loginimg.png create mode 100644 navigation/app/src/main/res/drawable/mangguo.png create mode 100644 navigation/app/src/main/res/drawable/orange.png create mode 100644 navigation/app/src/main/res/drawable/password.png create mode 100644 navigation/app/src/main/res/drawable/pearson.png create mode 100644 navigation/app/src/main/res/drawable/price.png create mode 100644 navigation/app/src/main/res/drawable/product.png create mode 100644 navigation/app/src/main/res/drawable/product_condition_item.xml create mode 100644 navigation/app/src/main/res/drawable/registerimg.png create mode 100644 navigation/app/src/main/res/drawable/salenum.png create mode 100644 navigation/app/src/main/res/drawable/search.png create mode 100644 navigation/app/src/main/res/drawable/setting.png create mode 100644 navigation/app/src/main/res/drawable/sex.png create mode 100644 navigation/app/src/main/res/drawable/shangpin.png create mode 100644 navigation/app/src/main/res/drawable/shopping_cart_product.xml create mode 100644 navigation/app/src/main/res/drawable/shoppingcart.png create mode 100644 navigation/app/src/main/res/drawable/shoppingcart_title.xml create mode 100644 navigation/app/src/main/res/drawable/shouye.jpg create mode 100644 navigation/app/src/main/res/drawable/shuiguo.png create mode 100644 navigation/app/src/main/res/drawable/spinner_drop_down_shape.xml create mode 100644 navigation/app/src/main/res/drawable/sure_apssword.png create mode 100644 navigation/app/src/main/res/drawable/tab_menu_text.xml create mode 100644 navigation/app/src/main/res/drawable/time.png create mode 100644 navigation/app/src/main/res/drawable/user.png create mode 100644 navigation/app/src/main/res/drawable/user_account.png create mode 100644 navigation/app/src/main/res/drawable/user_general.png create mode 100644 navigation/app/src/main/res/drawable/user_icon.png create mode 100644 navigation/app/src/main/res/drawable/user_login.xml create mode 100644 navigation/app/src/main/res/drawable/user_pay.png create mode 100644 navigation/app/src/main/res/drawable/user_register.xml create mode 100644 navigation/app/src/main/res/drawable/user_sex.png create mode 100644 navigation/app/src/main/res/drawable/xigua.png create mode 100644 navigation/app/src/main/res/drawable/xiguap.png create mode 100644 navigation/app/src/main/res/drawable/yifu.jpg create mode 100644 navigation/app/src/main/res/drawable/youzi.png create mode 100644 navigation/app/src/main/res/drawable/youzip.png create mode 100644 navigation/app/src/main/res/layout/activity_main.xml create mode 100644 navigation/app/src/main/res/layout/cart_have_product.xml create mode 100644 navigation/app/src/main/res/layout/cart_no_product.xml create mode 100644 navigation/app/src/main/res/layout/category_detail.xml create mode 100644 navigation/app/src/main/res/layout/category_list_item.xml create mode 100644 navigation/app/src/main/res/layout/categoty_detail_content.xml create mode 100644 navigation/app/src/main/res/layout/content_category.xml create mode 100644 navigation/app/src/main/res/layout/content_index.xml create mode 100644 navigation/app/src/main/res/layout/content_nav.xml create mode 100644 navigation/app/src/main/res/layout/content_product.xml create mode 100644 navigation/app/src/main/res/layout/content_product_title.xml create mode 100644 navigation/app/src/main/res/layout/content_user.xml create mode 100644 navigation/app/src/main/res/layout/index_famous.xml create mode 100644 navigation/app/src/main/res/layout/product_condition_item.xml create mode 100644 navigation/app/src/main/res/layout/shopping_cart_product.xml create mode 100644 navigation/app/src/main/res/layout/shoppingcart_title.xml create mode 100644 navigation/app/src/main/res/layout/user_login.xml create mode 100644 navigation/app/src/main/res/layout/user_register.xml create mode 100644 navigation/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 navigation/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 navigation/app/src/main/res/mipmap-anydpi-v33/ic_launcher.xml create mode 100644 navigation/app/src/main/res/mipmap-hdpi/ic_launcher.webp create mode 100644 navigation/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp create mode 100644 navigation/app/src/main/res/mipmap-mdpi/ic_launcher.webp create mode 100644 navigation/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp create mode 100644 navigation/app/src/main/res/mipmap-xhdpi/ic_launcher.webp create mode 100644 navigation/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp create mode 100644 navigation/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp create mode 100644 navigation/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp create mode 100644 navigation/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp create mode 100644 navigation/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp create mode 100644 navigation/app/src/main/res/values-night/themes.xml create mode 100644 navigation/app/src/main/res/values/colors.xml create mode 100644 navigation/app/src/main/res/values/strings.xml create mode 100644 navigation/app/src/main/res/values/themes.xml create mode 100644 navigation/app/src/main/res/xml/backup_rules.xml create mode 100644 navigation/app/src/main/res/xml/data_extraction_rules.xml create mode 100644 navigation/app/src/test/java/com/example/navigation/ExampleUnitTest.java create mode 100644 navigation/build.gradle create mode 100644 navigation/gradle.properties create mode 100644 navigation/gradle/wrapper/gradle-wrapper.jar create mode 100644 navigation/gradle/wrapper/gradle-wrapper.properties create mode 100644 navigation/gradlew create mode 100644 navigation/gradlew.bat create mode 100644 navigation/settings.gradle diff --git a/navigation/.gitignore b/navigation/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/navigation/.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/navigation/.idea/.gitignore b/navigation/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/navigation/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/navigation/.idea/compiler.xml b/navigation/.idea/compiler.xml new file mode 100644 index 0000000..fb7f4a8 --- /dev/null +++ b/navigation/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/navigation/.idea/deploymentTargetDropDown.xml b/navigation/.idea/deploymentTargetDropDown.xml new file mode 100644 index 0000000..5f9df6d --- /dev/null +++ b/navigation/.idea/deploymentTargetDropDown.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/navigation/.idea/gradle.xml b/navigation/.idea/gradle.xml new file mode 100644 index 0000000..a2d7c21 --- /dev/null +++ b/navigation/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/navigation/.idea/misc.xml b/navigation/.idea/misc.xml new file mode 100644 index 0000000..bdd9278 --- /dev/null +++ b/navigation/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/navigation/app/.gitignore b/navigation/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/navigation/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/navigation/app/build.gradle b/navigation/app/build.gradle new file mode 100644 index 0000000..a77fe9f --- /dev/null +++ b/navigation/app/build.gradle @@ -0,0 +1,40 @@ +plugins { + id 'com.android.application' +} + +android { + namespace 'com.example.navigation' + compileSdk 33 + + defaultConfig { + applicationId "com.example.navigation" + minSdk 24 + targetSdk 33 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.4.1' + implementation 'com.google.android.material:material:1.5.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.3' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + implementation 'liji.library.dev:citypickerview:1.1.0' +} \ No newline at end of file diff --git a/navigation/app/proguard-rules.pro b/navigation/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/navigation/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/navigation/app/src/androidTest/java/com/example/navigation/ExampleInstrumentedTest.java b/navigation/app/src/androidTest/java/com/example/navigation/ExampleInstrumentedTest.java new file mode 100644 index 0000000..650d8d0 --- /dev/null +++ b/navigation/app/src/androidTest/java/com/example/navigation/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.navigation; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.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.getInstrumentation().getTargetContext(); + assertEquals("com.example.navigation", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/navigation/app/src/main/AndroidManifest.xml b/navigation/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a3ce6f0 --- /dev/null +++ b/navigation/app/src/main/AndroidManifest.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/navigation/app/src/main/java/com/example/navigation/MainActivity.java b/navigation/app/src/main/java/com/example/navigation/MainActivity.java new file mode 100644 index 0000000..8089b69 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/MainActivity.java @@ -0,0 +1,79 @@ +package com.example.navigation; + +import android.content.Intent; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; + +import androidx.appcompat.app.AppCompatActivity; + +import com.example.navigation.activity.IndexActivity; +import com.example.navigation.activity.RegisterActivity; +import com.example.navigation.dataoperation.OrangeDatabase; + +public class MainActivity extends AppCompatActivity implements View.OnClickListener { + private Button registerButton, loginButton; + private EditText usernameText, paswdEdit; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.user_login); + init(); + } + + @Override + public void onClick(View v) { + switch (v.getId()) { + case R.id.register: + Intent intent = new Intent(MainActivity.this, RegisterActivity.class); + startActivity(intent); + break; + case R.id.login: + //注册时,我们引入了数据库,登录这里可以通过数据库进行验证,验证跳转到首页,不通过进行提示 + if (validateLogin()) { + Intent intent1 = new Intent(MainActivity.this, IndexActivity.class); + Bundle bundle = new Bundle(); + OrangeDatabase orangeDatabase = new OrangeDatabase(MainActivity.this); + bundle.putString("username", usernameText.getText().toString()); + bundle = orangeDatabase.queryUserInfo(orangeDatabase.getReadableDatabase(), bundle); + intent1.putExtras(bundle); + startActivity(intent1); + } else { + Toast.makeText(MainActivity.this, "账号或者密码错误", Toast.LENGTH_SHORT).show(); + } + break; + } + } + + //界面组件初始化 + private void init() { + usernameText = findViewById(R.id.username); + paswdEdit = findViewById(R.id.password); + loginButton = findViewById(R.id.login); + loginButton.setOnClickListener(this); + registerButton = findViewById(R.id.register); + registerButton.setOnClickListener(this); + } + + /** + * 登录验证 + * + * @return + */ + private boolean validateLogin() { + String username = usernameText.getText().toString(); + String password = paswdEdit.getText().toString(); + OrangeDatabase orangeDatabase = new OrangeDatabase(MainActivity.this); + SQLiteDatabase sqLiteDatabase = orangeDatabase.getReadableDatabase(); + Cursor cursor = sqLiteDatabase.rawQuery("select * from orange_user where username=? and password=?", new String[]{username, password}); + if (cursor.getCount() > 0) { + return true; + } + return false; + } +} diff --git a/navigation/app/src/main/java/com/example/navigation/activity/CategoryActivity.java b/navigation/app/src/main/java/com/example/navigation/activity/CategoryActivity.java new file mode 100644 index 0000000..010eb13 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/activity/CategoryActivity.java @@ -0,0 +1,90 @@ +package com.example.navigation.activity; + +import android.app.Activity; +import android.app.FragmentManager; +import android.app.FragmentTransaction; +import android.os.Bundle; +import android.widget.ListView; + +import androidx.annotation.Nullable; + +import com.example.navigation.R; +import com.example.navigation.adapter.Adapter; +import com.example.navigation.entity.Product; +import com.example.navigation.fragment.SetDetailFragment; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + + +public class CategoryActivity extends Activity { + public OnChangeListener onchangedListener; + private List productList; + private List productCategory = new ArrayList<>(); + private ListView titleList; + private Adapter adapter; + + @Override + public void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.content_category); + initData(); + init(); + SetDetailFragment fragment = new SetDetailFragment(); + FragmentManager fragmentManager = getFragmentManager(); + FragmentTransaction transaction = fragmentManager.beginTransaction(); + transaction.replace(R.id.category_detail, fragment); + transaction.commit(); + titleList.setOnItemClickListener((parent, view, position, id) -> { + adapter.setSelectedPosition(position); + adapter.notifyDataSetInvalidated(); + if (onchangedListener != null) { + onchangedListener.changeText(productList.get(position)); + } + }); + + } + + public void setOnChangeListener(OnChangeListener onChangeListener) { + this.onchangedListener = onChangeListener; + } + + public interface OnChangeListener { + void changeText(Product product); + } + + /** + * 初始化数据 + */ + private void initData() { + productList = new ArrayList<>(); + productCategory.add("橘子"); + productCategory.add("橙子"); + productCategory.add("柚子"); + Product product = new Product(); + product.setImageUrlId(R.drawable.arrow_down); + product.setProductName("橘子"); + product.setProductPrice(new BigDecimal("9.9")); + Product product1 = new Product(); + product1.setImageUrlId(R.drawable.orange); + product1.setProductName("橙子"); + product1.setProductPrice(new BigDecimal("29.9")); + Product product2 = new Product(); + product2.setImageUrlId(R.drawable.arrow_left); + product2.setProductName("柚子"); + product2.setProductPrice(new BigDecimal("19.9")); + productList.add(product); + productList.add(product1); + productList.add(product2); + } + + /** + * 初始化组件 + */ + private void init() { + titleList = findViewById(R.id.category_title_list); + adapter = new Adapter(productCategory, CategoryActivity.this); + titleList.setAdapter(adapter); + } +} \ No newline at end of file diff --git a/navigation/app/src/main/java/com/example/navigation/activity/IndexActivity.java b/navigation/app/src/main/java/com/example/navigation/activity/IndexActivity.java new file mode 100644 index 0000000..03017f8 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/activity/IndexActivity.java @@ -0,0 +1,128 @@ +package com.example.navigation.activity; + +import android.app.Activity; +import android.app.FragmentTransaction; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.LinearLayout; + +import androidx.annotation.Nullable; + +import com.example.navigation.R; +import com.example.navigation.fragment.IndexFragment; +import com.example.navigation.fragment.PearsonFragment; +import com.example.navigation.fragment.ProductFragment; +import com.example.navigation.fragment.ShoppingCartFragment; +import com.example.navigation.service.TimeService; + +public class IndexActivity extends Activity implements View.OnClickListener { + private IndexFragment indexFragment; + private ProductFragment productFragment; + private ShoppingCartFragment shoppingCartFragment; + private PearsonFragment pearsonFragment; + private LinearLayout indexLine, productLine, shoppingCartLine, pearsonLine; + + @Override + public void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + init(); + initIndexFragment(); + Thread thread = new Thread(runnable); + thread.start(); + } + + /** + * 组件初始化 + */ + private void init() { + indexLine = findViewById(R.id.content_index); + indexLine.setOnClickListener(this); + productLine = findViewById(R.id.content_product); + productLine.setOnClickListener(this); + shoppingCartLine = findViewById(R.id.content_cart); + shoppingCartLine.setOnClickListener(this); + pearsonLine = findViewById(R.id.content_pearson); + pearsonLine.setOnClickListener(this); + } + + @Override + public void onClick(View v) { + switch (v.getId()) { + case R.id.content_index: + initIndexFragment(); + break; + case R.id.content_product: + initproductFragment(); + break; + case R.id.content_cart: + initshoppingCartFragment(); + break; + case R.id.content_pearson: + initpearsonFragment(); + break; + } + } + + /** + * 初始化首页Fragment + */ + private void initIndexFragment() { + //开启事务,fragment的控制是由事务来实现的 + FragmentTransaction transaction = getFragmentManager().beginTransaction(); + if (indexFragment == null) { + indexFragment = new IndexFragment(); + } + transaction.replace(R.id.main_content, indexFragment); + transaction.commit(); + } + + /** + * 初始化产品Fragment + */ + private void initproductFragment() { + //开启事务,fragment的控制是由事务来实现的 + FragmentTransaction transaction = getFragmentManager().beginTransaction(); + if (productFragment == null) { + productFragment = new ProductFragment(); + } + transaction.replace(R.id.main_content, productFragment); + transaction.commit(); + } + + /** + * 初始化购物车Fragment + */ + private void initshoppingCartFragment() { + //开启事务,fragment的控制是由事务来实现的 + FragmentTransaction transaction = getFragmentManager().beginTransaction(); + if (shoppingCartFragment == null) { + shoppingCartFragment = new ShoppingCartFragment(); + } + transaction.replace(R.id.main_content, shoppingCartFragment); + transaction.commit(); + } + + /** + * 初始化个人Fragment + */ + private void initpearsonFragment() { + //开启事务,fragment的控制是由事务来实现的 + FragmentTransaction transaction = getFragmentManager().beginTransaction(); + if (pearsonFragment == null) { + Intent intent = IndexActivity.this.getIntent(); + Bundle bundle = intent.getExtras(); + pearsonFragment = new PearsonFragment(); + pearsonFragment.setArguments(bundle); + } + transaction.replace(R.id.main_content, pearsonFragment); + transaction.commit(); + } + + Runnable runnable = () -> { + Intent intent = new Intent(IndexActivity.this, TimeService.class); + startService(intent); + }; + +} diff --git a/navigation/app/src/main/java/com/example/navigation/activity/RegisterActivity.java b/navigation/app/src/main/java/com/example/navigation/activity/RegisterActivity.java new file mode 100644 index 0000000..862e7de --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/activity/RegisterActivity.java @@ -0,0 +1,168 @@ +package com.example.navigation.activity; + +import android.content.ContentValues; +import android.content.Intent; +import android.database.sqlite.SQLiteDatabase; +import android.graphics.Color; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.RadioGroup; +import android.widget.TextView; +import android.widget.Toast; + +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; + +import com.lljjcoder.citypickerview.widget.CityPicker; +import com.example.navigation.R; +import com.example.navigation.dataoperation.OrangeDatabase; + +public class RegisterActivity extends AppCompatActivity implements View.OnClickListener, RadioGroup.OnCheckedChangeListener { + private EditText usernameEdit, passwordEdit, surePasswordEdit; + private TextView cityText; + private CityPicker cityPicker; + private Button regButton; + private RadioGroup sexGroup; + private String sexStr = "男"; + + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.user_register); + init(); + } + + /** + * 界面组件初始化 + */ + private void init() { + cityText = findViewById(R.id.reg_province); + cityText.setOnClickListener(this); + usernameEdit = findViewById(R.id.reg_username); + passwordEdit = findViewById(R.id.reg_password); + surePasswordEdit = findViewById(R.id.reg_sure_password); + regButton = findViewById(R.id.reg_register); + regButton.setOnClickListener(this); + sexGroup = findViewById(R.id.sex); + sexGroup.setOnCheckedChangeListener(this); + + } + + @Override + public void onClick(View v) { + switch (v.getId()) { + case R.id.reg_province: + initCityPicker(); + cityPicker.show(); + break; + case R.id.reg_register: + //注册验证方法 + validateRegister(); + break; + + } + } + + /** + * 初始化城市选择器 + */ + public void initCityPicker() { + cityPicker = new CityPicker.Builder(RegisterActivity.this) + .textSize(16) + .title("地址选择") + .backgroundPop(0xa0000000) + .titleBackgroundColor("#EFB81C") + .titleTextColor("#000000") + .backgroundPop(0xa0000000) + .confirTextColor("#000000") + .cancelTextColor("#000000") + .province("江西省") + .city("赣州市") + .district("章贡区") + .textColor(Color.parseColor("#000000")) + .provinceCyclic(true) + .cityCyclic(false) + .districtCyclic(false) + .visibleItemsCount(7) + .itemPadding(10) + .onlyShowProvinceAndCity(false) + .build(); + cityPicker.setOnCityItemClickListener(new CityPicker.OnCityItemClickListener() { + @Override + public void onSelected(String... strings) { + String province = strings[0]; + String city = strings[1]; + String district = strings[2]; + cityText.setText(String.format("%s %s %s", province, city, district)); + } + + @Override + public void onCancel() { + } + }); + + } + + /** + * 注册验证 + */ + public void validateRegister() { + String username = usernameEdit.getText().toString(); + String password = passwordEdit.getText().toString(); + String surePassword = surePasswordEdit.getText().toString(); + String city = cityText.getText().toString(); + //判断两次密码是否输入一致 + if (password.equals(surePassword)) { + //这里也可以再进行其它的验证,如是否符合要求等,符合就进行插入数据库操作 + if (!username.equals("") || !password.equals("")) { + if (!city.equals("")) { + Bundle bundle = new Bundle(); + bundle.putString("username", username); + bundle.putString("password", password); + bundle.putString("sex", sexStr); + bundle.putString("city", city); + //本节将使用安卓自身带的SQLite数据库的方式存储注册的信息(之前直接传输显示在界面是的方式) + OrangeDatabase orangeDatabase = new OrangeDatabase(RegisterActivity.this); + SQLiteDatabase sqLiteDatabase = orangeDatabase.getWritableDatabase(); + insertData(sqLiteDatabase, bundle); + Intent intent = new Intent(RegisterActivity.this, IndexActivity.class); + intent.putExtras(bundle); + startActivity(intent); + } else { + Toast.makeText(RegisterActivity.this, "请选择地址", Toast.LENGTH_SHORT).show(); + } + } else { + Toast.makeText(RegisterActivity.this, "账号或密码未填写", Toast.LENGTH_SHORT).show(); + } + } else { + Toast.makeText(RegisterActivity.this, "两次密码输入不一致", Toast.LENGTH_SHORT).show(); + } + + + } + + @Override + public void onCheckedChanged(RadioGroup group, int checkedId) { + //根据用户选择来改变sex的值 + sexStr = checkedId == R.id.reg_man ? "男" : "女"; + } + + /** + * 插入数据库的值 + * + * @param sqLiteDatabase + * @param bundle + */ + private void insertData(SQLiteDatabase sqLiteDatabase, Bundle bundle) { + ContentValues contentValues = new ContentValues(); + contentValues.put("username", bundle.getString("username")); + contentValues.put("password", bundle.getString("password")); + contentValues.put("sex", bundle.getString("sex")); + contentValues.put("city", bundle.getString("city")); + sqLiteDatabase.insert("orange_user", null, contentValues); + sqLiteDatabase.close(); + } +} diff --git a/navigation/app/src/main/java/com/example/navigation/activity/UserActivity.java b/navigation/app/src/main/java/com/example/navigation/activity/UserActivity.java new file mode 100644 index 0000000..32e7f15 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/activity/UserActivity.java @@ -0,0 +1,66 @@ +package com.example.navigation.activity; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; + +import androidx.annotation.Nullable; + +import com.example.navigation.R; + +public class UserActivity extends Activity implements View.OnClickListener { + private ImageView userIconImage; + private TextView usernameText, userSexText, userCityText; + private LinearLayout usernameLine, userSexline, userCityLine, userPayLine, userSettingLine, userGeneralLine, userSearchProductLine; + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.content_user); + init(); + } + + /** + * 组件初始化 + */ + private void init() { + userIconImage = findViewById(R.id.user_icon); + usernameText = findViewById(R.id.user_username); + userSexText = findViewById(R.id.user_sex); + userCityText = findViewById(R.id.user_city); + usernameLine = findViewById(R.id.user_username_line); + userSexline = findViewById(R.id.user_sex_line); + userCityLine = findViewById(R.id.user_city_line); + userPayLine = findViewById(R.id.user_pay); + userSettingLine = findViewById(R.id.user_setting); + userGeneralLine = findViewById(R.id.user_general); +// userSearchProductLine = findViewById(R.id.user_searchProduct); + userSearchProductLine.setOnClickListener(this); + setData(); + } + + /** + * 组件赋值 + */ + private void setData() { + Intent intent = UserActivity.this.getIntent(); + Bundle bundle = intent.getExtras(); + usernameText.setText(String.format("用户名:%s", bundle.getString("username"))); + userSexText.setText(String.format("性别:%s", bundle.getString("sex"))); + userCityText.setText(String.format("城市:%s", bundle.getString("city"))); + } + + @Override + public void onClick(View v) { + switch (v.getId()) { + /*case R.id.user_searchProduct: + Intent intent1 = new Intent(UserActivity.this, CategoryActivity.class); + startActivity(intent1); + break;*/ + } + } +} diff --git a/navigation/app/src/main/java/com/example/navigation/adapter/Adapter.java b/navigation/app/src/main/java/com/example/navigation/adapter/Adapter.java new file mode 100644 index 0000000..f9ff4b4 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/adapter/Adapter.java @@ -0,0 +1,69 @@ +package com.example.navigation.adapter; + +import android.content.Context; +import android.graphics.Color; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.TextView; + +import com.example.navigation.R; + +import java.util.List; + +public class Adapter extends BaseAdapter { + private List productCategory; + private LayoutInflater layoutInflater; + private int selectionPosition = -1; + + public Adapter(List productCategory, Context context) { + this.productCategory = productCategory; + this.layoutInflater = LayoutInflater.from(context); + } + + @Override + public int getCount() { + return productCategory.size(); + } + + @Override + public Object getItem(int position) { + return productCategory.get(position); + } + + @Override + public long getItemId(int position) { + return position; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + ViewHolder viewHolder = null; + if (convertView == null) { + viewHolder = new ViewHolder(); + convertView = layoutInflater.inflate(R.layout.category_list_item, null); + Log.i("adapts", "getView: " + convertView); + viewHolder.tv = convertView.findViewById(R.id.categor_titles); + convertView.setTag(viewHolder); + } else { + viewHolder = (ViewHolder) convertView.getTag(); + } + viewHolder.tv.setText(productCategory.get(position)); + if (selectionPosition == position) { + viewHolder.tv.setBackgroundColor(Color.YELLOW); + } else { + viewHolder.tv.setBackgroundColor(Color.WHITE); + } + return convertView; + } + + public void setSelectedPosition(int position) { + this.selectionPosition = position; + } + + class ViewHolder { + TextView tv; + } +} diff --git a/navigation/app/src/main/java/com/example/navigation/adapter/ListViewAdapter.java b/navigation/app/src/main/java/com/example/navigation/adapter/ListViewAdapter.java new file mode 100644 index 0000000..1be2a69 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/adapter/ListViewAdapter.java @@ -0,0 +1,78 @@ +package com.example.navigation.adapter; + +import android.content.Context; +import android.graphics.Color; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; + +import com.example.navigation.R; +import com.example.navigation.entity.Condition; + +import java.util.List; + +public class ListViewAdapter extends BaseAdapter { + private List conditionList; + private LayoutInflater layoutInflater; + private int selectedPosition = -1; + private int selectColor = Color.GRAY; + + public ListViewAdapter(Context context, List conditionList) { + this.conditionList = conditionList; + this.layoutInflater = LayoutInflater.from(context); + } + + @Override + public int getCount() { + return conditionList.size(); + } + + @Override + public Object getItem(int position) { + return conditionList.get(position); + } + + @Override + public long getItemId(int position) { + return position; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + ViewHolder viewHolder; + if (convertView == null) { + convertView = layoutInflater.inflate(R.layout.product_condition_item, null); + viewHolder = new ViewHolder(); + viewHolder.imageView = convertView.findViewById(R.id.condition_icon); + viewHolder.jiange = convertView.findViewById(R.id.image_jiange); + viewHolder.textView = convertView.findViewById(R.id.condition_name); + viewHolder.linearLayout = convertView.findViewById(R.id.item_bg); + convertView.setTag(viewHolder); + } else { + viewHolder = (ViewHolder) convertView.getTag(); + } + Condition condition = conditionList.get(position); + if (condition != null) { + viewHolder.imageView.setBackgroundResource(condition.getConditionIcon()); + viewHolder.textView.setText(condition.getConditionName()); + viewHolder.jiange.setBackgroundColor(Color.rgb(207, 207, 207)); + if (selectedPosition == position) { + viewHolder.linearLayout.setBackgroundColor(selectColor); + } + + } + return convertView; + } + + class ViewHolder { + ImageView imageView, jiange; + TextView textView; + LinearLayout linearLayout; + } + + +} diff --git a/navigation/app/src/main/java/com/example/navigation/adapter/ProductAdapter.java b/navigation/app/src/main/java/com/example/navigation/adapter/ProductAdapter.java new file mode 100644 index 0000000..223e4b5 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/adapter/ProductAdapter.java @@ -0,0 +1,69 @@ +package com.example.navigation.adapter; + +import android.content.Context; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.ImageView; +import android.widget.TextView; + +import com.example.navigation.R; +import com.example.navigation.entity.Product; + +import java.util.List; + +public class ProductAdapter extends BaseAdapter { + private List productList; + private LayoutInflater layoutInflater; + + public ProductAdapter(Context context, List productList) { + this.productList = productList; + this.layoutInflater = LayoutInflater.from(context); + } + + @Override + public int getCount() { + return productList.size(); + } + + @Override + public Object getItem(int position) { + return productList.get(position); + } + + @Override + public long getItemId(int position) { + return position; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + ViewHolder viewHolder; + if (convertView == null) { + Log.i("aa", "getView: "+"aa"); + convertView = layoutInflater.inflate(R.layout.categoty_detail_content, null); + viewHolder = new ViewHolder(); + viewHolder.productImage = convertView.findViewById(R.id.category_product_image); + viewHolder.productName = convertView.findViewById(R.id.category_product_name); + viewHolder.productPrice = convertView.findViewById(R.id.category_product_price); + convertView.setTag(viewHolder); + } else { + viewHolder = (ViewHolder) convertView.getTag(); + } + Product product = productList.get(position); + Log.i("product", "getView: "+product.toString()); + if (product != null) { + viewHolder.productImage.setBackgroundResource(product.getImageUrlId()); + viewHolder.productName.setText(product.getProductName()); + viewHolder.productPrice.setText(String.valueOf(product.getProductPrice())); + } + return convertView; + } + + class ViewHolder { + ImageView productImage; + TextView productName, productPrice; + } +} diff --git a/navigation/app/src/main/java/com/example/navigation/dataoperation/OrangeDatabase.java b/navigation/app/src/main/java/com/example/navigation/dataoperation/OrangeDatabase.java new file mode 100644 index 0000000..f0b9c27 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/dataoperation/OrangeDatabase.java @@ -0,0 +1,67 @@ +package com.example.navigation.dataoperation; + +import android.content.ContentValues; +import android.content.Context; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteOpenHelper; +import android.os.Bundle; + +import androidx.annotation.Nullable; +public class OrangeDatabase extends SQLiteOpenHelper { + public OrangeDatabase(@Nullable Context context) { + super(context, "orange", null, 1); + } + + @Override + public void onCreate(SQLiteDatabase db) { + //创建用户表 + String sql = "create table orange_user(id integer primary key autoincrement, username varchar(50), password varchar(50),sex varchar(10),city carchar(50))"; + db.execSQL(sql); + } + + @Override + public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { + + } + + /** + * 插入数据 + * + * @param sqLiteDatabase + * @param username + * @param password + * @param sex + * @param city + */ + public void insertUser(SQLiteDatabase sqLiteDatabase, String username, String password, String sex, String city) { + ContentValues contentValues = new ContentValues(); + contentValues.put("username", username); + contentValues.put("password", password); + contentValues.put("sex", sex); + contentValues.put("city", city); + sqLiteDatabase.insert("orange_user", null, contentValues); + sqLiteDatabase.close(); + } + + /** + * 查询数据 + * + * @param sqLiteDatabase + * @param bundle + * @return + */ + public Bundle queryUserInfo(SQLiteDatabase sqLiteDatabase, Bundle bundle) { + String username = bundle.getString("username"); + Cursor cursor = sqLiteDatabase.rawQuery("select * from orange_user where username=?", new String[]{username}); + if (cursor != null) { + while (cursor.moveToNext()) { + bundle.putString("sex", cursor.getString(3)); + bundle.putString("city", cursor.getString(4)); + } + } + cursor.close(); + sqLiteDatabase.close(); + return bundle; + } +} diff --git a/navigation/app/src/main/java/com/example/navigation/entity/Condition.java b/navigation/app/src/main/java/com/example/navigation/entity/Condition.java new file mode 100644 index 0000000..93ef808 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/entity/Condition.java @@ -0,0 +1,30 @@ +package com.example.navigation.entity; + +public class Condition { + private Integer conditionIcon; + private String conditionName; + + public Integer getConditionIcon() { + return conditionIcon; + } + + public void setConditionIcon(Integer conditionIcon) { + this.conditionIcon = conditionIcon; + } + + public String getConditionName() { + return conditionName; + } + + public void setConditionName(String conditionName) { + this.conditionName = conditionName; + } + + @Override + public String toString() { + return "Condition{" + + "conditionIcon=" + conditionIcon + + ", conditionName='" + conditionName + '\'' + + '}'; + } +} diff --git a/navigation/app/src/main/java/com/example/navigation/entity/OrangeUser.java b/navigation/app/src/main/java/com/example/navigation/entity/OrangeUser.java new file mode 100644 index 0000000..1775f45 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/entity/OrangeUser.java @@ -0,0 +1,59 @@ +package com.example.navigation.entity; + +public class OrangeUser { + private Integer id; + private String username; + private String password; + private String sex; + private String city; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + @Override + public String toString() { + return "OrangeUser{" + + "username='" + username + '\'' + + ", password='" + password + '\'' + + ", sex='" + sex + '\'' + + ", city='" + city + '\'' + + '}'; + } +} diff --git a/navigation/app/src/main/java/com/example/navigation/entity/Product.java b/navigation/app/src/main/java/com/example/navigation/entity/Product.java new file mode 100644 index 0000000..76cbf09 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/entity/Product.java @@ -0,0 +1,43 @@ +package com.example.navigation.entity; + +import java.math.BigDecimal; + +public class Product { + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public BigDecimal getProductPrice() { + return productPrice; + } + + public void setProductPrice(BigDecimal productPrice) { + this.productPrice = productPrice; + } + + public Integer getImageUrlId() { + return imageUrlId; + } + + public void setImageUrlId(Integer imageUrlId) { + this.imageUrlId = imageUrlId; + } + + private Integer imageUrlId; + private String productName; + private BigDecimal productPrice; + + @Override + public String toString() { + return "Product{" + + "imageUrlId=" + imageUrlId + + ", productName='" + productName + '\'' + + ", productPrice=" + productPrice + + '}'; + } +} diff --git a/navigation/app/src/main/java/com/example/navigation/entity/ShoppingCart.java b/navigation/app/src/main/java/com/example/navigation/entity/ShoppingCart.java new file mode 100644 index 0000000..1b9ba9c --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/entity/ShoppingCart.java @@ -0,0 +1,44 @@ +package com.example.navigation.entity; + +public class ShoppingCart { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public Integer getProductId() { + return ProductId; + } + + public void setProductId(Integer productId) { + ProductId = productId; + } + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + private Integer id; + private Integer userId; + private Integer ProductId; + /** + * 购买数量 + */ + private Integer number; +} diff --git a/navigation/app/src/main/java/com/example/navigation/fragment/IndexFragment.java b/navigation/app/src/main/java/com/example/navigation/fragment/IndexFragment.java new file mode 100644 index 0000000..9be9e51 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/fragment/IndexFragment.java @@ -0,0 +1,110 @@ +package com.example.navigation.fragment; + +import android.app.Fragment; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.GridView; +import android.widget.LinearLayout; +import android.widget.SearchView; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import com.example.navigation.R; +import com.example.navigation.adapter.ProductAdapter; +import com.example.navigation.entity.Product; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + + +public class IndexFragment extends Fragment implements View.OnClickListener { + private SearchView searchView; + private LinearLayout orangeLine, youziLine, juziLine, xiguaLine, liLine, appleLine, lemonLine, mangguoLine; + private GridView gridView; + private ProductAdapter productAdapter; + private List productList; + + @Nullable + @Override + public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + View view = LayoutInflater.from(getActivity()).inflate(R.layout.content_index, container, false); + init(view); + return view; + } + + /** + * 初始化组件 + */ + private void init(View view) { + searchView = view.findViewById(R.id.searchView); + searchView.setOnClickListener(this); + orangeLine = view.findViewById(R.id.chengzi); + orangeLine.setOnClickListener(this); + youziLine = view.findViewById(R.id.youzi); + youziLine.setOnClickListener(this); + juziLine = view.findViewById(R.id.juzi); + juziLine.setOnClickListener(this); + xiguaLine = view.findViewById(R.id.xigua); + xiguaLine.setOnClickListener(this); + liLine = view.findViewById(R.id.li); + liLine.setOnClickListener(this); + lemonLine = view.findViewById(R.id.lemon); + lemonLine.setOnClickListener(this); + mangguoLine = view.findViewById(R.id.mangguo); + mangguoLine.setOnClickListener(this); + appleLine = view.findViewById(R.id.apple); + appleLine.setOnClickListener(this); + gridView = view.findViewById(R.id.index_famous_gridview); + initData(); + productAdapter = new ProductAdapter(getActivity(), productList); + gridView.setAdapter(productAdapter); + } + + + @Override + public void onClick(View v) { + + } + + /** + * 初始化商品数据 + */ + private void initData() { + productList = new ArrayList<>(); + Product product = new Product(); + product.setImageUrlId(R.drawable.cloth7); + product.setProductName("衣服7"); + product.setProductPrice(new BigDecimal("69.9")); + Product product1 = new Product(); + product1.setImageUrlId(R.drawable.cloth1); + product1.setProductName("衣服1"); + product1.setProductPrice(new BigDecimal("79.9")); + Product product2 = new Product(); + product2.setImageUrlId(R.drawable.cloth4); + product2.setProductName("衣服4"); + product2.setProductPrice(new BigDecimal("119.9")); + Product product3 = new Product(); + product3.setImageUrlId(R.drawable.cloth8); + product3.setProductName("衣服8"); + product3.setProductPrice(new BigDecimal("169.9")); + Product product4 = new Product(); + product4.setImageUrlId(R.drawable.cloth5); + product4.setProductName("衣服5"); + product4.setProductPrice(new BigDecimal("249.9")); + Product product5 = new Product(); + product5.setImageUrlId(R.drawable.cloth6); + product5.setProductName("衣服6"); + product5.setProductPrice(new BigDecimal("89.9")); + productList.add(product); + productList.add(product1); + productList.add(product2); + productList.add(product3); + productList.add(product4); + productList.add(product5); + + } +} diff --git a/navigation/app/src/main/java/com/example/navigation/fragment/PearsonFragment.java b/navigation/app/src/main/java/com/example/navigation/fragment/PearsonFragment.java new file mode 100644 index 0000000..40c8ffa --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/fragment/PearsonFragment.java @@ -0,0 +1,64 @@ +package com.example.navigation.fragment; + +import android.app.Fragment; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import com.example.navigation.R; + +public class PearsonFragment extends Fragment implements View.OnClickListener { + private ImageView userIconImage; + private TextView usernameText, userSexText, userCityText; + private LinearLayout usernameLine, userSexline, userCityLine, userPayLine, userSettingLine, userGeneralLine; + + + @Nullable + @Override + public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + View view = LayoutInflater.from(getActivity()).inflate(R.layout.content_user, container, false); + init(view); + return view; + } + + /** + * 组件初始化 + */ + private void init(View view) { + userIconImage = view.findViewById(R.id.user_icon); + usernameText = view.findViewById(R.id.user_username); + userSexText = view.findViewById(R.id.user_sex); + userCityText = view.findViewById(R.id.user_city); + usernameLine = view.findViewById(R.id.user_username_line); + userSexline = view.findViewById(R.id.user_sex_line); + userCityLine = view.findViewById(R.id.user_city_line); + userPayLine = view.findViewById(R.id.user_pay); + userSettingLine = view.findViewById(R.id.user_setting); + userGeneralLine = view.findViewById(R.id.user_general); + setData(); + } + + /** + * 组件赋值 + */ + private void setData() { + Bundle bundle = getArguments(); + usernameText.setText(String.format("用户名:%s", bundle.getString("username"))); + userSexText.setText(String.format("性别:%s", bundle.getString("sex"))); + userCityText.setText(String.format("城市:%s", bundle.getString("city"))); + } + + @Override + public void onClick(View v) { + + } + + +} diff --git a/navigation/app/src/main/java/com/example/navigation/fragment/ProductFragment.java b/navigation/app/src/main/java/com/example/navigation/fragment/ProductFragment.java new file mode 100644 index 0000000..8e1baa5 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/fragment/ProductFragment.java @@ -0,0 +1,117 @@ +package com.example.navigation.fragment; + +import android.app.Fragment; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.GridView; +import android.widget.Spinner; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import com.example.navigation.R; +import com.example.navigation.adapter.ListViewAdapter; +import com.example.navigation.adapter.ProductAdapter; +import com.example.navigation.entity.Condition; +import com.example.navigation.entity.Product; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +public class ProductFragment extends Fragment { + private Spinner conditonListSpinner; + private ListViewAdapter listViewAdapter; + private List conditionList; + private GridView productGridView; + private List productList; + + @Nullable + @Override + public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + View view = LayoutInflater.from(getActivity()).inflate(R.layout.content_product, container, false); + init(view); + return view; + } + + /** + * 组件初始化方法 + * + * @param view + */ + private void init(View view) { + conditonListSpinner = view.findViewById(R.id.product_select_condition); + initCondList(); + listViewAdapter = new ListViewAdapter(getActivity(), conditionList); + conditonListSpinner.setAdapter(listViewAdapter); + productGridView = view.findViewById(R.id.product_list); + initData(); + ProductAdapter productAdapter = new ProductAdapter(getActivity(), productList); + productGridView.setAdapter(productAdapter); + } + + /** + * 初始化conditionList + */ + private void initCondList() { + conditionList = new ArrayList<>(); + Condition allCondition = new Condition(); + allCondition.setConditionIcon(R.drawable.all); + allCondition.setConditionName("全部"); + Condition saleCondition = new Condition(); + saleCondition.setConditionIcon(R.drawable.salenum); + saleCondition.setConditionName("按销量高低排序"); + Condition timeCondition = new Condition(); + timeCondition.setConditionIcon(R.drawable.time); + timeCondition.setConditionName("按上市时间排序"); + Condition priceCondition = new Condition(); + priceCondition.setConditionIcon(R.drawable.price); + priceCondition.setConditionName("按商品价格排序"); + conditionList.add(allCondition); + conditionList.add(saleCondition); + conditionList.add(timeCondition); + conditionList.add(priceCondition); + } + + /** + * 初始化商品数据 + */ + private void initData() { + productList = new ArrayList<>(); + Product product = new Product(); + product.setImageUrlId(R.drawable.juzip); + product.setProductName("橘子"); + product.setProductPrice(new BigDecimal("9.9")); + Product product1 = new Product(); + product1.setImageUrlId(R.drawable.orange); + product1.setProductName("橙子"); + product1.setProductPrice(new BigDecimal("29.9")); + Product product2 = new Product(); + product2.setImageUrlId(R.drawable.youzip); + product2.setProductName("柚子"); + product2.setProductPrice(new BigDecimal("19.9")); + Product product3 = new Product(); + product3.setImageUrlId(R.drawable.xiguap); + product3.setProductName("西瓜"); + product3.setProductPrice(new BigDecimal("19.9")); + Product product4 = new Product(); + product4.setImageUrlId(R.drawable.applep); + product4.setProductName("苹果"); + product4.setProductPrice(new BigDecimal("49.9")); + Product product5 = new Product(); + product5.setImageUrlId(R.drawable.lemonp); + product5.setProductName("柠檬"); + product5.setProductPrice(new BigDecimal("9.9")); + productList.add(product); + productList.add(product1); + productList.add(product2); + productList.add(product3); + productList.add(product4); + productList.add(product5); + + } + + +} diff --git a/navigation/app/src/main/java/com/example/navigation/fragment/SetDetailFragment.java b/navigation/app/src/main/java/com/example/navigation/fragment/SetDetailFragment.java new file mode 100644 index 0000000..602b111 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/fragment/SetDetailFragment.java @@ -0,0 +1,53 @@ +package com.example.navigation.fragment; + +import android.annotation.SuppressLint; +import android.app.Fragment; +import android.os.Bundle; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import com.example.navigation.R; +import com.example.navigation.activity.CategoryActivity; + +import java.util.Objects; + +public class SetDetailFragment extends Fragment { + private View view; + private ImageView imageView; + private TextView nameText, priceText; + + @SuppressLint("SetTextI18n") + @Nullable + @Override + public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + view = inflater.inflate(R.layout.categoty_detail_content, container, false); + if (view != null) { + init(); + } + CategoryActivity categoryActivity = (CategoryActivity) getActivity(); + Objects.requireNonNull(categoryActivity).setOnChangeListener(product -> { + Log.i("sss", "onCreateView: " + product.getProductName()); + imageView.setBackgroundResource(product.getImageUrlId()); + nameText.setText(product.getProductName()); + priceText.setText(product.getProductPrice().toString()); + }); + return view; + } + + /** + * 内容组件初始化 + */ + private void init() { + imageView = view.findViewById(R.id.category_product_image); + nameText = view.findViewById(R.id.category_product_name); + priceText = view.findViewById(R.id.category_product_price); + } + +} diff --git a/navigation/app/src/main/java/com/example/navigation/fragment/ShoppingCartFragment.java b/navigation/app/src/main/java/com/example/navigation/fragment/ShoppingCartFragment.java new file mode 100644 index 0000000..b812369 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/fragment/ShoppingCartFragment.java @@ -0,0 +1,61 @@ +package com.example.navigation.fragment; + +import android.app.Fragment; +import android.app.FragmentTransaction; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Button; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import com.example.navigation.R; +import com.example.navigation.entity.ShoppingCart; + +import java.util.ArrayList; +import java.util.List; + +public class ShoppingCartFragment extends Fragment implements View.OnClickListener { + private Button walkButton; + private List cartList = new ArrayList<>(); + private ProductFragment productFragment; + + @Nullable + @Override + public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + View view; + if (cartList.size() > 0) { + //有商品 + view = LayoutInflater.from(getActivity()).inflate(R.layout.cart_have_product, container, false); + } else { + view = LayoutInflater.from(getActivity()).inflate(R.layout.cart_no_product, container, false); + } + init(view); + return view; + } + + /** + * 组件初始化 + */ + private void init(View view) { + walkButton = view.findViewById(R.id.random_search); + walkButton.setOnClickListener(this); + } + + @Override + public void onClick(View v) { + switch (v.getId()) { + case R.id.random_search: + //开启事务,fragment的控制是由事务来实现的 + FragmentTransaction transaction = getFragmentManager().beginTransaction(); + if (productFragment == null) { + productFragment = new ProductFragment(); + } + transaction.replace(R.id.main_content, productFragment); + transaction.commit(); + break; + } + } +} diff --git a/navigation/app/src/main/java/com/example/navigation/netrequest/ImageOkHttp.java b/navigation/app/src/main/java/com/example/navigation/netrequest/ImageOkHttp.java new file mode 100644 index 0000000..e9f2702 --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/netrequest/ImageOkHttp.java @@ -0,0 +1,4 @@ +package com.example.navigation.netrequest; + +public class ImageOkHttp { +} diff --git a/navigation/app/src/main/java/com/example/navigation/service/TimeService.java b/navigation/app/src/main/java/com/example/navigation/service/TimeService.java new file mode 100644 index 0000000..159c47d --- /dev/null +++ b/navigation/app/src/main/java/com/example/navigation/service/TimeService.java @@ -0,0 +1,82 @@ +package com.example.navigation.service; + +import android.app.Notification; +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.Service; +import android.content.Context; +import android.content.Intent; +import android.os.IBinder; + +import androidx.annotation.Nullable; +import androidx.core.app.NotificationCompat; + +import com.example.navigation.R; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Timer; +import java.util.TimerTask; + +public class TimeService extends Service { + private static Timer timer = null; + private NotificationManager manager; + private NotificationCompat.Builder builder; + + @Nullable + @Override + public IBinder onBind(Intent intent) { + return null; + } + + /** + * 清除通知 + */ + private void cleanAllNotification() { + manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + manager.cancelAll(); + if (timer != null) { + timer.cancel(); + timer = null; + } + + } + + /** + * 添加通知 + */ + @Override + public int onStartCommand(Intent intent, int flags, int startId) { + long period = 60 * 1000; //1分钟一个周期 + if (timer == null) { + timer = new Timer(); + } + timer.schedule(new TimerTask() { + @Override + public void run() { + /** + * NotificationChannel是android8.0新增的特性,如果App的targetSDKVersion>=26, + * 没有设置channel通知渠道的话,就会导致通知无法展示。 + * 报错内容:Failed to post notification on channel “null” + */ + NotificationChannel channel = new NotificationChannel("channel", "通知", NotificationManager.IMPORTANCE_DEFAULT); + manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + manager.createNotificationChannel(channel); + builder = new NotificationCompat.Builder(TimeService.this); + builder.setContentTitle("提醒系统当前时间"); + builder.setSmallIcon(R.drawable.chengzi); + builder.setChannelId("channel"); + Date date = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + builder.setContentText("系统当前时间为:" + formatter.format(date)); + builder.setAutoCancel(true); + builder.setDefaults(Notification.DEFAULT_ALL); + Notification notification = builder.build(); + manager.notify(1, notification); + + } + }, 0, period); + + return super.onStartCommand(intent, flags, startId); + } +} diff --git a/navigation/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/navigation/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/navigation/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/navigation/app/src/main/res/drawable/activity_main.xml b/navigation/app/src/main/res/drawable/activity_main.xml new file mode 100644 index 0000000..dfe67c8 --- /dev/null +++ b/navigation/app/src/main/res/drawable/activity_main.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/navigation/app/src/main/res/drawable/address.png b/navigation/app/src/main/res/drawable/address.png new file mode 100644 index 0000000000000000000000000000000000000000..7318be016a0fea789da57d99dcecd6485834d90d GIT binary patch literal 1028 zcmV+f1pE7mP)5000BaNklDk%Y z^L1WPEtqb%ySve7d?6yolv15K!uE{TxjPY%sF{WvH z!8)_=MtOV2+5Z`4zRuVE#u(eYwu!B~+Ih6Z%+n?3e~qGOr*AxXVHOt`uU=VM`9VYu zDWyIrNiZcM+lc6#?yu{Y^-*=#E{ zy?(!c?5x`B%yss*@F3cSOJ_lgk^>1IP5;w+J-?8Snmzlq+I$sOMy`3W#rtp<2 z;i5bihM8ZiI&b%D!#JRi0bHt6E?1sS%zSqpkYE_C^>!k%^K z@3t(*3%)0>owB>TQ=PG7? zuqx@uVP)q?Rk(M)1uBc%`;<|FSx5J@HrrFBuT(1l9e zh(ZvONukA9qgdxFE!DQ#DilhW?LsLSsiHO;Gn1Cd%sb`Im~me6X5QCe@*s=MyZ785 z=YBuJCVyy?``{V46p3^SMQLQ_Mm&n9$6vem2#6OUuz(f)7WJj>cu9gQ;F6{d3g!*~ zhXCv-0|eu-L-&jx#sUcEQPAh8FZHcctRrAH66qx&-eRE3v>`KKWkI6r(De_gH~FPq zs4ZZ2WTYAS{7C>>&A?W`|0>Uca^n=Z@P`%D5||wx?gP=M0G_rA2Kzu6>Mj@|>P=j# z6}KjENmWk>;9X1DY5`}!QZ2#&1rpy>YojVKt7-edeA6~g7IXtFBB_f4@yljynF2Wy zX2s63c43@h3ECmvSmO#0bK!}v1%y}7u zl?@5JPTh%fhLve8WLZ_etGdovsl8;d6#GZ&NxWDUm{HXs0?t@Ds=oIQ1O#Py5lheFr#V5i1~f@ zy7E@1dx`-dCzRt`y3f6507ldNHh>9F!Kr{u%V(ZK$jV#v!aI|Dhd(d?$5I?2!i=Zr zbpjHxHr*CBcJXMM2L$l-W&i^Ga?BSlUJuH%cr?MCLV>qsrcN0|ex)V0U;Etvl>bE2 z{FmVpi8|K*q0J$RC*5ul{WdC<~2V;N7Bt+qPik z5$$fPBPboyzM=9d+OmsR3ydZB1yXR`Hqu1~nYe$ZEu5^@hUKS^H&fiyK*f8?OO{Xv zKn4~7gl2r9?`y@i1j@>h%e-~leS8E!o*An@c7cS?S9FY@_J`!oRXe0rfy(#MBtHjH zM4Cgbfj<#wV%irp+&G+Db;~v@ZhGKDEs|t7g22|C P00000NkvXXu0mjfWqIjS literal 0 HcmV?d00001 diff --git a/navigation/app/src/main/res/drawable/apple.png b/navigation/app/src/main/res/drawable/apple.png new file mode 100644 index 0000000000000000000000000000000000000000..0810381d53b6ac6f3163f5dc3e3002e09562c290 GIT binary patch literal 1988 zcmV;#2RrzQP)6u{4Y3|O~rqpovo6UKOKY;(ZmArBo7kw{1okr<;W1|u>02N0v8i4HVqOay#H zMCXgdM+7nnN*Iq>41!~@jlmdhY-L-!cF?X}AGeQtd#^dydzS+1+TL{~aFQm=?svcM z{JwL}cg}Y%0e6WIcL@i?6C@V^?9wmh`xh?|gs2CAPXM4i<`e*Nv&f$SFdYD7tHhi| zsYMn5zzP7E1^`#3-w6QF4WQv#0Qe37UI2jaV@@DVs00Le7ePR!rq2dANbz~N$HI>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n0@3MV=&eJW%A&v1%tmz}I4l#%G d*JWL}?QZm^Xy&~w{S0(DgQu&X%Q~loCIB + + + + + + + + + + + + + + \ No newline at end of file diff --git a/navigation/app/src/main/res/drawable/button_register.xml b/navigation/app/src/main/res/drawable/button_register.xml new file mode 100644 index 0000000..3eb0673 --- /dev/null +++ b/navigation/app/src/main/res/drawable/button_register.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/navigation/app/src/main/res/drawable/cart.png b/navigation/app/src/main/res/drawable/cart.png new file mode 100644 index 0000000000000000000000000000000000000000..f2e1190318bac5a414c75ec24d955fae176d1a7c GIT binary patch literal 5573 zcmYM2cTm$ow}yYzNH?LV6qO)YXkq}RNRd#bOF()LH56&mqX>pBQZyhSL5dJTqy$1Q zQX~*TiWn(^6zLra2shuobLZQc-TiNOXZP$m@B73X8)|c~^0NW}z@e)HH>J&w|I^Pf z(?$gs`C$OyP11#{n?1H$vt@gI1relD;)x8Nu#7ve4n3RM+ljyC{S(I(;IvvR6ZN8zTQvOqoxIUR@S!j@(?) z7HX}w4=N!Rmo*X_%N9dhD_bXgkER01ccZ7R34`2@1p^)|GjHrBJ7yi|W)x0DURMM8 zQPe*RpIrNijYJ}mqjO2C%Ln+HTE_y$ZYuji^T|fulsc5tTz7I&17`0H@ESXvgz-I4 z-f;NG22eu-V$gS)0BcQ`a>w(jOZL#=)0|P%7@e}L?5zut1a~N?_@Z`x8dpB7NF&8(cHfLvNP=;R7JmAL)y(k4miVc?<)jY$f@}@}^d-yD` ztb{k6y!f*w<4ku^P|&8yrSIhfO_v78^VATcS~C0$_8H*EO!3}piBoyU!E0*e%dKKWkxq)Bs9B<=39Y}JitB(-JJ7g z!vowfb~CA5vOkQd%a3KxkpWVZlA3tIoXzKztu!wwm2a858^2t4j=MJMepgb3PM#Me{c^r7nnIXx+H_so&228js2|%q5<* zgE1#YusuC`D=#mvDpTCT&=BjryFx3tNYDlAdEQ zPa~y(RbB!geB@x+A4)8qyi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tPpn6cMKd+6f&GweT_|oa++WnCc5|x~MY%2J z8YQ;>0My`A^|%GI`~0VO@Tc-PhS6>CkiptaD+)ML3bkjt02n4)3qpOsY2rUb(KXNT zZ3{bxnJvVs*+xNJ>x9KGmE5tWy`>u7nOiVYggkUVLC3o)b%H(+;sD+PN6JBQdb;1k z+TQK`s{!z&qjl9t;H_HELi@e0OYyxlV4xwQDgF&&EGU$`&7H<2j1!YdWlwnkQUK0x z{P}aiy5W&4Vs;&WDE=*99^KFWSL+`l>b1LDa_ppLmWL8kazgPPG-*LgIWpx> zt;BJ-|00{3ID(;4o2%Mr!^QulNLTv24*=-YV(1jtU2>zdgTu_Y#|En;A5ALB0Dcls z&(GUoMNxK;wDR5b{`oRxli>x)>&+J!{IHJ6vD?bNOwh9A25`u$ML=%!2siC&b@-oFSDN$?I+ywBey98U;7`UqqQ~0*CY@OEsLS|4Ze*eI39`2M$rJ+ zbiozpS{G^!#)jtnN3&dO*XT1De_sIkVLem>5#j|>x7jsLvvv7KDpdF_H$wBK5^ft9 z8v4)x+%c+g!N(=<0-K*7INK0sc0&?`esFec(}U4^gYLh~E@#W%vYLM8@^>qX zS4)daj|rxW1!?vnPg|@s?y<%G{C^fGk+;Y4*PYmpXSm~8#6N~ZDv@_MrE)gz@tUQd z(J^@Qe{7LDRi>%1cZv+k;RdvY-_EmSNm`Fhj*gC^&THL<1~Z_eY78*F&lW?u4Gw`&E4ItCMuyWiADSh`7xbAuMfre)RT}?xH J#XX0o{{y$Isht1- literal 0 HcmV?d00001 diff --git a/navigation/app/src/main/res/drawable/cart_have_product.xml b/navigation/app/src/main/res/drawable/cart_have_product.xml new file mode 100644 index 0000000..b7362e4 --- /dev/null +++ b/navigation/app/src/main/res/drawable/cart_have_product.xml @@ -0,0 +1,15 @@ + + + + + + + + \ No newline at end of file diff --git a/navigation/app/src/main/res/drawable/cart_no_product.xml b/navigation/app/src/main/res/drawable/cart_no_product.xml new file mode 100644 index 0000000..ff8c14c --- /dev/null +++ b/navigation/app/src/main/res/drawable/cart_no_product.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + +