├── .idea ├── AndroidModuleDemo.iml ├── caches │ └── build_file_checksums.ser ├── codeStyles │ └── Project.xml ├── gradle.xml ├── libraries │ ├── Gradle____local_aars___C__WorkSpace_AndroidModuleDemo_bundle_platform_libs_simple_xml_core_jar_unspecified_jar.xml │ ├── Gradle__android_arch_core_common_1_0_0_jar.xml │ ├── Gradle__android_arch_lifecycle_common_1_0_3_jar.xml │ ├── Gradle__android_arch_lifecycle_runtime_1_0_3.xml │ ├── Gradle__com_alibaba_arouter_annotation_1_0_4_jar.xml │ ├── Gradle__com_alibaba_arouter_api_1_3_1.xml │ ├── Gradle__com_android_support_animated_vector_drawable_27_0_2.xml │ ├── Gradle__com_android_support_appcompat_v7_27_0_2.xml │ ├── Gradle__com_android_support_design_27_0_2.xml │ ├── Gradle__com_android_support_multidex_1_0_2.xml │ ├── Gradle__com_android_support_multidex_instrumentation_1_0_2.xml │ ├── Gradle__com_android_support_recyclerview_v7_27_0_2.xml │ ├── Gradle__com_android_support_support_annotations_27_0_2_jar.xml │ ├── Gradle__com_android_support_support_compat_27_0_2.xml │ ├── Gradle__com_android_support_support_core_ui_27_0_2.xml │ ├── Gradle__com_android_support_support_core_utils_27_0_2.xml │ ├── Gradle__com_android_support_support_fragment_27_0_2.xml │ ├── Gradle__com_android_support_support_media_compat_27_0_2.xml │ ├── Gradle__com_android_support_support_v13_27_0_2.xml │ ├── Gradle__com_android_support_support_v4_27_0_2.xml │ ├── Gradle__com_android_support_support_vector_drawable_27_0_2.xml │ ├── Gradle__com_android_support_transition_27_0_2.xml │ ├── Gradle__com_blankj_utilcode_1_10_0.xml │ ├── Gradle__com_github_GrenderG_Toasty_1_1_3.xml │ ├── Gradle__com_orhanobut_logger_1_15.xml │ ├── Gradle__com_yanzhenjie_alertdialog_alertdialog_1_0_1.xml │ └── Gradle__com_yanzhenjie_permission_1_1_2.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── LICENSE ├── README.md ├── andrew.jks ├── build.gradle ├── bundle_app ├── .gitignore ├── build.gradle ├── proguard-rules.pro ├── release │ └── output.json └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── andrew │ │ └── module │ │ └── MyApplication.java │ └── res │ └── values │ └── strings.xml ├── bundle_business ├── .gitignore ├── arouter.json ├── build.gradle ├── bundle_business.iml └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ ├── com │ │ └── andrew │ │ │ └── module │ │ │ └── business │ │ │ ├── BusinessCenterActivity.java │ │ │ ├── BusinessFragment.java │ │ │ └── been │ │ │ └── Data.java │ └── debug │ │ ├── BusinessApplication.java │ │ └── LauncherActivity.java │ ├── module │ └── AndroidManifest.xml │ └── res │ ├── layout │ ├── activity_business_center.xml │ └── fragment_business.xml │ └── values │ ├── colors.xml │ ├── dimens.xml │ └── strings.xml ├── bundle_main ├── .gitignore ├── build.gradle ├── bundle_main.iml └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ ├── com │ │ └── andrew │ │ │ └── module │ │ │ └── main │ │ │ ├── FragmentAdapter.java │ │ │ ├── MainActivity.java │ │ │ └── MainFragmentActivity.java │ └── debug │ │ └── MainApplication.java │ ├── module │ └── AndroidManifest.xml │ └── res │ ├── drawable-hdpi │ └── home.png │ ├── layout │ ├── activity_bottom_navigation.xml │ └── activity_main.xml │ ├── menu │ └── navigation.xml │ └── values │ ├── dimens.xml │ └── strings.xml ├── bundle_platform ├── .gitignore ├── build.gradle ├── libs │ └── simple-xml-core.jar └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── andrew │ │ └── module │ │ └── common │ │ ├── base │ │ ├── BaseActionBarActivity.java │ │ ├── BaseActivity.java │ │ ├── BaseApplication.java │ │ └── BaseFragment.java │ │ ├── iservices │ │ └── ISchoolModuleService.java │ │ ├── utils │ │ ├── StringUtils.java │ │ ├── ToastUtils.java │ │ └── Utils.java │ │ └── widget │ │ └── NoScrollViewPager.java │ └── res │ ├── drawable-xxhdpi │ └── ic_arrow_back.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ └── values │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── bundle_school ├── .gitignore ├── arouter.json ├── build.gradle ├── bundle_school.iml └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ ├── com │ │ └── andrew │ │ │ └── module │ │ │ └── school │ │ │ ├── SchoolActivity.java │ │ │ ├── SchoolFragment.java │ │ │ └── SchoolModuleServiceImpl.java │ └── debug │ │ └── SchoolApplication.java │ ├── module │ └── AndroidManifest.xml │ └── res │ ├── layout │ ├── activity_school.xml │ └── fragment_school.xml │ └── values │ ├── colors.xml │ ├── dimens.xml │ └── strings.xml ├── gradle.properties ├── local.properties ├── script └── library_work.gradle ├── settings.gradle └── versions.gradle /.idea/AndroidModuleDemo.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongxialiu/AndroidModuleDemo/22a537a483918312433f4caf59922d119fe4e770/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle____local_aars___C__WorkSpace_AndroidModuleDemo_bundle_platform_libs_simple_xml_core_jar_unspecified_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__android_arch_core_common_1_0_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__android_arch_lifecycle_common_1_0_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_0_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_alibaba_arouter_annotation_1_0_4_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_alibaba_arouter_api_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_animated_vector_drawable_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_appcompat_v7_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_design_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_multidex_1_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_multidex_instrumentation_1_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_recyclerview_v7_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_annotations_27_0_2_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_compat_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_core_ui_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_core_utils_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_fragment_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_media_compat_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_v13_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_v4_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_vector_drawable_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_transition_27_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_blankj_utilcode_1_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_github_GrenderG_Toasty_1_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_orhanobut_logger_1_15.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_yanzhenjie_alertdialog_alertdialog_1_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_yanzhenjie_permission_1_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AndroidModuleDemo 2 | 3 | Android项目组件化示例代码 4 | 5 | **小而精组件化搭建 6 | **博客介绍地址:https://www.jianshu.com/p/81d2e0132a10 7 | -------------------------------------------------------------------------------- /andrew.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongxialiu/AndroidModuleDemo/22a537a483918312433f4caf59922d119fe4e770/andrew.jks -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | apply from: 'versions.gradle' 5 | addRepos(repositories) 6 | dependencies { 7 | /* classpath deps.android_gradle_plugin*/ 8 | classpath deps.android_gradle_plugin 9 | // NOTE: Do not place your application dependencies here; they belong 10 | // in the individual module build.gradle files 11 | } 12 | } 13 | 14 | allprojects { 15 | addRepos(repositories) 16 | // Android dependency 'com.android.support:design' has different version for the compile (25.3.1) and runtime (25.4.0) classpath. 17 | // You should manually set the same version via DependencyResolution 18 | subprojects { 19 | project.configurations.all { 20 | resolutionStrategy.eachDependency { details -> 21 | if (details.requested.group == 'com.android.support' 22 | && !details.requested.name.contains('multidex')) { 23 | details.useVersion "27.0.2" 24 | } 25 | } 26 | } 27 | } 28 | 29 | // 组件缓存更新时间设置(默认每次build都更新) 30 | configurations.all { 31 | resolutionStrategy.cacheChangingModulesFor 0, 'minutes' 32 | } 33 | } 34 | 35 | task clean(type: Delete) { 36 | delete rootProject.buildDir 37 | } -------------------------------------------------------------------------------- /bundle_app/.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # Intellij 36 | *.iml 37 | .idea/workspace.xml 38 | 39 | # Keystore files 40 | *.jks 41 | -------------------------------------------------------------------------------- /bundle_app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | 4 | def keystorePropertiesFile = rootProject.file("keystore.properties") 5 | def keystoreProperties = new Properties() 6 | 7 | static def buildTime() { 8 | return new Date().format("yyyyMMdd"); 9 | } 10 | 11 | android { 12 | signingConfigs { 13 | release { 14 | keyAlias "123456" 15 | keyPassword "123456" 16 | storeFile file("C:\\WorkSpace\\AndroidModuleDemo\\andrew.jks") 17 | storePassword "123456" 18 | } 19 | } 20 | 21 | compileSdkVersion build_versions.target_sdk 22 | defaultConfig { 23 | applicationId "com.andrew.module" 24 | minSdkVersion build_versions.min_sdk 25 | targetSdkVersion build_versions.target_sdk 26 | versionCode 1 27 | versionName "1.0" 28 | multiDexEnabled true 29 | //打包时间 30 | resValue "string", "build_time", buildTime() 31 | } 32 | 33 | 34 | compileOptions { 35 | sourceCompatibility JavaVersion.VERSION_1_8 36 | targetCompatibility JavaVersion.VERSION_1_8 37 | } 38 | 39 | buildTypes { 40 | release { 41 | //更改AndroidManifest.xml中预先定义好占位符信息 42 | //manifestPlaceholders = [app_icon: "@drawable/icon"] 43 | // 不显示Log 44 | buildConfigField "boolean", "LEO_DEBUG", "false" 45 | //是否zip对齐 46 | zipAlignEnabled true 47 | // 缩减resource文件 48 | shrinkResources true 49 | //Proguard 50 | minifyEnabled true 51 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 52 | //签名 53 | signingConfig signingConfigs.release 54 | } 55 | 56 | debug { 57 | //给applicationId添加后缀“.debug” 58 | applicationIdSuffix ".debug" 59 | //manifestPlaceholders = [app_icon: "@drawable/launch_beta"] 60 | buildConfigField "boolean", "LOG_DEBUG", "true" 61 | zipAlignEnabled false 62 | shrinkResources false 63 | minifyEnabled false 64 | debuggable true 65 | } 66 | } 67 | 68 | 69 | } 70 | 71 | dependencies { 72 | implementation fileTree(dir: 'libs', include: ['*.jar']) 73 | implementation deps.support.multidex 74 | implementation project(':bundle_platform') 75 | if (!isModule.toBoolean()) { 76 | implementation project(':bundle_main') 77 | implementation project(':bundle_school') 78 | implementation project(':bundle_business') 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /bundle_app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\SDK/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | #---------------------------------基本指令区---------------------------------- 19 | -ignorewarnings 20 | -dontusemixedcaseclassnames # 是否使用大小写混合 21 | -dontpreverify # 混淆时是否做预校验 22 | -verbose # 混淆时是否记录日志 23 | -printmapping proguardMapping.txt 24 | -optimizationpasses 5 # 指定代码的压缩级别 25 | -dontskipnonpubliclibraryclassmembers 26 | 27 | 28 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 29 | -keepattributes *Annotation*,InnerClasses 30 | -keepattributes Signature # 避免混淆泛型 31 | -keepattributes EnclosingMethod 32 | -keepattributes SourceFile,LineNumberTable #运行抛出异常时保留代码行号 33 | -keepattributes Exceptions # 解决AGPBI警告 34 | 35 | #继承自activity,application,service,broadcastReceiver,contentprovider....不进行混淆 36 | -keep public class * extends android.app.Activity 37 | -keep public class * extends android.app.Application 38 | -keep public class * extends android.support.multidex.MultiDexApplication 39 | -keep public class * extends android.app.Service 40 | -keep public class * extends android.content.BroadcastReceiver 41 | -keep public class * extends android.content.ContentProvider 42 | -keep public class * extends android.app.backup.BackupAgentHelper 43 | -keep public class * extends android.preference.Preference 44 | -keep public class * extends android.view.View 45 | -keep public class com.android.vending.licensing.ILicensingService 46 | -keep class android.support.** {*;} 47 | 48 | # 所有View的子类及其子类的get、set方法都不进行混淆 49 | -keep public class * extends android.view.View{ 50 | *** get*(); 51 | void set*(***); 52 | public (android.content.Context); 53 | public (android.content.Context, android.util.AttributeSet); 54 | public (android.content.Context, android.util.AttributeSet, int); 55 | } 56 | 57 | # 这个主要是在layout 中写的onclick方法android:onclick="onClick",不进行混淆 58 | -keepclassmembers class * extends android.app.Activity { 59 | public void *(android.view.View); 60 | } 61 | 62 | 63 | # 对于带有回调函数onXXEvent的,不能被混淆 64 | -keepclassmembers class * { 65 | void *(*Event); 66 | } 67 | 68 | # 枚举类不能被混淆 69 | -keepclassmembers enum * { 70 | public static **[] values(); 71 | public static ** valueOf(java.lang.String); 72 | } 73 | 74 | # natvie 方法不混淆 75 | -keepclasseswithmembernames class * { 76 | native ; 77 | } 78 | 79 | # 保持 Parcelable 不被混淆 80 | -keep class * implements android.os.Parcelable { 81 | public static final android.os.Parcelable$Creator *; 82 | } 83 | 84 | 85 | #不混淆Serializable接口的子类中指定的某些成员变量和方法 86 | -keepclassmembers class * implements java.io.Serializable { 87 | static final long serialVersionUID; 88 | private static final java.io.ObjectStreamField[] serialPersistentFields; 89 | !static !transient ; 90 | private void writeObject(java.io.ObjectOutputStream); 91 | private void readObject(java.io.ObjectInputStream); 92 | java.lang.Object writeReplace(); 93 | java.lang.Object readResolve(); 94 | } 95 | 96 | 97 | -keepclassmembers class * { 98 | public (org.json.JSONObject); 99 | } 100 | 101 | 102 | # 不混淆R类里及其所有内部static类中的所有static变量字段,$是用来分割内嵌类与其母体的标志 103 | -keep public class **.R$*{ 104 | public static final int *; 105 | } 106 | 107 | 108 | #(可选)避免Log打印输出 109 | -assumenosideeffects class android.util.Log { 110 | public static *** v(...); 111 | public static *** d(...); 112 | public static *** i(...); 113 | public static *** w(...); 114 | } 115 | 116 | #---------------------------------webview------------------------------------ 117 | -keepclassmembers class fqcn.of.javascript.interface.for.webview { 118 | public *; 119 | } 120 | -keepclassmembers class * extends android.webkit.webViewClient { 121 | public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap); 122 | public boolean *(android.webkit.WebView, java.lang.String); 123 | } 124 | 125 | #---------------------------------业务组件实体类--------------------------------- 126 | 127 | 128 | 129 | #---------------------------------第三方库及jar包------------------------------- 130 | 131 | #litepal数据库不能被混淆 132 | -keep class org.litepal.** {*;} 133 | -keep class * extends org.litepal.crud.DataSupport {*;} 134 | 135 | #Glide不能被混淆 136 | -keep public class * implements com.bumptech.glide.module.GlideModule 137 | -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** { 138 | **[] $VALUES; 139 | public *; 140 | } 141 | 142 | 143 | #PersistentCookieJar 144 | -dontwarn com.franmontiel.persistentcookiejar.** 145 | -keep class com.franmontiel.persistentcookiejar.** 146 | 147 | 148 | #activityrouter 149 | -keep class com.github.mzule.activityrouter.router.** { *; } 150 | 151 | #友盟统计 152 | -keep class com.umeng.analytics.** {*;} 153 | -dontwarn com.umeng.analytics.** 154 | #友盟推送 155 | -dontwarn com.taobao.** 156 | -dontwarn anet.channel.** 157 | -dontwarn anetwork.channel.** 158 | -dontwarn org.android.** 159 | -dontwarn org.apache.thrift.** 160 | -dontwarn com.xiaomi.** 161 | -dontwarn com.huawei.** 162 | -keep class com.taobao.** {*;} 163 | -keep class org.android.** {*;} 164 | -keep class anet.channel.** {*;} 165 | -keep class com.umeng.** {*;} 166 | -keep class com.xiaomi.** {*;} 167 | -keep class com.huawei.** {*;} 168 | -keep class org.apache.thrift.** {*;} 169 | -keep class com.alibaba.sdk.android.**{*;} 170 | -keep class com.ut.**{*;} 171 | -keep class com.ta.**{*;} 172 | 173 | 174 | #换肤框架的混淆文件 175 | -keep class solid.ren.skinlibrary.** {*;} 176 | -dontwarn solid.ren.skinlibrary.** 177 | 178 | 179 | #高德相关混淆文件 180 | #3D 地图 181 | -keep class com.amap.api.** {*;} 182 | -keep class com.autonavi.** {*;} 183 | -keep class com.a.a.** {*;} 184 | -keep class com.loc.** {*;} 185 | -dontwarn com.amap.api.** 186 | -dontwarn com.autonavi.** 187 | -dontwarn com.a.a.** 188 | -dontwarn com.loc.** 189 | 190 | 191 | # simple-xml-core的SDK 192 | -keep class org.simpleframework.xml.** {*;} 193 | -dontwarn org.simpleframework.xml.** 194 | 195 | 196 | # 网络请求库async-http 197 | -keep class com.loopj.android.http.** {*;} 198 | -dontwarn com.loopj.android.http.** 199 | 200 | 201 | #pinyin4j 202 | -dontwarn net.soureceforge.pinyin4j.** 203 | -dontwarn demo.** 204 | -keep class net.sourceforge.pinyin4j.** { *;} 205 | -keep class demo.** { *;} 206 | -keep class com.hp.** { *;} 207 | 208 | #httpclient (org.apache.http.legacy.jar) 209 | -dontwarn android.net.compatibility.** 210 | -dontwarn android.net.http.** 211 | -dontwarn com.android.internal.http.multipart.** 212 | -dontwarn org.apache.commons.** 213 | -dontwarn org.apache.http.** 214 | -dontwarn org.apache.http.protocol.** 215 | -keep class android.net.compatibility.**{*;} 216 | -keep class android.net.http.**{*;} 217 | -keep class com.android.internal.http.multipart.**{*;} 218 | -keep class org.apache.commons.**{*;} 219 | -keep class org.apache.org.**{*;} 220 | -keep class org.apache.harmony.**{*;} 221 | 222 | #图表库 223 | -keep class com.github.mikephil.charting.** {*;} 224 | -dontwarn com.github.mikephil.charting.** 225 | 226 | # 讯飞语音 227 | -keep class com.chinaMobile.** {*;} 228 | -keep class com.iflytek.** {*;} 229 | -keep class com.iflytek.sunflower.** {*;} 230 | -dontwarn com.iflytek.sunflower.** 231 | -dontwarn com.chinaMobile.** 232 | -dontwarn com.iflytek.** 233 | 234 | # greenDao混淆 235 | -keep class de.greenrobot.dao.** {*;} 236 | -keepclassmembers class * extends de.greenrobot.dao.AbstractDao { 237 | public static Java.lang.String TABLENAME; 238 | } 239 | -keep class **$Properties 240 | 241 | # gson 242 | -keep class com.google.gson.** {*;} 243 | -keep class com.google.**{*;} 244 | -keep class sun.misc.Unsafe { *; } 245 | -keep class com.google.gson.stream.** { *; } 246 | -keep class com.google.gson.examples.android.model.** { *; } 247 | 248 | # zxing 249 | -keep class com.google.zxing.** {*;} 250 | -dontwarn com.google.zxing.** 251 | 252 | ##百度定位 253 | -keep class com.baidu.** {*;} 254 | -keep class vi.com.** {*;} 255 | -dontwarn com.baidu.** 256 | 257 | ## okhttp 258 | -dontwarn com.squareup.okhttp.** 259 | -keep class com.squareup.okhttp.{*;} 260 | 261 | #okhttp3.x 262 | -dontwarn com.squareup.okhttp3.** 263 | -keep class com.squareup.okhttp3.** { *;} 264 | -dontwarn okio.** 265 | 266 | #retrofit 267 | -dontwarn retrofit.** 268 | -keep class retrofit.** { *; } 269 | -dontwarn okio.** 270 | 271 | 272 | #recyclerview-animators 273 | -keep class jp.wasabeef.** {*;} 274 | -dontwarn jp.wasabeef.* 275 | 276 | #multistateview 277 | -keep class com.kennyc.view.** { *; } 278 | -dontwarn com.kennyc.view.* 279 | 280 | # universal-image-loader 混淆 281 | -dontwarn com.nostra13.universalimageloader.** 282 | -keep class com.nostra13.universalimageloader.** { *; } 283 | 284 | 285 | #-ButterKnife 7.0 286 | -keep class butterknife.** { *; } 287 | -dontwarn butterknife.internal.** 288 | -keep class **$$ViewBinder { *; } 289 | -keepclasseswithmembernames class * { 290 | @butterknife.* ; 291 | } 292 | -keepclasseswithmembernames class * { 293 | @butterknife.* ; 294 | } 295 | 296 | #eventbus 3.0 297 | -keepattributes *Annotation* 298 | -keepclassmembers class ** { 299 | @org.greenrobot.eventbus.Subscribe ; 300 | } 301 | -keep enum org.greenrobot.eventbus.ThreadMode { *; } 302 | -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent { 303 | (java.lang.Throwable); 304 | } 305 | 306 | #EventBus 307 | -keepclassmembers class ** { 308 | public void onEvent*(**); 309 | } 310 | -keepclassmembers class ** { 311 | public void xxxxxx(**); 312 | } 313 | 314 | # support-v4 315 | -dontwarn android.support.v4.** 316 | -keep class android.support.v4.app.** { *; } 317 | -keep interface android.support.v4.app.** { *; } 318 | -keep class android.support.v4.** { *; } 319 | 320 | 321 | # support-v7 322 | -dontwarn android.support.v7.** 323 | -keep class android.support.v7.internal.** { *; } 324 | -keep interface android.support.v7.internal.** { *; } 325 | -keep class android.support.v7.** { *; } 326 | 327 | # support design 328 | -dontwarn android.support.design.** 329 | -keep class android.support.design.** { *; } 330 | -keep interface android.support.design.** { *; } 331 | -keep public class android.support.design.R$* { *; } 332 | -------------------------------------------------------------------------------- /bundle_app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1},"path":"bundle_app-release.apk","properties":{"packageId":"com.andrew.module","split":"","minSdkVersion":"16"}}] -------------------------------------------------------------------------------- /bundle_app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /bundle_app/src/main/java/com/andrew/module/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.andrew.module; 2 | 3 | import android.content.Context; 4 | import android.support.multidex.MultiDex; 5 | 6 | import com.alibaba.android.arouter.launcher.ARouter; 7 | import com.andrew.module.common.base.BaseApplication; 8 | import com.andrew.module.common.utils.Utils; 9 | 10 | /** 11 | * 初始化 12 | * 13 | * @author Andrew 14 | * @name MyApplication 15 | */ 16 | public class MyApplication extends BaseApplication { 17 | 18 | 19 | @Override 20 | public void onCreate() { 21 | super.onCreate(); 22 | if (Utils.isAppDebug()) { 23 | //开启InstantRun之后,一定要在ARouter.init之前调用openDebug 24 | ARouter.openDebug(); 25 | ARouter.openLog(); 26 | } 27 | ARouter.init(this); 28 | } 29 | 30 | 31 | @Override 32 | protected void attachBaseContext(Context base) { 33 | super.attachBaseContext(base); 34 | // dex突破65535的限制 35 | MultiDex.install(this); 36 | } 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /bundle_app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 组件化项目 3 | 4 | module 5 | 6 | 7 | -------------------------------------------------------------------------------- /bundle_business/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /bundle_business/arouter.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Business模块ARouter实例映射表", 3 | "mapList": [ 4 | { 5 | "activityName": "BusinessCenterActivity", 6 | "routeName": "/business/BusinessCenterActivity", 7 | "description": "生意中心页", 8 | "params": null 9 | }, 10 | { 11 | "activityName": "BusinessFragment", 12 | "routeName": "/bundle_business/BusinessFragment", 13 | "description": "生意主页fragment", 14 | "params": null 15 | }, 16 | 17 | { 18 | "activityName": "TestActivity", 19 | "routeName": "/bundle_test/TestActivity", 20 | "description": "测试主页", 21 | "params": [ 22 | { 23 | "name": "username", 24 | "desc": "手机号", 25 | "type": "String" 26 | } 27 | ] 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /bundle_business/build.gradle: -------------------------------------------------------------------------------- 1 | apply from: rootProject.file('script/library_work.gradle') -------------------------------------------------------------------------------- /bundle_business/bundle_business.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /bundle_business/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /bundle_business/src/main/java/com/andrew/module/business/BusinessCenterActivity.java: -------------------------------------------------------------------------------- 1 | package com.andrew.module.business; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | import android.widget.Toast; 6 | 7 | import com.alibaba.android.arouter.facade.annotation.Route; 8 | import com.alibaba.android.arouter.launcher.ARouter; 9 | import com.andrew.module.common.base.BaseActivity; 10 | import com.andrew.module.common.iservices.ISchoolModuleService; 11 | 12 | /** 13 | * 14 | * @author Andrew 15 | * @name BusinessCenterActivity 16 | */ 17 | @Route(path = "/business/BusinessCenterActivity") 18 | public class BusinessCenterActivity extends BaseActivity { 19 | 20 | 21 | @Override 22 | protected void onCreate(Bundle savedInstanceState) { 23 | super.onCreate(savedInstanceState); 24 | super.setContentView(R.layout.activity_business_center); 25 | ARouter.getInstance().inject(this); 26 | findViewById(R.id.button).setOnClickListener(new View.OnClickListener() { 27 | @Override 28 | public void onClick(View view) { 29 | ISchoolModuleService moduleService = ARouter.getInstance().navigation(ISchoolModuleService.class); 30 | String content = moduleService.sayHello("我是生意过来的"); 31 | Toast.makeText(BusinessCenterActivity.this, content, Toast.LENGTH_SHORT).show(); 32 | 33 | } 34 | }); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /bundle_business/src/main/java/com/andrew/module/business/BusinessFragment.java: -------------------------------------------------------------------------------- 1 | package com.andrew.module.business; 2 | 3 | 4 | import android.os.Bundle; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | 9 | import com.alibaba.android.arouter.facade.annotation.Route; 10 | import com.andrew.module.common.base.BaseFragment; 11 | 12 | 13 | /** 14 | * 生意fragment 15 | */ 16 | @Route(path = "/bundle_business/BusinessFragment") 17 | public class BusinessFragment extends BaseFragment { 18 | 19 | 20 | public static BusinessFragment newInstance() { 21 | return new BusinessFragment(); 22 | } 23 | 24 | 25 | 26 | public BusinessFragment() { 27 | } 28 | 29 | 30 | @Override 31 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 32 | Bundle savedInstanceState) { 33 | return inflater.inflate(R.layout.fragment_business, container, false); 34 | } 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /bundle_business/src/main/java/com/andrew/module/business/been/Data.java: -------------------------------------------------------------------------------- 1 | package com.andrew.module.business.been; 2 | 3 | /** 4 | * Created by liuhongxia on 2018/5/13. 5 | */ 6 | 7 | public class Data { 8 | } 9 | -------------------------------------------------------------------------------- /bundle_business/src/main/java/debug/BusinessApplication.java: -------------------------------------------------------------------------------- 1 | package debug; 2 | 3 | import com.andrew.module.common.base.BaseApplication; 4 | 5 | /** 6 | * 7 | * @author Andrew 8 | * @name BusinessApplication 9 | */ 10 | public class BusinessApplication extends BaseApplication { 11 | 12 | @Override 13 | public void onCreate() { 14 | super.onCreate(); 15 | login(); 16 | } 17 | 18 | 19 | /** 20 | * 在这里模拟登陆,然后拿到sessionId或者Token 21 | * 这样就能够在组件请求接口了 22 | */ 23 | private void login() { 24 | // HttpClient client = new HttpClient.Builder() 25 | // .baseUrl("http://www.baidu.com") 26 | // .url("458412") 27 | // .bodyType(DataType.JSON_OBJECT, Data.class) 28 | // .build(); 29 | // client.get(new OnResultListener() { 30 | // 31 | // @Override 32 | // public void onSuccess(Data result) { 33 | // Logger.e(result.toString()); 34 | // } 35 | // 36 | // @Override 37 | // public void onError(int code, String message) { 38 | // Logger.e(message); 39 | // } 40 | // 41 | // @Override 42 | // public void onFailure(String message) { 43 | // Logger.e(message); 44 | // } 45 | // }); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /bundle_business/src/main/java/debug/LauncherActivity.java: -------------------------------------------------------------------------------- 1 | package debug; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | 7 | import com.andrew.module.business.BusinessCenterActivity; 8 | 9 | /** 10 | * 组件开发模式下,用于传递数据的启动Activity,集成模式下无效< 11 | * 12 | * @author Andrew 13 | * @name LauncherActivity 14 | */ 15 | public class LauncherActivity extends AppCompatActivity { 16 | 17 | @Override 18 | protected void onCreate(Bundle savedInstanceState) { 19 | super.onCreate(savedInstanceState); 20 | //在这里传值给需要调试的Activity 21 | Intent intent = new Intent(this, BusinessCenterActivity.class); 22 | intent.putExtra("id", "123456"); 23 | startActivity(intent); 24 | finish(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /bundle_business/src/main/module/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /bundle_business/src/main/res/layout/activity_business_center.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | > 8 | 9 | 13 |