├── .gitignore ├── .idea ├── codeStyles │ └── Project.xml ├── compiler.xml ├── gradle.xml ├── inspectionProfiles │ └── Project_Default.xml ├── jarRepositories.xml ├── markdown-navigator-enh.xml ├── misc.xml ├── runConfigurations.xml └── vcs.xml ├── README-LIBRARY.md ├── README-UPDATE.md ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── library │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── library │ │ │ ├── MainActivity.java │ │ │ ├── filedownload │ │ │ └── FileDownloadActivity.java │ │ │ ├── glide │ │ │ └── GlideUseActivity.java │ │ │ ├── http │ │ │ └── HttpSampleActivity.java │ │ │ ├── lazyload │ │ │ ├── LazyFragment.java │ │ │ └── LazyLoadActivity.java │ │ │ ├── list │ │ │ ├── multiplechoice │ │ │ │ ├── MultipleChoiceListActivity.java │ │ │ │ └── MultipleChoiceListAdapter.java │ │ │ ├── refreshload │ │ │ │ ├── RefreshLoadListActivity.java │ │ │ │ └── RefreshLoadListAdapter.java │ │ │ └── singlechoice │ │ │ │ ├── SingleChoiceListActivity.java │ │ │ │ └── SingleChoiceListAdapter.java │ │ │ ├── login │ │ │ ├── LoginActivity.java │ │ │ └── mvp │ │ │ │ ├── LoginContract.java │ │ │ │ ├── LoginModel.java │ │ │ │ └── LoginPresenter.java │ │ │ ├── mainpage │ │ │ ├── MainPageActivity.java │ │ │ └── fragment │ │ │ │ ├── HomeFragment.java │ │ │ │ ├── MineFragment.java │ │ │ │ └── NewsFragment.java │ │ │ ├── question │ │ │ ├── AnswerAdapter.java │ │ │ ├── QuestionActivity.java │ │ │ ├── QuestionAdapter.java │ │ │ └── QuestionBean.java │ │ │ └── toolbar │ │ │ └── CommonToolbarActivity.java │ └── res │ │ ├── drawable-xhdpi │ │ ├── ic_home_select.png │ │ ├── ic_home_unselect.png │ │ ├── ic_list_item_select.png │ │ ├── ic_list_item_unselect.png │ │ ├── ic_mine_select.png │ │ ├── ic_mine_unselect.png │ │ ├── ic_news_select.png │ │ └── ic_news_unselect.png │ │ ├── drawable │ │ ├── bg_circle_float_button.xml │ │ ├── border_black_corner_10.xml │ │ ├── item_answer_select.xml │ │ ├── item_answer_unselect.xml │ │ ├── select_home_icon.xml │ │ ├── select_list_item.xml │ │ ├── select_main_bottom_text_color.xml │ │ ├── select_mine_icon.xml │ │ ├── select_news_icon.xml │ │ └── selected_item_answer.xml │ │ ├── layout │ │ ├── activity_common_toolbar.xml │ │ ├── activity_file_download.xml │ │ ├── activity_glide_use.xml │ │ ├── activity_http_sample.xml │ │ ├── activity_lazy_load.xml │ │ ├── activity_login.xml │ │ ├── activity_main.xml │ │ ├── activity_main_page.xml │ │ ├── activity_multiple_choice_list.xml │ │ ├── activity_question.xml │ │ ├── activity_refresh_load_list.xml │ │ ├── activity_single_choice_list.xml │ │ ├── fragment_lazy.xml │ │ ├── fragment_main.xml │ │ ├── include_main_bottom.xml │ │ ├── item_question_answer.xml │ │ ├── item_question_type_1.xml │ │ ├── item_question_type_2.xml │ │ ├── item_question_type_3.xml │ │ ├── item_refresh_layout.xml │ │ ├── item_single_choice.xml │ │ ├── toolbar_my_left_view.xml │ │ ├── toolbar_my_right_view.xml │ │ └── toolbar_my_title_view.xml │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── library │ └── ExampleUnitTest.java ├── basecommon ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── common │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ └── question.json │ ├── java │ │ └── com │ │ │ └── common │ │ │ ├── base │ │ │ ├── BaseActivity.java │ │ │ ├── BaseApplication.java │ │ │ ├── BaseFragment.java │ │ │ └── mvp │ │ │ │ ├── BaseMvpActivity.java │ │ │ │ ├── BaseMvpFragment.java │ │ │ │ ├── BasePresenter.java │ │ │ │ └── BaseView.java │ │ │ ├── constants │ │ │ ├── Constants.java │ │ │ └── HttpConstants.java │ │ │ ├── http │ │ │ ├── XRetrofit.java │ │ │ ├── api │ │ │ │ └── ApiService.java │ │ │ ├── base │ │ │ │ ├── BaseObserver.java │ │ │ │ ├── BaseResponse.java │ │ │ │ └── RxJavaHelper.java │ │ │ ├── bean │ │ │ │ ├── ExampleBean.java │ │ │ │ ├── ExampleFileBean.java │ │ │ │ └── ExampleListBean.java │ │ │ ├── helper │ │ │ │ ├── CompressHelper.java │ │ │ │ ├── Mobile.java │ │ │ │ ├── RequestBodyHelper.java │ │ │ │ └── upload │ │ │ │ │ ├── OnUploadFileListener.java │ │ │ │ │ └── UploadFileHelper.java │ │ │ └── intercept │ │ │ │ └── HttpIntercept.java │ │ │ ├── library │ │ │ └── bravh_rvadapter │ │ │ │ ├── BaseItemDraggableAdapter.java │ │ │ │ ├── BaseMultiItemRecyclerAdapter.java │ │ │ │ ├── BaseRecyclerAdapter.java │ │ │ │ ├── BaseSectionMultiItemRecyclerAdapter.java │ │ │ │ ├── BaseSectionRecyclerAdapter.java │ │ │ │ ├── MultipleItemRvAdapter.java │ │ │ │ ├── RecyclerViewHolder.java │ │ │ │ ├── animation │ │ │ │ ├── AlphaInAnimation.java │ │ │ │ ├── BaseAnimation.java │ │ │ │ ├── ScaleInAnimation.java │ │ │ │ ├── SlideInBottomAnimation.java │ │ │ │ ├── SlideInLeftAnimation.java │ │ │ │ └── SlideInRightAnimation.java │ │ │ │ ├── callback │ │ │ │ └── ItemDragAndSwipeCallback.java │ │ │ │ ├── entity │ │ │ │ ├── AbstractExpandableItem.java │ │ │ │ ├── IExpandable.java │ │ │ │ ├── MultiItemEntity.java │ │ │ │ ├── SectionEntity.java │ │ │ │ └── SectionMultiEntity.java │ │ │ │ ├── listener │ │ │ │ ├── OnItemDragListener.java │ │ │ │ └── OnItemSwipeListener.java │ │ │ │ ├── loadmore │ │ │ │ ├── LoadMoreView.java │ │ │ │ └── SimpleLoadMoreView.java │ │ │ │ ├── provider │ │ │ │ └── BaseItemProvider.java │ │ │ │ └── util │ │ │ │ ├── ItemProviderException.java │ │ │ │ ├── MultiTypeDelegate.java │ │ │ │ ├── ProviderDelegate.java │ │ │ │ └── TouchEventUtil.java │ │ │ ├── util │ │ │ ├── BitmapUtil.java │ │ │ ├── FileUtil.java │ │ │ ├── GetPathFromUri.java │ │ │ ├── ParamUtil.java │ │ │ ├── SpUtil.java │ │ │ ├── filedownload │ │ │ │ ├── FileDownloadHelper.java │ │ │ │ └── OnDownloadListener.java │ │ │ └── glide │ │ │ │ ├── GlideUtil.java │ │ │ │ └── MyGlideModule.java │ │ │ └── weight │ │ │ ├── CommonRecyclerView.java │ │ │ ├── CommonSmartRefreshLayout.java │ │ │ ├── CommonToolbar.java │ │ │ └── CommonViewPager.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable-xhdpi │ │ ├── ic_back.png │ │ ├── ic_placeholder.png │ │ ├── ic_release.png │ │ └── ic_title.png │ │ ├── drawable │ │ ├── bg_f5f5_corner_8.xml │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ ├── brvah_quick_view_load_more.xml │ │ └── layout_toolbar.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 │ │ ├── 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 │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── ids.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── common │ └── ExampleUnitTest.java ├── build.gradle ├── config.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | xmlns:android 17 | 18 | ^$ 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | xmlns:.* 28 | 29 | ^$ 30 | 31 | 32 | BY_NAME 33 | 34 |
35 |
36 | 37 | 38 | 39 | .*:id 40 | 41 | http://schemas.android.com/apk/res/android 42 | 43 | 44 | 45 |
46 |
47 | 48 | 49 | 50 | .*:name 51 | 52 | http://schemas.android.com/apk/res/android 53 | 54 | 55 | 56 |
57 |
58 | 59 | 60 | 61 | name 62 | 63 | ^$ 64 | 65 | 66 | 67 |
68 |
69 | 70 | 71 | 72 | style 73 | 74 | ^$ 75 | 76 | 77 | 78 |
79 |
80 | 81 | 82 | 83 | .* 84 | 85 | ^$ 86 | 87 | 88 | BY_NAME 89 | 90 |
91 |
92 | 93 | 94 | 95 | .* 96 | 97 | http://schemas.android.com/apk/res/android 98 | 99 | 100 | ANDROID_ATTRIBUTE_ORDER 101 | 102 |
103 |
104 | 105 | 106 | 107 | .* 108 | 109 | .* 110 | 111 | 112 | BY_NAME 113 | 114 |
115 |
116 |
117 |
118 |
119 |
-------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /.idea/markdown-navigator-enh.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README-LIBRARY.md: -------------------------------------------------------------------------------- 1 | # 项目所用开源库 2 | + #### [屏幕适配 AutoSize](https://github.com/JessYanCoding/AndroidAutoSize) 3 | 4 | + #### [图片加载 Glide](https://github.com/bumptech/glide) 5 | 6 | + #### [RecyclerView 适配器 BaseRecyclerViewAdapterHelper](https://github.com/CymChad/BaseRecyclerViewAdapterHelper) 7 | 8 | + #### [事件通知 EventBus](https://github.com/greenrobot/EventBus) 9 | 10 | + #### [Android工具类 AndroidUtilCode](https://github.com/Blankj/AndroidUtilCode) 11 | 12 | + #### [网络请求 Retrofit2](https://github.com/square/retrofit) 13 | 14 | + #### [网络请求 OkHttp](https://github.com/square/okhttp) 15 | 16 | + #### [Json 数据解析](https://github.com/google/gson) 17 | 18 | + #### [列表刷新加载 SmartRefreshLayout](https://github.com/scwang90/SmartRefreshLayout) 19 | 20 | + #### [文件下载 FileDownloader](https://github.com/lingochamp/FileDownloader) 21 | 22 | + #### [线程异步处理 Rxjava RxAndroid](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples) 23 | 24 | -------------------------------------------------------------------------------- /README-UPDATE.md: -------------------------------------------------------------------------------- 1 | # 更新日志 2 | 3 | ## 2022/03/10 4 | + 新增答题页面(单选,多选,填空) [Java版本](https://github.com/manitozhang/QuickAndroid/blob/master/app/src/main/java/com/library/question/QuestionActivity.java) 5 | 6 | ## 2020/11/19 7 | + 新增Mvp示例使用 [Kotlin版本](https://github.com/manitozhang/QuickAndroid/blob/kotlin/app/src/main/java/com/library/login/LoginActivity.kt) [Java版本](https://github.com/manitozhang/QuickAndroid/blob/java/app/src/main/java/com/library/login/LoginActivity.java) 8 | + 新增Kotlin版本 [点击查看](https://github.com/manitozhang/QuickAndroid/tree/kotlin) 9 | 10 | ## 2020/11/18 11 | + 优化README模板布局,方便预览项目介绍与功能 12 | + 新增列表刷新加载 13 | + 新增列表单选示例 14 | + 新增列表多选,反选示例 15 | 16 | ## 2020/11/17 17 | + 新增文件下载示例 18 | + 新增CommonToolbar属性,字体大小,图片宽高 19 | + 新增CommonToolbar功能.issus提交的需求 [Toobar把Title标题改为图文一起的](https://github.com/manitozhang/QuickAndroid/issues/2) 可以自己将标题改为自定义布局: [使用示例](https://github.com/manitozhang/QuickAndroid/blob/master/app/src/main/java/com/library/toolbar/CommonToolbarActivity.java) 20 | 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # QuickAndroid Android快速开发框(持续更新中) 2 | 3 | ## [更新日志](https://github.com/manitozhang/QuickAndroid/blob/master/README-UPDATE.md) 4 | 5 | ## [Java版本](https://github.com/manitozhang/QuickAndroid/tree/java) [Kotlin版本](https://github.com/manitozhang/QuickAndroid/tree/kotlin) 6 | 7 | ## [项目用到的开源库以及地址](https://github.com/manitozhang/QuickAndroid/blob/master/README-LIBRARY.md) 8 | 9 | ## 各位小伙伴如果想到有什么常用到的可以联系我添加 10 | 1. 可以提交issus 11 | 2. 加我联系方式: 1271396448 (QQ,Vx 同步) 12 | 13 | ## 项目介绍 14 | + 针对用于一些外包或者其他快速开发的app,项目中包含了一些常用的框架,还有集成一些常用的第三方库以及使用,以及常用的组合控件(标题栏,按钮,菜单条目...),每个第三方使用方法和项目的架构均可直接复制到项目中使用,没有很多关联,继承实现之类,基本上每个东西单独封装,可直接引入basecommon包使用,也可按需cv 15 | --- 16 | ## 项目中所包含的功能 17 | + 安卓快速开发框架 18 | + 网络请求全示例 19 | + 常用第三方库合集 20 | + 常用的一些组件封装 21 | + 常用第三方组件的继承处理属性 22 | --- 23 | ## 快速引导 24 | 25 | | [首页框架-使用](https://github.com/manitozhang/QuickAndroid/blob/master/app/src/main/java/com/library/mainpage/MainPageActivity.java) | [网络请求示例-使用](https://github.com/manitozhang/QuickAndroid/blob/master/app/src/main/java/com/library/http/HttpSampleActivity.java) | [Fragment懒加载-使用](https://github.com/manitozhang/QuickAndroid/blob/master/app/src/main/java/com/library/lazyload/LazyFragment.java) | [公共标题栏-使用](https://github.com/manitozhang/QuickAndroid/blob/master/app/src/main/java/com/library/toolbar/CommonToolbarActivity.java) | 26 | | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | 27 | | 首页框架 | 网络请求示例 | Fragment懒加载 | 公共标题栏 | 28 | | [文件下载安装-使用](https://github.com/manitozhang/QuickAndroid/blob/master/app/src/main/java/com/library/filedownload/FileDownloadActivity.java) | [列表刷新加载-使用](https://github.com/manitozhang/QuickAndroid/blob/master/app/src/main/java/com/library/list/refreshload/RefreshLoadListActivity.java) | [列表单选-使用](https://github.com/manitozhang/QuickAndroid/blob/master/app/src/main/java/com/library/list/singlechoice/SingleChoiceListActivity.java) | [列表多选-使用](https://github.com/manitozhang/QuickAndroid/blob/master/app/src/main/java/com/library/list/multiplechoice/MultipleChoiceListActivity.java) | 29 | | 文件下载安装 | 列表刷新加载 | 列表单选 | 列表多选 | 30 | | [Glide图片加载-使用](https://github.com/manitozhang/QuickAndroid/blob/master/app/src/main/java/com/library/glide/GlideUseActivity.java) | [答题页面列表-使用](https://github.com/manitozhang/QuickAndroid/blob/master/app/src/main/java/com/library/question/QuestionActivity.java) | | | 31 | | Glide图片加载 | 答题页面 | | | 32 | 33 | 34 | 35 | ------ 36 | 37 | 38 | 39 | ## 免责声明 40 | 41 | + 项目旨在为更多的Android初学者与开发者提供便利,项目内使用到一些第三方开源库,如有违规或侵权,请联系删除 42 | + 项目使用的大部分开源库均可商用,不排除没有看到的或作者刚声明的,如出现法律纠纷与本人无关 43 | + 项目本着互相交流学习的目的,禁止用于非法用途,如出现法律纠纷与本人无关 44 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion rootProject.ext.android.compileSdkVersion 5 | buildToolsVersion rootProject.ext.android.buildToolsVersion 6 | defaultConfig { 7 | applicationId rootProject.ext.android.applicationId 8 | minSdkVersion rootProject.ext.android.minSdkVersion 9 | targetSdkVersion rootProject.ext.android.targetSdkVersion 10 | versionCode rootProject.ext.android.versionCode 11 | versionName rootProject.ext.android.versionName 12 | 13 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 14 | } 15 | 16 | buildTypes { 17 | release { 18 | minifyEnabled false 19 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 20 | } 21 | } 22 | compileOptions { 23 | sourceCompatibility JavaVersion.VERSION_1_8 24 | targetCompatibility JavaVersion.VERSION_1_8 25 | } 26 | 27 | } 28 | 29 | dependencies { 30 | implementation fileTree(dir: 'libs', include: ['*.jar']) 31 | implementation project(path: ':basecommon') 32 | implementation 'androidx.appcompat:appcompat:1.2.0' 33 | implementation 'androidx.constraintlayout:constraintlayout:2.0.1' 34 | } 35 | -------------------------------------------------------------------------------- /app/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 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/library/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.library; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | 25 | assertEquals("com.library", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.library; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.view.View; 6 | 7 | import androidx.annotation.Nullable; 8 | 9 | import com.common.base.BaseActivity; 10 | import com.library.filedownload.FileDownloadActivity; 11 | import com.library.glide.GlideUseActivity; 12 | import com.library.http.HttpSampleActivity; 13 | import com.library.lazyload.LazyLoadActivity; 14 | import com.library.list.multiplechoice.MultipleChoiceListActivity; 15 | import com.library.list.refreshload.RefreshLoadListActivity; 16 | import com.library.list.singlechoice.SingleChoiceListActivity; 17 | import com.library.login.LoginActivity; 18 | import com.library.mainpage.MainPageActivity; 19 | import com.library.question.QuestionActivity; 20 | import com.library.toolbar.CommonToolbarActivity; 21 | 22 | public class MainActivity extends BaseActivity { 23 | 24 | @Override 25 | public int getLayout() { 26 | return R.layout.activity_main; 27 | } 28 | 29 | @Override 30 | public void initViewIds() { 31 | } 32 | 33 | @Override 34 | public void initView() { 35 | 36 | } 37 | 38 | @Override 39 | public void initData(@Nullable Bundle savedInstanceState) { 40 | 41 | } 42 | 43 | /** 44 | * 首页框架 45 | * @param view 46 | */ 47 | public void btnMainPage(View view){ 48 | startActivity(new Intent(this, MainPageActivity.class)); 49 | } 50 | 51 | /** 52 | * 网络请求相关 53 | * 54 | * @param view 55 | */ 56 | public void btnHttp(View view) { 57 | startActivity(new Intent(this, HttpSampleActivity.class)); 58 | } 59 | 60 | /** 61 | * 懒加载 62 | * @param view 63 | */ 64 | public void btnLazyLoad(View view) { 65 | startActivity(new Intent(this, LazyLoadActivity.class)); 66 | } 67 | 68 | /** 69 | * 封装的标题栏 70 | * @param view 71 | */ 72 | public void btnCommonToolbar(View view) { 73 | startActivity(new Intent(this, CommonToolbarActivity.class)); 74 | } 75 | 76 | /** 77 | * Glide操作 78 | * @param view 79 | */ 80 | public void btnGlideClip(View view) { 81 | startActivity(new Intent(this, GlideUseActivity.class)); 82 | } 83 | 84 | /** 85 | * 文件下载 86 | * @param view 87 | */ 88 | public void btnDownload(View view) { 89 | startActivity(new Intent(this, FileDownloadActivity.class)); 90 | } 91 | 92 | /** 93 | * 列表刷新加载 94 | * @param view 95 | */ 96 | public void btnListRefresh(View view) { 97 | startActivity(new Intent(this , RefreshLoadListActivity.class)); 98 | } 99 | 100 | /** 101 | * 列表单选 102 | * @param view 103 | */ 104 | public void btnListSingleChoice(View view) { 105 | startActivity(new Intent(this , SingleChoiceListActivity.class)); 106 | } 107 | 108 | /** 109 | * 列表多选 110 | * @param view 111 | */ 112 | public void btnListMultipleChoice(View view) { 113 | startActivity(new Intent(this , MultipleChoiceListActivity.class)); 114 | } 115 | 116 | /** 117 | * Mvp示例 118 | * @param view 119 | */ 120 | public void btnMvp(View view) { 121 | startActivity(new Intent(this , LoginActivity.class)); 122 | } 123 | 124 | /** 125 | * 答题页面 126 | * @param view 127 | */ 128 | public void btnQuestion(View view) { 129 | startActivity(new Intent(this , QuestionActivity.class)); 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/filedownload/FileDownloadActivity.java: -------------------------------------------------------------------------------- 1 | package com.library.filedownload; 2 | 3 | import androidx.annotation.Nullable; 4 | 5 | import android.os.Bundle; 6 | import android.view.View; 7 | import android.widget.ProgressBar; 8 | import android.widget.TextView; 9 | 10 | import com.blankj.utilcode.util.AppUtils; 11 | import com.blankj.utilcode.util.ToastUtils; 12 | import com.common.base.BaseActivity; 13 | import com.common.util.BitmapUtil; 14 | import com.common.util.filedownload.FileDownloadHelper; 15 | import com.common.util.filedownload.OnDownloadListener; 16 | import com.library.R; 17 | 18 | /** 19 | * 文件下载页面 20 | */ 21 | public class FileDownloadActivity extends BaseActivity { 22 | 23 | private static final String fileUrl = "https://library-collection.oss-cn-beijing.aliyuncs.com/file/file.apk"; 24 | private int ids; 25 | private ProgressBar progressBar; 26 | private TextView tvProgress; 27 | private TextView tvSpeed; 28 | private FileDownloadHelper fileDownloadHelper; 29 | 30 | @Override 31 | public int getLayout() { 32 | return R.layout.activity_file_download; 33 | } 34 | 35 | @Override 36 | public void initViewIds() { 37 | progressBar = findViewById(R.id.progress_bar); 38 | tvProgress = findViewById(R.id.tv_progress); 39 | tvSpeed = findViewById(R.id.tv_speed); 40 | } 41 | 42 | @Override 43 | public void initView() { 44 | 45 | } 46 | 47 | @Override 48 | public void initData(@Nullable Bundle savedInstanceState) { 49 | 50 | } 51 | 52 | /** 53 | * 开始下载 54 | * 55 | * @param view 56 | */ 57 | public void btnStart(View view) { 58 | startDownload(); 59 | } 60 | 61 | /** 62 | * 开始下载 63 | */ 64 | private void startDownload(){ 65 | fileDownloadHelper = new FileDownloadHelper(); 66 | fileDownloadHelper.downloadFile(fileUrl, BitmapUtil.getFileStoragePath(), false, new OnDownloadListener() { 67 | 68 | @Override 69 | public void onPending(int id, int soFarBytes, int totalBytes) { 70 | } 71 | 72 | @Override 73 | public void onProgress(int id, int speed, int soFarBytes, int totalBytes) { 74 | tvProgress.setText(soFarBytes + " / " + totalBytes); 75 | tvSpeed.setText(speed + " KB/s"); 76 | progressBar.setMax(totalBytes); 77 | progressBar.setProgress(soFarBytes); 78 | } 79 | 80 | @Override 81 | public void onComplete(String path) { 82 | ToastUtils.showShort("下载完成"); 83 | //安装App 84 | AppUtils.installApp(path); 85 | } 86 | 87 | @Override 88 | public void onError(Throwable e) { 89 | ToastUtils.showShort("下载异常" + e.getMessage()); 90 | } 91 | }); 92 | } 93 | 94 | /** 95 | * 暂停下载 96 | * 97 | * @param view 98 | */ 99 | public void btnPause(View view) { 100 | fileDownloadHelper.pause(); 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/glide/GlideUseActivity.java: -------------------------------------------------------------------------------- 1 | package com.library.glide; 2 | 3 | import androidx.annotation.Nullable; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | 6 | import android.os.Bundle; 7 | import android.view.View; 8 | import android.widget.ImageView; 9 | 10 | import com.common.base.BaseActivity; 11 | import com.common.util.glide.GlideUtil; 12 | import com.library.R; 13 | 14 | /** 15 | * Glide 使用 16 | */ 17 | public class GlideUseActivity extends BaseActivity { 18 | 19 | private static final String imgUrl = "https://library-collection.oss-cn-beijing.aliyuncs.com/img/glideuse.png"; 20 | 21 | private ImageView ivDefault; 22 | private ImageView ivCircle; 23 | private ImageView ivCorner; 24 | 25 | @Override 26 | public int getLayout() { 27 | return R.layout.activity_glide_use; 28 | } 29 | 30 | @Override 31 | public void initViewIds() { 32 | ivDefault = findViewById(R.id.iv_default); 33 | ivCircle = findViewById(R.id.iv_circle); 34 | ivCorner = findViewById(R.id.iv_corner); 35 | } 36 | 37 | @Override 38 | public void initView() { 39 | GlideUtil.loadImage(imgUrl, ivDefault, getResources().getDrawable(R.drawable.ic_placeholder)); 40 | GlideUtil.loadCircleImage(imgUrl, ivCircle, getResources().getDrawable(R.drawable.ic_placeholder)); 41 | GlideUtil.loadCornerImage(imgUrl, ivCorner, 20, getResources().getDrawable(R.drawable.ic_placeholder)); 42 | } 43 | 44 | @Override 45 | public void initData(@Nullable Bundle savedInstanceState) { 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/lazyload/LazyFragment.java: -------------------------------------------------------------------------------- 1 | package com.library.lazyload; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | import android.widget.TextView; 6 | 7 | import com.common.base.BaseFragment; 8 | import com.library.R; 9 | 10 | /** 11 | * @Author: 张鹏飞 12 | * @Email: 1271396448@qq.com 13 | * @Date: 2020/11/13 14 | *

