├── .gitignore ├── .idea ├── codeStyles │ └── Project.xml ├── gradle.xml ├── misc.xml ├── runConfigurations.xml └── vcs.xml ├── README.md ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── model_mall ├── .gitignore ├── build.gradle ├── libs │ ├── MobCommons-2019.0306.1851.jar │ ├── MobTools-2019.0306.1850.jar │ ├── ShareSDK-Core-3.5.0.jar │ ├── ShareSDK-Douban-3.5.0.jar │ ├── ShareSDK-Douyin-3.5.0.jar │ ├── ShareSDK-Email-3.5.0.jar │ ├── ShareSDK-Facebook-3.5.0.jar │ ├── ShareSDK-GooglePlus-3.5.0.jar │ ├── ShareSDK-QQ-3.5.0.jar │ ├── ShareSDK-QZone-3.5.0.jar │ ├── ShareSDK-ShortMessage-3.5.0.jar │ ├── ShareSDK-SinaWeibo-3.5.0.jar │ ├── ShareSDK-Twitter-3.5.0.jar │ ├── ShareSDK-Wechat-3.5.0.jar │ ├── ShareSDK-Wechat-Core-3.5.0.jar │ ├── ShareSDK-Wechat-Favorite-3.5.0.jar │ ├── ShareSDK-Wechat-Moments-3.5.0.jar │ ├── ShareSDK-YouDao-3.5.0.jar │ └── ShareSDK-Youtube-3.5.0.jar ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── example │ │ └── administrator │ │ └── modelmall │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── ShareSDK.xml │ │ ├── iconfont.ttf │ │ ├── like.json │ │ ├── litepal.xml │ │ └── loading.json │ ├── java │ │ ├── cn │ │ │ └── sharesdk │ │ │ │ └── onekeyshare │ │ │ │ ├── CustomerLogo.java │ │ │ │ ├── OnekeyShare.java │ │ │ │ ├── OnekeySharePage.java │ │ │ │ ├── OnekeyShareTheme.java │ │ │ │ ├── OnekeyShareThemeImpl.java │ │ │ │ ├── ShareContentCustomizeCallback.java │ │ │ │ └── themes │ │ │ │ └── classic │ │ │ │ ├── ClassicTheme.java │ │ │ │ ├── EditPage.java │ │ │ │ ├── FriendAdapter.java │ │ │ │ ├── FriendListItem.java │ │ │ │ ├── FriendListPage.java │ │ │ │ ├── IndicatorView.java │ │ │ │ ├── PRTHeader.java │ │ │ │ ├── PicViewerPage.java │ │ │ │ ├── PlatformPage.java │ │ │ │ ├── PlatformPageAdapter.java │ │ │ │ ├── RotateImageView.java │ │ │ │ ├── XView.java │ │ │ │ ├── land │ │ │ │ ├── EditPageLand.java │ │ │ │ ├── FriendListPageLand.java │ │ │ │ ├── PlatformPageAdapterLand.java │ │ │ │ └── PlatformPageLand.java │ │ │ │ └── port │ │ │ │ ├── EditPagePort.java │ │ │ │ ├── FriendListPagePort.java │ │ │ │ ├── PlatformPageAdapterPort.java │ │ │ │ └── PlatformPagePort.java │ │ └── com │ │ │ └── example │ │ │ └── administrator │ │ │ └── modelmall │ │ │ ├── Constant │ │ │ └── ModelConstant.java │ │ │ ├── adapter │ │ │ ├── FindAdapter.java │ │ │ ├── MainPageAdapter.java │ │ │ ├── MainPageBannerAdapter.java │ │ │ ├── MainPageClassifyGridItemAdapter.java │ │ │ ├── MainPageHotSortAdapter.java │ │ │ ├── MainPageMoreImageAdapter.java │ │ │ ├── MainPageRecommentAdapter.java │ │ │ ├── MainPageSingleImageAdapter.java │ │ │ ├── ShopCartAdapter.java │ │ │ └── SortLeftAdapter.java │ │ │ ├── application │ │ │ └── LatteApplication.java │ │ │ ├── base │ │ │ ├── BasePage.java │ │ │ ├── FindPageFactory.java │ │ │ ├── MainPageFactory.java │ │ │ ├── MinePageFactory.java │ │ │ ├── Provider.java │ │ │ ├── ShoppingPageFactory.java │ │ │ ├── SortPageFactory.java │ │ │ └── impl │ │ │ │ ├── FindPageImpl.java │ │ │ │ ├── MainPageImpl.java │ │ │ │ ├── MinePageImpl.java │ │ │ │ ├── ShoppingPageImpl.java │ │ │ │ └── SortPageImpl.java │ │ │ ├── db │ │ │ └── UserRegisterBean.java │ │ │ ├── entity │ │ │ ├── EntityMainPage.java │ │ │ └── GoodsInfo.java │ │ │ ├── events │ │ │ └── GoodInfoMsg.java │ │ │ ├── icon │ │ │ ├── FontModel.java │ │ │ └── IconModel.java │ │ │ ├── loader │ │ │ └── ModelImageLoader.java │ │ │ ├── net │ │ │ ├── CommonOkHttpClient.java │ │ │ ├── exception │ │ │ │ └── OkHttpException.java │ │ │ ├── https │ │ │ │ └── HttpsUtils.java │ │ │ ├── listener │ │ │ │ ├── DisposeDataHandle.java │ │ │ │ └── DisposeDataListener.java │ │ │ ├── request │ │ │ │ ├── CommonRequest.java │ │ │ │ └── RequestParams.java │ │ │ └── response │ │ │ │ └── CommonJsonCallback.java │ │ │ ├── ui │ │ │ ├── activities │ │ │ │ ├── AboutActivity.java │ │ │ │ ├── BaseActivity.java │ │ │ │ ├── CountDownActivity.java │ │ │ │ ├── GoodsInfoActivity.java │ │ │ │ ├── GuideActivity.java │ │ │ │ ├── LoginActivity.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── MsgActivity.java │ │ │ │ ├── SearchActivity.java │ │ │ │ └── SignupActivity.java │ │ │ ├── customview │ │ │ │ ├── CustomDialog.java │ │ │ │ ├── StatusBarUtils.java │ │ │ │ └── ToastUtils.java │ │ │ └── fragments │ │ │ │ └── readme.text │ │ │ ├── utils │ │ │ ├── ModelPreference.java │ │ │ ├── RegularVerification.java │ │ │ └── TimeCount.java │ │ │ └── wxapi │ │ │ └── WXEntryActivity.java │ └── res │ │ ├── drawable-hdpi │ │ └── ssdk_oks_ptr_ptr.png │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable-xhdpi │ │ ├── big1.jpg │ │ ├── big2.jpg │ │ ├── big3.jpg │ │ ├── cat.png │ │ ├── chengxuyuan.jpg │ │ ├── faxian.png │ │ ├── fenlei.png │ │ ├── gouwuche.png │ │ ├── img_big.png │ │ ├── img_small.jpg │ │ ├── kong.jpg │ │ ├── launcher_00.jpeg │ │ ├── launcher_01.jpeg │ │ ├── launcher_02.jpeg │ │ ├── launcher_03.jpeg │ │ ├── launcher_04.jpeg │ │ ├── launcher_05.jpeg │ │ ├── more.png │ │ ├── msg.jpg │ │ ├── saoyisao.png │ │ ├── single.png │ │ ├── small1.jpg │ │ ├── small2.jpg │ │ ├── small3.jpg │ │ ├── ssdk_auth_title_back.png │ │ ├── ssdk_back_arr.png │ │ ├── ssdk_checkboxed.png │ │ ├── ssdk_country_back_arrow.png │ │ ├── ssdk_country_cl_divider.png │ │ ├── ssdk_country_clear_search.png │ │ ├── ssdk_country_search_icon.png │ │ ├── ssdk_country_sharesdk_icon.png │ │ ├── ssdk_exception_icon.png │ │ ├── ssdk_identify_icon.png │ │ ├── ssdk_input_bg_focus.9.png │ │ ├── ssdk_left_back.png │ │ ├── ssdk_load_dot_white.png │ │ ├── ssdk_loading.png │ │ ├── ssdk_logo.png │ │ ├── ssdk_mobile_logo.png │ │ ├── ssdk_oks_classic_accountkit.png │ │ ├── ssdk_oks_classic_alipay.png │ │ ├── ssdk_oks_classic_alipaymoments.png │ │ ├── ssdk_oks_classic_bluetooth.png │ │ ├── ssdk_oks_classic_check_checked.png │ │ ├── ssdk_oks_classic_check_default.png │ │ ├── ssdk_oks_classic_cmcc.png │ │ ├── ssdk_oks_classic_dingding.png │ │ ├── ssdk_oks_classic_douban.png │ │ ├── ssdk_oks_classic_douyin.png │ │ ├── ssdk_oks_classic_dropbox.png │ │ ├── ssdk_oks_classic_email.png │ │ ├── ssdk_oks_classic_evernote.png │ │ ├── ssdk_oks_classic_facebook.png │ │ ├── ssdk_oks_classic_facebookmessenger.png │ │ ├── ssdk_oks_classic_flickr.png │ │ ├── ssdk_oks_classic_foursquare.png │ │ ├── ssdk_oks_classic_googleplus.png │ │ ├── ssdk_oks_classic_instagram.png │ │ ├── ssdk_oks_classic_instapaper.png │ │ ├── ssdk_oks_classic_kaixin.png │ │ ├── ssdk_oks_classic_kakaostory.png │ │ ├── ssdk_oks_classic_kakaotalk.png │ │ ├── ssdk_oks_classic_laiwang.png │ │ ├── ssdk_oks_classic_laiwangmoments.png │ │ ├── ssdk_oks_classic_line.png │ │ ├── ssdk_oks_classic_linkedin.png │ │ ├── ssdk_oks_classic_meipai.png │ │ ├── ssdk_oks_classic_mingdao.png │ │ ├── ssdk_oks_classic_pinterest.png │ │ ├── ssdk_oks_classic_pocket.png │ │ ├── ssdk_oks_classic_qq.png │ │ ├── ssdk_oks_classic_qzone.png │ │ ├── ssdk_oks_classic_reddit.png │ │ ├── ssdk_oks_classic_renren.png │ │ ├── ssdk_oks_classic_shortmessage.png │ │ ├── ssdk_oks_classic_sinaweibo.png │ │ ├── ssdk_oks_classic_telecom.png │ │ ├── ssdk_oks_classic_telegram.png │ │ ├── ssdk_oks_classic_tencentweibo.png │ │ ├── ssdk_oks_classic_tumblr.png │ │ ├── ssdk_oks_classic_twitter.png │ │ ├── ssdk_oks_classic_vkontakte.png │ │ ├── ssdk_oks_classic_wechat.png │ │ ├── ssdk_oks_classic_wechatfavorite.png │ │ ├── ssdk_oks_classic_wechatmoments.png │ │ ├── ssdk_oks_classic_whatsapp.png │ │ ├── ssdk_oks_classic_yixin.png │ │ ├── ssdk_oks_classic_yixinmoments.png │ │ ├── ssdk_oks_classic_youdao.png │ │ ├── ssdk_oks_classic_youtube.png │ │ ├── ssdk_title_div.png │ │ ├── ssdk_weibo_common_shadow_top.9.png │ │ ├── ssdk_weibo_empty_failed.png │ │ ├── tuijian.png │ │ ├── tv_bg.jpg │ │ ├── user_head.jpg │ │ ├── wode.png │ │ ├── xiaoxi.png │ │ └── zhuye.png │ │ ├── drawable │ │ ├── bg_btn_start.xml │ │ ├── bg_circle_countdown.xml │ │ ├── bg_summary.xml │ │ ├── click_selector.xml │ │ ├── ic_launcher_background.xml │ │ ├── normal_selector.xml │ │ ├── ssdk_oks_classic_platform_cell_back.xml │ │ └── ssdk_oks_classic_progressbar.xml │ │ ├── layout │ │ ├── activity_about.xml │ │ ├── activity_countdown.xml │ │ ├── activity_goods_info.xml │ │ ├── activity_guide.xml │ │ ├── activity_login.xml │ │ ├── activity_main.xml │ │ ├── activity_msg.xml │ │ ├── activity_search.xml │ │ ├── activity_sign_up.xml │ │ ├── goods_item.xml │ │ ├── image_more.xml │ │ ├── image_single_grid.xml │ │ ├── item_banner.xml │ │ ├── item_classfiy_grid.xml │ │ ├── item_findpage.xml │ │ ├── item_hotsort.xml │ │ ├── page_find.xml │ │ ├── page_main.xml │ │ ├── page_mine.xml │ │ ├── page_recomment.xml │ │ ├── page_shopping.xml │ │ ├── page_sort.xml │ │ ├── select_addr_dialog.xml │ │ ├── select_clothes_dialog.xml │ │ ├── sortpage_left.xml │ │ └── toast.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── app_icon.jpg │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-en │ │ ├── ssdk_country_arrays.xml │ │ ├── ssdk_oks_strings.xml │ │ └── ssdk_strings.xml │ │ └── values │ │ ├── colors.xml │ │ ├── ssdk_country_arrays.xml │ │ ├── ssdk_instapaper_strings.xml │ │ ├── ssdk_oks_color_drawables.xml │ │ ├── ssdk_oks_strings.xml │ │ ├── ssdk_strings.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── example │ └── administrator │ └── modelmall │ └── ExampleUnitTest.java └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches/build_file_checksums.ser 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | .DS_Store 9 | /build 10 | /captures 11 | .externalNativeBuild 12 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 31 | 32 | 33 | 34 | 35 | 36 | 38 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # ModelMall 4 | 5 | ###### 效果图 6 | ![在这里插入图片描述](https://img-blog.csdnimg.cn/20190326205838210.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM4MzUwNjM1,size_16,color_FFFFFF,t_70) 7 | 8 | 9 | ![在这里插入图片描述](https://img-blog.csdnimg.cn/20190326205859254.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM4MzUwNjM1,size_16,color_FFFFFF,t_70) 10 | ![在这里插入图片描述](https://img-blog.csdnimg.cn/20190326203302667.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM4MzUwNjM1,size_16,color_FFFFFF,t_70) 11 | 12 | ![在这里插入图片描述](https://img-blog.csdnimg.cn/20190326203320958.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM4MzUwNjM1,size_16,color_FFFFFF,t_70) 13 | 14 | ![在这里插入图片描述](https://img-blog.csdnimg.cn/20190326203344933.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM4MzUwNjM1,size_16,color_FFFFFF,t_70) 15 | 16 | ![在这里插入图片描述](https://img-blog.csdnimg.cn/20190326203424737.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM4MzUwNjM1,size_16,color_FFFFFF,t_70) 17 | 18 | ![在这里插入图片描述](https://img-blog.csdnimg.cn/20190326203433920.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM4MzUwNjM1,size_16,color_FFFFFF,t_70) 19 | 20 | ![在这里插入图片描述](https://img-blog.csdnimg.cn/20190326204752485.gif) 21 | 22 | 23 | ###### ps 24 | 25 | 非常抱歉,这个项目的初衷是为了应付毕设而写,项目的数据都是我自己模拟的json放到了鸿洋大佬的玩安卓网站上面的,当时网站是提供了mockapi的接口的,后来发现因为某些原因,大佬吧这项功能关闭啦。现在项目的网络相关的数据展示就gg啦,,,,,这个项目是我参考了慕课网上的一个电商而改写的。有兴趣的大家可以搜索学习下,挺不错的。 26 | 27 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | mavenCentral() 7 | jcenter() 8 | google() 9 | } 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.0.0' 12 | 13 | 14 | // NOTE: Do not place your application dependencies here; they belong 15 | // in the individual module build.gradle files 16 | } 17 | } 18 | 19 | allprojects { 20 | repositories { 21 | mavenCentral() 22 | jcenter() 23 | google() 24 | } 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | 31 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | 15 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /model_mall/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /model_mall/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 27 5 | defaultConfig { 6 | applicationId "com.example.administrator.modelmall" 7 | minSdkVersion 19 8 | targetSdkVersion 27 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | 13 | } 14 | 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | } 22 | 23 | dependencies { 24 | implementation fileTree(include: ['*.jar'], dir: 'libs') 25 | implementation 'com.android.support:appcompat-v7:27.1.1' 26 | implementation 'com.android.support.constraint:constraint-layout:1.1.3' 27 | testImplementation 'junit:junit:4.12' 28 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 29 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 30 | //logger 31 | implementation 'com.orhanobut:logger:2.2.0' 32 | // 黄油刀 33 | implementation 'com.jakewharton:butterknife:8.8.0' 34 | annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.0' 35 | implementation 'com.ashokvarma.android:bottom-navigation-bar:2.1.0'// 底部导航 36 | implementation 'com.squareup.okhttp3:okhttp:3.4.1' // okhttp 37 | implementation 'com.google.code.gson:gson:2.6.2' //Gson 库 38 | implementation 'com.android.support:cardview-v7:27.1.1' //cardview 39 | implementation 'com.android.support:recyclerview-v7:27.1.1' //recyclerview 40 | implementation 'com.github.bumptech.glide:glide:4.9.0' //glide 41 | implementation 'com.youth.banner:banner:1.4.10' //banner 轮播 42 | implementation 'com.android.support:design:27.1.1' 43 | implementation 'org.litepal.android:core:1.4.1' // litepal数据库 44 | //字体图标库 45 | implementation 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2' 46 | implementation 'com.joanzapata.iconify:android-iconify-ionicons:2.2.2' 47 | // vLayout 48 | implementation('com.alibaba.android:vlayout:1.2.8@aar') { 49 | transitive = true 50 | exclude group: 'com.android.support' 51 | } 52 | implementation 'com.airbnb.android:lottie:2.5.1' // lottie动画 53 | implementation 'com.orhanobut:dialogplus:1.11@aar' // 对话框 54 | implementation 'org.greenrobot:eventbus:3.0.0' //eventBus 55 | implementation 'de.hdodenhof:circleimageview:3.0.0' // 圆图片 56 | implementation 'com.journeyapps:zxing-android-embedded:3.6.0' //扫码 57 | implementation 'com.carson_ho:SearchLayout:1.0.1' //搜索框 58 | 59 | // sharesdk 参考libs 60 | implementation files('libs/MobTools-2019.0306.1850.jar') 61 | implementation files('libs/ShareSDK-Facebook-3.5.0.jar') 62 | implementation files('libs/ShareSDK-Wechat-Moments-3.5.0.jar') 63 | implementation files('libs/ShareSDK-Wechat-Core-3.5.0.jar') 64 | implementation files('libs/MobCommons-2019.0306.1851.jar') 65 | implementation files('libs/ShareSDK-Douban-3.5.0.jar') 66 | implementation files('libs/ShareSDK-SinaWeibo-3.5.0.jar') 67 | implementation files('libs/ShareSDK-QZone-3.5.0.jar') 68 | implementation files('libs/ShareSDK-ShortMessage-3.5.0.jar') 69 | implementation files('libs/ShareSDK-GooglePlus-3.5.0.jar') 70 | implementation files('libs/ShareSDK-Wechat-3.5.0.jar') 71 | implementation files('libs/ShareSDK-YouDao-3.5.0.jar') 72 | implementation files('libs/ShareSDK-Youtube-3.5.0.jar') 73 | implementation files('libs/ShareSDK-Wechat-Favorite-3.5.0.jar') 74 | implementation files('libs/ShareSDK-Email-3.5.0.jar') 75 | implementation files('libs/ShareSDK-Core-3.5.0.jar') 76 | implementation files('libs/ShareSDK-Douyin-3.5.0.jar') 77 | implementation files('libs/ShareSDK-QQ-3.5.0.jar') 78 | implementation files('libs/ShareSDK-Twitter-3.5.0.jar') 79 | } 80 | -------------------------------------------------------------------------------- /model_mall/libs/MobCommons-2019.0306.1851.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/MobCommons-2019.0306.1851.jar -------------------------------------------------------------------------------- /model_mall/libs/MobTools-2019.0306.1850.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/MobTools-2019.0306.1850.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-Core-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-Core-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-Douban-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-Douban-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-Douyin-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-Douyin-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-Email-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-Email-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-Facebook-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-Facebook-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-GooglePlus-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-GooglePlus-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-QQ-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-QQ-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-QZone-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-QZone-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-ShortMessage-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-ShortMessage-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-SinaWeibo-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-SinaWeibo-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-Twitter-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-Twitter-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-Wechat-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-Wechat-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-Wechat-Core-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-Wechat-Core-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-Wechat-Favorite-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-Wechat-Favorite-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-Wechat-Moments-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-Wechat-Moments-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-YouDao-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-YouDao-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/libs/ShareSDK-Youtube-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/libs/ShareSDK-Youtube-3.5.0.jar -------------------------------------------------------------------------------- /model_mall/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /model_mall/src/androidTest/java/com/example/administrator/modelmall/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.example.administrator.modelmall", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /model_mall/src/main/assets/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/assets/iconfont.ttf -------------------------------------------------------------------------------- /model_mall/src/main/assets/litepal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/CustomerLogo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare; 10 | 11 | import android.graphics.Bitmap; 12 | import android.view.View.OnClickListener; 13 | 14 | /** 九宫格自定义的图标对象 */ 15 | public class CustomerLogo { 16 | public String label; 17 | public Bitmap logo; 18 | public OnClickListener listener; 19 | } 20 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/OnekeySharePage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare; 10 | 11 | import java.util.ArrayList; 12 | import java.util.HashMap; 13 | 14 | import cn.sharesdk.framework.Platform; 15 | import cn.sharesdk.framework.Platform.ShareParams; 16 | import cn.sharesdk.framework.PlatformActionListener; 17 | 18 | import com.mob.tools.FakeActivity; 19 | 20 | /** 快捷分享的基类 */ 21 | public class OnekeySharePage extends FakeActivity { 22 | private OnekeyShareThemeImpl impl; 23 | 24 | public OnekeySharePage(OnekeyShareThemeImpl impl) { 25 | this.impl = impl; 26 | } 27 | 28 | /** 分享界面是否弹窗模式 */ 29 | 30 | protected final boolean isDialogMode() { 31 | return impl.dialogMode; 32 | } 33 | 34 | protected final HashMap getShareParamsMap() { 35 | return impl.shareParamsMap; 36 | } 37 | 38 | /** 静默分享开关(没有界面,直接分享 )*/ 39 | protected final boolean isSilent() { 40 | return impl.silent; 41 | } 42 | 43 | protected final ArrayList getCustomerLogos() { 44 | return impl.customerLogos; 45 | } 46 | 47 | protected final HashMap getHiddenPlatforms() { 48 | return impl.hiddenPlatforms; 49 | } 50 | 51 | protected final PlatformActionListener getCallback() { 52 | return impl.callback; 53 | } 54 | 55 | protected final ShareContentCustomizeCallback getCustomizeCallback() { 56 | return impl.customizeCallback; 57 | } 58 | 59 | protected final boolean isDisableSSO() { 60 | return impl.disableSSO; 61 | } 62 | 63 | protected final void shareSilently(Platform platform) { 64 | impl.shareSilently(platform); 65 | } 66 | 67 | protected final ShareParams formateShareData(Platform platform) { 68 | if (impl.formateShareData(platform)) { 69 | return impl.shareDataToShareParams(platform); 70 | } 71 | return null; 72 | } 73 | 74 | protected final boolean isUseClientToShare(Platform platform) { 75 | return impl.isUseClientToShare(platform); 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/OnekeyShareTheme.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare; 10 | import cn.sharesdk.onekeyshare.themes.classic.ClassicTheme; 11 | 12 | /** 快捷分享的主题样式 */ 13 | public enum OnekeyShareTheme { 14 | //test please igronre 15 | /** 九格宫的主题样式 ,对应的实现类ClassicTheme */ 16 | CLASSIC(0, new ClassicTheme()); 17 | 18 | private final int value; 19 | private final OnekeyShareThemeImpl impl; 20 | 21 | private OnekeyShareTheme(int value, OnekeyShareThemeImpl impl) { 22 | this.value = value; 23 | this.impl = impl; 24 | } 25 | 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | public OnekeyShareThemeImpl getImpl() { 31 | return impl; 32 | } 33 | 34 | public static OnekeyShareTheme fromValue(int value) { 35 | for (OnekeyShareTheme theme : OnekeyShareTheme.values()) { 36 | if (theme.value == value) { 37 | return theme; 38 | } 39 | } 40 | return CLASSIC; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/ShareContentCustomizeCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare; 10 | 11 | import cn.sharesdk.framework.Platform; 12 | import cn.sharesdk.framework.Platform.ShareParams; 13 | 14 | /** 自定义不同平台分享不同内容的接口 */ 15 | public interface ShareContentCustomizeCallback { 16 | 17 | public void onShare(Platform platform, ShareParams paramsToShare); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/ClassicTheme.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic; 10 | 11 | import android.content.Context; 12 | import android.content.res.Configuration; 13 | 14 | import cn.sharesdk.framework.Platform; 15 | import cn.sharesdk.framework.Platform.ShareParams; 16 | import cn.sharesdk.onekeyshare.OnekeyShareThemeImpl; 17 | import cn.sharesdk.onekeyshare.themes.classic.land.EditPageLand; 18 | import cn.sharesdk.onekeyshare.themes.classic.land.PlatformPageLand; 19 | import cn.sharesdk.onekeyshare.themes.classic.port.EditPagePort; 20 | import cn.sharesdk.onekeyshare.themes.classic.port.PlatformPagePort; 21 | 22 | /** 九宫格经典主题样式的实现类*/ 23 | public class ClassicTheme extends OnekeyShareThemeImpl { 24 | 25 | /** 展示平台列表*/ 26 | 27 | // 两次弹出九宫格间隔不能少于1000毫秒 28 | private static final int MIN_CLICK_DELAY_TIME = 1000; 29 | private static long lastTime; 30 | 31 | protected void showPlatformPage(Context context) { 32 | PlatformPage page; 33 | int orientation = context.getResources().getConfiguration().orientation; 34 | if (orientation == Configuration.ORIENTATION_PORTRAIT) { 35 | page = new PlatformPagePort(this); 36 | } else { 37 | page = new PlatformPageLand(this); 38 | } 39 | long currentTime = System.currentTimeMillis(); 40 | if ((currentTime - lastTime) >= MIN_CLICK_DELAY_TIME) { 41 | page.show(context, null); 42 | } 43 | lastTime = currentTime; 44 | 45 | } 46 | 47 | /** 展示编辑界面*/ 48 | protected void showEditPage(Context context, Platform platform, ShareParams sp) { 49 | EditPage page; 50 | int orientation = context.getResources().getConfiguration().orientation; 51 | if (orientation == Configuration.ORIENTATION_PORTRAIT) { 52 | page = new EditPagePort(this); 53 | } else { 54 | page = new EditPageLand(this); 55 | } 56 | page.setPlatform(platform); 57 | page.setShareParams(sp); 58 | page.show(context, null); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/FriendListItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic; 10 | 11 | import android.content.Context; 12 | import android.graphics.Bitmap; 13 | import android.graphics.BitmapFactory; 14 | import android.util.TypedValue; 15 | import android.view.Gravity; 16 | import android.widget.ImageView; 17 | import android.widget.LinearLayout; 18 | import android.widget.TextView; 19 | 20 | import com.mob.tools.gui.AsyncImageView; 21 | import com.mob.tools.gui.BitmapProcessor; 22 | import com.mob.tools.utils.ResHelper; 23 | 24 | import cn.sharesdk.onekeyshare.themes.classic.FriendAdapter.Following; 25 | 26 | /** 好友列表的item */ 27 | public class FriendListItem extends LinearLayout { 28 | private static final int DESIGN_AVATAR_WIDTH = 64; 29 | private static final int DESIGN_AVATAR_PADDING = 24; 30 | private static final int DESIGN_ITEM_HEIGHT = 96; 31 | private static final int DESIGN_ITEM_PADDING = 20; 32 | 33 | private ImageView ivCheck; 34 | private AsyncImageView aivIcon; 35 | private TextView tvName; 36 | /** 好友列表中,被选中的checkbox图标 */ 37 | private Bitmap bmChd; 38 | /** 好友列表中,没选中的checkbox图标 */ 39 | private Bitmap bmUnch; 40 | 41 | public FriendListItem(Context context, float ratio) { 42 | super(context); 43 | int itemPadding = (int) (ratio * DESIGN_ITEM_PADDING); 44 | setPadding(itemPadding, 0, itemPadding, 0); 45 | setMinimumHeight((int) (ratio * DESIGN_ITEM_HEIGHT)); 46 | setBackgroundColor(0xffffffff); 47 | 48 | ivCheck = new ImageView(context); 49 | LayoutParams lp = new LayoutParams( 50 | LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); 51 | lp.gravity = Gravity.CENTER_VERTICAL; 52 | addView(ivCheck, lp); 53 | 54 | aivIcon = new AsyncImageView(context); 55 | int avatarWidth = (int) (ratio * DESIGN_AVATAR_WIDTH); 56 | lp = new LayoutParams(avatarWidth, avatarWidth); 57 | lp.gravity = Gravity.CENTER_VERTICAL; 58 | int avatarMargin = (int) (ratio * DESIGN_AVATAR_PADDING); 59 | lp.setMargins(avatarMargin, 0, avatarMargin, 0); 60 | addView(aivIcon, lp); 61 | 62 | tvName = new TextView(context); 63 | tvName.setTextColor(0xff000000); 64 | tvName.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18); 65 | tvName.setSingleLine(); 66 | lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); 67 | lp.gravity = Gravity.CENTER_VERTICAL; 68 | lp.weight = 1; 69 | addView(tvName, lp); 70 | 71 | int resId = ResHelper.getBitmapRes(context, "ssdk_oks_classic_check_checked"); 72 | if (resId > 0) { 73 | bmChd = BitmapFactory.decodeResource(context.getResources(), resId); 74 | } 75 | resId = ResHelper.getBitmapRes(getContext(), "ssdk_oks_classic_check_default"); 76 | if (resId > 0) { 77 | bmUnch = BitmapFactory.decodeResource(context.getResources(), resId); 78 | } 79 | } 80 | 81 | public void update(Following following, boolean fling) { 82 | tvName.setText(following.screenName); 83 | ivCheck.setImageBitmap(following.checked ? bmChd : bmUnch); 84 | if (aivIcon != null) { 85 | if (fling) { 86 | Bitmap bm = BitmapProcessor.getBitmapFromCache(following.icon); 87 | if (bm != null && !bm.isRecycled()) { 88 | aivIcon.setImageBitmap(bm); 89 | } else { 90 | aivIcon.execute(null, 0); 91 | } 92 | } else { 93 | aivIcon.execute(following.icon, 0); 94 | } 95 | } 96 | } 97 | 98 | } 99 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/IndicatorView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic; 10 | 11 | import android.content.Context; 12 | import android.graphics.Canvas; 13 | import android.graphics.Paint; 14 | import android.view.View; 15 | 16 | /** 九宫格滑动时,下面显示的圆圈 */ 17 | public class IndicatorView extends View { 18 | private static final int DESIGN_INDICATOR_RADIUS = 6; 19 | private static final int DESIGN_INDICATOR_DISTANCE = 14; 20 | private static final int DESIGN_BOTTOM_HEIGHT = 52; 21 | /** 九格宫有多少页数 */ 22 | private int count; 23 | /** 当前显示的是九格宫中的第几页 */ 24 | private int current; 25 | 26 | public IndicatorView(Context context) { 27 | super(context); 28 | } 29 | 30 | public void setScreenCount(int count) { 31 | this.count = count; 32 | } 33 | 34 | public void onScreenChange(int currentScreen, int lastScreen) { 35 | if (currentScreen != current) { 36 | current = currentScreen; 37 | postInvalidate(); 38 | } 39 | } 40 | 41 | protected void onDraw(Canvas canvas) { 42 | if (count <= 1) { 43 | this.setVisibility(View.GONE); 44 | return; 45 | } 46 | float height = getHeight(); 47 | float radius = height * DESIGN_INDICATOR_RADIUS / DESIGN_BOTTOM_HEIGHT; 48 | float distance = height * DESIGN_INDICATOR_DISTANCE / DESIGN_BOTTOM_HEIGHT; 49 | float windowWidth = radius * 2 * count + distance * (count - 1); 50 | float left = (getWidth() - windowWidth) / 2; 51 | float cy = height / 2; 52 | 53 | canvas.drawColor(0xffffffff); 54 | Paint paint = new Paint(); 55 | paint.setAntiAlias(true); 56 | for (int i = 0; i < count; i++) { 57 | if (i == current) { 58 | paint.setColor(0xff5d71a0); 59 | } else { 60 | paint.setColor(0xffafb1b7); 61 | } 62 | float cx = left + (radius * 2 + distance) * i; 63 | canvas.drawCircle(cx, cy, radius, paint); 64 | } 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/PRTHeader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic; 10 | 11 | import android.content.Context; 12 | import android.graphics.drawable.Drawable; 13 | import android.util.TypedValue; 14 | import android.view.Gravity; 15 | import android.view.View; 16 | import android.widget.LinearLayout; 17 | import android.widget.ProgressBar; 18 | import android.widget.TextView; 19 | 20 | import com.mob.tools.utils.ResHelper; 21 | 22 | /** 下拉刷新的头部控件 */ 23 | public class PRTHeader extends LinearLayout { 24 | private static final int DESIGN_SCREEN_WIDTH = 720; 25 | private static final int DESIGN_AVATAR_WIDTH = 64; 26 | private static final int DESIGN_AVATAR_PADDING = 24; 27 | 28 | private TextView tvHeader; 29 | private RotateImageView ivArrow; 30 | private ProgressBar pbRefreshing; 31 | 32 | public PRTHeader(Context context) { 33 | super(context); 34 | int[] size = ResHelper.getScreenSize(context); 35 | float screenWidth = size[0] < size[1] ? size[0] : size[1]; 36 | float ratio = screenWidth / DESIGN_SCREEN_WIDTH; 37 | 38 | setOrientation(VERTICAL); 39 | 40 | LinearLayout llInner = new LinearLayout(context); 41 | LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); 42 | lp.gravity = Gravity.CENTER_HORIZONTAL; 43 | addView(llInner, lp); 44 | 45 | ivArrow = new RotateImageView(context); 46 | int resId = ResHelper.getBitmapRes(context, "ssdk_oks_ptr_ptr"); 47 | if (resId > 0) { 48 | ivArrow.setImageResource(resId); 49 | } 50 | int avatarWidth = (int) (ratio * DESIGN_AVATAR_WIDTH); 51 | lp = new LayoutParams(avatarWidth, avatarWidth); 52 | lp.gravity = Gravity.CENTER_VERTICAL; 53 | int avataPadding = (int) (ratio * DESIGN_AVATAR_PADDING); 54 | lp.topMargin = lp.bottomMargin = avataPadding; 55 | llInner.addView(ivArrow, lp); 56 | 57 | pbRefreshing = new ProgressBar(context); 58 | resId = ResHelper.getBitmapRes(context, "ssdk_oks_classic_progressbar"); 59 | Drawable pbdrawable = context.getResources().getDrawable(resId); 60 | pbRefreshing.setIndeterminateDrawable(pbdrawable); 61 | llInner.addView(pbRefreshing, lp); 62 | pbRefreshing.setVisibility(View.GONE); 63 | 64 | tvHeader = new TextView(getContext()); 65 | tvHeader.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18); 66 | tvHeader.setPadding(avataPadding, 0, avataPadding, 0); 67 | tvHeader.setTextColor(0xff09bb07); 68 | lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); 69 | lp.gravity = Gravity.CENTER_VERTICAL; 70 | llInner.addView(tvHeader, lp); 71 | } 72 | 73 | public void onPullDown(int percent) { 74 | if (percent > 100) { 75 | int degree = (percent - 100) * 180 / 20; 76 | if (degree > 180) { 77 | degree = 180; 78 | } 79 | if (degree < 0) { 80 | degree = 0; 81 | } 82 | ivArrow.setRotation(degree); 83 | } else { 84 | ivArrow.setRotation(0); 85 | } 86 | 87 | if (percent < 100) { 88 | int resId = ResHelper.getStringRes(getContext(), "ssdk_oks_pull_to_refresh"); 89 | if (resId > 0) { 90 | tvHeader.setText(resId); 91 | } 92 | } else { 93 | int resId = ResHelper.getStringRes(getContext(), "ssdk_oks_release_to_refresh"); 94 | if (resId > 0) { 95 | tvHeader.setText(resId); 96 | } 97 | } 98 | } 99 | 100 | public void onRequest() { 101 | ivArrow.setVisibility(View.GONE); 102 | pbRefreshing.setVisibility(View.VISIBLE); 103 | int resId = ResHelper.getStringRes(getContext(), "ssdk_oks_refreshing"); 104 | if (resId > 0) { 105 | tvHeader.setText(resId); 106 | } 107 | } 108 | 109 | public void reverse() { 110 | pbRefreshing.setVisibility(View.GONE); 111 | ivArrow.setRotation(180); 112 | ivArrow.setVisibility(View.VISIBLE); 113 | } 114 | 115 | } 116 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/PicViewerPage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic; 10 | 11 | import android.graphics.Bitmap; 12 | import android.graphics.drawable.ColorDrawable; 13 | import android.view.ViewTreeObserver.OnGlobalLayoutListener; 14 | import android.widget.ImageView.ScaleType; 15 | 16 | import com.mob.tools.gui.ScaledImageView; 17 | 18 | import cn.sharesdk.onekeyshare.OnekeySharePage; 19 | import cn.sharesdk.onekeyshare.OnekeyShareThemeImpl; 20 | 21 | /** 图片浏览的视图类 */ 22 | public class PicViewerPage extends OnekeySharePage implements OnGlobalLayoutListener { 23 | private Bitmap pic; 24 | /** 图片浏览的缩放控件 */ 25 | private ScaledImageView sivViewer; 26 | 27 | public PicViewerPage(OnekeyShareThemeImpl impl) { 28 | super(impl); 29 | } 30 | 31 | /** 设置图片用于浏览 */ 32 | public void setImageBitmap(Bitmap pic) { 33 | this.pic = pic; 34 | } 35 | 36 | public void onCreate() { 37 | activity.getWindow().setBackgroundDrawable(new ColorDrawable(0x4c000000)); 38 | 39 | sivViewer = new ScaledImageView(activity); 40 | sivViewer.setScaleType(ScaleType.MATRIX); 41 | activity.setContentView(sivViewer); 42 | if (pic != null) { 43 | sivViewer.getViewTreeObserver().addOnGlobalLayoutListener(this); 44 | } 45 | } 46 | 47 | public void onGlobalLayout() { 48 | sivViewer.getViewTreeObserver().removeGlobalOnLayoutListener(this); 49 | sivViewer.post(new Runnable() { 50 | public void run() { 51 | sivViewer.setBitmap(pic); 52 | } 53 | }); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/RotateImageView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic; 10 | 11 | import android.content.Context; 12 | import android.graphics.Canvas; 13 | import android.widget.ImageView; 14 | 15 | /** 在At好友页面中,下拉刷新列表头部的旋转箭头 */ 16 | public class RotateImageView extends ImageView { 17 | private float rotation; 18 | 19 | public RotateImageView(Context context) { 20 | super(context); 21 | } 22 | 23 | public void setRotation(float rotation) { 24 | this.rotation = rotation; 25 | invalidate(); 26 | } 27 | 28 | protected void onDraw(Canvas canvas) { 29 | canvas.rotate(rotation, getWidth() / 2, getHeight() / 2); 30 | super.onDraw(canvas); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/XView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic; 10 | 11 | import android.content.Context; 12 | import android.graphics.Canvas; 13 | import android.graphics.Paint; 14 | import android.view.View; 15 | 16 | /** 编辑页面中删除图片“X”按钮 */ 17 | public class XView extends View { 18 | private float ratio; 19 | 20 | public XView(Context context) { 21 | super(context); 22 | } 23 | 24 | public void setRatio(float ratio) { 25 | this.ratio = ratio; 26 | } 27 | 28 | protected void onDraw(Canvas canvas) { 29 | int width = getWidth() / 2; 30 | int height = getHeight() / 2; 31 | 32 | Paint paint = new Paint(); 33 | paint.setAntiAlias(true); 34 | paint.setColor(0xffa0a0a0); 35 | canvas.drawRect(width, 0, getWidth(), height, paint); 36 | 37 | paint = new Paint(); 38 | paint.setAntiAlias(true); 39 | paint.setStrokeWidth(3f * ratio); 40 | paint.setColor(0xffffffff); 41 | float left = 8f * ratio; 42 | canvas.drawLine(width + left, left, getWidth() - left, width - left, paint); 43 | canvas.drawLine(width + left, width - left, getWidth() - left, left, paint); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/land/FriendListPageLand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic.land; 10 | 11 | import com.mob.tools.utils.ResHelper; 12 | 13 | import cn.sharesdk.onekeyshare.OnekeyShareThemeImpl; 14 | import cn.sharesdk.onekeyshare.themes.classic.FriendListPage; 15 | 16 | /** 横屏的好友列表 */ 17 | public class FriendListPageLand extends FriendListPage { 18 | private static final int DESIGN_SCREEN_WIDTH = 1280; 19 | private static final int DESIGN_TITLE_HEIGHT = 70; 20 | 21 | public FriendListPageLand(OnekeyShareThemeImpl impl) { 22 | super(impl); 23 | } 24 | 25 | protected float getRatio() { 26 | float screenWidth = ResHelper.getScreenWidth(activity); 27 | return screenWidth / DESIGN_SCREEN_WIDTH; 28 | } 29 | 30 | protected int getDesignTitleHeight() { 31 | return DESIGN_TITLE_HEIGHT; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/land/PlatformPageAdapterLand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic.land; 10 | 11 | import android.content.Context; 12 | 13 | import com.mob.tools.utils.ResHelper; 14 | 15 | import java.util.ArrayList; 16 | 17 | import cn.sharesdk.onekeyshare.themes.classic.PlatformPage; 18 | import cn.sharesdk.onekeyshare.themes.classic.PlatformPageAdapter; 19 | 20 | /** 横屏的九宫格页面适配器 */ 21 | public class PlatformPageAdapterLand extends PlatformPageAdapter { 22 | private static final int DESIGN_SCREEN_WIDTH_L = 1280; 23 | private static final int DESIGN_CELL_WIDTH_L = 160; 24 | private static final int DESIGN_SEP_LINE_WIDTH = 1; 25 | private static final int DESIGN_LOGO_HEIGHT = 76; 26 | private static final int DESIGN_PADDING_TOP = 20; 27 | 28 | public PlatformPageAdapterLand(PlatformPage page, ArrayList cells) { 29 | super(page, cells); 30 | } 31 | 32 | protected void calculateSize(Context context, ArrayList plats) { 33 | int screenWidth = ResHelper.getScreenWidth(context); 34 | float ratio = ((float) screenWidth) / DESIGN_SCREEN_WIDTH_L; 35 | int cellWidth = (int) (DESIGN_CELL_WIDTH_L * ratio); 36 | lineSize = screenWidth / cellWidth; 37 | 38 | sepLineWidth = (int) (DESIGN_SEP_LINE_WIDTH * ratio); 39 | sepLineWidth = sepLineWidth < 1 ? 1 : sepLineWidth; 40 | logoHeight = (int) (DESIGN_LOGO_HEIGHT * ratio); 41 | paddingTop = (int) (DESIGN_PADDING_TOP * ratio); 42 | bottomHeight = (int) (DESIGN_BOTTOM_HEIGHT * ratio); 43 | cellHeight = (screenWidth - sepLineWidth * 3) / (lineSize - 1); 44 | panelHeight = cellHeight + sepLineWidth; 45 | } 46 | 47 | protected void collectCells(ArrayList plats) { 48 | int count = plats.size(); 49 | if (count < lineSize) { 50 | int lineCount = (count / lineSize); 51 | if (count % lineSize != 0) { 52 | lineCount++; 53 | } 54 | cells = new Object[1][lineCount * lineSize]; 55 | } else { 56 | int pageCount = (count / lineSize); 57 | if (count % lineSize != 0) { 58 | pageCount++; 59 | } 60 | cells = new Object[pageCount][lineSize]; 61 | } 62 | 63 | for (int i = 0; i < count; i++) { 64 | int p = i / lineSize; 65 | cells[p][i - lineSize * p] = plats.get(i); 66 | } 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/land/PlatformPageLand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic.land; 10 | 11 | import java.util.ArrayList; 12 | 13 | import cn.sharesdk.onekeyshare.OnekeyShareThemeImpl; 14 | import cn.sharesdk.onekeyshare.themes.classic.PlatformPage; 15 | import cn.sharesdk.onekeyshare.themes.classic.PlatformPageAdapter; 16 | 17 | /** 横屏的九宫格页面 */ 18 | public class PlatformPageLand extends PlatformPage { 19 | 20 | public PlatformPageLand(OnekeyShareThemeImpl impl) { 21 | super(impl); 22 | } 23 | 24 | public void onCreate() { 25 | requestSensorLandscapeOrientation(); 26 | super.onCreate(); 27 | } 28 | 29 | protected PlatformPageAdapter newAdapter(ArrayList cells) { 30 | return new PlatformPageAdapterLand(this, cells); 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/port/FriendListPagePort.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic.port; 10 | 11 | import com.mob.tools.utils.ResHelper; 12 | 13 | import cn.sharesdk.onekeyshare.OnekeyShareThemeImpl; 14 | import cn.sharesdk.onekeyshare.themes.classic.FriendListPage; 15 | 16 | /** 竖屏的好友列表 */ 17 | public class FriendListPagePort extends FriendListPage { 18 | private static final int DESIGN_SCREEN_WIDTH = 720; 19 | private static final int DESIGN_TITLE_HEIGHT = 96; 20 | 21 | public FriendListPagePort(OnekeyShareThemeImpl impl) { 22 | super(impl); 23 | } 24 | 25 | protected float getRatio() { 26 | float screenWidth = ResHelper.getScreenWidth(activity); 27 | return screenWidth / DESIGN_SCREEN_WIDTH; 28 | } 29 | 30 | protected int getDesignTitleHeight() { 31 | return DESIGN_TITLE_HEIGHT; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/port/PlatformPageAdapterPort.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic.port; 10 | 11 | import android.content.Context; 12 | 13 | import com.mob.tools.utils.ResHelper; 14 | 15 | import java.util.ArrayList; 16 | 17 | import cn.sharesdk.onekeyshare.themes.classic.PlatformPage; 18 | import cn.sharesdk.onekeyshare.themes.classic.PlatformPageAdapter; 19 | 20 | /** 竖屏的九宫格页面适配器 */ 21 | public class PlatformPageAdapterPort extends PlatformPageAdapter { 22 | private static final int DESIGN_SCREEN_WIDTH_P = 720; 23 | private static final int DESIGN_SEP_LINE_WIDTH = 1; 24 | private static final int DESIGN_LOGO_HEIGHT = 76; 25 | private static final int DESIGN_PADDING_TOP = 20; 26 | private static final int PAGE_SIZE_P = 12; 27 | private static final int LINE_SIZE_P = 4; 28 | 29 | public PlatformPageAdapterPort(PlatformPage page, ArrayList cells) { 30 | super(page, cells); 31 | } 32 | 33 | protected void calculateSize(Context context, ArrayList plats) { 34 | int screenWidth = ResHelper.getScreenWidth(context); 35 | lineSize = LINE_SIZE_P; 36 | 37 | float ratio = ((float) screenWidth) / DESIGN_SCREEN_WIDTH_P; 38 | sepLineWidth = (int) (DESIGN_SEP_LINE_WIDTH * ratio); 39 | sepLineWidth = sepLineWidth < 1 ? 1 : sepLineWidth; 40 | logoHeight = (int) (DESIGN_LOGO_HEIGHT * ratio); 41 | paddingTop = (int) (DESIGN_PADDING_TOP * ratio); 42 | bottomHeight = (int) (DESIGN_BOTTOM_HEIGHT * ratio); 43 | cellHeight = (screenWidth - sepLineWidth * 3) / 4; 44 | if (plats.size() <= lineSize) { 45 | panelHeight = cellHeight + sepLineWidth; 46 | } else if (plats.size() <= PAGE_SIZE_P - lineSize) { 47 | panelHeight = (cellHeight + sepLineWidth) * 2; 48 | } else { 49 | panelHeight = (cellHeight + sepLineWidth) * 3; 50 | } 51 | } 52 | 53 | protected void collectCells(ArrayList plats) { 54 | int count = plats.size(); 55 | if (count < PAGE_SIZE_P) { 56 | int lineCount = (count / lineSize); 57 | if (count % lineSize != 0) { 58 | lineCount++; 59 | } 60 | cells = new Object[1][lineCount * lineSize]; 61 | } else { 62 | int pageCount = (count / PAGE_SIZE_P); 63 | if (count % PAGE_SIZE_P != 0) { 64 | pageCount++; 65 | } 66 | cells = new Object[pageCount][PAGE_SIZE_P]; 67 | } 68 | 69 | for (int i = 0; i < count; i++) { 70 | int p = i / PAGE_SIZE_P; 71 | cells[p][i - PAGE_SIZE_P * p] = plats.get(i); 72 | } 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /model_mall/src/main/java/cn/sharesdk/onekeyshare/themes/classic/port/PlatformPagePort.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package cn.sharesdk.onekeyshare.themes.classic.port; 10 | 11 | import java.util.ArrayList; 12 | 13 | import cn.sharesdk.onekeyshare.OnekeyShareThemeImpl; 14 | import cn.sharesdk.onekeyshare.themes.classic.PlatformPage; 15 | import cn.sharesdk.onekeyshare.themes.classic.PlatformPageAdapter; 16 | 17 | /** 竖屏的九宫格页面 */ 18 | public class PlatformPagePort extends PlatformPage { 19 | 20 | public PlatformPagePort(OnekeyShareThemeImpl impl) { 21 | super(impl); 22 | } 23 | 24 | public void onCreate() { 25 | requestSensorPortraitOrientation(); 26 | super.onCreate(); 27 | } 28 | 29 | protected PlatformPageAdapter newAdapter(ArrayList cells) { 30 | return new PlatformPageAdapterPort(this, cells); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/Constant/ModelConstant.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.Constant; 2 | 3 | /** 4 | * Create by SunnyDay on 2019/03/14 5 | * 6 | * 全局常量 7 | */ 8 | public class ModelConstant { 9 | public static final String CONFIG = "config";// SharedPreferences 配置文件名 10 | 11 | public static final String FIRST_IN = "firstin"; // 倒计时界面 首次进入引导页判断 12 | 13 | public static final String URL_MAINPAGE = "https://www.wanandroid.com/tools/mockapi/7751/mall_mainpage_goods";// 主页数据url 14 | public static final String GOODS_INFO = "https://www.wanandroid.com/tools/mockapi/7751/goods_info";// 单个商品信息 15 | } 16 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/adapter/FindAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.adapter; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | import android.support.v7.widget.CardView; 6 | import android.support.v7.widget.RecyclerView; 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.view.ViewGroup; 10 | 11 | import com.example.administrator.modelmall.R; 12 | import com.example.administrator.modelmall.ui.customview.ToastUtils; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * Create by SunnyDay on 2019/03/25 18 | *

