├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── splash_logo.png │ │ │ │ ├── mask_round_purple.xml │ │ │ │ ├── divider_horizontal_1px.xml │ │ │ │ ├── indicator_yellow_radius.xml │ │ │ │ ├── divider_vertical_1dp.xml │ │ │ │ ├── search_view_bg.xml │ │ │ │ ├── dialog_progress_bg.xml │ │ │ │ ├── image_holder_goods.xml │ │ │ │ ├── selector_ic_favorite.xml │ │ │ │ ├── selector_ic_is_hot.xml │ │ │ │ ├── selector_ic_cheapest.xml │ │ │ │ ├── selector_ic_most_expensive.xml │ │ │ │ ├── card_bg.xml │ │ │ │ ├── ic_email.xml │ │ │ │ ├── ic_chevron_right.xml │ │ │ │ ├── refresh_logo_active.xml │ │ │ │ ├── refresh_logo_inactive.xml │ │ │ │ ├── ic_cheapest_normal.xml │ │ │ │ ├── ic_most_expensive_normal.xml │ │ │ │ ├── ic_most_expensive_activated.xml │ │ │ │ ├── ic_order_wait_ship.xml │ │ │ │ ├── ic_order_wait_pay.xml │ │ │ │ ├── ic_address.xml │ │ │ │ ├── ic_search_clear.xml │ │ │ │ ├── ic_password.xml │ │ │ │ ├── ic_order_history.xml │ │ │ │ ├── ic_username.xml │ │ │ │ ├── ic_order_unconfirmed.xml │ │ │ │ ├── ic_help.xml │ │ │ │ ├── ic_order_shipped.xml │ │ │ │ ├── ic_is_hot_normal.xml │ │ │ │ ├── ic_is_hot_activated.xml │ │ │ │ ├── ic_favorite.xml │ │ │ │ ├── tab_goods_bg.xml │ │ │ │ ├── selector_item_category_bg.xml │ │ │ │ ├── horizontal_bar_bg.xml │ │ │ │ ├── tab_query_order_bg.xml │ │ │ │ └── selector_address_dot.xml │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_cart.png │ │ │ │ ├── ic_tab_cart.png │ │ │ │ ├── ic_tab_home.png │ │ │ │ ├── ic_tab_mine.png │ │ │ │ ├── ic_menu_grid.png │ │ │ │ ├── ic_menu_list.png │ │ │ │ ├── ic_menu_share.png │ │ │ │ ├── ic_favorite_grey.png │ │ │ │ ├── ic_favorite_red.png │ │ │ │ ├── ic_menu_search.png │ │ │ │ ├── ic_menu_settings.png │ │ │ │ ├── ic_tab_category.png │ │ │ │ ├── image_empty_cart.png │ │ │ │ ├── ic_loading_failure_big.png │ │ │ │ └── dialog_alert_bg.xml │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_cart.png │ │ │ │ ├── ic_tab_cart.png │ │ │ │ ├── ic_tab_home.png │ │ │ │ ├── ic_tab_mine.png │ │ │ │ ├── ic_menu_grid.png │ │ │ │ ├── ic_menu_list.png │ │ │ │ ├── ic_menu_share.png │ │ │ │ ├── ic_favorite_grey.png │ │ │ │ ├── ic_favorite_red.png │ │ │ │ ├── ic_menu_search.png │ │ │ │ ├── ic_menu_settings.png │ │ │ │ ├── ic_tab_category.png │ │ │ │ ├── image_empty_cart.png │ │ │ │ └── ic_loading_failure_big.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_cart.png │ │ │ │ ├── ic_menu_grid.png │ │ │ │ ├── ic_menu_list.png │ │ │ │ ├── ic_tab_cart.png │ │ │ │ ├── ic_tab_home.png │ │ │ │ ├── ic_tab_mine.png │ │ │ │ ├── ic_favorite_red.png │ │ │ │ ├── ic_menu_search.png │ │ │ │ ├── ic_menu_share.png │ │ │ │ ├── ic_tab_category.png │ │ │ │ ├── ic_favorite_grey.png │ │ │ │ ├── ic_menu_settings.png │ │ │ │ ├── image_empty_cart.png │ │ │ │ ├── ic_loading_failure_big.png │ │ │ │ ├── mask_round_pink.xml │ │ │ │ ├── mask_round_orange.xml │ │ │ │ ├── mask_round_yellow.xml │ │ │ │ ├── ic_cheapest_activated.xml │ │ │ │ └── horizontal_card_bg.xml │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── btn_minus.png │ │ │ │ ├── btn_plus.png │ │ │ │ ├── ic_cart.png │ │ │ │ ├── ic_delete.png │ │ │ │ ├── ic_edit.png │ │ │ │ ├── ic_tab_cart.png │ │ │ │ ├── ic_tab_home.png │ │ │ │ ├── ic_tab_mine.png │ │ │ │ ├── btn_minus_gray.png │ │ │ │ ├── ic_menu_grid.png │ │ │ │ ├── ic_menu_list.png │ │ │ │ ├── ic_menu_search.png │ │ │ │ ├── ic_menu_share.png │ │ │ │ ├── text_number_bg.png │ │ │ │ ├── ic_favorite_grey.png │ │ │ │ ├── ic_favorite_red.png │ │ │ │ ├── ic_menu_settings.png │ │ │ │ ├── ic_tab_category.png │ │ │ │ ├── image_avatar_bg.png │ │ │ │ ├── image_empty_cart.png │ │ │ │ ├── image_no_comments.png │ │ │ │ ├── image_default_avatar.png │ │ │ │ └── ic_loading_failure_big.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── ic_cart.png │ │ │ │ ├── ic_tab_cart.png │ │ │ │ ├── ic_tab_home.png │ │ │ │ ├── ic_tab_mine.png │ │ │ │ ├── ic_tab_category.png │ │ │ │ ├── image_empty_cart.png │ │ │ │ └── ic_loading_failure_big.png │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-nodpi │ │ │ │ └── image_holder_banner.png │ │ │ ├── layout │ │ │ │ ├── item_goods_picture.xml │ │ │ │ ├── activity_cart.xml │ │ │ │ ├── fragment_goods_details.xml │ │ │ │ ├── item_banner.xml │ │ │ │ ├── fragment_photo_dialog.xml │ │ │ │ ├── partial_pref_category.xml │ │ │ │ ├── item_children_category.xml │ │ │ │ ├── activity_splash.xml │ │ │ │ ├── item_primary_category.xml │ │ │ │ ├── activity_help.xml │ │ │ │ ├── widget_load_more_footer.xml │ │ │ │ ├── widget_refresh_header.xml │ │ │ │ ├── activity_collect.xml │ │ │ │ ├── widget_banner_layout.xml │ │ │ │ ├── item_home_goods.xml │ │ │ │ ├── activity_order_list.xml │ │ │ │ ├── activity_manage_address.xml │ │ │ │ ├── activity_settings.xml │ │ │ │ ├── activity_eshop_main.xml │ │ │ │ ├── fragment_home.xml │ │ │ │ ├── item_order_goods.xml │ │ │ │ ├── partial_action_bar.xml │ │ │ │ ├── fragment_goods_comments.xml │ │ │ │ ├── widget_image_grid.xml │ │ │ │ ├── widget_simple_number_picker.xml │ │ │ │ ├── widget_simple_search_view.xml │ │ │ │ ├── fragment_progress_dialog.xml │ │ │ │ ├── fragment_category.xml │ │ │ │ ├── item_order_list_goods.xml │ │ │ │ ├── partial_goods_action_bar.xml │ │ │ │ ├── item_collect_goods_grid.xml │ │ │ │ ├── partial_mine_top.xml │ │ │ │ ├── activity_goods.xml │ │ │ │ ├── item_search_goods.xml │ │ │ │ ├── item_cart_goods.xml │ │ │ │ └── item_collect_goods_list.xml │ │ │ ├── values │ │ │ │ ├── ids.xml │ │ │ │ ├── attrs.xml │ │ │ │ ├── colors.xml │ │ │ │ └── dimens.xml │ │ │ ├── color │ │ │ │ ├── app_bar_text.xml │ │ │ │ ├── selector_text_orange.xml │ │ │ │ └── primary_text.xml │ │ │ ├── anim │ │ │ │ ├── push_left_in.xml │ │ │ │ ├── push_left_out.xml │ │ │ │ ├── push_right_in.xml │ │ │ │ └── push_right_out.xml │ │ │ ├── menu │ │ │ │ ├── activity_goods.xml │ │ │ │ ├── fragment_category.xml │ │ │ │ └── acitivity_collect.xml │ │ │ └── xml │ │ │ │ ├── bottombar_tabs.xml │ │ │ │ └── preferences.xml │ │ └── java │ │ │ └── com │ │ │ └── gfd │ │ │ └── eshop │ │ │ ├── network │ │ │ ├── event │ │ │ │ ├── CartEvent.java │ │ │ │ ├── UserEvent.java │ │ │ │ └── AddressEvent.java │ │ │ ├── entity │ │ │ │ ├── CollectGoods.java │ │ │ │ ├── CategoryHome.java │ │ │ │ ├── Session.java │ │ │ │ ├── CategoryBase.java │ │ │ │ ├── CategoryPrimary.java │ │ │ │ ├── CartBill.java │ │ │ │ ├── Region.java │ │ │ │ ├── Shipping.java │ │ │ │ ├── Picture.java │ │ │ │ ├── Paginated.java │ │ │ │ ├── Banner.java │ │ │ │ ├── Status.java │ │ │ │ ├── Payment.java │ │ │ │ ├── Pagination.java │ │ │ │ ├── GoodsSpec.java │ │ │ │ ├── OrderInfo.java │ │ │ │ ├── CartGoods.java │ │ │ │ ├── OrderGoods.java │ │ │ │ ├── Order.java │ │ │ │ ├── SimpleGoods.java │ │ │ │ ├── Filter.java │ │ │ │ ├── User.java │ │ │ │ └── GoodsInfo.java │ │ │ ├── core │ │ │ │ ├── ResponseEntity.java │ │ │ │ ├── ApiInterface.java │ │ │ │ ├── ApiError.java │ │ │ │ ├── IUserManager.java │ │ │ │ ├── RequestParam.java │ │ │ │ └── ApiPath.java │ │ │ └── api │ │ │ │ ├── ApiCategory.java │ │ │ │ ├── ApiHomeCategory.java │ │ │ │ ├── ApiUserInfo.java │ │ │ │ ├── ApiCollectDelete.java │ │ │ │ ├── ApiAddressDelete.java │ │ │ │ ├── ApiOrderCancel.java │ │ │ │ ├── ApiAddressDefault.java │ │ │ │ ├── ApiCollectCreate.java │ │ │ │ ├── ApiAddressList.java │ │ │ │ ├── ApiAddressAdd.java │ │ │ │ ├── ApiAddressUpdate.java │ │ │ │ ├── ApiAddressInfo.java │ │ │ │ ├── ApiCartDelete.java │ │ │ │ ├── ApiCartCreate.java │ │ │ │ ├── ApiGoodsInfo.java │ │ │ │ ├── ApiHomeBanner.java │ │ │ │ ├── ApiCartUpdate.java │ │ │ │ ├── ApiCartList.java │ │ │ │ ├── ApiCollectList.java │ │ │ │ ├── ApiRegion.java │ │ │ │ ├── ApiSearch.java │ │ │ │ └── ApiSignIn.java │ │ │ ├── feature │ │ │ ├── settings │ │ │ │ ├── SettingsFragment.java │ │ │ │ └── SettingsActivity.java │ │ │ ├── goods │ │ │ │ ├── comments │ │ │ │ │ └── GoodsCommentsFragment.java │ │ │ │ ├── GoodsPagerAdapter.java │ │ │ │ └── info │ │ │ │ │ └── GoodsPictureAdapter.java │ │ │ ├── EShopApplication.java │ │ │ ├── cart │ │ │ │ ├── CartActivity.java │ │ │ │ └── CartGoodsAdapter.java │ │ │ ├── category │ │ │ │ ├── CategoryAdapter.java │ │ │ │ └── ChildrenAdapter.java │ │ │ ├── SplashActivity.java │ │ │ ├── help │ │ │ │ └── HelpActivity.java │ │ │ └── search │ │ │ │ └── SearchGoodsAdapter.java │ │ │ └── base │ │ │ ├── glide │ │ │ └── DefaultGlideModule.java │ │ │ ├── widgets │ │ │ ├── SquareLayout.java │ │ │ └── CustomProgressBar.java │ │ │ ├── wrapper │ │ │ ├── ToastWrapper.java │ │ │ └── BadgeWrapper.java │ │ │ ├── utils │ │ │ ├── Sha256Utils.java │ │ │ └── LogUtils.java │ │ │ └── TransitionActivity.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── gfd │ │ │ └── eshop │ │ │ └── network │ │ │ ├── ApiTest.java │ │ │ ├── ApiOrderPreviewTest.java │ │ │ ├── ApiCollectCreateTest.java │ │ │ ├── ApiOrderListTest.java │ │ │ ├── ApiSearchTest.java │ │ │ ├── ApiRegionTest.java │ │ │ ├── ApiGoodsInfoTest.java │ │ │ ├── ApiSignUpTest.java │ │ │ ├── ApiHomeBannerTest.java │ │ │ ├── ApiCartListTest.java │ │ │ ├── ApiCartCreateTest.java │ │ │ ├── ApiCategoryTest.java │ │ │ ├── ApiHomeCategoryTest.java │ │ │ ├── ApiAddressListTest.java │ │ │ ├── ApiCartDeleteTest.java │ │ │ ├── ApiSignInTest.java │ │ │ └── ApiAddressAddTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── gfd │ │ └── eshop │ │ └── ApplicationTest.java └── proguard-rules.pro ├── settings.gradle ├── gradle.properties ├── screenshot ├── 01.jpeg ├── 02.jpeg ├── 03.jpeg ├── 04.jpeg ├── 05.jpeg ├── 06.jpeg ├── 07.jpeg └── qcode.jpg ├── .gitignore ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── README.md └── config └── quality ├── findbugs └── findbugs-filter.xml ├── checkstyle └── suppressions.xml └── pmd └── pmd-ruleset.xml /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/gradle.properties -------------------------------------------------------------------------------- /screenshot/01.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/screenshot/01.jpeg -------------------------------------------------------------------------------- /screenshot/02.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/screenshot/02.jpeg -------------------------------------------------------------------------------- /screenshot/03.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/screenshot/03.jpeg -------------------------------------------------------------------------------- /screenshot/04.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/screenshot/04.jpeg -------------------------------------------------------------------------------- /screenshot/05.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/screenshot/05.jpeg -------------------------------------------------------------------------------- /screenshot/06.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/screenshot/06.jpeg -------------------------------------------------------------------------------- /screenshot/07.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/screenshot/07.jpeg -------------------------------------------------------------------------------- /screenshot/qcode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/screenshot/qcode.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/ 5 | .DS_Store 6 | /build 7 | /captures 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/splash_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable/splash_logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_tab_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_tab_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_tab_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_tab_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_tab_mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_tab_mine.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_tab_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_tab_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_tab_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_tab_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_tab_mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_tab_mine.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/btn_minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/btn_minus.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/btn_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/btn_plus.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_delete.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_edit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxxhdpi/ic_cart.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_menu_grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_menu_grid.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_menu_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_menu_list.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_menu_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_menu_share.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_menu_grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_menu_grid.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_menu_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_menu_list.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_menu_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_menu_share.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_menu_grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_menu_grid.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_menu_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_menu_list.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_tab_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_tab_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_tab_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_tab_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_tab_mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_tab_mine.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_tab_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_tab_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_tab_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_tab_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_tab_mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_tab_mine.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_favorite_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_favorite_grey.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_favorite_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_favorite_red.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_menu_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_menu_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_menu_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_menu_settings.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_tab_category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_tab_category.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/image_empty_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/image_empty_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_favorite_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_favorite_grey.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_favorite_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_favorite_red.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_menu_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_menu_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_menu_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_menu_settings.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_tab_category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_tab_category.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/image_empty_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/image_empty_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_favorite_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_favorite_red.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_menu_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_menu_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_menu_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_menu_share.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_tab_category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_tab_category.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/btn_minus_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/btn_minus_gray.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_menu_grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_menu_grid.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_menu_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_menu_list.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_menu_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_menu_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_menu_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_menu_share.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/text_number_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/text_number_bg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_tab_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxxhdpi/ic_tab_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_tab_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxxhdpi/ic_tab_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_tab_mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxxhdpi/ic_tab_mine.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_favorite_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_favorite_grey.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_menu_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_menu_settings.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/image_empty_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/image_empty_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_favorite_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_favorite_grey.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_favorite_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_favorite_red.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_menu_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_menu_settings.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_tab_category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_tab_category.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/image_avatar_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/image_avatar_bg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/image_empty_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/image_empty_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_tab_category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxxhdpi/ic_tab_category.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/image_holder_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-nodpi/image_holder_banner.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/image_no_comments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/image_no_comments.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/image_empty_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxxhdpi/image_empty_cart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_loading_failure_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-hdpi/ic_loading_failure_big.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_loading_failure_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-mdpi/ic_loading_failure_big.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_failure_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xhdpi/ic_loading_failure_big.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/image_default_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/image_default_avatar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_loading_failure_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxhdpi/ic_loading_failure_big.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_loading_failure_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guofudong/EShop/HEAD/app/src/main/res/drawable-xxxhdpi/ic_loading_failure_big.png -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/event/CartEvent.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.event; 2 | 3 | /** 4 | * EventBus-购物车消息实体类 5 | */ 6 | public class CartEvent { 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/event/UserEvent.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.event; 2 | 3 | /** 4 | * EventBus-用户信息消息实体类 5 | */ 6 | public class UserEvent { 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/event/AddressEvent.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.event; 2 | 3 | /** 4 | * EventBus-收货地址消息实体类 5 | */ 6 | public class AddressEvent { 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/mask_round_purple.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/mask_round_pink.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_goods_picture.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/mask_round_orange.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/mask_round_yellow.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/divider_horizontal_1px.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/indicator_yellow_radius.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_cart.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/color/app_bar_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/divider_vertical_1dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/search_view_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Oct 22 16:12:51 CST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/dialog_progress_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dialog_alert_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/image_holder_goods.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_ic_favorite.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_ic_is_hot.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_ic_cheapest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_ic_most_expensive.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_goods_details.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/card_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import org.junit.Before; 5 | 6 | public class ApiTest { 7 | 8 | EShopClient client; 9 | 10 | @Before public void setUp() throws Exception { 11 | client = EShopClient.getInstance(); 12 | client.setShowLog(true); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/color/selector_text_orange.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/push_left_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/anim/push_left_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/anim/push_right_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/anim/push_right_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/CollectGoods.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | public class CollectGoods extends SimpleGoods { 7 | 8 | @SerializedName("rec_id") private int mRecId; // 收藏id 9 | 10 | public int getRecId() { 11 | return mRecId; 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_email.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/menu/activity_goods.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_chevron_right.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/refresh_logo_active.xml: -------------------------------------------------------------------------------- 1 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/refresh_logo_inactive.xml: -------------------------------------------------------------------------------- 1 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_category.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_cheapest_normal.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/core/ResponseEntity.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.core; 2 | 3 | import com.gfd.eshop.network.entity.Status; 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | /** 7 | * 响应体的基类. 8 | */ 9 | public abstract class ResponseEntity { 10 | 11 | @SerializedName("status") private Status mStatus; 12 | 13 | public Status getStatus() { 14 | return mStatus; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_most_expensive_normal.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/gfd/eshop/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_cheapest_activated.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_most_expensive_activated.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/CategoryHome.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | import java.util.List; 7 | 8 | public class CategoryHome extends CategoryBase { 9 | 10 | @SerializedName("goods") 11 | private List mHotGoodsList; 12 | 13 | public List getHotGoodsList() { 14 | return mHotGoodsList; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_order_wait_ship.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_order_wait_pay.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/Session.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * 会话实体 7 | */ 8 | public class Session { 9 | 10 | @SerializedName("uid") private int mUid; 11 | 12 | @SerializedName("sid") private String mSid; 13 | 14 | public int getUid() { 15 | return mUid; 16 | } 17 | 18 | public String getSid() { 19 | return mSid; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/res/color/primary_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/CategoryBase.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * 商品分类基类. 7 | */ 8 | public class CategoryBase { 9 | 10 | @SerializedName("id") private int mId; 11 | 12 | @SerializedName("name") private String mName; 13 | 14 | public int getId() { 15 | return mId; 16 | } 17 | 18 | public String getName() { 19 | return mName; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_photo_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/partial_pref_category.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiOrderPreviewTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import com.gfd.eshop.network.api.ApiOrderPreview; 5 | 6 | import org.junit.Test; 7 | 8 | import java.io.IOException; 9 | 10 | public class ApiOrderPreviewTest extends ApiSignInTest { 11 | 12 | @Test public void previewOrder() throws IOException { 13 | signIn(); 14 | ApiOrderPreview apiOrderPreview = new ApiOrderPreview(); 15 | client.execute(apiOrderPreview); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiCollectCreateTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import com.gfd.eshop.network.api.ApiCollectCreate; 5 | 6 | import org.junit.Test; 7 | 8 | import java.io.IOException; 9 | 10 | public class ApiCollectCreateTest extends ApiSignInTest { 11 | 12 | @Test public void createCollect() throws IOException { 13 | signIn(); 14 | ApiCollectCreate apiCollectCreate = new ApiCollectCreate(80); 15 | client.execute(apiCollectCreate); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiOrderListTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import com.gfd.eshop.network.api.ApiOrderList; 5 | 6 | import org.junit.Test; 7 | 8 | import java.io.IOException; 9 | 10 | public class ApiOrderListTest extends ApiSignInTest { 11 | 12 | @Test public void getOrderList() throws IOException { 13 | signIn(); 14 | ApiOrderList apiOrderList = new ApiOrderList(ApiOrderList.ORDER_UNCONFIRMED, null); 15 | client.execute(apiOrderList); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/feature/settings/SettingsFragment.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.feature.settings; 2 | 3 | 4 | import android.os.Bundle; 5 | import androidx.preference.PreferenceFragmentCompat; 6 | import com.gfd.eshop.R; 7 | 8 | /** 9 | * 设置Fragment 10 | */ 11 | public class SettingsFragment extends PreferenceFragmentCompat { 12 | 13 | @Override 14 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { 15 | addPreferencesFromResource(R.xml.preferences); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/CategoryPrimary.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | import java.util.Collections; 6 | import java.util.List; 7 | 8 | /** 9 | * 商品一级分类. 10 | */ 11 | public class CategoryPrimary extends CategoryBase { 12 | 13 | @SerializedName("children") private List mChildren = Collections.emptyList(); 14 | 15 | public List getChildren() { 16 | return mChildren; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_address.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/CartBill.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * 购物车结算. 7 | */ 8 | public class CartBill { 9 | 10 | @SerializedName("goods_price") private String mGoodsPrice; 11 | 12 | @SerializedName("real_goods_count") private int mGoodsCount; // 实物商品数量 13 | 14 | public String getGoodsPrice() { 15 | return mGoodsPrice; 16 | } 17 | 18 | public int getGoodsCount() { 19 | return mGoodsCount; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiSearchTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import com.gfd.eshop.network.api.ApiSearch; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | 9 | import java.io.IOException; 10 | 11 | public class ApiSearchTest extends ApiTest { 12 | 13 | @Test public void searchGoods() throws IOException { 14 | 15 | ApiSearch apiSearch = new ApiSearch(null, null); 16 | ApiSearch.Rsp rsp = client.execute(apiSearch); 17 | Assert.assertTrue(rsp.getStatus().isSucceed()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiRegionTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import com.gfd.eshop.network.api.ApiRegion; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | 9 | import java.io.IOException; 10 | 11 | public class ApiRegionTest extends ApiTest { 12 | 13 | @Test public void getRegion() throws IOException { 14 | ApiRegion apiRegion = new ApiRegion(ApiRegion.ID_CHINA); 15 | ApiRegion.Rsp rsp = client.execute(apiRegion); 16 | 17 | Assert.assertTrue(rsp.getStatus().isSucceed()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_children_category.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiGoodsInfoTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import com.gfd.eshop.network.api.ApiGoodsInfo; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | 9 | import java.io.IOException; 10 | 11 | public class ApiGoodsInfoTest extends ApiTest { 12 | 13 | @Test public void getGoodsInfo() throws IOException { 14 | 15 | ApiGoodsInfo apiGoodsInfo = new ApiGoodsInfo(78); 16 | 17 | ApiGoodsInfo.Rsp rsp = client.execute(apiGoodsInfo); 18 | Assert.assertTrue(rsp.getStatus().isSucceed()); 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiSignUpTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | import com.gfd.eshop.network.api.ApiSignUp; 4 | 5 | import org.junit.Assert; 6 | import org.junit.Test; 7 | 8 | import java.io.IOException; 9 | 10 | public class ApiSignUpTest extends ApiTest { 11 | 12 | @Test public void signUp() throws IOException { 13 | 14 | ApiSignUp apiSignUp = new ApiSignUp("ycj", "123456", "ycj@163.com"); 15 | ApiSignUp.Rsp rsp = client.execute(apiSignUp); 16 | Assert.assertFalse(rsp.getStatus().isSucceed()); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiHomeBannerTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import com.gfd.eshop.network.api.ApiHomeBanner; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | 9 | import java.io.IOException; 10 | 11 | public class ApiHomeBannerTest extends ApiTest { 12 | 13 | @Test public void getBanners() throws IOException { 14 | 15 | ApiHomeBanner apiHomeBanner = new ApiHomeBanner(); 16 | ApiHomeBanner.Rsp rsp = client.execute(apiHomeBanner); 17 | 18 | Assert.assertTrue(rsp.getStatus().isSucceed()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_search_clear.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiCartListTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import com.gfd.eshop.network.api.ApiCartList; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | 9 | import java.io.IOException; 10 | 11 | public class ApiCartListTest extends ApiCartCreateTest { 12 | 13 | @Test public void getCartList() throws IOException { 14 | signIn(); 15 | ApiCartList apiCartList = new ApiCartList(); 16 | 17 | ApiCartList.Rsp rsp = client.execute(apiCartList); 18 | Assert.assertTrue(rsp.getStatus().isSucceed()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiCartCreateTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import com.gfd.eshop.network.api.ApiCartCreate; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | 9 | import java.io.IOException; 10 | 11 | public class ApiCartCreateTest extends ApiSignInTest { 12 | 13 | @Test public void addToCart() throws IOException { 14 | signIn(); 15 | ApiCartCreate apiCartCreate = new ApiCartCreate(73, 1); 16 | ApiCartCreate.Rsp rsp = client.execute(apiCartCreate); 17 | Assert.assertTrue(rsp.getStatus().isSucceed()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiCategoryTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | import com.gfd.eshop.network.api.ApiCategory; 4 | 5 | import org.junit.Assert; 6 | import org.junit.Test; 7 | 8 | import java.io.IOException; 9 | 10 | /** 11 | * 商品分类接口的单元测试. 12 | */ 13 | public class ApiCategoryTest extends ApiTest { 14 | 15 | @Test public void getCategories() throws IOException { 16 | 17 | ApiCategory apiCategory = new ApiCategory(); 18 | ApiCategory.Rsp rsp = client.execute(apiCategory); 19 | Assert.assertTrue(rsp.getStatus().isSucceed()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiHomeCategoryTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import com.gfd.eshop.network.api.ApiHomeCategory; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | 9 | import java.io.IOException; 10 | 11 | public class ApiHomeCategoryTest extends ApiTest { 12 | 13 | @Test public void getHomeCategories() throws IOException { 14 | 15 | ApiHomeCategory apiHomeCategory = new ApiHomeCategory(); 16 | ApiHomeCategory.Rsp rsp = client.execute(apiHomeCategory); 17 | Assert.assertTrue(rsp.getStatus().isSucceed()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/res/menu/acitivity_collect.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/xml/bottombar_tabs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 11 | 15 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_password.xml: -------------------------------------------------------------------------------- 1 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiAddressListTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import com.gfd.eshop.network.api.ApiAddressList; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | 9 | import java.io.IOException; 10 | 11 | public class ApiAddressListTest extends ApiSignInTest { 12 | 13 | @Test public void getAddressList() throws IOException { 14 | signIn(); 15 | ApiAddressList apiAddressList = new ApiAddressList(); 16 | ApiAddressList.Rsp rsp = client.execute(apiAddressList); 17 | Assert.assertTrue(rsp.getStatus().isSucceed()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_order_history.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiCartDeleteTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | 4 | import com.gfd.eshop.network.api.ApiCartDelete; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | 9 | import java.io.IOException; 10 | 11 | public class ApiCartDeleteTest extends ApiCartCreateTest { 12 | 13 | @Test public void deleteFromCart() throws IOException { 14 | 15 | addToCart(); 16 | ApiCartDelete apiCartDelete = new ApiCartDelete(73); 17 | ApiCartDelete.Rsp rsp = client.execute(apiCartDelete); 18 | Assert.assertTrue(rsp.getStatus().isSucceed()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/Region.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * 区域. 7 | */ 8 | public class Region { 9 | 10 | @SerializedName("id") private int mId; 11 | 12 | @SerializedName("parent_id") private int mParentId; 13 | 14 | @SerializedName("name") private String mName; 15 | 16 | public int getId() { 17 | return mId; 18 | } 19 | 20 | public int getParentId() { 21 | return mParentId; 22 | } 23 | 24 | public String getName() { 25 | return mName; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_username.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_order_unconfirmed.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_primary_category.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/Shipping.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * 派送方式. 7 | */ 8 | public class Shipping { 9 | 10 | @SerializedName("shipping_id") private int mId; 11 | 12 | @SerializedName("shipping_name") private String mName; 13 | 14 | @SerializedName("format_shipping_fee") private String mPrice; 15 | 16 | public int getId() { 17 | return mId; 18 | } 19 | 20 | public String getName() { 21 | return mName; 22 | } 23 | 24 | public String getPrice() { 25 | return mPrice; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/core/ApiInterface.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.core; 2 | 3 | 4 | import androidx.annotation.NonNull; 5 | import androidx.annotation.Nullable; 6 | 7 | /** 8 | * Api接口的抽象, 每一个子类代表一个服务器接口. 9 | */ 10 | public interface ApiInterface { 11 | 12 | /** 13 | * 获取接口路径 14 | * @return 15 | */ 16 | @NonNull 17 | String getPath(); 18 | 19 | /** 20 | * 获取请求参数 21 | * @return 22 | */ 23 | @Nullable 24 | RequestParam getRequestParam(); 25 | 26 | /** 27 | * 响应实体的类型 28 | * @return 29 | */ 30 | @NonNull Class getResponseType(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/Picture.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * 图片实体. 7 | */ 8 | public class Picture { 9 | 10 | @SerializedName("small") private String mSmall; // 小图 11 | 12 | @SerializedName("thumb") private String mMiddle; // 中图 13 | 14 | @SerializedName("url") private String mLarge; // 大图 15 | 16 | public String getSmall() { 17 | return mSmall; 18 | } 19 | 20 | public String getMiddle() { 21 | return mMiddle; 22 | } 23 | 24 | public String getLarge() { 25 | return mLarge; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/test/java/com/gfd/eshop/network/ApiSignInTest.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network; 2 | 3 | import com.gfd.eshop.network.api.ApiSignIn; 4 | 5 | import org.junit.Assert; 6 | import org.junit.Test; 7 | 8 | import java.io.IOException; 9 | 10 | public class ApiSignInTest extends ApiTest { 11 | 12 | @Test public void signIn() throws IOException { 13 | 14 | ApiSignIn apiSignIn = new ApiSignIn("ycj", "123456"); 15 | ApiSignIn.Rsp rsp = client.execute(apiSignIn); 16 | 17 | Assert.assertTrue(rsp.getStatus().isSucceed()); 18 | UserManager.getInstance().setUser(rsp.getData().getUser(), rsp.getData().getSession()); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/Paginated.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * 分页结果 7 | */ 8 | public class Paginated { 9 | 10 | @SerializedName("total") private int mTotal; // 总数 11 | 12 | @SerializedName("count") private int mCount; // 返回条数 13 | 14 | @SerializedName("more") private int mMore; // 是否还有更多 (1为是, 0为否) 15 | 16 | public int getTotal() { 17 | return mTotal; 18 | } 19 | 20 | public int getCount() { 21 | return mCount; 22 | } 23 | 24 | public boolean hasMore() { 25 | return mMore == 1; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_help.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/core/ApiError.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.core; 2 | 3 | /** 4 | * 6 =>'用户名或者密码错误', 5 | * 8 =>'处理失败', 6 | * 11 =>'用户名或email已使用', 7 | * 13 =>'不存在的信息', 8 | * 14 =>'购买失败', 9 | * 100 =>'您的帐号已过期', 10 | * 101 =>'协议格式错误', 11 | * 501 =>'协议格式错误', 12 | * 502 =>'协议格式错误', 13 | * 503 =>'合同期终止', 14 | * 10001=>'您必须选定一个配送方式', 15 | * 10002=>'购物车中没有商品', 16 | * 10003=>'您的余额不足以支付整个订单,请选择其他支付方式', 17 | * 10005=>'您选择的超值礼包数量已经超出库存。请您减少购买量或联系商家。', 18 | * 10006=>'如果是团购,且保证金大于0,不能使用货到付款', 19 | * 10007=>'您已收藏过此商品', 20 | * 10008=>'库存不足', 21 | * 10009=>'订单无发货信息' 22 | */ 23 | public interface ApiError { 24 | int SESSION_EXPIRE = 100; 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/Banner.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | 4 | 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | /** 8 | * 轮播图实体. 9 | */ 10 | public class Banner { 11 | 12 | @SerializedName("photo") private Picture mPicture; // 轮播图图片 13 | 14 | @SerializedName("description") private String mDesc; // 描述 15 | 16 | @SerializedName("url") private String mUrl; // 外链URL 17 | 18 | public Picture getPicture() { 19 | return mPicture; 20 | } 21 | 22 | public String getDesc() { 23 | return mDesc; 24 | } 25 | 26 | public String getUrl() { 27 | return mUrl; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/Status.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * 响应状态对象. 7 | */ 8 | public class Status { 9 | 10 | @SerializedName("succeed") private int mSucceed; 11 | 12 | @SerializedName("error_code") private int mErrorCode; 13 | 14 | @SerializedName("error_desc") private String mErrorDesc; 15 | 16 | public boolean isSucceed() { 17 | return mSucceed == 1; 18 | } 19 | 20 | public int getErrorCode() { 21 | return mErrorCode; 22 | } 23 | 24 | public String getErrorDesc() { 25 | return mErrorDesc; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_order_shipped.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_is_hot_normal.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_is_hot_activated.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_favorite.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/base/glide/DefaultGlideModule.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.base.glide; 2 | 3 | 4 | import android.content.Context; 5 | 6 | import com.bumptech.glide.Glide; 7 | import com.bumptech.glide.GlideBuilder; 8 | import com.bumptech.glide.load.DecodeFormat; 9 | import com.bumptech.glide.module.GlideModule; 10 | 11 | public class DefaultGlideModule implements GlideModule { 12 | 13 | @Override public void applyOptions(Context context, GlideBuilder builder) { 14 | // 增加图片质量 (Glide默认使用RGB565对图片解码) 15 | builder.setDecodeFormat(DecodeFormat.PREFER_ARGB_8888); 16 | } 17 | 18 | @Override public void registerComponents(Context context, Glide glide) { 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_help.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/tab_goods_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/Payment.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * 支付方式. 7 | */ 8 | public class Payment { 9 | 10 | @SerializedName("pay_id") private int mId; 11 | 12 | @SerializedName("pay_name") private String mName; 13 | 14 | @SerializedName("format_pay_fee") private String mPrice; 15 | 16 | @SerializedName("pay_code") private String mCode; 17 | 18 | public int getId() { 19 | return mId; 20 | } 21 | 22 | public String getName() { 23 | return mName; 24 | } 25 | 26 | public String getPrice() { 27 | return mPrice; 28 | } 29 | 30 | public String getCode() { 31 | return mCode; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | -keep public class * implements com.bumptech.glide.module.GlideModule 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/Pagination.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * 分页参数. 7 | */ 8 | public class Pagination { 9 | 10 | @SerializedName("page") private int mPage = 1; // 页码 11 | 12 | @SerializedName("count") private int mCount = 5; // 每页条数 13 | 14 | public Pagination next() { 15 | mPage++; 16 | return this; 17 | } 18 | 19 | public Pagination reset() { 20 | mPage = 1; 21 | return this; 22 | } 23 | 24 | public boolean isFirst() { 25 | return mPage == 1; 26 | } 27 | 28 | public int getPage() { 29 | return mPage; 30 | } 31 | 32 | public int getCount() { 33 | return mCount; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/GoodsSpec.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | public class GoodsSpec { 7 | 8 | public static final int ATTR_TYPE_UNIQUE = 0; 9 | public static final int ATTR_TYPE_SINGLE = 1; 10 | public static final int ATTR_TYPE_MULTIPLE = 2; 11 | 12 | @SerializedName("attr_type") private int mAttrType; 13 | 14 | @SerializedName("name") private String mAttrName; 15 | 16 | public static class GoodsValue { 17 | 18 | @SerializedName("id") private int mId; 19 | 20 | @SerializedName("label") private String mLabel; 21 | 22 | @SerializedName("price") private float mPrice; 23 | 24 | @SerializedName("format_price") private String mFormatPrice; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/widget_load_more_footer.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/feature/goods/comments/GoodsCommentsFragment.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.feature.goods.comments; 2 | 3 | 4 | import com.gfd.eshop.R; 5 | import com.gfd.eshop.base.BaseFragment; 6 | import com.gfd.eshop.network.core.ResponseEntity; 7 | 8 | /** 9 | * 商品评价页面: 不实现, 用空白页面. 10 | */ 11 | public class GoodsCommentsFragment extends BaseFragment { 12 | 13 | public static GoodsCommentsFragment newInstance() { 14 | return new GoodsCommentsFragment(); 15 | } 16 | 17 | @Override protected int getContentViewLayout() { 18 | return R.layout.fragment_goods_comments; 19 | } 20 | 21 | @Override protected void initView() { 22 | } 23 | 24 | @Override 25 | protected void onBusinessResponse(String apiPath, boolean success, ResponseEntity rsp) { 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_item_category_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/horizontal_bar_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/widget_refresh_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/horizontal_card_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/base/widgets/SquareLayout.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.base.widgets; 2 | 3 | 4 | import android.content.Context; 5 | import android.util.AttributeSet; 6 | import android.widget.FrameLayout; 7 | 8 | public class SquareLayout extends FrameLayout { 9 | 10 | public SquareLayout(Context context) { 11 | super(context); 12 | } 13 | 14 | public SquareLayout(Context context, AttributeSet attrs) { 15 | super(context, attrs); 16 | } 17 | 18 | public SquareLayout(Context context, AttributeSet attrs, int defStyleAttr) { 19 | super(context, attrs, defStyleAttr); 20 | } 21 | 22 | @SuppressWarnings("SuspiciousNameCombination") 23 | @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 24 | super.onMeasure(widthMeasureSpec, widthMeasureSpec); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | #FDD835 5 | #FBD536 6 | @color/orange 7 | 8 | 9 | #F6F6F6 10 | #EDE8E8 11 | #939393 12 | #737373 13 | #404245 14 | 15 | #CC737373 16 | 17 | 18 | #7A71E9 19 | #F16755 20 | #F06CA7 21 | #847534 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/network/entity/OrderInfo.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.network.entity; 2 | 3 | 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | public class OrderInfo { 7 | 8 | @SerializedName("pay_code") private String mPayCode; 9 | @SerializedName("order_amount") private float mPrice; 10 | @SerializedName("order_id") private int mId; 11 | @SerializedName("subject") private String mSubject; 12 | @SerializedName("desc") private String mDesc; 13 | 14 | public String getPayCode() { 15 | return mPayCode; 16 | } 17 | 18 | public float getPrice() { 19 | return mPrice; 20 | } 21 | 22 | public int getId() { 23 | return mId; 24 | } 25 | 26 | public String getSubject() { 27 | return mSubject; 28 | } 29 | 30 | public String getDesc() { 31 | return mDesc; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/feature/EShopApplication.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.feature; 2 | 3 | 4 | import android.app.Application; 5 | 6 | import androidx.preference.PreferenceManager; 7 | 8 | import com.gfd.eshop.R; 9 | import com.gfd.eshop.base.wrapper.ToastWrapper; 10 | import com.squareup.leakcanary.LeakCanary; 11 | 12 | /** 13 | * App-Application 14 | */ 15 | public class EShopApplication extends Application { 16 | 17 | @Override public void onCreate() { 18 | super.onCreate(); 19 | if (LeakCanary.isInAnalyzerProcess(this)) { 20 | // 此进程是LeakCanary用于内存堆分析的. 21 | // 不应该在此进程中做任何app初始化工作. 22 | return; 23 | } 24 | //初始化LeakCanary 25 | LeakCanary.install(this); 26 | //初始化Toast工具类 27 | ToastWrapper.init(this); 28 | //设置偏好设置 29 | PreferenceManager.setDefaultValues(this, R.xml.preferences, false); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_collect.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 16 | 17 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/widget_banner_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_home_goods.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 18 | 19 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/gfd/eshop/base/wrapper/ToastWrapper.java: -------------------------------------------------------------------------------- 1 | package com.gfd.eshop.base.wrapper; 2 | 3 | 4 | import android.content.Context; 5 | import android.widget.Toast; 6 | 7 | /** 8 | * Toast包装类 9 | */ 10 | public class ToastWrapper { 11 | 12 | private static Toast mToast; 13 | 14 | /** 15 | * 初始化操作 16 | * @param context:上下文 17 | */ 18 | public static void init(Context context) { 19 | mToast = Toast.makeText(context, null, Toast.LENGTH_SHORT); 20 | mToast.setDuration(Toast.LENGTH_SHORT); 21 | } 22 | 23 | /** 24 | * 以Toast形式显示文本-单例模式 25 | * 26 | * @param resId:str资源id 27 | */ 28 | public static void show(int resId) { 29 | mToast.setText(resId); 30 | mToast.show(); 31 | } 32 | 33 | /** 34 | * 以Toast形式显示文本-单例模式 35 | * 36 | * @param charSequence 37 | */ 38 | public static void show(CharSequence charSequence) { 39 | mToast.setText(charSequence); 40 | mToast.show(); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/tab_query_order_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_order_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 16 | 17 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_manage_address.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 17 | 18 |