15 | * @Desc: 16 | */ 17 | public class LazyFragment extends BaseFragment { 18 | 19 | private TextView tvTabName; 20 | private String bundleTabName = ""; 21 | 22 | @Override 23 | public int getLayout() { 24 | return R.layout.fragment_lazy; 25 | } 26 | 27 | @Override 28 | public void initViewIds(View view) { 29 | tvTabName = view.findViewById(R.id.tv_tab_name); 30 | } 31 | 32 | @Override 33 | public void initArguments() { 34 | if (getArguments() != null) 35 | bundleTabName = getArguments().getString("bundle_tab"); 36 | super.initArguments(); 37 | } 38 | 39 | @Override 40 | public void initView(View view) { 41 | 42 | } 43 | 44 | /** 45 | * 在initData方法写需要懒加载的业务代码即可 46 | * @param savedInstanceState 47 | */ 48 | @Override 49 | public void initData(Bundle savedInstanceState) { 50 | tvTabName.setText(bundleTabName); 51 | } 52 | 53 | /** 54 | * 使用懒加载 必须实现 需要配合viewpager.setOffscreenPageLimit()方法,有多少个就写几 55 | * 56 | * @return 57 | */ 58 | @Override 59 | public boolean useLazyFragment() { 60 | return true; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/lazyload/LazyLoadActivity.java: -------------------------------------------------------------------------------- 1 | package com.library.lazyload; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.annotation.Nullable; 5 | import androidx.appcompat.app.AppCompatActivity; 6 | import androidx.fragment.app.Fragment; 7 | import androidx.fragment.app.FragmentManager; 8 | import androidx.fragment.app.FragmentPagerAdapter; 9 | 10 | import android.os.Bundle; 11 | import android.view.View; 12 | 13 | import com.common.base.BaseActivity; 14 | import com.common.weight.CommonViewPager; 15 | import com.google.android.material.tabs.TabLayout; 16 | import com.library.R; 17 | 18 | import static androidx.fragment.app.FragmentStatePagerAdapter.BEHAVIOR_SET_USER_VISIBLE_HINT; 19 | 20 | /** 21 | * 懒加载的Activity 22 | */ 23 | public class LazyLoadActivity extends BaseActivity { 24 | 25 | 26 | private String[] tabArray = new String[]{"推荐", "关注", "娱乐", "国内", "军事", "财经"}; 27 | private TabLayout tabLayout; 28 | private CommonViewPager viewPager; 29 | 30 | @Override 31 | public int getLayout() { 32 | return R.layout.activity_lazy_load; 33 | } 34 | 35 | @Override 36 | public void initViewIds() { 37 | tabLayout = findViewById(R.id.tab_layout); 38 | viewPager = findViewById(R.id.view_pager); 39 | } 40 | 41 | @Override 42 | public void initView() { 43 | tabLayout.setupWithViewPager(viewPager); 44 | viewPager.setOffscreenPageLimit(tabArray.length); 45 | viewPager.setAdapter(new MyPagerAdapter(getSupportFragmentManager())); 46 | } 47 | 48 | @Override 49 | public void initData(@Nullable Bundle savedInstanceState) { 50 | 51 | } 52 | 53 | class MyPagerAdapter extends FragmentPagerAdapter { 54 | public MyPagerAdapter(@NonNull FragmentManager fm) { 55 | super(fm); 56 | } 57 | 58 | @Nullable 59 | @Override 60 | public CharSequence getPageTitle(int position) { 61 | return tabArray[position]; 62 | } 63 | 64 | @NonNull 65 | @Override 66 | public Fragment getItem(int position) { 67 | //传递数据 68 | LazyFragment lazyFragment = new LazyFragment(); 69 | Bundle bundle = new Bundle(); 70 | bundle.putString("bundle_tab", tabArray[position]); 71 | lazyFragment.setArguments(bundle); 72 | return lazyFragment; 73 | } 74 | 75 | @Override 76 | public int getCount() { 77 | return tabArray.length; 78 | } 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/list/multiplechoice/MultipleChoiceListAdapter.java: -------------------------------------------------------------------------------- 1 | package com.library.list.multiplechoice; 2 | 3 | import android.widget.ImageView; 4 | import android.widget.TextView; 5 | 6 | import androidx.annotation.Nullable; 7 | 8 | import com.common.http.bean.ExampleListBean; 9 | import com.common.library.bravh_rvadapter.BaseRecyclerAdapter; 10 | import com.common.library.bravh_rvadapter.RecyclerViewHolder; 11 | import com.library.R; 12 | 13 | import java.util.List; 14 | 15 | /** 16 | * @Author: 张鹏飞 17 | * @Email: 1271396448@qq.com 18 | * @Date: 2020/11/18 19 | *

20 | * @Desc: 多选列表适配器 21 | */ 22 | public class MultipleChoiceListAdapter extends BaseRecyclerAdapter { 23 | 24 | public MultipleChoiceListAdapter(@Nullable List data) { 25 | super(R.layout.item_single_choice, data); 26 | } 27 | 28 | @Override 29 | protected void convert(RecyclerViewHolder holder, ExampleListBean item) { 30 | //注册子View的点击事件,必须,否则在Act点击事件不生效 31 | holder.addOnClickListener(R.id.iv_select); 32 | ImageView ivSelect = holder.getImageView(R.id.iv_select); 33 | //因为在布局中定义了一个选中与非选中的drawable,select_list_item.xml 34 | //如果实体类里面的标识符为选中状态,就给他选中 35 | ivSelect.setSelected(item.isChecked()); 36 | TextView tvTitle = holder.getTextView(R.id.tv_title); 37 | TextView tvContent = holder.getTextView(R.id.tv_content); 38 | TextView tvTime = holder.getTextView(R.id.tv_time); 39 | tvTitle.setText(item.getTitle()); 40 | tvContent.setText(item.getContent()); 41 | tvTime.setText(item.getTime()); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/list/refreshload/RefreshLoadListAdapter.java: -------------------------------------------------------------------------------- 1 | package com.library.list.refreshload; 2 | 3 | import android.view.View; 4 | import android.widget.Button; 5 | import android.widget.TextView; 6 | 7 | import androidx.annotation.Nullable; 8 | 9 | import com.common.http.bean.ExampleListBean; 10 | import com.common.library.bravh_rvadapter.BaseRecyclerAdapter; 11 | import com.common.library.bravh_rvadapter.RecyclerViewHolder; 12 | import com.library.R; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * @Author: 张鹏飞 18 | * @Email: 1271396448@qq.com 19 | * @Date: 2020/11/18 20 | *

21 | * @Desc: 22 | */ 23 | public class RefreshLoadListAdapter extends BaseRecyclerAdapter { 24 | public RefreshLoadListAdapter(@Nullable List data) { 25 | super(R.layout.item_refresh_layout, data); 26 | } 27 | 28 | @Override 29 | protected void convert(RecyclerViewHolder holder, ExampleListBean item) { 30 | //注册子View的点击事件,必须,否则在Act点击事件不生效 31 | holder.addOnClickListener(R.id.btn_click_me); 32 | TextView tvTitle = holder.getTextView(R.id.tv_title); 33 | TextView tvContent = holder.getTextView(R.id.tv_content); 34 | TextView tvTime = holder.getTextView(R.id.tv_time); 35 | tvTitle.setText(item.getTitle()); 36 | tvContent.setText(item.getContent()); 37 | tvTime.setText(item.getTime()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/list/singlechoice/SingleChoiceListActivity.java: -------------------------------------------------------------------------------- 1 | package com.library.list.singlechoice; 2 | 3 | import androidx.annotation.Nullable; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import androidx.recyclerview.widget.LinearLayoutManager; 6 | 7 | import android.os.Bundle; 8 | import android.view.View; 9 | 10 | import com.blankj.utilcode.util.ToastUtils; 11 | import com.common.base.BaseActivity; 12 | import com.common.http.XRetrofit; 13 | import com.common.http.base.BaseObserver; 14 | import com.common.http.base.RxJavaHelper; 15 | import com.common.http.bean.ExampleListBean; 16 | import com.common.http.helper.Mobile; 17 | import com.common.library.bravh_rvadapter.BaseRecyclerAdapter; 18 | import com.common.weight.CommonRecyclerView; 19 | import com.library.R; 20 | import com.library.list.refreshload.RefreshLoadListAdapter; 21 | 22 | import java.util.Collections; 23 | import java.util.List; 24 | 25 | /** 26 | * 单选列表Activity 27 | */ 28 | public class SingleChoiceListActivity extends BaseActivity { 29 | 30 | private CommonRecyclerView rvSingleChoice; 31 | private SingleChoiceListAdapter singleChoiceListAdapter; 32 | private final int page = 1; 33 | private final int pageNum = 20; 34 | 35 | @Override 36 | public int getLayout() { 37 | return R.layout.activity_single_choice_list; 38 | } 39 | 40 | @Override 41 | public void initViewIds() { 42 | rvSingleChoice = findViewById(R.id.rv_single_choice); 43 | } 44 | 45 | @Override 46 | public void initView() { 47 | initSingleChoiceRecycler(); 48 | } 49 | 50 | private void initSingleChoiceRecycler() { 51 | LinearLayoutManager layoutManager = new LinearLayoutManager(this); 52 | rvSingleChoice.setLayoutManager(layoutManager); 53 | singleChoiceListAdapter = new SingleChoiceListAdapter(Collections.emptyList()); 54 | rvSingleChoice.setAdapter(singleChoiceListAdapter); 55 | } 56 | 57 | @Override 58 | public void initData(@Nullable Bundle savedInstanceState) { 59 | getList(page, pageNum); 60 | } 61 | 62 | @Override 63 | public void initListener() { 64 | super.initListener(); 65 | singleChoiceListAdapter.setOnItemChildClickListener((adapter, view, position) -> { 66 | if (view.getId() == R.id.iv_select) { 67 | //点击按钮,将当前点击的下标传进去,刷新适配器 68 | singleChoiceListAdapter.setSelPos(position); 69 | singleChoiceListAdapter.notifyDataSetChanged(); 70 | } 71 | }); 72 | } 73 | 74 | /** 75 | * 获取集合 76 | * 77 | * @param page: 页数 78 | * @param pageNum: 条目数 79 | */ 80 | private void getList(int page, int pageNum) { 81 | XRetrofit.getApi() 82 | .getList(Mobile.getList(page, pageNum)) 83 | .compose(RxJavaHelper.observeOnMainThread()) 84 | .subscribe(new BaseObserver>() { 85 | @Override 86 | public void onSuccess(List response) { 87 | if (response == null) 88 | return; 89 | singleChoiceListAdapter.setNewData(response); 90 | } 91 | }); 92 | } 93 | 94 | /** 95 | * 获取选中的下标 96 | * 97 | * @param view 98 | */ 99 | public void btnGetSingleData(View view) { 100 | if (singleChoiceListAdapter.getSelPos() == -1) { 101 | ToastUtils.showShort("你还未选中数据"); 102 | return; 103 | } 104 | ToastUtils.showShort("选中的标题是---" 105 | + singleChoiceListAdapter.getData() 106 | .get(singleChoiceListAdapter.getSelPos()).getTitle()); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/list/singlechoice/SingleChoiceListAdapter.java: -------------------------------------------------------------------------------- 1 | package com.library.list.singlechoice; 2 | 3 | import android.widget.ImageView; 4 | import android.widget.TextView; 5 | 6 | import androidx.annotation.Nullable; 7 | 8 | import com.common.http.bean.ExampleListBean; 9 | import com.common.library.bravh_rvadapter.BaseRecyclerAdapter; 10 | import com.common.library.bravh_rvadapter.RecyclerViewHolder; 11 | import com.library.R; 12 | 13 | import java.util.List; 14 | 15 | /** 16 | * @Author: 张鹏飞 17 | * @Email: 1271396448@qq.com 18 | * @Date: 2020/11/18 19 | *

20 | * @Desc: 21 | */ 22 | public class SingleChoiceListAdapter extends BaseRecyclerAdapter { 23 | /** 24 | * 定义选中的下标, 默认-1 25 | */ 26 | private int selPos = -1; 27 | 28 | public void setSelPos(int selPos) { 29 | this.selPos = selPos; 30 | } 31 | 32 | public int getSelPos() { 33 | return selPos; 34 | } 35 | 36 | public SingleChoiceListAdapter(@Nullable List data) { 37 | super(R.layout.item_single_choice, data); 38 | } 39 | 40 | @Override 41 | protected void convert(RecyclerViewHolder holder, ExampleListBean item) { 42 | //注册子View的点击事件,必须,否则在Act点击事件不生效 43 | holder.addOnClickListener(R.id.iv_select); 44 | ImageView ivSelect = holder.getImageView(R.id.iv_select); 45 | //因为在布局中定义了一个选中与非选中的drawable,select_list_item.xml 46 | //如果传进来的选中下标等于当前下标,就给设置选中状态 47 | ivSelect.setSelected(selPos == holder.getAdapterPosition()); 48 | TextView tvTitle = holder.getTextView(R.id.tv_title); 49 | TextView tvContent = holder.getTextView(R.id.tv_content); 50 | TextView tvTime = holder.getTextView(R.id.tv_time); 51 | tvTitle.setText(item.getTitle()); 52 | tvContent.setText(item.getContent()); 53 | tvTime.setText(item.getTime()); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/login/LoginActivity.java: -------------------------------------------------------------------------------- 1 | package com.library.login; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | import android.widget.EditText; 6 | 7 | import androidx.annotation.Nullable; 8 | 9 | import com.blankj.utilcode.util.ToastUtils; 10 | import com.common.base.mvp.BaseMvpActivity; 11 | import com.common.http.bean.ExampleBean; 12 | import com.common.http.helper.Mobile; 13 | import com.common.util.ParamUtil; 14 | import com.library.R; 15 | import com.library.login.mvp.LoginContract; 16 | import com.library.login.mvp.LoginPresenter; 17 | 18 | public class LoginActivity extends BaseMvpActivity implements LoginContract.View { 19 | 20 | 21 | private EditText etPassword; 22 | private EditText etUsername; 23 | 24 | @Override 25 | public int getLayout() { 26 | return R.layout.activity_login; 27 | } 28 | 29 | @Override 30 | public void initViewIds() { 31 | etUsername = findViewById(R.id.et_username); 32 | etPassword = findViewById(R.id.et_password); 33 | } 34 | 35 | @Override 36 | public void initView() { 37 | mPresenter = new LoginPresenter(); 38 | mPresenter.attachView(this); 39 | } 40 | 41 | @Override 42 | public void initData(@Nullable Bundle savedInstanceState) { 43 | 44 | } 45 | 46 | @Override 47 | public void loginSuccess(ExampleBean bean) { 48 | //登录请求成功 49 | ToastUtils.showShort("登录成功"); 50 | } 51 | 52 | public void btnLogin(View view) { 53 | mPresenter.login(Mobile.userLogin(ParamUtil.getEditStr(etUsername), ParamUtil.getEditStr(etPassword))); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/login/mvp/LoginContract.java: -------------------------------------------------------------------------------- 1 | package com.library.login.mvp; 2 | 3 | import com.common.base.mvp.BaseView; 4 | import com.common.http.base.BaseResponse; 5 | import com.common.http.bean.ExampleBean; 6 | 7 | import java.util.HashMap; 8 | 9 | import io.reactivex.Observable; 10 | 11 | /** 12 | * @Author: 张鹏飞 13 | * @Email: 1271396448@qq.com 14 | *

15 | * @Desc: 16 | */ 17 | 18 | public interface LoginContract { 19 | 20 | interface Model { 21 | Observable> login(HashMap map); 22 | } 23 | 24 | interface View extends BaseView { 25 | void loginSuccess(ExampleBean bean); 26 | } 27 | 28 | interface Presenter { 29 | void login(HashMap map); 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/java/com/library/login/mvp/LoginModel.java: -------------------------------------------------------------------------------- 1 | package com.library.login.mvp; 2 | 3 | 4 | import com.common.http.XRetrofit; 5 | import com.common.http.base.BaseResponse; 6 | import com.common.http.bean.ExampleBean; 7 | import com.common.http.helper.RequestBodyHelper; 8 | 9 | import java.util.HashMap; 10 | 11 | import io.reactivex.Observable; 12 | 13 | /** 14 | * @Author: 张鹏飞 15 | * @Email: 1271396448@qq.com 16 | *

17 | * @Desc: 18 | */ 19 | 20 | public class LoginModel implements LoginContract.Model { 21 | 22 | @Override 23 | public Observable> login(HashMap map) { 24 | return XRetrofit.getApi().testLogin(RequestBodyHelper.getRequestBody(map)); 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/java/com/library/login/mvp/LoginPresenter.java: -------------------------------------------------------------------------------- 1 | package com.library.login.mvp; 2 | 3 | import com.common.base.mvp.BasePresenter; 4 | import com.common.http.base.BaseObserver; 5 | import com.common.http.base.RxJavaHelper; 6 | import com.common.http.bean.ExampleBean; 7 | 8 | import java.util.HashMap; 9 | 10 | 11 | /** 12 | * @Author: 张鹏飞 13 | * @Email: 1271396448@qq.com 14 | *

15 | * @Desc: 16 | */ 17 | 18 | public class LoginPresenter extends BasePresenter implements LoginContract.Presenter{ 19 | 20 | 21 | private LoginModel model; 22 | 23 | public LoginPresenter() { 24 | model = new LoginModel(); 25 | } 26 | 27 | @Override 28 | public void login(HashMap map) { 29 | model.login(map) 30 | .compose(RxJavaHelper.observeOnMainThread()) 31 | .subscribe(new BaseObserver() { 32 | @Override 33 | public void onSuccess(ExampleBean response) { 34 | mView.loginSuccess(response); 35 | } 36 | }); 37 | } 38 | } -------------------------------------------------------------------------------- /app/src/main/java/com/library/mainpage/MainPageActivity.java: -------------------------------------------------------------------------------- 1 | package com.library.mainpage; 2 | 3 | import androidx.annotation.Nullable; 4 | import androidx.fragment.app.FragmentManager; 5 | import androidx.fragment.app.FragmentTransaction; 6 | 7 | import android.os.Bundle; 8 | import android.widget.TextView; 9 | 10 | import com.common.base.BaseActivity; 11 | import com.library.R; 12 | import com.library.mainpage.fragment.HomeFragment; 13 | import com.library.mainpage.fragment.MineFragment; 14 | import com.library.mainpage.fragment.NewsFragment; 15 | 16 | /** 17 | * 首页页面 18 | */ 19 | public class MainPageActivity extends BaseActivity { 20 | 21 | private int[] idArrays = new int[]{R.id.tv_home, R.id.tv_news, R.id.tv_mine}; 22 | 23 | private FragmentTransaction beginTransaction; 24 | private HomeFragment homeFragment; 25 | private NewsFragment newsFragment; 26 | private MineFragment mineFragment; 27 | private TextView tvHome; 28 | private TextView tvNews; 29 | private TextView tvMine; 30 | 31 | @Override 32 | public int getLayout() { 33 | return R.layout.activity_main_page; 34 | } 35 | 36 | @Override 37 | public void initViewIds() { 38 | tvHome = findViewById(R.id.tv_home); 39 | tvNews = findViewById(R.id.tv_news); 40 | tvMine = findViewById(R.id.tv_mine); 41 | } 42 | 43 | @Override 44 | public void initView() { 45 | setFragment(0); 46 | } 47 | 48 | @Override 49 | public void initData(@Nullable Bundle savedInstanceState) { 50 | } 51 | 52 | @Override 53 | public void initListener() { 54 | super.initListener(); 55 | tvHome.setOnClickListener(v -> { 56 | setFragment(0); 57 | }); 58 | tvNews.setOnClickListener(v -> { 59 | setFragment(1); 60 | }); 61 | tvMine.setOnClickListener(v -> { 62 | setFragment(2); 63 | }); 64 | } 65 | 66 | /** 67 | * 设置Fragment 68 | * 其他地方可发送通知来执行该方法改变tab选中 69 | * @param index: 下标 70 | */ 71 | private void setFragment(int index) { 72 | FragmentManager fragmentManager = getSupportFragmentManager(); 73 | beginTransaction = fragmentManager.beginTransaction(); 74 | hideFragment(); 75 | switch (index) { 76 | case 0: 77 | //首页 78 | if (homeFragment == null) { 79 | homeFragment = new HomeFragment(); 80 | beginTransaction.add(R.id.fl_layout, homeFragment); 81 | } else { 82 | beginTransaction.show(homeFragment); 83 | } 84 | break; 85 | case 1: 86 | //发现 87 | if (newsFragment == null) { 88 | newsFragment = new NewsFragment(); 89 | beginTransaction.add(R.id.fl_layout, newsFragment); 90 | } else { 91 | beginTransaction.show(newsFragment); 92 | } 93 | break; 94 | case 2: 95 | //我的 96 | if (mineFragment == null) { 97 | mineFragment = new MineFragment(); 98 | beginTransaction.add(R.id.fl_layout, mineFragment); 99 | } else { 100 | beginTransaction.show(mineFragment); 101 | } 102 | break; 103 | } 104 | beginTransaction.commitAllowingStateLoss(); 105 | refreshBottomStatus(index); 106 | } 107 | 108 | /** 109 | * 改变底部图片和文字的状态 110 | * 111 | * @param position: 下标 112 | */ 113 | private void refreshBottomStatus(int position) { 114 | for (int i = 0; i < idArrays.length; i++) { 115 | findViewById(idArrays[i]).setSelected(position == i); 116 | } 117 | } 118 | 119 | /** 120 | * 隐藏所有Fragment 121 | */ 122 | private void hideFragment() { 123 | if (homeFragment != null) 124 | beginTransaction.hide(homeFragment); 125 | if (newsFragment != null) 126 | beginTransaction.hide(newsFragment); 127 | if (mineFragment != null) 128 | beginTransaction.hide(mineFragment); 129 | } 130 | 131 | } 132 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/mainpage/fragment/HomeFragment.java: -------------------------------------------------------------------------------- 1 | package com.library.mainpage.fragment; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | import android.widget.TextView; 6 | 7 | import com.common.base.BaseFragment; 8 | import com.library.R; 9 | 10 | /** 11 | * @Author: 张鹏飞 12 | * @Email: 1271396448@qq.com 13 | * @Date: 2020/11/13 14 | *

15 | * @Desc: 16 | */ 17 | public class HomeFragment extends BaseFragment { 18 | 19 | private TextView tvDesc; 20 | 21 | @Override 22 | public int getLayout() { 23 | return R.layout.fragment_main ; 24 | } 25 | 26 | @Override 27 | public void initViewIds(View view) { 28 | tvDesc = view.findViewById(R.id.tv_desc); 29 | } 30 | 31 | @Override 32 | public void initView(View view) { 33 | tvDesc.setText("我是首页"); 34 | } 35 | 36 | @Override 37 | public void initData(Bundle savedInstanceState) { 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/mainpage/fragment/MineFragment.java: -------------------------------------------------------------------------------- 1 | package com.library.mainpage.fragment; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | import android.widget.TextView; 6 | 7 | import com.common.base.BaseFragment; 8 | import com.library.R; 9 | 10 | /** 11 | * @Author: 张鹏飞 12 | * @Email: 1271396448@qq.com 13 | * @Date: 2020/11/13 14 | *

15 | * @Desc: 16 | */ 17 | public class MineFragment extends BaseFragment { 18 | 19 | private TextView tvDesc; 20 | 21 | @Override 22 | public int getLayout() { 23 | return R.layout.fragment_main ; 24 | } 25 | 26 | @Override 27 | public void initViewIds(View view) { 28 | tvDesc = view.findViewById(R.id.tv_desc); 29 | } 30 | 31 | @Override 32 | public void initView(View view) { 33 | tvDesc.setText("我是个人页"); 34 | } 35 | 36 | @Override 37 | public void initData(Bundle savedInstanceState) { 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/mainpage/fragment/NewsFragment.java: -------------------------------------------------------------------------------- 1 | package com.library.mainpage.fragment; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | import android.widget.TextView; 6 | 7 | import com.common.base.BaseFragment; 8 | import com.library.R; 9 | 10 | /** 11 | * @Author: 张鹏飞 12 | * @Email: 1271396448@qq.com 13 | * @Date: 2020/11/13 14 | *

15 | * @Desc: 16 | */ 17 | public class NewsFragment extends BaseFragment { 18 | 19 | private TextView tvDesc; 20 | 21 | @Override 22 | public int getLayout() { 23 | return R.layout.fragment_main ; 24 | } 25 | 26 | @Override 27 | public void initViewIds(View view) { 28 | tvDesc = view.findViewById(R.id.tv_desc); 29 | } 30 | 31 | @Override 32 | public void initView(View view) { 33 | tvDesc.setText("我是新闻页"); 34 | } 35 | 36 | @Override 37 | public void initData(Bundle savedInstanceState) { 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/question/AnswerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.library.question; 2 | 3 | import android.util.Log; 4 | import android.widget.ImageView; 5 | import android.widget.TextView; 6 | 7 | import androidx.annotation.Nullable; 8 | 9 | import com.common.library.bravh_rvadapter.BaseRecyclerAdapter; 10 | import com.common.library.bravh_rvadapter.RecyclerViewHolder; 11 | import com.library.R; 12 | 13 | import java.util.List; 14 | 15 | /** 16 | * @Author: Created by seven.zhang 17 | * @Date: 2022/3/10 15:43 18 | * @Desc: 19 | */ 20 | public class AnswerAdapter extends BaseRecyclerAdapter { 21 | private OnItemClickListener onItemClickListener; 22 | /** 23 | * 类型 24 | * {@link QuestionBean } 25 | * 1: 单选 26 | * 2: 多选 27 | */ 28 | private int type; 29 | /** 30 | * 单选的下标 31 | */ 32 | private QuestionBean.QuestionData questionItem; 33 | 34 | public int getType() { 35 | return type; 36 | } 37 | 38 | public AnswerAdapter(QuestionBean.QuestionData questionItem, int type, @Nullable List data) { 39 | super(R.layout.item_question_answer, data); 40 | this.questionItem = questionItem; 41 | this.type = type; 42 | } 43 | 44 | @Override 45 | protected void convert(RecyclerViewHolder holder, QuestionBean.QuestionData.AnswerData item) { 46 | ImageView ivSelect = holder.getImageView(R.id.iv_select); 47 | TextView tvAnswer = holder.getTextView(R.id.tv_answer); 48 | tvAnswer.setText(item.getAnswer()); 49 | ivSelect.setSelected(type == QuestionBean.TYPE_MULTI_CHOICE ? item.isChecked() : item.getId() == questionItem.getCheckedId()); 50 | holder.itemView.setOnClickListener(v -> { 51 | if (type == QuestionBean.TYPE_SINGLE_CHOICE) { 52 | //单选 53 | onItemClickListener.onItemClick(type, item.getId()); 54 | } else { 55 | //多选 56 | item.setChecked(!item.isChecked()); 57 | ivSelect.setSelected(item.isChecked()); 58 | } 59 | }); 60 | } 61 | 62 | interface OnItemClickListener { 63 | void onItemClick(int type, int answerId); 64 | } 65 | 66 | public void setmOnItemClickListener(OnItemClickListener onItemClickListener) { 67 | this.onItemClickListener = onItemClickListener; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/question/QuestionActivity.java: -------------------------------------------------------------------------------- 1 | package com.library.question; 2 | 3 | import androidx.annotation.Nullable; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import androidx.recyclerview.widget.LinearLayoutManager; 6 | 7 | import android.os.Bundle; 8 | import android.util.Log; 9 | import android.view.View; 10 | import android.widget.Button; 11 | import android.widget.TextView; 12 | 13 | import com.blankj.utilcode.util.GsonUtils; 14 | import com.blankj.utilcode.util.LogUtils; 15 | import com.blankj.utilcode.util.ResourceUtils; 16 | import com.common.base.BaseActivity; 17 | import com.common.weight.CommonRecyclerView; 18 | import com.library.R; 19 | 20 | import java.util.ArrayList; 21 | 22 | /** 23 | * 答题页面 24 | */ 25 | public class QuestionActivity extends BaseActivity { 26 | 27 | private CommonRecyclerView rvQuestion; 28 | private String TAG = "QuestionActivity"; 29 | private QuestionAdapter questionAdapter; 30 | private Button btnShowAnswer; 31 | private TextView tvAllAnswer; 32 | 33 | @Override 34 | public int getLayout() { 35 | return R.layout.activity_question; 36 | } 37 | 38 | @Override 39 | public void initViewIds() { 40 | rvQuestion = findViewById(R.id.rv_question); 41 | btnShowAnswer = findViewById(R.id.btn_show_answer); 42 | tvAllAnswer = findViewById(R.id.tv_all_answer); 43 | } 44 | 45 | @Override 46 | public void initView() { 47 | initQuestionRecycler(); 48 | } 49 | 50 | /** 51 | * 初始化问题列表 52 | */ 53 | private void initQuestionRecycler() { 54 | questionAdapter = new QuestionAdapter(new ArrayList<>()); 55 | rvQuestion.setLayoutManager(new LinearLayoutManager(this)); 56 | rvQuestion.setAdapter(questionAdapter); 57 | } 58 | 59 | @Override 60 | public void initData(@Nullable Bundle savedInstanceState) { 61 | formatQuestionJson(); 62 | } 63 | 64 | @Override 65 | public void initListener() { 66 | super.initListener(); 67 | btnShowAnswer.setOnClickListener(v -> { 68 | StringBuilder stringBuilder = new StringBuilder(); 69 | //显示所有答案 70 | for (QuestionBean.QuestionData questionItem : questionAdapter.getData()) { 71 | if (questionItem.getType() == QuestionBean.TYPE_SINGLE_CHOICE) { 72 | //单选 73 | stringBuilder.append("问题id: " + questionItem.getId() + " 答案id: " + questionItem.getCheckedId() + "\n"); 74 | } else if (questionItem.getType() == QuestionBean.TYPE_MULTI_CHOICE) { 75 | //多选 76 | ArrayList answerIdList = new ArrayList<>(); 77 | for (QuestionBean.QuestionData.AnswerData answerItem : questionItem.getAnswer()) { 78 | if (answerItem.isChecked()) { 79 | answerIdList.add(answerItem.getId()); 80 | } 81 | } 82 | stringBuilder.append("问题id: " + questionItem.getId() + " 答案id: " + answerIdList.toString() + "\n"); 83 | } else if (questionItem.getType() == QuestionBean.TYPE_FILL_BLANKS) { 84 | //填空 85 | stringBuilder.append("问题id: " + questionItem.getId() + " 答案: " + questionItem.getInputAnswer() + "\n"); 86 | } 87 | } 88 | tvAllAnswer.setText(stringBuilder); 89 | }); 90 | } 91 | 92 | /** 93 | * 格式化问题的json 94 | */ 95 | private void formatQuestionJson() { 96 | String questionJsonStr = ResourceUtils.readAssets2String("question.json"); 97 | QuestionBean questionBean = GsonUtils.fromJson(questionJsonStr, QuestionBean.class); 98 | questionAdapter.setNewData(questionBean.getData()); 99 | } 100 | } -------------------------------------------------------------------------------- /app/src/main/java/com/library/question/QuestionAdapter.java: -------------------------------------------------------------------------------- 1 | package com.library.question; 2 | 3 | import android.text.Editable; 4 | import android.text.TextWatcher; 5 | import android.util.Log; 6 | import android.view.View; 7 | import android.widget.EditText; 8 | import android.widget.TextView; 9 | 10 | import androidx.annotation.Nullable; 11 | import androidx.recyclerview.widget.GridLayoutManager; 12 | 13 | import com.blankj.utilcode.util.Utils; 14 | import com.common.library.bravh_rvadapter.BaseMultiItemRecyclerAdapter; 15 | import com.common.library.bravh_rvadapter.BaseRecyclerAdapter; 16 | import com.common.library.bravh_rvadapter.MultipleItemRvAdapter; 17 | import com.common.library.bravh_rvadapter.RecyclerViewHolder; 18 | import com.common.weight.CommonRecyclerView; 19 | import com.library.R; 20 | 21 | import java.util.List; 22 | 23 | /** 24 | * @Author: Created by seven.zhang 25 | * @Date: 2022/3/9 18:52 26 | * @Desc: 27 | */ 28 | public class QuestionAdapter extends BaseMultiItemRecyclerAdapter { 29 | 30 | /** 31 | * Same as QuickAdapter#QuickAdapter(Context,int) but with 32 | * some initialization data. 33 | * 34 | * @param data A new list is created out of this one to avoid mutable list 35 | */ 36 | public QuestionAdapter(List data) { 37 | super(data); 38 | addItemType(QuestionBean.TYPE_SINGLE_CHOICE, R.layout.item_question_type_1); 39 | addItemType(QuestionBean.TYPE_MULTI_CHOICE, R.layout.item_question_type_2); 40 | addItemType(QuestionBean.TYPE_FILL_BLANKS, R.layout.item_question_type_3); 41 | } 42 | 43 | @Override 44 | protected void convert(RecyclerViewHolder holder, QuestionBean.QuestionData item) { 45 | TextView tvTitle = holder.getTextView(R.id.tv_title); 46 | tvTitle.setText(item.getTitle() + " (" + item.getTypeDesc() + ")"); 47 | if (item.getItemType() == QuestionBean.TYPE_SINGLE_CHOICE || item.getItemType() == QuestionBean.TYPE_MULTI_CHOICE) { 48 | //单选或者多选 49 | CommonRecyclerView rvAnswer = holder.findViewById(R.id.rv_answer); 50 | initAnswerRecycler(rvAnswer, item, item.getItemType(), item.getAnswer()); 51 | } else { 52 | //填空 53 | EditText etAnswer = holder.findViewById(R.id.et_answer); 54 | etAnswer.setText(item.getInputAnswer()); 55 | etAnswer.addTextChangedListener(new TextWatcher() { 56 | @Override 57 | public void beforeTextChanged(CharSequence s, int start, int count, int after) { 58 | 59 | } 60 | 61 | @Override 62 | public void onTextChanged(CharSequence s, int start, int before, int count) { 63 | item.setInputAnswer(s.toString()); 64 | } 65 | 66 | @Override 67 | public void afterTextChanged(Editable s) { 68 | 69 | } 70 | }); 71 | } 72 | } 73 | 74 | /** 75 | * 初始化答案列表适配器 76 | * 77 | * @param rvAnswer 78 | * @param type 79 | * @param answerList 80 | */ 81 | private void initAnswerRecycler(CommonRecyclerView rvAnswer,QuestionBean.QuestionData item, int type, List answerList) { 82 | rvAnswer.setLayoutManager(new GridLayoutManager(Utils.getApp(), 2)); 83 | AnswerAdapter answerAdapter = new AnswerAdapter(item, type, answerList); 84 | rvAnswer.setAdapter(answerAdapter); 85 | answerAdapter.setmOnItemClickListener((type1, answerId) -> { 86 | if (type1 == QuestionBean.TYPE_SINGLE_CHOICE) { 87 | item.setCheckedId(answerId); 88 | answerAdapter.notifyDataSetChanged(); 89 | } 90 | }); 91 | 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /app/src/main/java/com/library/question/QuestionBean.java: -------------------------------------------------------------------------------- 1 | package com.library.question; 2 | 3 | import android.util.Log; 4 | 5 | import com.common.library.bravh_rvadapter.entity.MultiItemEntity; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @Author: Created by seven.zhang 11 | * @Date: 2022/3/10 11:03 12 | * @Desc: 13 | */ 14 | public class QuestionBean { 15 | /** 16 | * 单选 17 | */ 18 | public static int TYPE_SINGLE_CHOICE = 1; 19 | /** 20 | * 多选 21 | */ 22 | public static int TYPE_MULTI_CHOICE = 2; 23 | /** 24 | * 填空 25 | */ 26 | public static int TYPE_FILL_BLANKS = 3; 27 | 28 | private List data; 29 | 30 | public List getData() { 31 | return data; 32 | } 33 | 34 | static class QuestionData implements MultiItemEntity{ 35 | private int id; 36 | private String title; 37 | private String rightAnswer; 38 | private List answer; 39 | private String typeDesc; 40 | /** 41 | * 用于单选,单选的下标 42 | */ 43 | private int checkedId = -1; 44 | 45 | public int getCheckedId() { 46 | return checkedId; 47 | } 48 | 49 | public void setCheckedId(int checkedId) { 50 | this.checkedId = checkedId; 51 | } 52 | 53 | /** 54 | * 用于填空,输入的填空内容 55 | */ 56 | private String inputAnswer; 57 | 58 | public String getInputAnswer() { 59 | return inputAnswer; 60 | } 61 | 62 | public void setInputAnswer(String inputAnswer) { 63 | this.inputAnswer = inputAnswer; 64 | } 65 | 66 | /** 67 | * 问题类型 68 | * 1: 单选 69 | * 2: 多选 70 | * 3: 填空 71 | */ 72 | private int type; 73 | 74 | public int getId() { 75 | return id; 76 | } 77 | 78 | public String getTitle() { 79 | return title; 80 | } 81 | 82 | public String getRightAnswer() { 83 | return rightAnswer; 84 | } 85 | 86 | public List getAnswer() { 87 | return answer; 88 | } 89 | 90 | public String getTypeDesc() { 91 | return typeDesc; 92 | } 93 | 94 | public int getType() { 95 | return type; 96 | } 97 | 98 | @Override 99 | public int getItemType() { 100 | return type; 101 | } 102 | 103 | static class AnswerData{ 104 | /** 105 | * 用于多选,是否选择 106 | */ 107 | private boolean isChecked = false; 108 | private int id; 109 | private String answer; 110 | 111 | public boolean isChecked() { 112 | return isChecked; 113 | } 114 | 115 | public void setChecked(boolean checked) { 116 | isChecked = checked; 117 | } 118 | 119 | public int getId() { 120 | return id; 121 | } 122 | 123 | public String getAnswer() { 124 | return answer; 125 | } 126 | } 127 | } 128 | 129 | } 130 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_home_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/a02bbfe8bb62db87b4719113524baa30d8bb76e0/app/src/main/res/drawable-xhdpi/ic_home_select.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_home_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/a02bbfe8bb62db87b4719113524baa30d8bb76e0/app/src/main/res/drawable-xhdpi/ic_home_unselect.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_list_item_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/a02bbfe8bb62db87b4719113524baa30d8bb76e0/app/src/main/res/drawable-xhdpi/ic_list_item_select.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_list_item_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/a02bbfe8bb62db87b4719113524baa30d8bb76e0/app/src/main/res/drawable-xhdpi/ic_list_item_unselect.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_mine_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/a02bbfe8bb62db87b4719113524baa30d8bb76e0/app/src/main/res/drawable-xhdpi/ic_mine_select.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_mine_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/a02bbfe8bb62db87b4719113524baa30d8bb76e0/app/src/main/res/drawable-xhdpi/ic_mine_unselect.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_news_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/a02bbfe8bb62db87b4719113524baa30d8bb76e0/app/src/main/res/drawable-xhdpi/ic_news_select.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_news_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/a02bbfe8bb62db87b4719113524baa30d8bb76e0/app/src/main/res/drawable-xhdpi/ic_news_unselect.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_circle_float_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/border_black_corner_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/item_answer_select.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/item_answer_unselect.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/select_home_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/select_list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/select_main_bottom_text_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/select_mine_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/select_news_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selected_item_answer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_file_download.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 |