19 | * 发现页面的adapter 20 | */ 21 | public class FindAdapter extends RecyclerView.Adapter { 22 | 23 | 24 | private Context context; 25 | 26 | public FindAdapter(Context context) { 27 | 28 | this.context = context; 29 | } 30 | 31 | @NonNull 32 | @Override 33 | public MyHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 34 | View view = LayoutInflater.from(context).inflate(R.layout.item_findpage,parent,false); 35 | return new MyHolder(view); 36 | } 37 | 38 | @Override 39 | public void onBindViewHolder(@NonNull MyHolder holder, int position) { 40 | holder.card.setOnClickListener(new View.OnClickListener() { 41 | @Override 42 | public void onClick(View view) { 43 | ToastUtils.showToast(context,"后台小哥哥正在努力加班中",ToastUtils.LENGTH_SHORT); 44 | } 45 | }); 46 | } 47 | 48 | @Override 49 | public int getItemCount() { 50 | return 5; 51 | } 52 | 53 | class MyHolder extends RecyclerView.ViewHolder { 54 | 55 | private CardView card; 56 | 57 | public MyHolder(View itemView) { 58 | super(itemView); 59 | card = itemView.findViewById(R.id.cardview); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/adapter/MainPageAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.adapter; 2 | 3 | 4 | import android.support.annotation.NonNull; 5 | import android.support.v4.view.PagerAdapter; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | 9 | import com.example.administrator.modelmall.base.BasePage; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * Create by SunnyDay on 2019/03/15 15 | *

16 | * 主界面 viewpager的 adapter 17 | */ 18 | public class MainPageAdapter extends PagerAdapter { 19 | private List mList; 20 | 21 | public MainPageAdapter(List mList) { 22 | this.mList = mList; 23 | } 24 | 25 | @Override 26 | public int getCount() { 27 | return mList == null ? 0 : mList.size(); 28 | } 29 | 30 | @Override 31 | public boolean isViewFromObject(@NonNull View view, @NonNull Object o) { 32 | return view == o; 33 | } 34 | 35 | @NonNull 36 | @Override 37 | public Object instantiateItem(@NonNull ViewGroup container, int position) { 38 | container.addView(mList.get(position).view); 39 | 40 | return mList.get(position).view; 41 | } 42 | 43 | @Override 44 | public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) { 45 | container.removeView((View) object); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/adapter/MainPageBannerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.adapter; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | import android.support.v7.widget.RecyclerView; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.Toast; 10 | 11 | import com.alibaba.android.vlayout.DelegateAdapter; 12 | import com.alibaba.android.vlayout.LayoutHelper; 13 | import com.example.administrator.modelmall.R; 14 | import com.example.administrator.modelmall.entity.EntityMainPage; 15 | import com.example.administrator.modelmall.loader.ModelImageLoader; 16 | import com.example.administrator.modelmall.ui.customview.ToastUtils; 17 | import com.youth.banner.Banner; 18 | import com.youth.banner.listener.OnBannerListener; 19 | 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | 24 | /** 25 | * Create by SunnyDay on 2019/03/19 26 | * 27 | * 首页的banner 展示 28 | */ 29 | public class MainPageBannerAdapter extends DelegateAdapter.Adapter { 30 | private Context context; 31 | private LayoutHelper layoutHelper; 32 | private EntityMainPage entityMainPage; 33 | private List urlList; 34 | 35 | public MainPageBannerAdapter(Context context, LayoutHelper layoutHelper, EntityMainPage entityMainPage) { 36 | this.context = context; 37 | this.entityMainPage = entityMainPage; 38 | this.layoutHelper = layoutHelper; 39 | } 40 | 41 | @Override 42 | public LayoutHelper onCreateLayoutHelper() { 43 | return layoutHelper; 44 | } 45 | 46 | @NonNull 47 | @Override 48 | public MainViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 49 | View view = LayoutInflater.from(context).inflate(R.layout.item_banner, parent, false); 50 | return new MainViewHolder(view); 51 | } 52 | 53 | @Override 54 | public void onBindViewHolder(@NonNull MainViewHolder holder, int position) { 55 | initBannerData(); 56 | holder.banner.setImageLoader(new ModelImageLoader()) 57 | .setImages(urlList) 58 | .start(); 59 | 60 | holder.banner.setOnBannerListener(new OnBannerListener() { 61 | @Override 62 | public void OnBannerClick(int position) { 63 | ToastUtils.showToast(context,"程序员小哥正在路上",ToastUtils.LENGTH_LONG); 64 | } 65 | }); 66 | 67 | } 68 | 69 | /** 70 | * 服务器获得的banner 广告url拿来 装入集合 71 | */ 72 | private void initBannerData() { 73 | 74 | urlList = new ArrayList<>(); 75 | for (int i = 0; i < entityMainPage.getBanners().size(); i++) { 76 | urlList.add(entityMainPage.getBanners().get(i).getBanner_url()); 77 | } 78 | 79 | } 80 | 81 | /** 82 | * 本类型就一个Banner 不在动态的填充size 83 | */ 84 | @Override 85 | public int getItemCount() { 86 | 87 | return entityMainPage == null ? 0 : 1;//容错处理 88 | } 89 | 90 | /** 91 | * holder 92 | */ 93 | static class MainViewHolder extends RecyclerView.ViewHolder { 94 | 95 | public Banner banner; 96 | 97 | public MainViewHolder(View itemView) { 98 | super(itemView); 99 | banner = itemView.findViewById(R.id.banner); 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/adapter/MainPageClassifyGridItemAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.adapter; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | import android.support.v7.widget.AppCompatImageView; 6 | import android.support.v7.widget.LinearLayoutCompat; 7 | import android.support.v7.widget.RecyclerView; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.widget.ImageView; 12 | import android.widget.TextView; 13 | import android.widget.Toast; 14 | 15 | import com.alibaba.android.vlayout.DelegateAdapter; 16 | import com.alibaba.android.vlayout.LayoutHelper; 17 | import com.bumptech.glide.Glide; 18 | import com.example.administrator.modelmall.R; 19 | import com.example.administrator.modelmall.entity.EntityMainPage; 20 | import com.example.administrator.modelmall.ui.customview.ToastUtils; 21 | 22 | 23 | /** 24 | * Create by SunnyDay on 2019/03/19 25 | *

26 | * 首页的banner 展示 27 | */ 28 | public class MainPageClassifyGridItemAdapter extends DelegateAdapter.Adapter { 29 | private Context context; 30 | private LayoutHelper layoutHelper; 31 | private EntityMainPage entityMainPage; 32 | 33 | public MainPageClassifyGridItemAdapter(Context context, LayoutHelper layoutHelper, EntityMainPage entityMainPage) { 34 | this.context = context; 35 | this.entityMainPage = entityMainPage; 36 | this.layoutHelper = layoutHelper; 37 | } 38 | 39 | @Override 40 | public LayoutHelper onCreateLayoutHelper() { 41 | return layoutHelper; 42 | } 43 | 44 | @NonNull 45 | @Override 46 | public MainViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 47 | View view = LayoutInflater.from(context).inflate(R.layout.item_classfiy_grid, parent, false); 48 | return new MainViewHolder(view); 49 | } 50 | 51 | @Override 52 | public void onBindViewHolder(@NonNull MainViewHolder holder, final int position) { 53 | Glide 54 | .with(context) 55 | .load(entityMainPage.getClassifyGridItems().get(position).getGrid_url()) 56 | .placeholder(R.mipmap.ic_launcher) 57 | .into(holder.img); 58 | holder.imgDesc.setText(entityMainPage.getClassifyGridItems().get(position).getDesc()); 59 | holder.llLayout.setOnClickListener(new View.OnClickListener() { 60 | @Override 61 | public void onClick(View view) { 62 | ToastUtils.showToast(context,"点击了第"+position+"条目",ToastUtils.LENGTH_LONG); 63 | } 64 | }); 65 | 66 | } 67 | 68 | 69 | @Override 70 | public int getItemCount() { 71 | 72 | return entityMainPage == null ? 0 : entityMainPage.getClassifyGridItems().size();//容错处理 73 | } 74 | 75 | /** 76 | * holder 77 | */ 78 | static class MainViewHolder extends RecyclerView.ViewHolder { 79 | AppCompatImageView img; 80 | TextView imgDesc; 81 | LinearLayoutCompat llLayout; 82 | 83 | 84 | public MainViewHolder(View itemView) { 85 | super(itemView); 86 | img = itemView.findViewById(R.id.img); 87 | imgDesc = itemView.findViewById(R.id.img_desc); 88 | llLayout = itemView.findViewById(R.id.ll_layout); 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/adapter/MainPageMoreImageAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.adapter; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | import android.support.v7.widget.AppCompatImageView; 6 | import android.support.v7.widget.RecyclerView; 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.view.ViewGroup; 10 | 11 | import com.alibaba.android.vlayout.DelegateAdapter; 12 | import com.alibaba.android.vlayout.LayoutHelper; 13 | import com.bumptech.glide.Glide; 14 | import com.example.administrator.modelmall.R; 15 | import com.example.administrator.modelmall.entity.EntityMainPage; 16 | import com.example.administrator.modelmall.ui.customview.ToastUtils; 17 | 18 | 19 | /** 20 | * Create by SunnyDay on 2019/03/19 21 | *

22 | * 首页的10个item下的一个图片展示 23 | */ 24 | public class MainPageMoreImageAdapter extends DelegateAdapter.Adapter { 25 | private Context context; 26 | private LayoutHelper layoutHelper; 27 | private EntityMainPage entityMainPage; 28 | 29 | public MainPageMoreImageAdapter(Context context, LayoutHelper layoutHelper, EntityMainPage entityMainPage) { 30 | this.context = context; 31 | this.entityMainPage = entityMainPage; 32 | this.layoutHelper = layoutHelper; 33 | } 34 | 35 | @Override 36 | public LayoutHelper onCreateLayoutHelper() { 37 | return layoutHelper; 38 | } 39 | 40 | @NonNull 41 | @Override 42 | public MainViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 43 | View view = LayoutInflater.from(context).inflate(R.layout.image_more, parent, false); 44 | return new MainViewHolder(view); 45 | } 46 | 47 | @Override 48 | public void onBindViewHolder(@NonNull MainViewHolder holder, int position) { 49 | Glide 50 | .with(context) 51 | .load(entityMainPage.getFour_goods_image().get(position).getFour_image_url()) 52 | .placeholder(R.drawable.more) 53 | .into(holder.img); 54 | 55 | holder.img.setOnClickListener(new View.OnClickListener() { 56 | @Override 57 | public void onClick(View view) { 58 | ToastUtils.showToast(context,"程序员小哥正在努力加班中",ToastUtils.LENGTH_LONG); 59 | } 60 | }); 61 | 62 | 63 | } 64 | 65 | 66 | /** 67 | * 一张图片的显示 68 | * */ 69 | @Override 70 | public int getItemCount() { 71 | 72 | return entityMainPage == null ? 0 : entityMainPage.getFour_goods_image().size();//容错处理 73 | } 74 | 75 | /** 76 | * holder 77 | */ 78 | static class MainViewHolder extends RecyclerView.ViewHolder { 79 | AppCompatImageView img; 80 | 81 | 82 | public MainViewHolder(View itemView) { 83 | super(itemView); 84 | img = itemView.findViewById(R.id.img); 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/adapter/MainPageSingleImageAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.adapter; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | import android.support.v7.widget.AppCompatImageView; 6 | import android.support.v7.widget.RecyclerView; 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.view.ViewGroup; 10 | import android.widget.TextView; 11 | 12 | import com.alibaba.android.vlayout.DelegateAdapter; 13 | import com.alibaba.android.vlayout.LayoutHelper; 14 | import com.bumptech.glide.Glide; 15 | import com.example.administrator.modelmall.R; 16 | import com.example.administrator.modelmall.entity.EntityMainPage; 17 | 18 | 19 | /** 20 | * Create by SunnyDay on 2019/03/19 21 | *

22 | * 首页的10个item下的一个图片展示 23 | */ 24 | public class MainPageSingleImageAdapter extends DelegateAdapter.Adapter { 25 | private Context context; 26 | private LayoutHelper layoutHelper; 27 | private EntityMainPage entityMainPage; 28 | 29 | public MainPageSingleImageAdapter(Context context, LayoutHelper layoutHelper, EntityMainPage entityMainPage) { 30 | this.context = context; 31 | this.entityMainPage = entityMainPage; 32 | this.layoutHelper = layoutHelper; 33 | } 34 | 35 | @Override 36 | public LayoutHelper onCreateLayoutHelper() { 37 | return layoutHelper; 38 | } 39 | 40 | @NonNull 41 | @Override 42 | public MainViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 43 | View view = LayoutInflater.from(context).inflate(R.layout.image_single_grid, parent, false); 44 | return new MainViewHolder(view); 45 | } 46 | 47 | @Override 48 | public void onBindViewHolder(@NonNull MainViewHolder holder, int position) { 49 | Glide 50 | .with(context) 51 | .load(entityMainPage.getSingle_image()) 52 | // .placeholder(R.drawable.single) //设置placeholder 图片不能正常显示 53 | .into(holder.img); 54 | 55 | 56 | } 57 | 58 | 59 | /** 60 | * 一张图片的显示 61 | * */ 62 | @Override 63 | public int getItemCount() { 64 | 65 | return entityMainPage == null ? 0 : 1;//容错处理 66 | } 67 | 68 | /** 69 | * holder 70 | */ 71 | static class MainViewHolder extends RecyclerView.ViewHolder { 72 | AppCompatImageView img; 73 | 74 | 75 | public MainViewHolder(View itemView) { 76 | super(itemView); 77 | img = itemView.findViewById(R.id.img); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/adapter/ShopCartAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.adapter; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | import android.support.v7.widget.RecyclerView; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.CheckBox; 10 | import android.widget.ImageView; 11 | import android.widget.TextView; 12 | 13 | import com.example.administrator.modelmall.R; 14 | import com.example.administrator.modelmall.events.GoodInfoMsg; 15 | import com.orhanobut.logger.Logger; 16 | 17 | import java.util.List; 18 | 19 | /** 20 | * Create by SunnyDay on 2019/03/21 21 | *

22 | * 购物车界面的adapter 23 | */ 24 | public class ShopCartAdapter extends RecyclerView.Adapter { 25 | private Context context; 26 | public List mList; 27 | public boolean isChecked; 28 | 29 | 30 | public ShopCartAdapter(Context context, List mList) { 31 | this.context = context; 32 | this.mList = mList; 33 | } 34 | 35 | @NonNull 36 | @Override 37 | public MyHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 38 | View view = LayoutInflater.from(context).inflate(R.layout.goods_item, parent, false); 39 | return new MyHolder(view); 40 | } 41 | 42 | @Override 43 | public void onBindViewHolder(@NonNull MyHolder holder, int position) { 44 | isChecked = holder.cb_select.isChecked(); 45 | } 46 | 47 | @Override 48 | public int getItemCount() { 49 | 50 | return mList.size() == 0 ? 1 : mList.size(); 51 | } 52 | 53 | class MyHolder extends RecyclerView.ViewHolder { 54 | public CheckBox cb_select; 55 | 56 | public MyHolder(View itemView) { 57 | super(itemView); 58 | cb_select = itemView.findViewById(R.id.cb_select); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/adapter/SortLeftAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.adapter; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.content.Context; 5 | import android.support.annotation.NonNull; 6 | import android.support.v7.widget.RecyclerView; 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.view.ViewGroup; 10 | import android.widget.RelativeLayout; 11 | import android.widget.TextView; 12 | 13 | import com.example.administrator.modelmall.R; 14 | import com.example.administrator.modelmall.ui.customview.ToastUtils; 15 | 16 | import org.greenrobot.eventbus.EventBus; 17 | 18 | /** 19 | * Create by SunnyDay on 2019/03/26 20 | */ 21 | public class SortLeftAdapter extends RecyclerView.Adapter { 22 | private Context context; 23 | 24 | public SortLeftAdapter(Context context) { 25 | this.context = context; 26 | } 27 | 28 | @NonNull 29 | @Override 30 | public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 31 | View view = LayoutInflater.from(context).inflate(R.layout.sortpage_left, parent, false); 32 | return new MyViewHolder(view); 33 | } 34 | 35 | @SuppressLint("SetTextI18n") 36 | @Override 37 | public void onBindViewHolder(@NonNull final MyViewHolder holder, final int position) { 38 | holder.tvSort.setText("商品类别" + position); 39 | holder.rlLayout.setOnClickListener(new View.OnClickListener() { 40 | @Override 41 | public void onClick(View view) { 42 | // ToastUtils.showToast(context,"点击"+position,ToastUtils.LENGTH_LONG); 43 | // 发送通知更新消息 44 | EventBus.getDefault().post("update"); 45 | } 46 | }); 47 | 48 | } 49 | 50 | 51 | @Override 52 | public int getItemCount() { 53 | return 20; 54 | } 55 | 56 | class MyViewHolder extends RecyclerView.ViewHolder { 57 | 58 | TextView tvSort; 59 | RelativeLayout rlLayout; 60 | 61 | public MyViewHolder(View itemView) { 62 | super(itemView); 63 | tvSort = itemView.findViewById(R.id.tv_sort); 64 | rlLayout = itemView.findViewById(R.id.rl_layout); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/application/LatteApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.application; 2 | 3 | import android.app.Application; 4 | 5 | import com.example.administrator.modelmall.icon.FontModel; 6 | import com.joanzapata.iconify.Iconify; 7 | import com.joanzapata.iconify.fonts.FontAwesomeModule; 8 | import com.joanzapata.iconify.fonts.IoniconsModule; 9 | import com.mob.MobSDK; 10 | import com.orhanobut.logger.AndroidLogAdapter; 11 | import com.orhanobut.logger.Logger; 12 | 13 | import org.litepal.LitePal; 14 | 15 | import cn.sharesdk.framework.ShareSDK; 16 | 17 | /** 18 | * Create by SunnyDay on 2019/03/14 19 | */ 20 | public class LatteApplication extends Application { 21 | @Override 22 | public void onCreate() { 23 | super.onCreate(); 24 | Logger.addLogAdapter(new AndroidLogAdapter());// Logger 25 | LitePal.initialize(this);// 数据库 26 | // 字体图标库 27 | Iconify.with(new FontAwesomeModule()) 28 | .with(new IoniconsModule()) 29 | .with(new FontModel()); 30 | 31 | MobSDK.init(this); // shareSDK 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/base/BasePage.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.base; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | 7 | 8 | /** 9 | * Create by SunnyDay on 2019/03/15 10 | * 11 | * 五个界面的基类 12 | */ 13 | public abstract class BasePage { 14 | public Context context; 15 | public View view; 16 | 17 | public BasePage(Context context) { 18 | this.context = context; 19 | if (convertView() == null) { 20 | throw new ClassCastException("resource id just can be type of layout"); 21 | } 22 | this.view = convertView(); 23 | init(); 24 | } 25 | 26 | /** 27 | * 实现类提供 资源id ,或者view 28 | */ 29 | public abstract Object setContentView(); 30 | 31 | /** 32 | * 具体子实现 33 | */ 34 | public abstract void init(); 35 | 36 | 37 | /** 38 | * view的同一转换处理 39 | * */ 40 | private View convertView() { 41 | View view = null; 42 | if (setContentView() instanceof Integer) { 43 | view = LayoutInflater.from(context).inflate((Integer) setContentView(), null, false); 44 | } else if (setContentView() instanceof View) { 45 | view = (View) setContentView(); 46 | } else { 47 | throw new IllegalArgumentException("offerLayout only be View or be Resource Id"); 48 | } 49 | return view; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/base/FindPageFactory.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.base; 2 | 3 | import android.content.Context; 4 | 5 | import com.example.administrator.modelmall.base.impl.FindPageImpl; 6 | import com.example.administrator.modelmall.base.impl.MainPageImpl; 7 | 8 | /** 9 | * Create by SunnyDay on 2019/03/16 10 | */ 11 | public class FindPageFactory implements Provider { 12 | 13 | Context context; 14 | 15 | public FindPageFactory(Context context) { 16 | this.context = context; 17 | } 18 | 19 | @Override 20 | public BasePage produce() { 21 | return new FindPageImpl(context); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/base/MainPageFactory.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.base; 2 | 3 | import android.content.Context; 4 | 5 | import com.example.administrator.modelmall.base.impl.MainPageImpl; 6 | 7 | /** 8 | * Create by SunnyDay on 2019/03/16 9 | */ 10 | public class MainPageFactory implements Provider { 11 | 12 | Context context; 13 | 14 | public MainPageFactory(Context context) { 15 | this.context = context; 16 | } 17 | 18 | @Override 19 | public BasePage produce() { 20 | return new MainPageImpl(context); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/base/MinePageFactory.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.base; 2 | 3 | import android.content.Context; 4 | 5 | import com.example.administrator.modelmall.base.impl.MainPageImpl; 6 | import com.example.administrator.modelmall.base.impl.MinePageImpl; 7 | 8 | /** 9 | * Create by SunnyDay on 2019/03/16 10 | */ 11 | public class MinePageFactory implements Provider { 12 | 13 | Context context; 14 | 15 | public MinePageFactory(Context context) { 16 | this.context = context; 17 | } 18 | 19 | @Override 20 | public BasePage produce() { 21 | return new MinePageImpl(context); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/base/Provider.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.base; 2 | 3 | /** 4 | * Create by SunnyDay on 2019/03/16 5 | * 6 | */ 7 | public interface Provider { 8 | BasePage produce(); 9 | } 10 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/base/ShoppingPageFactory.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.base; 2 | 3 | import android.content.Context; 4 | 5 | import com.example.administrator.modelmall.base.impl.MainPageImpl; 6 | import com.example.administrator.modelmall.base.impl.ShoppingPageImpl; 7 | 8 | /** 9 | * Create by SunnyDay on 2019/03/16 10 | */ 11 | public class ShoppingPageFactory implements Provider { 12 | 13 | Context context; 14 | 15 | public ShoppingPageFactory(Context context) { 16 | this.context = context; 17 | } 18 | 19 | @Override 20 | public BasePage produce() { 21 | return new ShoppingPageImpl(context); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/base/SortPageFactory.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.base; 2 | 3 | import android.content.Context; 4 | 5 | import com.example.administrator.modelmall.base.impl.MainPageImpl; 6 | import com.example.administrator.modelmall.base.impl.SortPageImpl; 7 | 8 | /** 9 | * Create by SunnyDay on 2019/03/16 10 | */ 11 | public class SortPageFactory implements Provider { 12 | 13 | Context context; 14 | 15 | public SortPageFactory(Context context) { 16 | this.context = context; 17 | } 18 | 19 | @Override 20 | public BasePage produce() { 21 | return new SortPageImpl(context); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/base/impl/FindPageImpl.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.base.impl; 2 | 3 | import android.content.Context; 4 | import android.support.v7.widget.LinearLayoutManager; 5 | import android.support.v7.widget.RecyclerView; 6 | 7 | import com.example.administrator.modelmall.R; 8 | import com.example.administrator.modelmall.adapter.FindAdapter; 9 | import com.example.administrator.modelmall.base.BasePage; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | /** 15 | * Create by SunnyDay on 2019/03/15 16 | */ 17 | public class FindPageImpl extends BasePage { 18 | 19 | private RecyclerView recyclerView; 20 | 21 | public FindPageImpl(Context context) { 22 | super(context); 23 | } 24 | 25 | @Override 26 | public Object setContentView() { 27 | return R.layout.page_find; 28 | } 29 | 30 | @Override 31 | public void init() { 32 | recyclerView = view.findViewById(R.id.recycler_find); 33 | recyclerView.setLayoutManager(new LinearLayoutManager(context)); 34 | recyclerView.setAdapter(new FindAdapter(context)); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/base/impl/MinePageImpl.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.base.impl; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.view.View; 6 | import android.widget.RelativeLayout; 7 | 8 | import com.example.administrator.modelmall.R; 9 | import com.example.administrator.modelmall.base.BasePage; 10 | import com.example.administrator.modelmall.ui.activities.AboutActivity; 11 | import com.example.administrator.modelmall.ui.customview.ToastUtils; 12 | 13 | /** 14 | * Create by SunnyDay on 2019/03/15 15 | */ 16 | public class MinePageImpl extends BasePage implements View.OnClickListener { 17 | 18 | public MinePageImpl(Context context) { 19 | super(context); 20 | } 21 | 22 | @Override 23 | public Object setContentView() { 24 | return R.layout.page_mine; 25 | } 26 | 27 | @Override 28 | public void init() { 29 | RelativeLayout myGoods = view.findViewById(R.id.rl_my_goods); 30 | RelativeLayout myGoodsAddr = view.findViewById(R.id.rl_goods_addr); 31 | RelativeLayout setting = view.findViewById(R.id.rl_setting); 32 | myGoods.setOnClickListener(this); 33 | myGoodsAddr.setOnClickListener(this); 34 | setting.setOnClickListener(this); 35 | } 36 | 37 | @Override 38 | public void onClick(View view) { 39 | switch (view.getId()){ 40 | case R.id.rl_my_goods: 41 | ToastUtils.showToast(context,"待续",ToastUtils.LENGTH_SHORT); 42 | break; 43 | case R.id.rl_goods_addr: 44 | ToastUtils.showToast(context,"待续",ToastUtils.LENGTH_SHORT); 45 | break; 46 | case R.id.rl_setting: 47 | context.startActivity(new Intent(context,AboutActivity.class)); 48 | break; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/base/impl/ShoppingPageImpl.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.base.impl; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.content.Context; 5 | import android.support.v7.widget.LinearLayoutManager; 6 | import android.support.v7.widget.RecyclerView; 7 | 8 | import android.view.View; 9 | import android.widget.ImageView; 10 | import android.widget.TextView; 11 | 12 | import com.example.administrator.modelmall.R; 13 | import com.example.administrator.modelmall.adapter.ShopCartAdapter; 14 | import com.example.administrator.modelmall.base.BasePage; 15 | import com.example.administrator.modelmall.events.GoodInfoMsg; 16 | import com.example.administrator.modelmall.ui.customview.ToastUtils; 17 | import com.orhanobut.logger.Logger; 18 | 19 | import org.greenrobot.eventbus.EventBus; 20 | import org.greenrobot.eventbus.Subscribe; 21 | import org.greenrobot.eventbus.ThreadMode; 22 | 23 | import java.util.ArrayList; 24 | import java.util.List; 25 | 26 | /** 27 | * Create by SunnyDay on 2019/03/15 28 | * 购物车模块 29 | */ 30 | public class ShoppingPageImpl extends BasePage implements View.OnClickListener { 31 | 32 | private RecyclerView recyclerView; 33 | private ShopCartAdapter adapter; 34 | private List mList; 35 | private ImageView imgRmpty; 36 | private TextView tvClear;//清空 37 | private TextView tvDel; //删除 38 | 39 | private TextView tvSummary;//结算 40 | private TextView tvTital; 41 | 42 | 43 | public ShoppingPageImpl(Context context) { 44 | super(context); 45 | } 46 | 47 | @Override 48 | public Object setContentView() { 49 | return R.layout.page_shopping; 50 | } 51 | 52 | @Override 53 | public void init() { 54 | EventBus.getDefault().register(this); // 传this , 传 context 报错 55 | mList = new ArrayList<>(); 56 | 57 | recyclerView = view.findViewById(R.id.shop_cart); 58 | imgRmpty = view.findViewById(R.id.img_empty); 59 | 60 | tvClear = view.findViewById(R.id.tv_clear); 61 | tvDel = view.findViewById(R.id.tv_del); 62 | tvSummary = view.findViewById(R.id.tv_summary); 63 | tvTital = view.findViewById(R.id.tv_tital); 64 | 65 | tvClear.setOnClickListener(this); 66 | tvDel.setOnClickListener(this); 67 | tvSummary.setOnClickListener(this); 68 | 69 | recyclerView.setLayoutManager(new LinearLayoutManager(context)); 70 | adapter = new ShopCartAdapter(context, mList); 71 | recyclerView.setAdapter(adapter); 72 | 73 | 74 | } 75 | 76 | @SuppressLint("SetTextI18n") 77 | @Subscribe(threadMode = ThreadMode.MAIN) 78 | public void Event(GoodInfoMsg goodInfoMsg) { 79 | imgRmpty.setVisibility(View.GONE); 80 | recyclerView.setVisibility(View.VISIBLE); 81 | tvTital.setText("¥119.00"); 82 | 83 | Logger.d("收到消息:通知显示商品" + goodInfoMsg.getGoodCount()); 84 | int size = goodInfoMsg.getGoodCount();//没啥鸡用 必须写 85 | mList.add(size);// 没啥鸡用 必须写 86 | adapter.notifyDataSetChanged(); 87 | 88 | } 89 | 90 | @Override 91 | public void onClick(View view) { 92 | switch (view.getId()) { 93 | case R.id.tv_clear: 94 | ToastUtils.showToast(context, "程序员小哥哥正在熬夜加班", ToastUtils.LENGTH_SHORT); 95 | break; 96 | case R.id.tv_del: 97 | ToastUtils.showToast(context, "程序员小哥哥正在熬夜加班", ToastUtils.LENGTH_SHORT); 98 | break; 99 | case R.id.tv_summary: 100 | if (recyclerView.getVisibility() == View.VISIBLE){ 101 | ToastUtils.showToast(context, "调用支付宝", ToastUtils.LENGTH_SHORT); 102 | }else{ 103 | ToastUtils.showToast(context, "购物车为空,请先购买商品", ToastUtils.LENGTH_SHORT); 104 | } 105 | 106 | break; 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/db/UserRegisterBean.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.db; 2 | 3 | import org.litepal.crud.DataSupport; 4 | 5 | /** 6 | * Create by SunnyDay on 2019/03/16 7 | * 用户注册表 8 | * 存了用户注册的相关信息 9 | */ 10 | public class UserRegisterBean extends DataSupport { 11 | 12 | private String name; 13 | private String email; 14 | private String phone; 15 | private String pwd; 16 | 17 | public String getName() { 18 | return name; 19 | } 20 | 21 | public void setName(String name) { 22 | this.name = name; 23 | } 24 | 25 | public String getEmail() { 26 | return email; 27 | } 28 | 29 | public void setEmail(String email) { 30 | this.email = email; 31 | } 32 | 33 | public String getPhone() { 34 | return phone; 35 | } 36 | 37 | public void setPhone(String phone) { 38 | this.phone = phone; 39 | } 40 | 41 | public String getPwd() { 42 | return pwd; 43 | } 44 | 45 | public void setPwd(String pwd) { 46 | this.pwd = pwd; 47 | } 48 | 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/entity/GoodsInfo.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.entity; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Create by SunnyDay on 2019/03/22 7 | */ 8 | public class GoodsInfo { 9 | 10 | private List threeBigImage; 11 | private List threeSmallImage; 12 | 13 | public List getThreeBigImage() { 14 | return threeBigImage; 15 | } 16 | 17 | public void setThreeBigImage(List threeBigImage) { 18 | this.threeBigImage = threeBigImage; 19 | } 20 | 21 | public List getThreeSmallImage() { 22 | return threeSmallImage; 23 | } 24 | 25 | public void setThreeSmallImage(List threeSmallImage) { 26 | this.threeSmallImage = threeSmallImage; 27 | } 28 | 29 | public static class ThreeBigImageBean { 30 | /** 31 | * imageurl : https://img14.360buyimg.com/n0/jfs/t1/18670/4/7265/161721/5c6a6445E5aaceb6a/85a35ed9549caa8b.jpg 32 | */ 33 | 34 | private String imageurl; 35 | 36 | public String getImageurl() { 37 | return imageurl; 38 | } 39 | 40 | public void setImageurl(String imageurl) { 41 | this.imageurl = imageurl; 42 | } 43 | } 44 | 45 | public static class ThreeSmallImageBean { 46 | /** 47 | * imageurl : https://img14.360buyimg.com/n9/s60x76_jfs/t1/18869/2/7221/116782/5c6a6435E7be4d040/4da11722411e547b.jpg!cc_60x76.jpg 48 | */ 49 | 50 | private String imageurl; 51 | 52 | public String getImageurl() { 53 | return imageurl; 54 | } 55 | 56 | public void setImageurl(String imageurl) { 57 | this.imageurl = imageurl; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/events/GoodInfoMsg.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.events; 2 | 3 | /** 4 | * Create by SunnyDay on 2019/03/23 5 | * 6 | * 商品消息 事件 7 | */ 8 | public class GoodInfoMsg { 9 | private Integer goodCount; 10 | 11 | public GoodInfoMsg(Integer goodCount) { 12 | this.goodCount = goodCount; 13 | } 14 | 15 | public Integer getGoodCount() { 16 | return goodCount; 17 | } 18 | 19 | public void setGoodCount(Integer goodCount) { 20 | this.goodCount = goodCount; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/icon/FontModel.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.icon; 2 | 3 | import com.joanzapata.iconify.Icon; 4 | import com.joanzapata.iconify.IconFontDescriptor; 5 | 6 | /** 7 | * Create by SunnyDay on 2019/03/17 8 | * 9 | * 自定义字体图标模块 10 | * 11 | * 使用其他的第三方字体图标 12 | */ 13 | public class FontModel implements IconFontDescriptor { 14 | /** 15 | * 返回下载的ttf文件 16 | * */ 17 | @Override 18 | public String ttfFileName() { 19 | return "iconfont.ttf"; 20 | } 21 | 22 | /** 23 | * 返回个icon类型数组 24 | * 25 | * */ 26 | @Override 27 | public Icon[] characters() { 28 | return IconModel.values(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/icon/IconModel.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.icon; 2 | 3 | import com.joanzapata.iconify.Icon; 4 | 5 | /** 6 | * Create by SunnyDay on 2019/03/17 7 | *

8 | * 实现 Icon 接口 9 | */ 10 | public enum IconModel implements Icon { 11 | //  支付宝 12 | //  扫一扫 13 | icon_scan('\ue502'), 14 | icon_shop('\ue612'), 15 | icon_kefu('\ue506'), 16 | icon_guanzhu('\ue503'), 17 | icon_gengduo('\ue63e'), 18 | icon_ali_pay('\ue6c3'); 19 | 20 | private char character; 21 | IconModel(char character) { 22 | this.character = character; 23 | } 24 | 25 | /** 26 | * 参考 font 27 | */ 28 | @Override 29 | public String key() { 30 | return name().replace('_', '-'); 31 | } 32 | 33 | @Override 34 | public char character() { 35 | return character; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/loader/ModelImageLoader.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.loader; 2 | 3 | import android.content.Context; 4 | import android.widget.ImageView; 5 | 6 | import com.bumptech.glide.Glide; 7 | import com.youth.banner.loader.ImageLoader; 8 | 9 | /** 10 | * Create by SunnyDay on 2019/03/15 11 | * Banner 的ImageLoader 12 | */ 13 | public class ModelImageLoader extends ImageLoader { 14 | @Override 15 | public void displayImage(Context context, Object path, ImageView imageView) { 16 | Glide.with(context) 17 | .load(path) 18 | .into(imageView); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/net/CommonOkHttpClient.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.net; 2 | 3 | 4 | import com.example.administrator.modelmall.net.https.HttpsUtils; 5 | import com.example.administrator.modelmall.net.response.CommonJsonCallback; 6 | 7 | import java.util.concurrent.TimeUnit; 8 | 9 | import javax.net.ssl.HostnameVerifier; 10 | import javax.net.ssl.SSLSession; 11 | 12 | import okhttp3.Call; 13 | import okhttp3.Callback; 14 | import okhttp3.OkHttpClient; 15 | import okhttp3.Request; 16 | 17 | /** 18 | * Create by SunnyDay on 2019/03/04 19 | * 20 | * @function 请求的发送 请求参数的配置 https的支持 21 | */ 22 | public class CommonOkHttpClient { 23 | private static final int TIME_OUT = 30;// 超时 24 | private static OkHttpClient okHttpClient; 25 | 26 | // client的一些参数配置 在类第一次加载时完成 27 | static { 28 | OkHttpClient.Builder okhttpBuilder = new OkHttpClient.Builder(); 29 | okhttpBuilder.connectTimeout(TIME_OUT, TimeUnit.SECONDS);//连接超时 30 | okhttpBuilder.readTimeout(TIME_OUT, TimeUnit.SECONDS);//读超时 31 | okhttpBuilder.writeTimeout(TIME_OUT, TimeUnit.SECONDS);//写超时 32 | okhttpBuilder.followRedirects(true);// 允许重定向 33 | 34 | // 添加对所有https的支持 35 | okhttpBuilder.hostnameVerifier(new HostnameVerifier() { 36 | @Override 37 | public boolean verify(String hostname, SSLSession session) { 38 | return true; //true: 支持任意类型的https(无论官方购买的https,或者是自己生成的https请求) 39 | } 40 | }); 41 | okhttpBuilder.sslSocketFactory(HttpsUtils.getSslSorcetFactory()); 42 | // 生成client对象 43 | okHttpClient = okhttpBuilder.build(); 44 | } 45 | 46 | /** 47 | * 发送具体的http/https请求 48 | * @param request 49 | * @param commCallback 50 | * @return call 51 | * 52 | * */ 53 | public static Call sendRequest(Request request, CommonJsonCallback commCallback) { 54 | Call call = okHttpClient.newCall(request); 55 | call.enqueue((Callback) commCallback); 56 | return call; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/net/exception/OkHttpException.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.net.exception; 2 | 3 | /** 4 | * Create by SunnyDay on 2019/03/05 5 | */ 6 | public class OkHttpException extends Exception { 7 | 8 | private int ecode;// 服务端返回码 9 | private Object emsg;// 服务端返回信息 10 | 11 | public OkHttpException(int ecode, Object emsg) { 12 | this.ecode = ecode; 13 | this.emsg = emsg; 14 | } 15 | 16 | public int getEcode() { 17 | return ecode; 18 | } 19 | 20 | public void setEcode(int ecode) { 21 | this.ecode = ecode; 22 | } 23 | 24 | public Object getEmsg() { 25 | return emsg; 26 | } 27 | 28 | public void setEmsg(Object emsg) { 29 | this.emsg = emsg; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/net/https/HttpsUtils.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.net.https; 2 | 3 | import java.security.SecureRandom; 4 | import java.security.cert.CertificateException; 5 | import java.security.cert.X509Certificate; 6 | 7 | import javax.net.ssl.SSLContext; 8 | import javax.net.ssl.SSLSocketFactory; 9 | import javax.net.ssl.X509TrustManager; 10 | 11 | /** 12 | * Create by SunnyDay on 2019/03/05 13 | *

14 | * https 相关知识 参考 张鸿洋 Android Https相关完全解析 当OkHttp遇到Https 15 | * 友情链接:https://blog.csdn.net/lmj623565791/article/details/48129405 16 | */ 17 | public class HttpsUtils { 18 | /** 19 | * trust all https point 20 | */ 21 | public static SSLSocketFactory getSslSorcetFactory(){ 22 | // 1 生成信任管理器类 23 | X509TrustManager manager = new X509TrustManager() { 24 | // 所有的重写方法空实现即可 25 | @Override 26 | public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { 27 | } 28 | 29 | @Override 30 | public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { 31 | } 32 | 33 | @Override 34 | public X509Certificate[] getAcceptedIssuers() { 35 | return new X509Certificate[0]; 36 | } 37 | }; 38 | // 2 创建加密上下文 39 | SSLContext sslContext = null; 40 | try { 41 | sslContext = SSLContext.getInstance("SSL");// 协议类型与服务器保持一致 42 | X509TrustManager[] xTrustArray = new X509TrustManager[]{manager}; 43 | sslContext.init(null, xTrustArray, new SecureRandom()); 44 | } catch (Exception e) { 45 | e.printStackTrace(); 46 | } 47 | return sslContext.getSocketFactory(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/net/listener/DisposeDataHandle.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.net.listener; 2 | 3 | /** 4 | * Create by SunnyDay on 2019/03/05 5 | */ 6 | public class DisposeDataHandle { 7 | public DisposeDataListener listener = null; 8 | public Class mClass = null; 9 | 10 | public DisposeDataHandle(DisposeDataListener listener) { 11 | this.listener = listener; 12 | } 13 | 14 | 15 | public DisposeDataHandle(Class mClass ,DisposeDataListener listener ) { 16 | this.listener = listener; 17 | this.mClass = mClass; 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/net/listener/DisposeDataListener.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.net.listener; 2 | 3 | /** 4 | * Create by SunnyDay on 2019/03/05 5 | */ 6 | public interface DisposeDataListener { 7 | /** 8 | * 请求成功回调事件处理 9 | */ 10 | void onSuccess(Object responseObj); 11 | 12 | /** 13 | * 请求失败回调事件处理 14 | */ 15 | void onFailure(Object reasonObj); 16 | } 17 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/net/request/CommonRequest.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.net.request; 2 | import java.util.Map; 3 | 4 | import okhttp3.FormBody; 5 | import okhttp3.Request; 6 | 7 | /** 8 | * Create by SunnyDay on 2019/03/04 9 | * 10 | * @function 接收请求参数 为我们生成Request对象 11 | */ 12 | public class CommonRequest { 13 | /** 14 | * @function post 请求 15 | * @param url url 16 | * @param params 请求参数 17 | * 18 | */ 19 | public static Request createPostRequest(String url, RequestParams params) { 20 | FormBody.Builder builder = new FormBody.Builder(); 21 | // 吧请求内容添加到请求体中 22 | for (Map.Entry entry : params.urlParams.entrySet()) { 23 | builder.add(entry.getKey(), entry.getValue()); 24 | } 25 | // 构建请求体 26 | FormBody formBody = builder.build(); 27 | // 返回封装的Request请求 28 | return new Request.Builder().post(formBody).build(); 29 | } 30 | 31 | /** 32 | * @function get 请求 33 | * @param url url 34 | * @param params 请求参数 35 | * 通过url+请求参数的拼接 成我们的get请求url,在生成Request请求 36 | * 37 | * get url 的方式 域名 ? key = value & key = value ...... 38 | * 有参数就拼接url再请求, 没有参数就使用给的拼接好的url 39 | */ 40 | public static Request createGetRequest(String url, RequestParams params){ 41 | StringBuilder sb = new StringBuilder(url).append("?"); 42 | if (params!=null){ 43 | for (Map.Entry entry : params.urlParams.entrySet()) { 44 | sb.append(entry.getKey()) 45 | .append("=") 46 | .append(entry.getValue()) 47 | .append("&"); 48 | } 49 | String disposedUrl = sb.toString().substring(sb.length()-1);// 去掉最后一个多余的&字符串 50 | return new Request.Builder() 51 | .url(disposedUrl) 52 | .get() 53 | .build(); 54 | }else{ 55 | return new Request.Builder() 56 | .url(url) 57 | .get() 58 | .build(); 59 | } 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/net/request/RequestParams.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.net.request; 2 | 3 | import java.io.FileNotFoundException; 4 | import java.util.HashMap; 5 | import java.util.Map; 6 | import java.util.concurrent.ConcurrentHashMap; 7 | 8 | /** 9 | * Create by SunnyDay on 2019/03/04 10 | * 11 | * @function 封装所有的请求参数到hashMap中。 12 | * 友情链接: 13 | * 1 map集合遍历参考 https://www.cnblogs.com/blest-future/p/4628871.html 14 | * 2 匿名内部类,非静态代码块 使用参考 https://blog.csdn.net/luman1991/article/details/53034602#commentBox 15 | * https://www.cnblogs.com/chenssy/p/3390871.html 16 | * https://zhangbo-peipei-163-com.iteye.com/blog/2023001 17 | * (具体参考 查找资料 java 匿名内部类的写法 ,java相关属性参数初始化顺序) 18 | */ 19 | public class RequestParams { 20 | public ConcurrentHashMap urlParams = new ConcurrentHashMap<>(); 21 | public ConcurrentHashMap fileParams = new ConcurrentHashMap<>(); 22 | 23 | /** 24 | * @param source map类型参数 25 | * @function 构造器 吧用户传来map类型的参数存入我们的集合 26 | */ 27 | public RequestParams(Map source) { 28 | if (source != null) { 29 | //遍历key value集合 30 | for (Map.Entry entry : source.entrySet()) { 31 | put(entry.getKey(), entry.getValue()); 32 | } 33 | } 34 | } 35 | 36 | /** 37 | * @function 构造器 接收 String类型的key value 请求参数 存入集合 38 | */ 39 | public RequestParams(final String key, final String value) { 40 | // 参考 类注释的友情链接 41 | this(new HashMap() { 42 | { 43 | put(key, value); 44 | } 45 | }); 46 | 47 | 48 | } 49 | 50 | /** 51 | * @function 空请求参数 52 | */ 53 | public RequestParams() { 54 | this((Map) null); 55 | } 56 | 57 | /** 58 | * @param key 请求参数key 59 | * @param value 请求参数value 60 | * @function key value 放入hashmap 61 | */ 62 | public void put(String key, String value) { 63 | if (key != null && value != null) { 64 | urlParams.put(key, value); 65 | } 66 | } 67 | 68 | /** 69 | * @param key 请求参数key 70 | * @param object 请求参数obj 71 | * @function 吧请求参数存入集合 72 | */ 73 | public void put(String key, Object object) throws FileNotFoundException { 74 | if (key != null) { 75 | fileParams.put(key, object); 76 | } 77 | } 78 | 79 | /** 80 | * @funtion 判断是否有请求参数 81 | */ 82 | public boolean hasParams() { 83 | if (urlParams.size() > 0 || fileParams.size() > 0) { 84 | return true; 85 | } 86 | return false; 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/net/response/CommonJsonCallback.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.net.response; 2 | 3 | import android.os.Handler; 4 | import android.os.Looper; 5 | 6 | import com.example.administrator.modelmall.net.exception.OkHttpException; 7 | import com.example.administrator.modelmall.net.listener.DisposeDataHandle; 8 | import com.example.administrator.modelmall.net.listener.DisposeDataListener; 9 | import com.google.gson.Gson; 10 | 11 | import java.io.IOException; 12 | 13 | import okhttp3.Call; 14 | import okhttp3.Callback; 15 | import okhttp3.Response; 16 | 17 | /** 18 | * Create by SunnyDay on 2019/03/05 19 | */ 20 | public class CommonJsonCallback implements Callback { 21 | 22 | /** 23 | * 自定义类型异常 24 | * 网络异常 25 | * json异常 26 | * 其他异常 27 | */ 28 | protected final int NETWORK_ERROR = -1; 29 | protected final int JSON_ERROR = -2; 30 | protected final int OTHER_ERROR = -3; 31 | 32 | 33 | private Handler mDeliveryHandler; //进行消息转发 34 | private DisposeDataListener mlistener; 35 | private Class mClass; 36 | 37 | public CommonJsonCallback(DisposeDataHandle handle) { 38 | this.mlistener = handle.listener; 39 | this.mClass = handle.mClass; 40 | this.mDeliveryHandler = new Handler(Looper.getMainLooper()); 41 | } 42 | 43 | /** 44 | * 请求失败处理 45 | */ 46 | @Override 47 | public void onFailure(Call call, final IOException e) { 48 | mDeliveryHandler.post(new Runnable() { 49 | @Override 50 | public void run() { 51 | mlistener.onFailure(new OkHttpException(NETWORK_ERROR, e.getMessage())); 52 | } 53 | }); 54 | } 55 | 56 | /** 57 | * 请求成功回调 58 | */ 59 | @Override 60 | public void onResponse(Call call, Response response) throws IOException { 61 | final String result = response.body().string();// json 类型 为String就行 62 | mDeliveryHandler.post(new Runnable() { 63 | @Override 64 | public void run() { 65 | handleResponse(result); 66 | } 67 | }); 68 | } 69 | 70 | /** 71 | * 处理json数据 72 | * 73 | * @param responseObj json字符串 74 | * 75 | * 返回数据 默认json 或者实体 76 | */ 77 | private void handleResponse(String responseObj) { 78 | // 判空处理 79 | if (responseObj == null && responseObj.trim().equals("")) { 80 | mlistener.onFailure(new OkHttpException(NETWORK_ERROR, "net work error")); 81 | return; 82 | } 83 | try { 84 | if (mClass == null) { 85 | // 用户不想让我们处理json,直接回传给用户 86 | mlistener.onSuccess(responseObj); 87 | } else { 88 | // 我们处理把json转化为实体 89 | Gson gson = new Gson(); 90 | Object obj = gson.fromJson(responseObj, mClass); 91 | if (obj != null) { 92 | mlistener.onSuccess(obj); 93 | } else { 94 | // 不是合法的json 95 | mlistener.onFailure(new OkHttpException(JSON_ERROR, "illegal json")); 96 | } 97 | } 98 | } catch (Exception e) { 99 | mlistener.onFailure(new OkHttpException(OTHER_ERROR, e.getMessage())); 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/ui/activities/AboutActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.ui.activities; 2 | 3 | import android.os.Build; 4 | import android.support.annotation.RequiresApi; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.os.Bundle; 7 | 8 | import com.example.administrator.modelmall.R; 9 | 10 | public class AboutActivity extends BaseActivity { 11 | 12 | 13 | @Override 14 | public Object offerLayout() { 15 | return R.layout.activity_about; 16 | } 17 | 18 | @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) 19 | @Override 20 | public void onBindView() { 21 | setImmersionStatusBar(); 22 | } 23 | 24 | @Override 25 | public void destory() { 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/ui/activities/BaseActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.ui.activities; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.graphics.Color; 5 | import android.os.Build; 6 | import android.os.Bundle; 7 | import android.support.annotation.Nullable; 8 | import android.support.annotation.RequiresApi; 9 | import android.support.v7.app.AppCompatActivity; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.view.WindowManager; 13 | 14 | import butterknife.ButterKnife; 15 | import butterknife.Unbinder; 16 | 17 | /** 18 | * Create by SunnyDay on 2019/03/14 19 | *

20 | * 此app activity的基类 21 | * (抽象类的设计,深入理解面向对象的核心思想) 22 | */ 23 | @SuppressLint("Registered") 24 | public abstract class BaseActivity extends AppCompatActivity { 25 | private View mConvertView; 26 | private Unbinder mBinder; 27 | 28 | /** 29 | * 加 final 不让子类 重写 onCreate,让其实现我们想要让他实现的方法 30 | */ 31 | @Override 32 | protected final void onCreate(@Nullable Bundle savedInstanceState) { 33 | super.onCreate(savedInstanceState); 34 | mConvertView = convertView(); 35 | if (mConvertView == null) { 36 | // 传其他资源id 时的处理(只能传布局资源id ) 37 | throw new ClassCastException("view convert fail,check your resource id be layout resource"); 38 | } else { 39 | setContentView(mConvertView); 40 | mBinder = ButterKnife.bind(this); 41 | onBindView(); 42 | 43 | } 44 | 45 | } 46 | 47 | /** 48 | * 提供布局 49 | * 可以为 资源id 50 | * 可以为 view 51 | */ 52 | public abstract Object offerLayout(); 53 | 54 | /** 55 | * 处理view。 用户做自己的工作 56 | */ 57 | public abstract void onBindView(); 58 | 59 | public abstract void destory(); 60 | 61 | /** 62 | * view的处理 63 | * 实现类 传布局资源ID 或者传view 64 | * 此处进行统一处理 65 | */ 66 | private View convertView() { 67 | View view = null; 68 | if (offerLayout() instanceof Integer) { 69 | view = LayoutInflater.from(this).inflate((Integer) offerLayout(), null, false); 70 | } else if (offerLayout() instanceof View) { 71 | view = (View) offerLayout(); 72 | } else { 73 | throw new IllegalArgumentException("offerLayout only be View or be Resource Id"); 74 | } 75 | return view; 76 | } 77 | 78 | /** 79 | * ButterKnife的解绑 80 | */ 81 | @Override 82 | public void onDestroy() { 83 | // 解绑 84 | if (mBinder != null) { 85 | mBinder.unbind(); 86 | mBinder = null; 87 | } 88 | mConvertView = null; // call gc 89 | super.onDestroy(); 90 | destory(); 91 | } 92 | 93 | /** 94 | * 全屏 且隐藏标题栏 95 | * (子类需要直接使用) 96 | */ 97 | public void setNoTitleBarAndFullScreen() { 98 | // requestWindowFeature(Window.FEATURE_NO_TITLE); 此句必须在setContent之前 99 | getSupportActionBar().hide();// 标题栏的隐藏 100 | getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, //全屏处理 101 | WindowManager.LayoutParams.FLAG_FULLSCREEN); 102 | } 103 | 104 | /** 105 | * 沉浸式状态栏 106 | */ 107 | @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) 108 | public void setImmersionStatusBar() { 109 | getSupportActionBar().hide(); 110 | View decorView = getWindow().getDecorView(); 111 | int option = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE; 112 | decorView.setSystemUiVisibility(option); 113 | getWindow().setStatusBarColor(Color.TRANSPARENT); 114 | } 115 | 116 | /** 117 | * 隐藏actionbar 118 | * */ 119 | public void hideActionBar(){ 120 | getSupportActionBar().hide(); 121 | } 122 | 123 | } 124 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/ui/activities/CountDownActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.ui.activities; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.content.Intent; 5 | import android.os.CountDownTimer; 6 | import android.support.v7.widget.AppCompatTextView; 7 | import android.view.View; 8 | 9 | import com.example.administrator.modelmall.Constant.ModelConstant; 10 | import com.example.administrator.modelmall.R; 11 | import com.example.administrator.modelmall.utils.ModelPreference; 12 | 13 | import butterknife.BindView; 14 | 15 | /** 16 | * Create by SunnyDay on 2019/03/15 17 | */ 18 | public class CountDownActivity extends BaseActivity { 19 | @BindView(R.id.tv_count_down) 20 | AppCompatTextView countDownText; 21 | private CountDownTimer timer; 22 | 23 | @Override 24 | public Object offerLayout() { 25 | return R.layout.activity_countdown; 26 | } 27 | 28 | @Override 29 | public void onBindView() { 30 | setNoTitleBarAndFullScreen(); 31 | initCountDown(); 32 | } 33 | 34 | 35 | /** 36 | * 倒计时逻辑处理 37 | */ 38 | private void initCountDown() { 39 | // 避免内存泄漏 40 | if (!isFinishing()) { 41 | timer = new CountDownTimer(1000 * 11, 1000) { 42 | @SuppressLint("SetTextI18n") 43 | @Override 44 | public void onTick(long millisUntilFinished) { 45 | countDownText.setOnClickListener(new View.OnClickListener() { 46 | @Override 47 | public void onClick(View v) { 48 | checkToJump(); 49 | } 50 | }); 51 | int time = (int) millisUntilFinished; 52 | countDownText.setText(time / 1000 + " 跳过"); 53 | } 54 | 55 | @Override 56 | public void onFinish() { 57 | checkToJump(); 58 | } 59 | }.start(); 60 | } 61 | } 62 | 63 | /** 64 | * 首次进入引导页判断 65 | */ 66 | private void checkToJump() { 67 | boolean isFirstin = ModelPreference.getBoolean(CountDownActivity.this, ModelConstant.FIRST_IN, true); 68 | if (isFirstin) { 69 | startActivity(new Intent(CountDownActivity.this, GuideActivity.class)); 70 | ModelPreference.putBoolean(CountDownActivity.this, ModelConstant.FIRST_IN, false); 71 | } else { 72 | startActivity(new Intent(CountDownActivity.this, LoginActivity.class)); 73 | } 74 | finish(); 75 | } 76 | 77 | @Override 78 | public void destory() { 79 | // 避免内存泄漏 80 | if (timer != null) { 81 | timer.cancel(); 82 | timer = null; 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/ui/activities/GuideActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.ui.activities; 2 | 3 | import android.content.Intent; 4 | import android.support.v4.view.ViewPager; 5 | import android.support.v7.widget.AppCompatTextView; 6 | import android.view.View; 7 | 8 | import com.example.administrator.modelmall.R; 9 | import com.example.administrator.modelmall.loader.ModelImageLoader; 10 | import com.orhanobut.logger.Logger; 11 | import com.youth.banner.Banner; 12 | import com.youth.banner.listener.OnBannerListener; 13 | 14 | import java.util.ArrayList; 15 | import java.util.List; 16 | 17 | 18 | import butterknife.BindView; 19 | 20 | public class GuideActivity extends BaseActivity { 21 | @BindView(R.id.banner) 22 | public Banner banner; 23 | @BindView(R.id.btn_start) 24 | public AppCompatTextView btnStart; 25 | private List images; 26 | 27 | @Override 28 | public Object offerLayout() { 29 | return R.layout.activity_guide; 30 | } 31 | 32 | @Override 33 | public void onBindView() { 34 | setNoTitleBarAndFullScreen(); 35 | initBannerData(); 36 | initViews(); 37 | } 38 | 39 | private void initViews() { 40 | banner.setImageLoader(new ModelImageLoader()) 41 | .setImages(images) 42 | .isAutoPlay(false) 43 | .start(); 44 | banner.setOnPageChangeListener(new ViewPager.OnPageChangeListener() { 45 | @Override 46 | public void onPageScrolled(int i, float v, int i1) { 47 | } 48 | 49 | @Override 50 | public void onPageSelected(int i) { 51 | if (i == images.size() - 1) { 52 | btnStart.setVisibility(View.VISIBLE); 53 | btnStart.setOnClickListener(new View.OnClickListener() { 54 | @Override 55 | public void onClick(View v) { 56 | startActivity(new Intent(GuideActivity.this, LoginActivity.class)); 57 | finish(); 58 | } 59 | }); 60 | } else { 61 | btnStart.setVisibility(View.GONE); 62 | } 63 | } 64 | 65 | @Override 66 | public void onPageScrollStateChanged(int i) { 67 | } 68 | }); 69 | 70 | } 71 | 72 | /** 73 | * 初始化banner数据 74 | */ 75 | private void initBannerData() { 76 | images = new ArrayList<>(); 77 | images.add(R.drawable.launcher_01); 78 | images.add(R.drawable.launcher_02); 79 | images.add(R.drawable.launcher_03); 80 | images.add(R.drawable.launcher_04); 81 | images.add(R.drawable.launcher_05); 82 | } 83 | 84 | @Override 85 | public void destory() { 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/ui/activities/LoginActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.ui.activities; 2 | 3 | import android.content.Intent; 4 | import android.support.design.widget.TextInputEditText; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.os.Bundle; 7 | import android.view.View; 8 | import android.widget.Button; 9 | import android.widget.TextView; 10 | import android.widget.Toast; 11 | 12 | import com.example.administrator.modelmall.R; 13 | import com.example.administrator.modelmall.db.UserRegisterBean; 14 | import com.example.administrator.modelmall.ui.customview.StatusBarUtils; 15 | import com.example.administrator.modelmall.ui.customview.ToastUtils; 16 | import com.example.administrator.modelmall.utils.RegularVerification; 17 | import com.orhanobut.logger.Logger; 18 | 19 | import org.litepal.LitePal; 20 | import org.litepal.crud.DataSupport; 21 | 22 | import java.util.List; 23 | 24 | import butterknife.BindView; 25 | 26 | public class LoginActivity extends BaseActivity implements View.OnClickListener { 27 | @BindView(R.id.tv_email) 28 | public TextInputEditText mEmail; 29 | @BindView(R.id.tv_pwd) 30 | public TextInputEditText mPwd; 31 | 32 | @BindView(R.id.btn_login) 33 | Button btnLogin; 34 | @BindView(R.id.tv_to_register) 35 | TextView tvToRegister; 36 | private String dbEmail; 37 | private String dbPwd; 38 | private String email; 39 | private String pwd; 40 | 41 | @Override 42 | public Object offerLayout() { 43 | return R.layout.activity_login; 44 | } 45 | 46 | @Override 47 | public void onBindView() { 48 | hideActionBar(); 49 | StatusBarUtils.setWindowStatusBarColor(this,R.color.orange); 50 | getDataFromDB(); 51 | 52 | btnLogin.setOnClickListener(this); 53 | tvToRegister.setOnClickListener(this); 54 | 55 | 56 | } 57 | 58 | /** 59 | * 核对登陆信息 60 | */ 61 | private boolean checkUserInputData() { 62 | boolean isPass = true; 63 | email = mEmail.getText().toString(); 64 | pwd = mPwd.getText().toString(); 65 | 66 | if (email.isEmpty() || !RegularVerification.isEmail(email)) { 67 | mEmail.setError("错误的邮箱格式"); 68 | isPass = false; 69 | } 70 | if (pwd.isEmpty() || pwd.length() < 6) { 71 | mPwd.setError("请输入至少6位密码"); 72 | isPass = false; 73 | } 74 | 75 | return isPass; 76 | } 77 | 78 | /** 79 | * 从数据库读信息 80 | */ 81 | private void getDataFromDB() { 82 | List user = DataSupport.findAll(UserRegisterBean.class); 83 | if (user != null) { 84 | for (UserRegisterBean userInfo : user) { 85 | dbEmail = userInfo.getEmail(); 86 | dbPwd = userInfo.getPwd(); 87 | } 88 | 89 | } 90 | } 91 | 92 | @Override 93 | public void destory() { 94 | 95 | } 96 | 97 | @Override 98 | public void onClick(View v) { 99 | switch (v.getId()) { 100 | case R.id.btn_login: 101 | if (checkUserInputData()) { 102 | if (email.equals(dbEmail) && pwd.equals(dbPwd)) { 103 | ToastUtils.showToast(this,"登陆成功",ToastUtils.LENGTH_LONG); 104 | startActivity(new Intent(LoginActivity.this, MainActivity.class)); 105 | finish(); 106 | } else { 107 | ToastUtils.showToast(this,"账号或者密码有误",ToastUtils.LENGTH_LONG); 108 | } 109 | } 110 | break; 111 | case R.id.tv_to_register: 112 | startActivity(new Intent(LoginActivity.this, SignupActivity.class)); 113 | break; 114 | } 115 | 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/ui/activities/MsgActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.ui.activities; 2 | 3 | import android.os.Build; 4 | import android.support.annotation.RequiresApi; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.os.Bundle; 7 | 8 | import com.example.administrator.modelmall.R; 9 | 10 | public class MsgActivity extends BaseActivity{ 11 | 12 | 13 | @Override 14 | public Object offerLayout() { 15 | return R.layout.activity_msg; 16 | } 17 | 18 | @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) 19 | @Override 20 | public void onBindView() { 21 | setImmersionStatusBar(); 22 | } 23 | 24 | @Override 25 | public void destory() { 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/ui/activities/SearchActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.ui.activities; 2 | 3 | import android.os.Build; 4 | import android.support.annotation.RequiresApi; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.os.Bundle; 7 | 8 | import com.example.administrator.modelmall.R; 9 | import com.example.administrator.modelmall.ui.customview.ToastUtils; 10 | 11 | import butterknife.BindView; 12 | import scut.carson_ho.searchview.ICallBack; 13 | import scut.carson_ho.searchview.SearchView; 14 | import scut.carson_ho.searchview.bCallBack; 15 | 16 | public class SearchActivity extends BaseActivity { 17 | @BindView(R.id.search_view) 18 | SearchView searchView; 19 | 20 | @Override 21 | public Object offerLayout() { 22 | return R.layout.activity_search; 23 | } 24 | 25 | @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) 26 | @Override 27 | public void onBindView() { 28 | setImmersionStatusBar(); 29 | 30 | initSearchView(); 31 | } 32 | 33 | private void initSearchView() { 34 | 35 | searchView.setOnClickSearch(new ICallBack() { 36 | @Override 37 | public void SearchAciton(String string) { 38 | // 框架源码弹吐司 不友好 这里为了实现功能临时使用 39 | ToastUtils.showToast(SearchActivity.this,"后台小哥的数据库正在搭建",ToastUtils.LENGTH_LONG); 40 | } 41 | }); 42 | searchView.setOnClickBack(new bCallBack() { 43 | @Override 44 | public void BackAciton() { 45 | finish(); 46 | } 47 | }); 48 | } 49 | 50 | @Override 51 | public void destory() { 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/ui/customview/CustomDialog.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.ui.customview; 2 | 3 | import android.app.Dialog; 4 | import android.content.Context; 5 | import android.support.annotation.NonNull; 6 | import android.support.annotation.Nullable; 7 | 8 | /** 9 | * Create by SunnyDay on 2019/03/23 10 | * 11 | * 不在使用 使用第三方 DialogPlus 参考 12 | */ 13 | public class CustomDialog extends Dialog { 14 | public CustomDialog(@NonNull Context context) { 15 | super(context); 16 | } 17 | 18 | public CustomDialog(@NonNull Context context, int themeResId) { 19 | super(context, themeResId); 20 | } 21 | 22 | protected CustomDialog(@NonNull Context context, boolean cancelable, @Nullable OnCancelListener cancelListener) { 23 | super(context, cancelable, cancelListener); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/ui/customview/StatusBarUtils.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.ui.customview; 2 | 3 | import android.app.Activity; 4 | import android.app.Dialog; 5 | import android.os.Build; 6 | import android.view.Window; 7 | import android.view.WindowManager; 8 | 9 | /** 10 | * Create by SunnyDay on 2019/03/21 11 | * 12 | * 修改状态栏颜色 13 | * 修改作用对象:activity,dialog 。 14 | */ 15 | public class StatusBarUtils { 16 | public static void setWindowStatusBarColor(Activity activity, int colorResId) { 17 | try { 18 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 19 | Window window = activity.getWindow(); 20 | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); 21 | window.setStatusBarColor(activity.getResources().getColor(colorResId)); 22 | 23 | //底部导航栏 24 | //window.setNavigationBarColor(activity.getResources().getColor(colorResId)); 25 | } 26 | } catch (Exception e) { 27 | e.printStackTrace(); 28 | } 29 | } 30 | 31 | public static void setWindowStatusBarColor(Dialog dialog, int colorResId) { 32 | try { 33 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 34 | Window window = dialog.getWindow(); 35 | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); 36 | window.setStatusBarColor(dialog.getContext().getResources().getColor(colorResId)); 37 | 38 | //底部导航栏 39 | //window.setNavigationBarColor(activity.getResources().getColor(colorResId)); 40 | } 41 | } catch (Exception e) { 42 | e.printStackTrace(); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/ui/customview/ToastUtils.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.ui.customview; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.widget.TextView; 7 | import android.widget.Toast; 8 | 9 | import com.example.administrator.modelmall.R; 10 | 11 | /** 12 | * Create by SunnyDay on 2019/03/21 13 | * 吐司简单 定制 (我们 app的专有吐司) 14 | * 15 | * ps:只展示较短的字符串 16 | */ 17 | public class ToastUtils { 18 | public static final int LENGTH_LONG = Toast.LENGTH_LONG; 19 | public static final int LENGTH_SHORT = Toast.LENGTH_SHORT; 20 | 21 | 22 | public static void showToast(Context context, CharSequence text,int during) { 23 | Toast toast = null; 24 | View view = LayoutInflater.from(context).inflate(R.layout.toast, null, false); 25 | TextView desc = view.findViewById(R.id.desc); 26 | desc.setText(text); 27 | 28 | toast = new Toast(context); 29 | toast.setDuration(during); 30 | toast.setView(view); 31 | toast.show(); 32 | 33 | 34 | 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/ui/fragments/readme.text: -------------------------------------------------------------------------------- 1 | fragment不在使用 本来打算 viewpager+fragment 2 | 结果改成ViewPager+5Views 封装抽取工厂模式设计 -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/utils/ModelPreference.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.utils; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | 6 | import com.example.administrator.modelmall.Constant.ModelConstant; 7 | 8 | /** 9 | * Create by SunnyDay on 2019/03/14 10 | * SharedPreferences 工具类 11 | */ 12 | public class ModelPreference { 13 | 14 | 15 | /** 16 | * 存布尔值 17 | * @param context 上下文 18 | * @param key 存的key 19 | * @param value 值 20 | * 21 | * */ 22 | public static void putBoolean(Context context, String key, boolean value) { 23 | SharedPreferences sp = context.getSharedPreferences(ModelConstant.CONFIG, Context.MODE_PRIVATE); 24 | sp.edit().putBoolean(key, value).apply(); 25 | } 26 | /** 27 | * 取布尔值 28 | * @param context 上下文 29 | * @param key key 30 | * @param defalutValue 默认值 31 | * 32 | * */ 33 | public static boolean getBoolean(Context context, String key, boolean defalutValue) { 34 | SharedPreferences sp = context.getSharedPreferences(ModelConstant.CONFIG, Context.MODE_PRIVATE); 35 | return sp.getBoolean(key, defalutValue); 36 | } 37 | /** 38 | * 存字符串 39 | * @param context 上下文 40 | * @param key key 41 | * @param value 值 42 | * 43 | * */ 44 | public static void putString(Context context, String key, String value) { 45 | SharedPreferences sp = context.getSharedPreferences(ModelConstant.CONFIG, Context.MODE_PRIVATE); 46 | sp.edit().putString(key, value).apply(); 47 | } 48 | /** 49 | * 取布尔值 50 | * @param context 上下文 51 | * @param key key 52 | * @param defalutValue 默认值 53 | * 54 | * */ 55 | public static String getString(Context context, String key, String defalutValue) { 56 | SharedPreferences sp = context.getSharedPreferences(ModelConstant.CONFIG, Context.MODE_PRIVATE); 57 | return sp.getString(key, defalutValue); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/utils/RegularVerification.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.utils; 2 | 3 | import java.util.regex.Pattern; 4 | 5 | /** 6 | * Create by SunnyDay on 2019/03/16 7 | * 正则验证包 8 | */ 9 | public class RegularVerification { 10 | private static final String REGEX_USERNAME = "^[a-zA-Z]\\w{5,20}$"; /** * 正则表达式:验证密码 */ 11 | private static final String REGEX_PASSWORD = "^[a-zA-Z0-9]{6,20}$"; /** * 正则表达式:验证手机号 */ 12 | private static final String REGEX_MOBILE = "^((17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$"; /** * 正则表达式:验证邮箱 */ 13 | private static final String REGEX_EMAIL = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; /** * 正则表达式:验证汉字 */ 14 | private static final String REGEX_CHINESE = "^[\u4e00-\u9fa5],{0,}$"; /** * 正则表达式:验证身份证 */ 15 | private static final String REGEX_ID_CARD = "(^\\d{18}$)|(^\\d{15}$)"; /** * 正则表达式:验证URL */ 16 | private static final String REGEX_URL = "http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w- ./?%&=]*)?"; /** * 正则表达式:验证IP地址 */ 17 | private static final String REGEX_IP_ADDR = "(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)"; /** * 校验用户名 18 | * 19 | * @param username 20 | * @return 校验通过返回true,否则返回false */ 21 | public static boolean isUsername(String username) { return Pattern.matches(REGEX_USERNAME, username); 22 | } /** * 校验密码 23 | * 24 | * @param password 25 | * @return 校验通过返回true,否则返回false */ 26 | public static boolean isPassword(String password) { return Pattern.matches(REGEX_PASSWORD, password); 27 | } /** * 校验手机号 28 | * 29 | * @param mobile 30 | * @return 校验通过返回true,否则返回false */ 31 | public static boolean isMobile(String mobile) { return Pattern.matches(REGEX_MOBILE, mobile); 32 | } /** * 校验邮箱 33 | * 34 | * @param email 35 | * @return 校验通过返回true,否则返回false */ 36 | public static boolean isEmail(String email) { return Pattern.matches(REGEX_EMAIL, email); 37 | } /** * 校验汉字 38 | * 39 | * @param chinese 40 | * @return 校验通过返回true,否则返回false */ 41 | public static boolean isChinese(String chinese) { return Pattern.matches(REGEX_CHINESE, chinese); 42 | } /** * 校验身份证 43 | * 44 | * @param idCard 45 | * @return 校验通过返回true,否则返回false */ 46 | public static boolean isIDCard(String idCard) { return Pattern.matches(REGEX_ID_CARD, idCard); 47 | } /** * 校验URL 48 | * 49 | * @param url 50 | * @return 校验通过返回true,否则返回false */ 51 | public static boolean isUrl(String url) { return Pattern.matches(REGEX_URL, url); 52 | } /** * 校验IP地址 53 | * 54 | * @param ipAddr 55 | * @return 56 | */ 57 | public static boolean isIPAddr(String ipAddr) { return Pattern.matches(REGEX_IP_ADDR, ipAddr); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/utils/TimeCount.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall.utils; 2 | import android.os.CountDownTimer; 3 | /** 4 | * Create by SunnyDay on 2019/03/15 5 | * 倒计时工具封装 6 | */ 7 | public class TimeCount extends CountDownTimer { 8 | 9 | /** 10 | * @param millisInFuture The number of millis in the future from the call 11 | * to {@link #start()} until the countdown is done and {@link #onFinish()} 12 | * is called. 13 | * @param countDownInterval The interval along the way to receive 14 | * {@link #onTick(long)} callbacks. 15 | */ 16 | public TimeCount(long millisInFuture, long countDownInterval) { 17 | super(millisInFuture,countDownInterval); 18 | } 19 | 20 | /** 21 | * 处理倒计时期间逻辑 22 | * 23 | * */ 24 | @Override 25 | public void onTick(long millisUntilFinished) { 26 | // TODO 27 | } 28 | 29 | /** 30 | * 倒计时结束处理 31 | * */ 32 | @Override 33 | public void onFinish() { 34 | // TODO 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /model_mall/src/main/java/com/example/administrator/modelmall/wxapi/WXEntryActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 官网地站:http://www.mob.com 3 | * 技术支持QQ: 4006852216 4 | * 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复) 5 | * 6 | * Copyright (c) 2013年 mob.com. All rights reserved. 7 | */ 8 | 9 | package com.example.administrator.modelmall.wxapi; 10 | 11 | import android.content.Intent; 12 | import android.widget.Toast; 13 | import cn.sharesdk.wechat.utils.WXAppExtendObject; 14 | import cn.sharesdk.wechat.utils.WXMediaMessage; 15 | import cn.sharesdk.wechat.utils.WechatHandlerActivity; 16 | 17 | /** 微信客户端回调activity示例 */ 18 | public class WXEntryActivity extends WechatHandlerActivity { 19 | 20 | /** 21 | * 处理微信发出的向第三方应用请求app message 22 | *

23 | * 在微信客户端中的聊天页面有“添加工具”,可以将本应用的图标添加到其中 24 | * 此后点击图标,下面的代码会被执行。Demo仅仅只是打开自己而已,但你可 25 | * 做点其他的事情,包括根本不打开任何页面 26 | */ 27 | public void onGetMessageFromWXReq(WXMediaMessage msg) { 28 | if (msg != null) { 29 | Intent iLaunchMyself = getPackageManager().getLaunchIntentForPackage(getPackageName()); 30 | startActivity(iLaunchMyself); 31 | } 32 | } 33 | 34 | /** 35 | * 处理微信向第三方应用发起的消息 36 | *

37 | * 此处用来接收从微信发送过来的消息,比方说本demo在wechatpage里面分享 38 | * 应用时可以不分享应用文件,而分享一段应用的自定义信息。接受方的微信 39 | * 客户端会通过这个方法,将这个信息发送回接收方手机上的本demo中,当作 40 | * 回调。 41 | *

42 | * 本Demo只是将信息展示出来,但你可做点其他的事情,而不仅仅只是Toast 43 | */ 44 | public void onShowMessageFromWXReq(WXMediaMessage msg) { 45 | if (msg != null && msg.mediaObject != null 46 | && (msg.mediaObject instanceof WXAppExtendObject)) { 47 | WXAppExtendObject obj = (WXAppExtendObject) msg.mediaObject; 48 | Toast.makeText(this, obj.extInfo, Toast.LENGTH_SHORT).show(); 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-hdpi/ssdk_oks_ptr_ptr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-hdpi/ssdk_oks_ptr_ptr.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/big1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/big1.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/big2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/big2.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/big3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/big3.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/cat.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/chengxuyuan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/chengxuyuan.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/faxian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/faxian.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/fenlei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/fenlei.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/gouwuche.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/gouwuche.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/img_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/img_big.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/img_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/img_small.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/kong.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/kong.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/launcher_00.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/launcher_00.jpeg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/launcher_01.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/launcher_01.jpeg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/launcher_02.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/launcher_02.jpeg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/launcher_03.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/launcher_03.jpeg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/launcher_04.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/launcher_04.jpeg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/launcher_05.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/launcher_05.jpeg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/more.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/msg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/msg.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/saoyisao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/saoyisao.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/single.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/single.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/small1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/small1.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/small2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/small2.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/small3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/small3.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_auth_title_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_auth_title_back.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_back_arr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_back_arr.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_checkboxed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_checkboxed.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_country_back_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_country_back_arrow.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_country_cl_divider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_country_cl_divider.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_country_clear_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_country_clear_search.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_country_search_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_country_search_icon.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_country_sharesdk_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_country_sharesdk_icon.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_exception_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_exception_icon.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_identify_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_identify_icon.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_input_bg_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_input_bg_focus.9.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_left_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_left_back.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_load_dot_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_load_dot_white.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_loading.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_logo.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_mobile_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_mobile_logo.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_accountkit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_accountkit.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_alipay.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_alipaymoments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_alipaymoments.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_bluetooth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_bluetooth.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_check_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_check_checked.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_check_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_check_default.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_cmcc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_cmcc.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_dingding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_dingding.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_douban.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_douban.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_douyin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_douyin.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_dropbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_dropbox.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_email.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_evernote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_evernote.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_facebook.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_facebookmessenger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_facebookmessenger.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_flickr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_flickr.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_foursquare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_foursquare.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_googleplus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_googleplus.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_instagram.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_instapaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_instapaper.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_kaixin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_kaixin.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_kakaostory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_kakaostory.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_kakaotalk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_kakaotalk.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_laiwang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_laiwang.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_laiwangmoments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_laiwangmoments.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_line.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_linkedin.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_meipai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_meipai.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_mingdao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_mingdao.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_pinterest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_pinterest.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_pocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_pocket.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_qq.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_qzone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_qzone.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_reddit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_reddit.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_renren.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_renren.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_shortmessage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_shortmessage.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_sinaweibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_sinaweibo.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_telecom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_telecom.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_telegram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_telegram.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_tencentweibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_tencentweibo.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_tumblr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_tumblr.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_twitter.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_vkontakte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_vkontakte.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_wechat.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_wechatfavorite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_wechatfavorite.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_wechatmoments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_wechatmoments.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_whatsapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_whatsapp.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_yixin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_yixin.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_yixinmoments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_yixinmoments.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_youdao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_youdao.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_oks_classic_youtube.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_title_div.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_title_div.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_weibo_common_shadow_top.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_weibo_common_shadow_top.9.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/ssdk_weibo_empty_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/ssdk_weibo_empty_failed.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/tuijian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/tuijian.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/tv_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/tv_bg.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/user_head.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/user_head.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/wode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/wode.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/xiaoxi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/xiaoxi.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable-xhdpi/zhuye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/drawable-xhdpi/zhuye.png -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable/bg_btn_start.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable/bg_circle_countdown.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable/bg_summary.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable/click_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable/normal_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable/ssdk_oks_classic_platform_cell_back.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /model_mall/src/main/res/drawable/ssdk_oks_classic_progressbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/activity_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 13 | 21 | 22 | 27 | 35 | 44 | 53 | 62 | 63 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/activity_countdown.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 25 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/activity_guide.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 12 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/activity_msg.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 23 | 24 | 30 | 31 | 40 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/activity_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 19 | 20 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/goods_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 19 | 20 | 25 | 26 | 31 | 32 | 38 | 39 | 51 | 52 | 59 | 60 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/image_more.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/image_single_grid.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/item_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/item_classfiy_grid.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 14 | 22 | 23 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/item_findpage.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 19 | 20 | 24 | 25 | 31 | 32 | 44 | 45 | 56 | 57 | 58 | 63 | 68 | 76 | 84 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/page_find.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 12 | 22 | 23 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/select_addr_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 20 | 21 | 32 | 33 | 37 | 38 | 48 | 56 | 57 | 61 | 62 | 72 | 80 | 81 | 82 | 86 | 96 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/sortpage_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 26 | -------------------------------------------------------------------------------- /model_mall/src/main/res/layout/toast.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 20 | 21 | 30 | 31 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-xhdpi/app_icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/mipmap-xhdpi/app_icon.jpg -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /model_mall/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnnydaydev/ModelMall/d3bff211bb05257e559356902e956f1ef33e2cc1/model_mall/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /model_mall/src/main/res/values-en/ssdk_oks_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Share 4 | Sharing operation is working in the background… 5 | Operation failed 6 | Operation succeeded 7 | Operation canceled 8 | Cancel 9 | Photo Sharing 10 | Confirm 11 | Contacts 12 | Pull down to refresh 13 | Release to refresh 14 | Refreshing… 15 | 16 | -------------------------------------------------------------------------------- /model_mall/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #008577 4 | #00574B 5 | #D81B60 6 | #ffffff 7 | #000000 8 | #ff0000 9 | #ff8800 10 | #929292 11 | #0000FE 12 | 13 | 14 | -------------------------------------------------------------------------------- /model_mall/src/main/res/values/ssdk_instapaper_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | %s 12 | 46 | 47 | 48 | 49 | 58 |

59 | %s 60 |
61 | 62 | 63 | 64 |
65 |

66 |
67 | 68 | 69 | ]]> 70 | -------------------------------------------------------------------------------- /model_mall/src/main/res/values/ssdk_oks_color_drawables.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ffffffff 4 | #ffeeeeee 5 | 6 | -------------------------------------------------------------------------------- /model_mall/src/main/res/values/ssdk_oks_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 分享 4 | 分享操作正在后台进行… 5 | 分享失败 6 | 分享成功 7 | 分享已取消 8 | 取消 9 | 图文分享 10 | 确定 11 | 联系人 12 | 下拉刷新 13 | 松开刷新 14 | 刷新中… 15 | 16 | -------------------------------------------------------------------------------- /model_mall/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ModelMall 3 | 跳过 4 | 开始体验 5 | 6 | -------------------------------------------------------------------------------- /model_mall/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 24 | 25 | -------------------------------------------------------------------------------- /model_mall/src/test/java/com/example/administrator/modelmall/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.administrator.modelmall; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':model_mall' 2 | // 规范 --------------------------------------------------------------------------------