├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ └── strings.xml │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_home_select.png │ │ │ │ ├── ic_mine_select.png │ │ │ │ ├── ic_news_select.png │ │ │ │ ├── ic_home_unselect.png │ │ │ │ ├── ic_mine_unselect.png │ │ │ │ ├── ic_news_unselect.png │ │ │ │ ├── ic_list_item_select.png │ │ │ │ └── ic_list_item_unselect.png │ │ │ ├── drawable │ │ │ │ ├── bg_circle_float_button.xml │ │ │ │ ├── item_answer_unselect.xml │ │ │ │ ├── border_black_corner_10.xml │ │ │ │ ├── select_main_bottom_text_color.xml │ │ │ │ ├── select_home_icon.xml │ │ │ │ ├── select_list_item.xml │ │ │ │ ├── select_mine_icon.xml │ │ │ │ ├── select_news_icon.xml │ │ │ │ ├── selected_item_answer.xml │ │ │ │ └── item_answer_select.xml │ │ │ └── layout │ │ │ │ ├── fragment_lazy.xml │ │ │ │ ├── fragment_main.xml │ │ │ │ ├── activity_main_page.xml │ │ │ │ ├── toolbar_my_left_view.xml │ │ │ │ ├── toolbar_my_title_view.xml │ │ │ │ ├── toolbar_my_right_view.xml │ │ │ │ ├── activity_refresh_load_list.xml │ │ │ │ ├── include_main_bottom.xml │ │ │ │ ├── activity_single_choice_list.xml │ │ │ │ ├── activity_lazy_load.xml │ │ │ │ ├── activity_login.xml │ │ │ │ ├── item_question_type_2.xml │ │ │ │ ├── item_question_type_1.xml │ │ │ │ ├── item_question_answer.xml │ │ │ │ ├── item_question_type_3.xml │ │ │ │ ├── activity_file_download.xml │ │ │ │ ├── activity_glide_use.xml │ │ │ │ ├── activity_question.xml │ │ │ │ ├── item_refresh_layout.xml │ │ │ │ ├── item_single_choice.xml │ │ │ │ ├── activity_multiple_choice_list.xml │ │ │ │ ├── activity_main.xml │ │ │ │ └── activity_http_sample.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── library │ │ │ │ ├── login │ │ │ │ ├── mvp │ │ │ │ │ ├── LoginModel.java │ │ │ │ │ ├── LoginContract.java │ │ │ │ │ └── LoginPresenter.java │ │ │ │ └── LoginActivity.java │ │ │ │ ├── mainpage │ │ │ │ ├── fragment │ │ │ │ │ ├── HomeFragment.java │ │ │ │ │ ├── MineFragment.java │ │ │ │ │ └── NewsFragment.java │ │ │ │ └── MainPageActivity.java │ │ │ │ ├── list │ │ │ │ ├── refreshload │ │ │ │ │ └── RefreshLoadListAdapter.java │ │ │ │ ├── multiplechoice │ │ │ │ │ └── MultipleChoiceListAdapter.java │ │ │ │ └── singlechoice │ │ │ │ │ ├── SingleChoiceListAdapter.java │ │ │ │ │ └── SingleChoiceListActivity.java │ │ │ │ ├── lazyload │ │ │ │ ├── LazyFragment.java │ │ │ │ └── LazyLoadActivity.java │ │ │ │ ├── glide │ │ │ │ └── GlideUseActivity.java │ │ │ │ ├── question │ │ │ │ ├── AnswerAdapter.java │ │ │ │ ├── QuestionBean.java │ │ │ │ ├── QuestionAdapter.java │ │ │ │ └── QuestionActivity.java │ │ │ │ ├── filedownload │ │ │ │ └── FileDownloadActivity.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── library │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── library │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── basecommon ├── .gitignore ├── consumer-rules.pro ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_back.png │ │ │ │ ├── ic_title.png │ │ │ │ ├── ic_release.png │ │ │ │ └── ic_placeholder.png │ │ │ ├── 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 │ │ │ ├── drawable │ │ │ │ └── bg_f5f5_corner_8.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── values │ │ │ │ ├── ids.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── styles.xml │ │ │ │ └── attrs.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── layout │ │ │ │ └── brvah_quick_view_load_more.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── common │ │ │ │ ├── library │ │ │ │ └── bravh_rvadapter │ │ │ │ │ ├── entity │ │ │ │ │ ├── MultiItemEntity.java │ │ │ │ │ ├── IExpandable.java │ │ │ │ │ ├── SectionEntity.java │ │ │ │ │ ├── SectionMultiEntity.java │ │ │ │ │ └── AbstractExpandableItem.java │ │ │ │ │ ├── animation │ │ │ │ │ ├── BaseAnimation.java │ │ │ │ │ ├── SlideInBottomAnimation.java │ │ │ │ │ ├── SlideInLeftAnimation.java │ │ │ │ │ ├── SlideInRightAnimation.java │ │ │ │ │ ├── AlphaInAnimation.java │ │ │ │ │ └── ScaleInAnimation.java │ │ │ │ │ ├── util │ │ │ │ │ ├── ItemProviderException.java │ │ │ │ │ ├── ProviderDelegate.java │ │ │ │ │ ├── TouchEventUtil.java │ │ │ │ │ └── MultiTypeDelegate.java │ │ │ │ │ ├── listener │ │ │ │ │ ├── OnItemDragListener.java │ │ │ │ │ └── OnItemSwipeListener.java │ │ │ │ │ ├── loadmore │ │ │ │ │ ├── SimpleLoadMoreView.java │ │ │ │ │ └── LoadMoreView.java │ │ │ │ │ ├── provider │ │ │ │ │ └── BaseItemProvider.java │ │ │ │ │ ├── BaseSectionRecyclerAdapter.java │ │ │ │ │ └── MultipleItemRvAdapter.java │ │ │ │ ├── constants │ │ │ │ ├── Constants.java │ │ │ │ └── HttpConstants.java │ │ │ │ ├── util │ │ │ │ ├── glide │ │ │ │ │ ├── MyGlideModule.java │ │ │ │ │ └── GlideUtil.java │ │ │ │ ├── filedownload │ │ │ │ │ ├── OnDownloadListener.java │ │ │ │ │ └── FileDownloadHelper.java │ │ │ │ ├── SpUtil.java │ │ │ │ ├── ParamUtil.java │ │ │ │ └── GetPathFromUri.java │ │ │ │ ├── http │ │ │ │ ├── helper │ │ │ │ │ ├── upload │ │ │ │ │ │ ├── OnUploadFileListener.java │ │ │ │ │ │ └── UploadFileHelper.java │ │ │ │ │ ├── RequestBodyHelper.java │ │ │ │ │ └── Mobile.java │ │ │ │ ├── bean │ │ │ │ │ ├── ExampleFileBean.java │ │ │ │ │ ├── ExampleBean.java │ │ │ │ │ └── ExampleListBean.java │ │ │ │ ├── base │ │ │ │ │ ├── RxJavaHelper.java │ │ │ │ │ ├── BaseResponse.java │ │ │ │ │ └── BaseObserver.java │ │ │ │ ├── intercept │ │ │ │ │ └── HttpIntercept.java │ │ │ │ ├── XRetrofit.java │ │ │ │ └── api │ │ │ │ │ └── ApiService.java │ │ │ │ ├── base │ │ │ │ ├── mvp │ │ │ │ │ ├── BaseView.java │ │ │ │ │ ├── BasePresenter.java │ │ │ │ │ ├── BaseMvpFragment.java │ │ │ │ │ └── BaseMvpActivity.java │ │ │ │ └── BaseApplication.java │ │ │ │ └── weight │ │ │ │ ├── CommonViewPager.java │ │ │ │ └── CommonRecyclerView.java │ │ ├── AndroidManifest.xml │ │ └── assets │ │ │ └── question.json │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── common │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── common │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── compiler.xml ├── vcs.xml ├── misc.xml ├── runConfigurations.xml ├── gradle.xml ├── jarRepositories.xml ├── inspectionProfiles │ └── Project_Default.xml ├── markdown-navigator-enh.xml └── codeStyles │ └── Project.xml ├── .gitignore ├── README-LIBRARY.md ├── README-UPDATE.md ├── gradle.properties ├── gradlew.bat └── README.md /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /basecommon/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /basecommon/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name='QuickAndroid' 2 | include ':app' 3 | include ':basecommon' 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_home_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_home_select.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_mine_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_mine_select.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_news_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_news_select.png -------------------------------------------------------------------------------- /basecommon/src/main/res/drawable-xhdpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/drawable-xhdpi/ic_back.png -------------------------------------------------------------------------------- /basecommon/src/main/res/drawable-xhdpi/ic_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/drawable-xhdpi/ic_title.png -------------------------------------------------------------------------------- /basecommon/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /basecommon/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_home_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_home_unselect.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_mine_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_mine_unselect.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_news_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_news_unselect.png -------------------------------------------------------------------------------- /basecommon/src/main/res/drawable-xhdpi/ic_release.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/drawable-xhdpi/ic_release.png -------------------------------------------------------------------------------- /basecommon/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /basecommon/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /basecommon/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_list_item_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/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/HEAD/app/src/main/res/drawable-xhdpi/ic_list_item_unselect.png -------------------------------------------------------------------------------- /basecommon/src/main/res/drawable-xhdpi/ic_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/drawable-xhdpi/ic_placeholder.png -------------------------------------------------------------------------------- /basecommon/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /basecommon/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /basecommon/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /basecommon/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /basecommon/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manitozhang/QuickAndroid/HEAD/basecommon/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_circle_float_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /basecommon/src/main/res/drawable/bg_f5f5_corner_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/item_answer_unselect.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Sep 18 11:14:11 CST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip 7 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/entity/MultiItemEntity.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.entity; 2 | 3 | /** 4 | * https://github.com/CymChad/BaseRecyclerViewAdapterHelper 5 | */ 6 | public interface MultiItemEntity { 7 | int getItemType(); 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/border_black_corner_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /basecommon/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/select_main_bottom_text_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /basecommon/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/constants/Constants.java: -------------------------------------------------------------------------------- 1 | package com.common.constants; 2 | 3 | /** 4 | * @Author: 张鹏飞 5 | * @Email: 1271396448@qq.com 6 | * @Date: 2020/11/12 7 | *

8 | * @Desc: 常量类 9 | */ 10 | public class Constants { 11 | //文件存储根路径 12 | public static final String SD_ROOT_DIR = "/zpf/file/"; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /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_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 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/animation/BaseAnimation.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.animation; 2 | 3 | import android.animation.Animator; 4 | import android.view.View; 5 | 6 | /** 7 | * https://github.com/CymChad/BaseRecyclerViewAdapterHelper 8 | */ 9 | public interface BaseAnimation { 10 | Animator[] getAnimators(View view); 11 | } 12 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /basecommon/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/util/glide/MyGlideModule.java: -------------------------------------------------------------------------------- 1 | package com.common.util.glide; 2 | 3 | import com.bumptech.glide.annotation.GlideModule; 4 | import com.bumptech.glide.module.AppGlideModule; 5 | 6 | /** 7 | * @Author: 张鹏飞 8 | * @Email: 1271396448@qq.com 9 | * @Date: 2020/11/16 10 | *

11 | * @Desc: GlideApp 12 | */ 13 | @GlideModule 14 | public class MyGlideModule extends AppGlideModule { 15 | } 16 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/http/helper/upload/OnUploadFileListener.java: -------------------------------------------------------------------------------- 1 | package com.common.http.helper.upload; 2 | 3 | /** 4 | * @Author: 张 5 | * @Email: 1271396448@qq.com 6 | * @Date: 2019/7/22 2:34 PM 7 | *

8 | * 文件上传结果监听 9 | */ 10 | 11 | public interface OnUploadFileListener { 12 | //上传成功 13 | void onUploadFileSuccess(String imgUrl); 14 | 15 | //上传失败 16 | void onUploadFileFailed(String errorMsg); 17 | } -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/util/ItemProviderException.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.util; 2 | 3 | /** 4 | * @author ChayChan 5 | * @description: ItemProviderException 6 | * @date 2018/4/12 9:10 7 | */ 8 | 9 | public class ItemProviderException extends NullPointerException { 10 | 11 | public ItemProviderException(String message) { 12 | super(message); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/constants/HttpConstants.java: -------------------------------------------------------------------------------- 1 | package com.common.constants; 2 | 3 | /** 4 | * 网络相关参数 5 | */ 6 | public class HttpConstants { 7 | 8 | public static final String BASE_URL = "http://119.45.229.87:1271/"; 9 | //成功码 10 | public static final int CODE_SUCCESS = 10000; 11 | //链接超时时间 12 | public static final int TIME_OUT_CONNECT = 8; 13 | //读取超时时间 14 | public static final int TIME_OUT_READ = 8; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/base/mvp/BaseView.java: -------------------------------------------------------------------------------- 1 | package com.common.base.mvp; 2 | 3 | import com.uber.autodispose.AutoDisposeConverter; 4 | 5 | /** 6 | * @Author: 张鹏飞 7 | * @Email: 1271396448@qq.com 8 | *

9 | * @Desc: 10 | */ 11 | public interface BaseView { 12 | 13 | /** 14 | * 绑定Android生命周期 防止RxJava内存泄漏 15 | * 16 | * @param 17 | * @return 18 | */ 19 | AutoDisposeConverter bindAutoDispose(); 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/src/test/java/com/library/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.library; 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 | } -------------------------------------------------------------------------------- /basecommon/src/test/java/com/common/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.common; 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 | } -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/util/filedownload/OnDownloadListener.java: -------------------------------------------------------------------------------- 1 | package com.common.util.filedownload; 2 | 3 | /** 4 | * @Author: 张 5 | * @Email: 1271396448@qq.com 6 | * @Date: 2019/8/16 6:05 PM 7 | *

8 | * 下载监听回调 9 | */ 10 | public interface OnDownloadListener { 11 | 12 | void onPending(int id, int soFarBytes, int totalBytes); 13 | 14 | void onProgress(int id, int speed, int soFarBytes, int totalBytes); 15 | 16 | void onComplete(String path); 17 | 18 | void onError(Throwable e); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_lazy.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /basecommon/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #6200EE 4 | #3700B3 5 | #03DAC5 6 | 7 | #FF0000 8 | 9 | #03DAC5 10 | #FFFFFF 11 | #000000 12 | 13 | #F5F5F5 14 | #787878 15 | 16 | -------------------------------------------------------------------------------- /basecommon/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | QuickAndroid 3 | 4 | 5 | 您当前的网络连接不可用 6 | 服务器异常 7 | 连接超时 8 | 数据解析异常 9 | 程序异常 10 | 11 | 正在加载中… 12 | 加载失败,请点我重试 13 | 没有更多数据 14 | 15 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/listener/OnItemDragListener.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.listener; 2 | 3 | 4 | import androidx.recyclerview.widget.RecyclerView; 5 | 6 | /** 7 | * Created by luoxw on 2016/6/20. 8 | */ 9 | public interface OnItemDragListener { 10 | void onItemDragStart(RecyclerView.ViewHolder viewHolder, int pos); 11 | 12 | void onItemDragMoving(RecyclerView.ViewHolder source, int from, RecyclerView.ViewHolder target, int to); 13 | 14 | void onItemDragEnd(RecyclerView.ViewHolder viewHolder, int pos); 15 | } 16 | -------------------------------------------------------------------------------- /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/layout/fragment_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/entity/IExpandable.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.entity; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * implement the interface if the item is expandable 7 | * Created by luoxw on 2016/8/8. 8 | */ 9 | public interface IExpandable { 10 | boolean isExpanded(); 11 | void setExpanded(boolean expanded); 12 | List getSubItems(); 13 | 14 | /** 15 | * Get the level of this item. The level start from 0. 16 | * If you don't care about the level, just return a negative. 17 | */ 18 | int getLevel(); 19 | } 20 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/animation/SlideInBottomAnimation.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.animation; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.view.View; 6 | 7 | 8 | /** 9 | * https://github.com/CymChad/BaseRecyclerViewAdapterHelper 10 | */ 11 | public class SlideInBottomAnimation implements BaseAnimation { 12 | @Override 13 | public Animator[] getAnimators(View view) { 14 | return new Animator[]{ 15 | ObjectAnimator.ofFloat(view, "translationY", view.getMeasuredHeight(), 0) 16 | }; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/animation/SlideInLeftAnimation.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.animation; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.view.View; 6 | 7 | 8 | /** 9 | * https://github.com/CymChad/BaseRecyclerViewAdapterHelper 10 | */ 11 | public class SlideInLeftAnimation implements BaseAnimation { 12 | @Override 13 | public Animator[] getAnimators(View view) { 14 | return new Animator[]{ 15 | ObjectAnimator.ofFloat(view, "translationX", -view.getRootView().getWidth(), 0) 16 | }; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/animation/SlideInRightAnimation.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.animation; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.view.View; 6 | 7 | 8 | /** 9 | * https://github.com/CymChad/BaseRecyclerViewAdapterHelper 10 | */ 11 | public class SlideInRightAnimation implements BaseAnimation { 12 | @Override 13 | public Animator[] getAnimators(View view) { 14 | return new Animator[]{ 15 | ObjectAnimator.ofFloat(view, "translationX", view.getRootView().getWidth(), 0) 16 | }; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/http/helper/RequestBodyHelper.java: -------------------------------------------------------------------------------- 1 | package com.common.http.helper; 2 | 3 | import com.google.gson.Gson; 4 | 5 | import java.util.HashMap; 6 | 7 | import okhttp3.MediaType; 8 | import okhttp3.RequestBody; 9 | 10 | /** 11 | * Created by zhang on 2020/7/17 12 | *

13 | * HashMap转RequestBody 14 | */ 15 | public class RequestBodyHelper { 16 | 17 | public static RequestBody getRequestBody(HashMap map) { 18 | Gson gson = new Gson(); 19 | String toJson = gson.toJson(map); 20 | return RequestBody.create(MediaType.parse("application/json;charset=utf-8"), toJson); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/base/BaseApplication.java: -------------------------------------------------------------------------------- 1 | package com.common.base; 2 | 3 | import android.app.Application; 4 | import android.view.Gravity; 5 | 6 | import com.blankj.utilcode.util.ToastUtils; 7 | import com.common.util.SpUtil; 8 | import com.liulishuo.filedownloader.FileDownloader; 9 | 10 | public class BaseApplication extends Application { 11 | 12 | @Override 13 | public void onCreate() { 14 | super.onCreate(); 15 | SpUtil.init(this); 16 | initToast(); 17 | FileDownloader.setup(this); 18 | } 19 | 20 | private void initToast(){ 21 | ToastUtils toastUtils = ToastUtils.getDefaultMaker(); 22 | toastUtils.setGravity(Gravity.CENTER,0,0); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/entity/SectionEntity.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * https://github.com/CymChad/BaseRecyclerViewAdapterHelper 7 | */ 8 | public abstract class SectionEntity implements Serializable { 9 | public boolean isHeader; 10 | public T t; 11 | public String header; 12 | 13 | public SectionEntity(boolean isHeader, String header) { 14 | this.isHeader = isHeader; 15 | this.header = header; 16 | this.t = null; 17 | } 18 | 19 | public SectionEntity(T t) { 20 | this.isHeader = false; 21 | this.header = null; 22 | this.t = t; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/http/bean/ExampleFileBean.java: -------------------------------------------------------------------------------- 1 | package com.common.http.bean; 2 | 3 | /** 4 | * @Author: 张鹏飞 5 | * @Date: 2020/11/12 6 | * @Email: 1271396448@qq.com 7 | *

8 | * @Desc: 返回的整个的信息 sample: {"code":10000,"msg":"请求成功","data":{"fileUrl":"文件地址"}} 只需要写data里面的就可以 9 | */ 10 | public class ExampleFileBean { 11 | 12 | private String fileUrl; 13 | 14 | public String getFileUrl() { 15 | return fileUrl; 16 | } 17 | 18 | public void setFileUrl(String fileUrl) { 19 | this.fileUrl = fileUrl; 20 | } 21 | 22 | @Override 23 | public String toString() { 24 | return "ExampleFileBean{" + 25 | "fileUrl='" + fileUrl + '\'' + 26 | '}'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/toolbar_my_left_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/toolbar_my_title_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/toolbar_my_right_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 19 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/entity/SectionMultiEntity.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * https://github.com/CymChad/BaseRecyclerViewAdapterHelper 7 | */ 8 | public abstract class SectionMultiEntity implements Serializable, MultiItemEntity { 9 | 10 | public boolean isHeader; 11 | public T t; 12 | public String header; 13 | 14 | public SectionMultiEntity(boolean isHeader, String header) { 15 | this.isHeader = isHeader; 16 | this.header = header; 17 | this.t = null; 18 | } 19 | 20 | public SectionMultiEntity(T t) { 21 | this.isHeader = false; 22 | this.header = null; 23 | this.t = t; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/base/mvp/BasePresenter.java: -------------------------------------------------------------------------------- 1 | package com.common.base.mvp; 2 | 3 | /** 4 | * @Author: 张鹏飞 5 | * @Email: 1271396448@qq.com 6 | *

7 | * @Desc: Presenter基类 8 | */ 9 | public class BasePresenter { 10 | 11 | protected V mView; 12 | 13 | /** 14 | * 绑定View 一般初始化调用 15 | * 16 | * @param view: view 17 | */ 18 | public void attachView(V view) { 19 | this.mView = view; 20 | } 21 | 22 | /** 23 | * 解绑View 一般在destroy调用 24 | */ 25 | public void detachView() { 26 | this.mView = null; 27 | } 28 | 29 | /** 30 | * View 是否绑定 31 | * 32 | * @return: 是否绑定 33 | */ 34 | public boolean isViewAttached() { 35 | return mView != null; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/loadmore/SimpleLoadMoreView.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.loadmore; 2 | 3 | 4 | import com.common.R; 5 | 6 | /** 7 | * Created by BlingBling on 2016/10/11. 8 | */ 9 | 10 | public final class SimpleLoadMoreView extends LoadMoreView { 11 | 12 | @Override 13 | public int getLayoutId() { 14 | return R.layout.brvah_quick_view_load_more; 15 | } 16 | 17 | @Override 18 | protected int getLoadingViewId() { 19 | return R.id.load_more_loading_view; 20 | } 21 | 22 | @Override 23 | protected int getLoadFailViewId() { 24 | return R.id.load_more_load_fail_view; 25 | } 26 | 27 | @Override 28 | protected int getLoadEndViewId() { 29 | return R.id.load_more_load_end_view; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /basecommon/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 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/animation/AlphaInAnimation.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.animation; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.view.View; 6 | 7 | 8 | /** 9 | * https://github.com/CymChad/BaseRecyclerViewAdapterHelper 10 | */ 11 | public class AlphaInAnimation implements BaseAnimation { 12 | private static final float DEFAULT_ALPHA_FROM = 0f; 13 | private final float mFrom; 14 | 15 | public AlphaInAnimation() { 16 | this(DEFAULT_ALPHA_FROM); 17 | } 18 | 19 | public AlphaInAnimation(float from) { 20 | mFrom = from; 21 | } 22 | 23 | @Override 24 | public Animator[] getAnimators(View view) { 25 | return new Animator[]{ObjectAnimator.ofFloat(view, "alpha", mFrom, 1f)}; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /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/res/layout/activity_refresh_load_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /basecommon/src/androidTest/java/com/common/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.common; 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.common.test", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/http/base/RxJavaHelper.java: -------------------------------------------------------------------------------- 1 | package com.common.http.base; 2 | 3 | import io.reactivex.Observable; 4 | import io.reactivex.ObservableSource; 5 | import io.reactivex.ObservableTransformer; 6 | import io.reactivex.android.schedulers.AndroidSchedulers; 7 | import io.reactivex.schedulers.Schedulers; 8 | 9 | /** 10 | * @Author: 张鹏飞 11 | * @Email: 1271396448@qq.com 12 | *

13 | * @Desc: Rxjava2线程切换操作封装 14 | */ 15 | public class RxJavaHelper { 16 | 17 | public static ObservableTransformer observeOnMainThread(){ 18 | return new ObservableTransformer() { 19 | @Override 20 | public ObservableSource apply(Observable upstream) { 21 | return upstream.subscribeOn(Schedulers.io()) 22 | .unsubscribeOn(Schedulers.io()) 23 | .observeOn(AndroidSchedulers.mainThread()); 24 | } 25 | }; 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/animation/ScaleInAnimation.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.animation; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.view.View; 6 | 7 | 8 | /** 9 | * https://github.com/CymChad/BaseRecyclerViewAdapterHelper 10 | */ 11 | public class ScaleInAnimation implements BaseAnimation { 12 | private static final float DEFAULT_SCALE_FROM = .5f; 13 | private final float mFrom; 14 | 15 | public ScaleInAnimation() { 16 | this(DEFAULT_SCALE_FROM); 17 | } 18 | 19 | public ScaleInAnimation(float from) { 20 | mFrom = from; 21 | } 22 | 23 | @Override 24 | public Animator[] getAnimators(View view) { 25 | ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, "scaleX", mFrom, 1f); 26 | ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "scaleY", mFrom, 1f); 27 | return new ObjectAnimator[]{scaleX, scaleY}; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/include_main_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 21 | 22 | 27 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/library/bravh_rvadapter/util/ProviderDelegate.java: -------------------------------------------------------------------------------- 1 | package com.common.library.bravh_rvadapter.util; 2 | 3 | import android.util.SparseArray; 4 | 5 | import com.common.library.bravh_rvadapter.provider.BaseItemProvider; 6 | 7 | 8 | /** 9 | * https://github.com/chaychan 10 | * @author ChayChan 11 | * @date 2018/3/21 11:04 12 | */ 13 | 14 | public class ProviderDelegate { 15 | 16 | private SparseArray mItemProviders = new SparseArray<>(); 17 | 18 | public void registerProvider(BaseItemProvider provider){ 19 | if (provider == null){ 20 | throw new ItemProviderException("ItemProvider can not be null"); 21 | } 22 | 23 | int viewType = provider.viewType(); 24 | 25 | if (mItemProviders.get(viewType) == null){ 26 | mItemProviders.put(viewType,provider); 27 | } 28 | } 29 | 30 | public SparseArray getItemProviders(){ 31 | return mItemProviders; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /basecommon/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /basecommon/src/main/java/com/common/http/bean/ExampleBean.java: -------------------------------------------------------------------------------- 1 | package com.common.http.bean; 2 | 3 | /** 4 | * @Author: 张鹏飞 5 | * @Date: 2020/9/3 6 | * @Email: 1271396448@qq.com 7 | *

8 | * @Desc: 返回的整个的信息 sample: {"code":10000,"msg":"请求成功","data":{"username":"用户名","password":"密码"}} 只需要写data里面的就可以 9 | */ 10 | public class ExampleBean { 11 | 12 | private String username; 13 | private String password; 14 | 15 | public String getUsername() { 16 | return username; 17 | } 18 | 19 | public void setUsername(String username) { 20 | this.username = username; 21 | } 22 | 23 | public String getPassword() { 24 | return password; 25 | } 26 | 27 | public void setPassword(String password) { 28 | this.password = password; 29 | } 30 | 31 | @Override 32 | public String toString() { 33 | return "ExampleBean{" + 34 | "username='" + username + '\'' + 35 | ", password='" + password + '\'' + 36 | '}'; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_single_choice_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 |