Full Code of JessYanCoding/MVPArms for AI

master 8adc86be91ea cached
163 files
536.1 KB
139.4k tokens
974 symbols
1 requests
Download .txt
Showing preview only (587K chars total). Download the full file or copy to clipboard to get everything.
Repository: JessYanCoding/MVPArms
Branch: master
Commit: 8adc86be91ea
Files: 163
Total size: 536.1 KB

Directory structure:
gitextract_p0iu70qk/

├── .github/
│   └── ISSUE_TEMPLATE.md
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CONTRIBUTING_APP.md
├── LICENSE
├── MVPArms.md
├── MVP_generator_solution
├── README.md
├── arms/
│   ├── .gitignore
│   ├── build.gradle
│   ├── gradle.properties
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── jess/
│           │           └── arms/
│           │               ├── base/
│           │               │   ├── AdapterViewPager.java
│           │               │   ├── App.java
│           │               │   ├── BaseActivity.java
│           │               │   ├── BaseApplication.java
│           │               │   ├── BaseFragment.java
│           │               │   ├── BaseHolder.java
│           │               │   ├── BaseLazyLoadFragment.java
│           │               │   ├── BaseService.java
│           │               │   ├── DefaultAdapter.java
│           │               │   ├── Platform.java
│           │               │   ├── Unused.java
│           │               │   └── delegate/
│           │               │       ├── ActivityDelegate.java
│           │               │       ├── ActivityDelegateImpl.java
│           │               │       ├── AppDelegate.java
│           │               │       ├── AppLifecycles.java
│           │               │       ├── FragmentDelegate.java
│           │               │       ├── FragmentDelegateImpl.java
│           │               │       ├── IActivity.java
│           │               │       └── IFragment.java
│           │               ├── di/
│           │               │   ├── component/
│           │               │   │   └── AppComponent.java
│           │               │   ├── module/
│           │               │   │   ├── AppModule.java
│           │               │   │   ├── ClientModule.java
│           │               │   │   └── GlobalConfigModule.java
│           │               │   └── scope/
│           │               │       ├── ActivityScope.java
│           │               │       └── FragmentScope.java
│           │               ├── http/
│           │               │   ├── BaseUrl.java
│           │               │   ├── GlobalHttpHandler.java
│           │               │   ├── OkHttpStreamFetcher.java
│           │               │   ├── OkHttpUrlLoader.java
│           │               │   ├── imageloader/
│           │               │   │   ├── BaseImageLoaderStrategy.java
│           │               │   │   ├── ImageConfig.java
│           │               │   │   ├── ImageLoader.java
│           │               │   │   └── glide/
│           │               │   │       ├── GlideAppliesOptions.java
│           │               │   │       └── GlideConfiguration.java
│           │               │   └── log/
│           │               │       ├── DefaultFormatPrinter.java
│           │               │       ├── FormatPrinter.java
│           │               │       └── RequestInterceptor.java
│           │               ├── integration/
│           │               │   ├── ActivityLifecycle.java
│           │               │   ├── AppManager.java
│           │               │   ├── ConfigModule.java
│           │               │   ├── EventBusManager.java
│           │               │   ├── FragmentLifecycle.java
│           │               │   ├── IRepositoryManager.java
│           │               │   ├── ManifestParser.java
│           │               │   ├── RepositoryManager.java
│           │               │   ├── RetrofitServiceProxyHandler.java
│           │               │   ├── cache/
│           │               │   │   ├── Cache.java
│           │               │   │   ├── CacheType.java
│           │               │   │   ├── IntelligentCache.java
│           │               │   │   └── LruCache.java
│           │               │   └── lifecycle/
│           │               │       ├── ActivityLifecycleForRxLifecycle.java
│           │               │       ├── ActivityLifecycleable.java
│           │               │       ├── FragmentLifecycleForRxLifecycle.java
│           │               │       ├── FragmentLifecycleable.java
│           │               │       └── Lifecycleable.java
│           │               ├── mvp/
│           │               │   ├── BaseModel.java
│           │               │   ├── BasePresenter.java
│           │               │   ├── IModel.java
│           │               │   ├── IPresenter.java
│           │               │   └── IView.java
│           │               ├── utils/
│           │               │   ├── ArmsUtils.java
│           │               │   ├── CharacterHandler.java
│           │               │   ├── DataHelper.java
│           │               │   ├── DeviceUtils.java
│           │               │   ├── DrawableProvider.java
│           │               │   ├── FastBlur.java
│           │               │   ├── LogUtils.java
│           │               │   ├── PermissionUtil.java
│           │               │   ├── Preconditions.java
│           │               │   ├── RxLifecycleUtils.java
│           │               │   ├── ThirdViewUtil.java
│           │               │   ├── UrlEncoderUtils.java
│           │               │   └── ZipHelper.java
│           │               └── widget/
│           │                   └── CustomPopupWindow.java
│           └── res/
│               └── values/
│                   └── strings.xml
├── arms-autolayout/
│   ├── .gitignore
│   ├── build.gradle
│   ├── gradle.properties
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── jess/
│           │           └── arms/
│           │               └── widget/
│           │                   └── autolayout/
│           │                       ├── AutoAppBarLayout.java
│           │                       ├── AutoCardView.java
│           │                       ├── AutoCollapsingToolbarLayout.java
│           │                       ├── AutoRadioGroup.java
│           │                       ├── AutoScrollView.java
│           │                       ├── AutoTabLayout.java
│           │                       └── AutoToolbar.java
│           └── res/
│               └── values/
│                   ├── attrs.xml
│                   └── strings.xml
├── arms-imageloader-glide/
│   ├── .gitignore
│   ├── build.gradle
│   ├── gradle.properties
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── jess/
│           │           └── arms/
│           │               └── http/
│           │                   └── imageloader/
│           │                       └── glide/
│           │                           ├── BlurTransformation.java
│           │                           ├── CacheStrategy.java
│           │                           ├── GlideImageLoaderStrategy.java
│           │                           └── ImageConfigImpl.java
│           └── res/
│               └── values/
│                   └── strings.xml
├── bintray.gradle
├── build.gradle
├── config.gradle
├── demo/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       ├── androidTest/
│       │   └── java/
│       │       └── me/
│       │           └── jessyan/
│       │               └── mvparms/
│       │                   └── demo/
│       │                       └── ApplicationTest.java
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── java/
│       │   │   └── me/
│       │   │       └── jessyan/
│       │   │           └── mvparms/
│       │   │               └── demo/
│       │   │                   ├── app/
│       │   │                   │   ├── ActivityLifecycleCallbacksImpl.java
│       │   │                   │   ├── AppLifecyclesImpl.java
│       │   │                   │   ├── EventBusTags.java
│       │   │                   │   ├── FragmentLifecycleCallbacksImpl.java
│       │   │                   │   ├── GlobalConfiguration.java
│       │   │                   │   ├── GlobalHttpHandlerImpl.java
│       │   │                   │   ├── ResponseErrorListenerImpl.java
│       │   │                   │   ├── service/
│       │   │                   │   │   └── DemoService.java
│       │   │                   │   └── utils/
│       │   │                   │       └── RxUtils.java
│       │   │                   ├── di/
│       │   │                   │   ├── component/
│       │   │                   │   │   └── UserComponent.java
│       │   │                   │   └── module/
│       │   │                   │       └── UserModule.java
│       │   │                   └── mvp/
│       │   │                       ├── contract/
│       │   │                       │   └── UserContract.java
│       │   │                       ├── model/
│       │   │                       │   ├── UserModel.java
│       │   │                       │   ├── api/
│       │   │                       │   │   ├── Api.java
│       │   │                       │   │   ├── cache/
│       │   │                       │   │   │   └── CommonCache.java
│       │   │                       │   │   └── service/
│       │   │                       │   │       ├── CommonService.java
│       │   │                       │   │       └── UserService.java
│       │   │                       │   └── entity/
│       │   │                       │       ├── BaseResponse.java
│       │   │                       │       └── User.java
│       │   │                       ├── presenter/
│       │   │                       │   └── UserPresenter.java
│       │   │                       └── ui/
│       │   │                           ├── activity/
│       │   │                           │   └── UserActivity.java
│       │   │                           ├── adapter/
│       │   │                           │   └── UserAdapter.java
│       │   │                           └── holder/
│       │   │                               └── UserItemHolder.java
│       │   └── res/
│       │       ├── anim/
│       │       │   ├── translate_center_to_left.xml
│       │       │   ├── translate_center_to_right.xml
│       │       │   ├── translate_left_to_center.xml
│       │       │   └── translate_right_to_center.xml
│       │       ├── layout/
│       │       │   ├── activity_user.xml
│       │       │   ├── include_title.xml
│       │       │   └── recycle_list.xml
│       │       └── values/
│       │           ├── colors.xml
│       │           ├── strings.xml
│       │           └── styles.xml
│       └── test/
│           └── java/
│               └── me/
│                   └── jessyan/
│                       └── mvparms/
│                           └── demo/
│                               └── ExampleUnitTest.java
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
## Look at here

- → Did you conform to the [Rules](https://github.com/JessYanCoding/MVPArms/issues/150)?
- → Did you read the [Wiki](https://github.com/JessYanCoding/MVPArms/wiki) **Carefully**?
- → Did you search in Google?
- → Did you search in openned&closed Issues?
- → **Receive only bugs and suggestions**

### Environment

- [x] MVPArms Version: <!-- like: v2.3.1 -->
- [x] AndroidStudio Version: <!-- like: v3.0.0 -->
- [x] Gradle Plugin Version: <!-- like: v3.0.0 -->
- [x] Target Android Version: <!-- like: Android 5.0 -->
- [x] Device Model: <!-- like: Nexus 6 -->


### Bug Description:
<!-- 不接受框架之外的任何问题, 比如说 Retrofit 怎么使用, 不接受基础的问题以及 Google 或者百度能搜索到的问题, 比如说 Gradle 怎么下载不了三方库, 不接受已经回答过的 issues, 比如说 DaggerAppComponent, DaggerUserComponent 文件怎么不存在, 提问前最好先看下 https://github.com/JessYanCoding/MVPArms/issues/150, 当发现此 issues 不符合要求, 会在未被告知的情况下直接被 close!-->


### Related Code:
```java
  

```

### Bug Log:
```log


```

### Others:


================================================
FILE: .gitignore
================================================
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
*.iml
.idea

# Keystore files
*.jks

# MacOS
.DS_Store


================================================
FILE: .travis.yml
================================================
language: android
jdk: oraclejdk8
before_install:
  - yes | sdkmanager "platforms;android-28"

env:
  global:
    - ANDROID_API_LEVEL=28
    - ANDROID_BUILD_TOOLS_VERSION=28.0.3
    - TRAVIS_SECURE_ENV_VARS=true

android:
  components:
    # The BuildTools version used by your project
    - tools
    - platform-tools
    - build-tools-$ANDROID_BUILD_TOOLS_VERSION
    - extra-android-m2repository
    - extra-google-android-support

    # The SDK version used to compile your project
    - android-$ANDROID_API_LEVEL
  licenses:
    - '.+'

script:
  - ./gradlew clean
  #    - ./gradlew install
  #    - ./gradlew bintrayUpload
  - ./gradlew assembleDebug

================================================
FILE: CHANGELOG.md
================================================
[UpdateLog](https://github.com/JessYanCoding/MVPArms/wiki/UpdateLog)

================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
  address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting jess.yan.effort@gmail.com. All complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing
If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request targeting the branch `master`.

When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible.

## License

By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/JessYanCoding/MVPArms/blob/master/LICENSE

All files are released with the Apache 2.0 license.

If you are adding a new file it should have a header like this:

```
/*
 * Copyright 2018 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 ```

================================================
FILE: CONTRIBUTING_APP.md
================================================
**如果您使用或基于 MVPArms 开发过开源的 APP 或者 Framework, 恳请您将项目地址 [Pull Request](https://github.com/JessYanCoding/MVPArms/pull/new/master) 到这个页面, 方便更多人学习的同时, 也能为您的开源项目引入更多的流量, 也衷心的希望大家在学习 MVPArms 获得自我提升的同时, 也能帮助其他朋友更快的成长, 将开源精神传递下去!**

**同时您也可以给自己的开源项目打上 mvparms 的标签,这样大家就能在 [Topics](https://github.com/topics/mvparms) 中找到您的开源项目**

> **Tips: 以下项目并不能百分百保证完全按照框架的正规流程和正确配置, 大家可以作为参考, 但主要还是以官方 Demo 为准**

<!-- 格式为: [**项目名字** : 项目描述](项目地址) -->
### App
#### Kotlin
* [**养眼** : 这是一个基于 **MVPArms** 使用 **kotlin** 开发的 **看图 App** (**程序媛建议路过**) ](https://github.com/miaoMiaoDaShi/YangYanNew)
* [**NoblesSpiritsKotlin** : 这是一个基于 **MVPArms** 使用 **kotlin** 开发的 **Mall App**](https://github.com/haife/NoblesSpiritsKotlin)

#### Java
* [**Hands-Chopping** : 这是一个基于 **MVPArms + ArmsComponent** 开发的包含 **Steam** 和 **杉果** 的组件化客户端](https://github.com/noterpopo/Hands-Chopping)
* [**YeLearns** : 这是一个基于 **MVPArms** 开发的包含 **玩安卓、DIYcode、干货、微信资讯、游明星空** 等多个模块的客户端](https://github.com/yeyueduxing/YeLearns)
* [**LQRBiliBlili** : 这是一个基于 **MVPArms** 开发的高仿 **bilibili** 安卓客户端 (**!!!请注意, 此项目在 GlobalConfiguration 中的部分配置是不正确的, 特别是对 Retrofit 的配置, 如非特殊需求, 请不要再一次给 Retrofit 设置新的 OkHttpClient, 框架内部已提供有 OkHttpClient, 请以官方 Demo 为准**)](https://github.com/GitLqr/LQRBiliBlili)
* [**DiyCode** : 这是一个基于 **MVPArms** 开发的 **DiyCode** 社区客户端](https://github.com/linsneider/DiyCodeAndroid)
* [**Ganamrs** : 这是一个基于 **MVPArms** 开发的 **Gank** 开源客户端](https://github.com/lianhuo/Ganamrs)
* [**P2P** : 这是一个基于 **MVPArms** 开发的 **金融** 客户端](https://github.com/Everglowzz/P2P)
* [**ZackShop** : 这是一个基于 **MVPArms** 开发的 **仿京东** 客户端](https://github.com/zhangqian666/shop-front-android)

### Framework
* [**MVPFrames** : 这个项目是将 **MVPArms** 框架和 **MVPArt** 框架合并成一个通用型项目, 并增加了数据库](https://github.com/DesignQu/MVPFrames)
* [**MVVMArms** : Android MVVM Architecture Components based on **MVPArms** and **Android Architecture Components**.](https://github.com/xiaobailong24/MVVMArms)
* [**smartframework-android-atlas** : 这是一个将 **MVPArms** 框架和 **Atlas** 框架相结合的组件化 **MVP** 框架](https://github.com/smarthane/smartframework-android-atlas)
* [**smartframework-android** : 这是一个将 **MVPArms** 框架和 **VirtualAPK** 框架相结合的插件化 **MVP** 框架](https://github.com/smarthane/smartframework-android)
* [**Atoms-mvp** : 这是一个参考 **MVPArms** 框架, 将自己对框架的理解相结合的 **MVP** 框架](https://github.com/xwc520/Atoms-mvp)



================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "{}"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright {yyyy} {name of copyright owner}

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


================================================
FILE: MVPArms.md
================================================
![Logo](image/arms_banner_v1.0.jpg)
![Official](image/official.jpeg)

<p align="center">
   <a href="https://bintray.com/jessyancoding/maven/MVPArms/_latestVersion">
    <img src="https://img.shields.io/badge/Jcenter-v2.5.2-brightgreen.svg?style=flat-square" alt="Latest Stable Version" />
  </a>
  <a href="https://travis-ci.org/JessYanCoding/MVPArms">
    <img src="https://travis-ci.org/JessYanCoding/MVPArms.svg?branch=master" alt="Build Status" />
  </a>
  <a href="https://developer.android.com/about/versions/android-4.0.html">
    <img src="https://img.shields.io/badge/API-14%2B-blue.svg?style=flat-square" alt="Min Sdk Version" />
  </a>
  <a href="http://www.apache.org/licenses/LICENSE-2.0">
    <img src="http://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square" alt="License" />
  </a>
  <a href="https://www.jianshu.com/u/1d0c0bc634db">
    <img src="https://img.shields.io/badge/Author-JessYan-orange.svg?style=flat-square" alt="Author" />
  </a>
  <a href="https://shang.qq.com/wpa/qunwpa?idkey=7e59e59145e6c7c68932ace10f52790636451f01d1ecadb6a652b1df234df753">
    <img src="https://img.shields.io/badge/QQ%E7%BE%A4-455850365%20%7C%20301733278-orange.svg?style=flat-square" alt="QQ Group" />
  </a>
</p>

<h2 align="center">一个整合了大量主流开源项目高度可配置化的 Android MVP 快速集成框架</h2>

## Usage
> New Project (**以下步骤太麻烦? 现在可直接在新建的新工程中使用新功能 [一键生成 app Module](https://github.com/JessYanCoding/MVPArms-Module-Template), 让您免于项目繁琐的配置,快速开启 MVPArms 的世界**)
>> 如果您想构建一个全新的项目,直接将整个项目 **clone** (或者下载) 下来,再将 **demo** 作为主 **Module** (建议将 **arms Module** 删除,并使用 **Gradle** [远程依赖](https://github.com/JessYanCoding/MVPArms/wiki#1.1) 本框架,便于更新,删除前请务必先查看 [这里](https://github.com/JessYanCoding/MVPArms/wiki/Issues#2)),最后将项目包名改成自己的包名,**demo Module** 包含可以直接使用的包结构,一个主流的 `MVP`+`Dagger2`+`Retrofit`+`RxJava` 框架就这样轻松的构建成功了,现在您再参考 **Mvp** 包下的 **UserActivity** 的格式,[使用 Template 一键生成 MVP、Dagger2 相关的所有类](https://github.com/JessYanCoding/MVPArmsTemplate),配合查阅 [Wiki 文档](https://github.com/JessYanCoding/MVPArms/wiki) 慢慢掌握本框架,看再多文章不如早点在项目中使用它,在实践中学习总是最快的
 
> Old Project
>> [老项目想引入此框架,可以参考 Wiki 文档,写的非常详细](https://github.com/JessYanCoding/MVPArms/wiki)

## Wiki
[详细使用方法及扩展功能,请参照 Wiki (**开发前必看!!!**)](https://github.com/JessYanCoding/MVPArms/wiki)

## Notice

* [**MVPArms 官方组件化方案 ArmsComponent**](https://github.com/JessYanCoding/ArmsComponent/wiki)

* [MVPArms 学习项目](https://github.com/JessYanCoding/MVPArms/blob/master/CONTRIBUTING_APP.md)

* [意见收集](https://github.com/JessYanCoding/MVPArms/issues/40)

* [更新日志](https://github.com/JessYanCoding/MVPArms/wiki/UpdateLog)

* [常见 Issues](https://github.com/JessYanCoding/MVPArms/wiki/Issues)

* [我们为什么要把 Dagger2,MVP 以及 RxJava 引入项目中?](http://www.jianshu.com/p/91c2bb8e6369)

* 看了上面的文章,对为什么使用这些技术应该比较了解了,使用这些技术对项目后期的维护和迭代特别是大型项目非常有帮助,但是在开发前期每写一个页面要多写很多  `MVP`、`Dagger2` 的类和接口,这对于开发前期确实比较头疼,现在本框架已经可以通过 [Template](https://github.com/JessYanCoding/MVPArmsTemplate) 自动生成一些 `MVP`,`Dagger2` 的模版代码,现在大家可以非常轻松的使用本框架.

* 使用此框架自带自动屏幕适配功能 (可不使用),请参考 [AndroidAutoSize 使用方法](https://github.com/JessYanCoding/AndroidAutoSize).

* 作为通用框架,本框架不提供与 **UI** 有关的任何第三方库.

## Functionality & Libraries
1. [`Mvp` 是 Google 官方出品的 `Mvp` 架构项目,含有多个不同的架构分支(此为 Dagger 分支).](https://github.com/googlesamples/android-architecture/tree/todo-mvp-dagger/)
2. [`Dagger2` 是 Google 根据 Square 的 Dagger1 出品的依赖注入框架,通过 Apt 编译时生成代码,性能优于使用运行时反射技术的依赖注入框架.](https://github.com/google/dagger)
3. [`RxJava` 提供优雅的响应式 API 解决异步请求以及事件处理.](https://github.com/ReactiveX/RxJava)
4. [`RxAndroid` 为 Android 提供响应式 API.](https://github.com/ReactiveX/RxAndroid)
5. [`Rxlifecycle`,在 Android 上使用 `RxJava` 都知道的一个坑,就是生命周期的解除订阅,这个框架通过绑定 Activity 和 Fragment 的生命周期完美解决该问题.](https://github.com/trello/RxLifecycle)
6. [`RxCache` 是使用注解,为 `Retrofit` 加入二级缓存 (内存,磁盘) 的缓存库.](https://github.com/VictorAlbertos/RxCache)
7. [`RxErroHandler` 是 `RxJava` 的错误处理库,可在出现错误后重试.](https://github.com/JessYanCoding/RxErrorHandler)
8. [`RxPermissions` 用于处理 Android 运行时权限的响应式库.](https://github.com/tbruyelle/RxPermissions)
9. [`Retrofit` 是 Square 出品的网络请求库,极大的减少了 Http 请求的代码和步骤.](https://github.com/square/retrofit)
10. [`Okhttp` 同样 Square 出品,不多介绍,做 Android 的都应该知道.](https://github.com/square/okhttp)
11. [`AndroidAutoSize` 是今日头条屏幕适配方案终极版,一个极低成本的 Android 屏幕适配方案,该库没有引入到 `Arms`,所以框架使用者可自由选择屏幕适配方案.](https://github.com/JessYanCoding/AndroidAutoSize)
12. [`Gson` 是 Google 官方的 Json Convert 框架.](https://github.com/google/gson)
13. [`Butterknife` 是 JakeWharton 大神出品的 View 注入框架.](https://github.com/JakeWharton/butterknife)
14. [`AndroidEventBus` 是一个轻量级的 EventBus,该库没有引入到 `Arms`,所以框架使用者可自由选择 EventBus.](https://github.com/hehonghui/AndroidEventBus)
15. [`Timber` 是 JakeWharton 大神出品的 Log 框架容器,内部代码极少,但是思想非常不错.](https://github.com/JakeWharton/timber)
16. [`Glide` 是本框架默认封装到扩展库 `arms-imageloader-glide` 中的图片加载库,可参照着 Wiki 更改为其他的图片加载库,`Glide` 的 API 和 `Picasso` 差不多,缓存机制比 `Picasso` 复杂,速度快,适合处理大型图片流,支持 gif 图片,`Fresco` 太大了!在 5.0 以下优势很大,5.0 以上系统默认使用的内存管理和 `Fresco` 类似.](https://github.com/bumptech/glide)
17. [`LeakCanary` 是 Square 出品的专门用来检测 `Android` 和 `Java` 的内存泄漏,并通过通知栏提示内存泄漏信息.](https://github.com/square/leakcanary)

## Who is using MVPArms?

**MVPArms** 从诞生之初, 一直真诚的为开发者做着力所能及的事, 从详细的 [**Wiki**文档](https://github.com/JessYanCoding/MVPArms/wiki) 到高效的 [代码生成器](https://github.com/JessYanCoding/MVPArmsTemplate), 无一不透露着 **MVPArms** 对开发者诚挚的付出和关怀

**MVPArms** 经过近两年时间殷勤的耕耘, 逐渐变得成熟, 稳定, 这不得不归功于 **MVPArms** 大家庭中每一位成员一直以来真诚的反馈和建议, 在此由衷的感谢他们为 **MVPArms** 做出的不可磨灭的贡献  

但是 **MVPArms** 远不止于此, 还有更多的路要走, 还会继续成长, 变得更加强大, 现在我们诚挚的邀请您也成为咱们 **MVPArms** 大家庭中的一员  

**天府通** | **小顶家装 工长端** | **小顶家装 工人端** | **小顶家装 材料端** | **小顶网** |
:-------------------------------------------------------------------:|:----------:|:---------------:|:--------:|:--------------:|
[<img src="image/tianfutong_logo.png" width="80" height="80">](https://android.myapp.com/myapp/detail.htm?apkName=com.chinarainbow.tft) | [<img src="image/xiaoding_foreman_logo.png" width="80" height="80">](http://www.dggxdjz.com) | [<img src="image/xiaoding_worker_logo.png" width="80" height="80">](http://www.dggxdjz.com) | [<img src="image/xiaoding_material_logo.png" width="80" height="80">](http://www.dggxdjz.com) | [<img src="image/top_net_work_logo.png" width="80" height="80">](http://www.dgg.net/appload.htm) |
**天天视频** | **天天直播** | **中斗通航** | **中斗祥云** | **麋鹿旅行** |
[<img src="image/tiantian_video_logo.png" width="80" height="80">](http://sj.qq.com/myapp/detail.htm?apkName=com.dzwh.ttys) | [<img src="image/tiantian_live_logo.png" width="80" height="80">](http://www.25pp.com/android/detail_7611392/) | [<img src="image/tong_hang_logo.png" width="80" height="80">](https://fir.im/3176) | <img src="image/xiang_yun_logo.png" width="80" height="80">  | [<img src="image/mi_lu_logo.png" width="80" height="80">](http://android.myapp.com/myapp/detail.htm?apkName=com.elk.tourist) |
**汇财富** | **觅窝** | **晒墨宝** | **智播**  | **(Your App ...)** |
[<img src="image/hui_cai_fu_logo.png" width="80" height="80">](http://android.myapp.com/myapp/detail.htm?apkName=com.tahone.client) | [<img src="image/mi_wo_logo.png" width="80" height="80">](http://miwo.ai/) | [<img src="image/shaimobao_logo.png" width="80" height="80">](http://sj.qq.com/myapp/search.htm?kw=%E6%99%92%E5%A2%A8%E5%AE%9D)  | [<img src="image/zhibo_logo.png" width="80" height="80">](http://www.zhibocloud.cn/) | <img src="image/android_logo.png" width="80" height="80"> |  
 

## Acknowledgements 
感谢本框架所使用到的所有三方库的 **Author** ,以及所有为 **Open Source** 做无私贡献的 **Developer** 和 **Organizations** ,使我们能更好的工作和学习,本人也会将业余时间回报给开源社区

## Donate
如果您认可 **MVPArms** 的代码质量,并使用 **MVPArms** 在实际开发中切实的提升了您的工作效率和开发能力,请您点击右上角 **Star** 支持一下谢谢!

## About Me
* **Email**: <jess.yan.effort@gmail.com>  
* **Home**: <http://jessyan.me>
* **掘金**: <https://juejin.im/user/57a9dbd9165abd0061714613>
* **简书**: <https://www.jianshu.com/u/1d0c0bc634db>

## License
``` 
 Copyright 2016, jessyan       
  
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at 
 
       http://www.apache.org/licenses/LICENSE-2.0 

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
```


================================================
FILE: MVP_generator_solution
================================================
MVPArms框架自动生成MVP及Dagger2相关文件解决方案

第二代模版已经开源到 https://github.com/JessYanCoding/MVPArmsTemplate ,一键生成所有文件

(设置)Setting -> Editor ->  File and Code Templates -> Files 然后点击左上角绿色的+号


下面有7个Template,将分隔符上Name: 后的字符复制到Name输入框里,将分隔符里的内容复制进下面的大输入框,复制完后在继续点+
创建下一个,重复之前的操作,一共创建7个Template,点击右下角的ok按钮,现在在对应的包下点鼠标右键New选择项里就有刚才创建的
Template了,点击对应Template,在输入框中输入名字就可以创建对应的文件
再按照Contract->Model->Presenter->Activity->Module->Component的顺序在对应包下构建这6个模版,名字必须一样,这下
对应页面的Dagger和Mvp类即自动生成了,就可以专注写逻辑了
以下模版可以根据需求做相应修改



Name: Activity
--------------------------------------------------------------------------------------

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end

import android.content.Intent;
import androidx.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import com.jess.arms.base.BaseActivity;
import com.jess.arms.utils.ArmsUtils;


import static com.jess.arms.utils.Preconditions.checkNotNull;

/**
  * 通过Template生成对应页面的MVP和Dagger代码,请注意输入框中输入的名字必须相同
  * 由于每个项目包结构都不一定相同,所以每生成一个文件需要自己导入import包名,可以在设置中设置自动导入包名
  * 请在对应包下按以下顺序生成对应代码,Contract->Model->Presenter->Activity->Module->Component
  * 因为生成Activity时,Module和Component还没生成,但是Activity中有它们的引用,所以会报错,但是不用理会
  * 继续将Module和Component生成完后,编译一下项目再回到Activity,按提示修改一个方法名即可
  * 如果想生成Fragment的相关文件,则将上面构建顺序中的Activity换为Fragment,并将Component中inject方法的参数改为此Fragment
  */

#parse("File Header.java")

public class ${NAME}Activity extends BaseActivity<${NAME}Presenter> implements ${NAME}Contract.View {


    @Override
    public void setupActivityComponent(AppComponent appComponent) {
        Dagger${NAME}Component
                .builder()
                .appComponent(appComponent)
                .${NAME}Module(new ${NAME}Module(this)) //请将${NAME}Module()第一个首字母改为小写
                .build()
                .inject(this);
    }

    @Override
    public int initView(Bundle savedInstanceState) {
        return 0;
    }

    @Override
    public void initData(Bundle savedInstanceState) {

    }


    @Override
    public void showLoading() {

    }

    @Override
    public void hideLoading() {

    }

    @Override
    public void showMessage(@NonNull String message) {
        checkNotNull(message);
        ArmsUtils.snackbarText(message);
    }

    @Override
    public void launchActivity(@NonNull Intent intent) {
        checkNotNull(intent);
        ArmsUtils.startActivity(intent);
    }

    @Override
    public void killMyself() {
        finish();
    }


}

--------------------------------------------------------------------------------------




Name: Component
--------------------------------------------------------------------------------------

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end

import com.jess.arms.di.scope.ActivityScope;

import dagger.Component;

/**
  * 通过Template生成对应页面的MVP和Dagger代码,请注意输入框中输入的名字必须相同
  * 由于每个项目包结构都不一定相同,所以每生成一个文件需要自己导入import包名,可以在设置中设置自动导入包名
  * 请在对应包下按以下顺序生成对应代码,Contract->Model->Presenter->Activity->Module->Component
  * 因为生成Activity时,Module和Component还没生成,但是Activity中有它们的引用,所以会报错,但是不用理会
  * 继续将Module和Component生成完后,编译一下项目再回到Activity,按提示修改一个方法名即可
  * 如果想生成Fragment的相关文件,则将上面构建顺序中的Activity换为Fragment,并将Component中inject方法的参数改为此Fragment
  */

#parse("File Header.java")

@ActivityScope
@Component(modules = ${NAME}Module.class,dependencies = AppComponent.class)
public interface ${NAME}Component {
    void inject(${NAME}Activity activity);
}
--------------------------------------------------------------------------------------




Name: Contract
--------------------------------------------------------------------------------------

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end

import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;

/**
  * 通过Template生成对应页面的MVP和Dagger代码,请注意输入框中输入的名字必须相同
  * 由于每个项目包结构都不一定相同,所以每生成一个文件需要自己导入import包名,可以在设置中设置自动导入包名
  * 请在对应包下按以下顺序生成对应代码,Contract->Model->Presenter->Activity->Module->Component
  * 因为生成Activity时,Module和Component还没生成,但是Activity中有它们的引用,所以会报错,但是不用理会
  * 继续将Module和Component生成完后,编译一下项目再回到Activity,按提示修改一个方法名即可
  * 如果想生成Fragment的相关文件,则将上面构建顺序中的Activity换为Fragment,并将Component中inject方法的参数改为此Fragment
  */

#parse("File Header.java")

public interface ${NAME}Contract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    interface View extends IView {

    }
    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
    interface Model extends IModel{

    }
}
--------------------------------------------------------------------------------------


Name: Fragment
--------------------------------------------------------------------------------------

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end

import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import com.jess.arms.base.BaseFragment

import com.jess.arms.utils.ArmsUtils;

import butterknife.Bind;

import static com.jess.arms.utils.Preconditions.checkNotNull;

/**
  * 通过Template生成对应页面的MVP和Dagger代码,请注意输入框中输入的名字必须相同
  * 由于每个项目包结构都不一定相同,所以每生成一个文件需要自己导入import包名,可以在设置中设置自动导入包名
  * 请在对应包下按以下顺序生成对应代码,Contract->Model->Presenter->Activity->Module->Component
  * 因为生成Activity时,Module和Component还没生成,但是Activity中有它们的引用,所以会报错,但是不用理会
  * 继续将Module和Component生成完后,编译一下项目再回到Activity,按提示修改一个方法名即可
  * 如果想生成Fragment的相关文件,则将上面构建顺序中的Activity换为Fragment,并将Component中inject方法的参数改为此Fragment
  */

#parse("File Header.java")

public class ${NAME}Fragment extends BaseFragment<${NAME}Presenter> implements ${NAME}Contract.View{


    public static ${NAME}Fragment newInstance() {
        ${NAME}Fragment fragment = new ${NAME}Fragment();
        return fragment;
    }

    @Override
    public void setupFragmentComponent(AppComponent appComponent) {
        Dagger${NAME}Component
                .builder()
                .appComponent(appComponent)
                .${NAME}Module(new ${NAME}Module(this))//请将${NAME}Module()第一个首字母改为小写
                .build()
                .inject(this);
    }

    @Override
    public View initView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(layout_id, container, false);
    }

    @Override
    public void initData(Bundle savedInstanceState) {

    }

    /**
     * 此方法是让外部调用使fragment做一些操作的,比如说外部的activity想让fragment对象执行一些方法,
     * 建议在有多个需要让外界调用的方法时,统一传Message,通过what字段,来区分不同的方法,在setData
     * 方法中就可以switch做不同的操作,这样就可以用统一的入口方法做不同的事
     *
     * 使用此方法时请注意调用时fragment的生命周期,如果调用此setData方法时onCreate还没执行
     * setData里却调用了presenter的方法时,是会报空的,因为dagger注入是在onCreated方法中执行的,然后才创建的presenter
     * 如果要做一些初始化操作,可以不必让外部调setData,在initData中初始化就可以了
     *
     * @param data
     */

    @Override
    public void setData(Object data) {

    }


    @Override
    public void showLoading() {

    }

    @Override
    public void hideLoading() {

    }

    @Override
    public void showMessage(@NonNull String message) {
        checkNotNull(message);
        ArmsUtils.snackbarText(message);
    }

    @Override
    public void launchActivity(@NonNull Intent intent) {
        checkNotNull(intent);
        ArmsUtils.startActivity(intent);
    }

    @Override
    public void killMyself() {

    }

}
--------------------------------------------------------------------------------------


Name: Model
--------------------------------------------------------------------------------------

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end

import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;

import static com.jess.arms.utils.Preconditions.checkNotNull;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;

/**
  * 通过Template生成对应页面的MVP和Dagger代码,请注意输入框中输入的名字必须相同
  * 由于每个项目包结构都不一定相同,所以每生成一个文件需要自己导入import包名,可以在设置中设置自动导入包名
  * 请在对应包下按以下顺序生成对应代码,Contract->Model->Presenter->Activity->Module->Component
  * 因为生成Activity时,Module和Component还没生成,但是Activity中有它们的引用,所以会报错,但是不用理会
  * 继续将Module和Component生成完后,编译一下项目再回到Activity,按提示修改一个方法名即可
  * 如果想生成Fragment的相关文件,则将上面构建顺序中的Activity换为Fragment,并将Component中inject方法的参数改为此Fragment
  */

#parse("File Header.java")

@ActivityScope
public class ${NAME}Model extends BaseModel implements ${NAME}Contract.Model{
    private Gson mGson;
    private Application mApplication;

    @Inject
    public ${NAME}Model(IRepositoryManager repositoryManager, Gson gson, Application application) {
        super(repositoryManager);
        this.mGson = gson;
        this.mApplication = application;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.mGson = null;
        this.mApplication = null;
    }

}

--------------------------------------------------------------------------------------


Name: Module
--------------------------------------------------------------------------------------
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end

import com.google.gson.Gson;
import android.app.Application;
import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

/**
  * 通过Template生成对应页面的MVP和Dagger代码,请注意输入框中输入的名字必须相同
  * 由于每个项目包结构都不一定相同,所以每生成一个文件需要自己导入import包名,可以在设置中设置自动导入包名
  * 请在对应包下按以下顺序生成对应代码,Contract->Model->Presenter->Activity->Module->Component
  * 因为生成Activity时,Module和Component还没生成,但是Activity中有它们的引用,所以会报错,但是不用理会
  * 继续将Module和Component生成完后,编译一下项目再回到Activity,按提示修改一个方法名即可
  * 如果想生成Fragment的相关文件,则将上面构建顺序中的Activity换为Fragment,并将Component中inject方法的参数改为此Fragment
  */

#parse("File Header.java")

@Module
public class ${NAME}Module {
    private ${NAME}Contract.View view;

    /**
     * 构建${NAME}Module时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     * @param view
     */
    public ${NAME}Module(${NAME}Contract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    ${NAME}Contract.View provide${NAME}View(){
        return this.view;
    }

    @ActivityScope
    @Provides
    ${NAME}Contract.Model provide${NAME}Model(${NAME}Model model){
        return model;
    }
}
--------------------------------------------------------------------------------------


Name: Presenter
--------------------------------------------------------------------------------------

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end

import android.app.Application;
import com.jess.arms.integration.AppManager;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.mvp.BasePresenter;
import com.jess.arms.http.imageloader.ImageLoader;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
import javax.inject.Inject;


/**
  * 通过Template生成对应页面的MVP和Dagger代码,请注意输入框中输入的名字必须相同
  * 由于每个项目包结构都不一定相同,所以每生成一个文件需要自己导入import包名,可以在设置中设置自动导入包名
  * 请在对应包下按以下顺序生成对应代码,Contract->Model->Presenter->Activity->Module->Component
  * 因为生成Activity时,Module和Component还没生成,但是Activity中有它们的引用,所以会报错,但是不用理会
  * 继续将Module和Component生成完后,编译一下项目再回到Activity,按提示修改一个方法名即可
  * 如果想生成Fragment的相关文件,则将上面构建顺序中的Activity换为Fragment,并将Component中inject方法的参数改为此Fragment
  */



#parse("File Header.java")

@ActivityScope
public class ${NAME}Presenter extends BasePresenter<${NAME}Contract.Model, ${NAME}Contract.View> {
    private RxErrorHandler mErrorHandler;
    private Application mApplication;
    private ImageLoader mImageLoader;
    private AppManager mAppManager;

    @Inject
    public ${NAME}Presenter (${NAME}Contract.Model model, ${NAME}Contract.View rootView
            , RxErrorHandler handler, Application application
            , ImageLoader imageLoader, AppManager appManager) {
        super(model, rootView);
        this.mErrorHandler = handler;
        this.mApplication = application;
        this.mImageLoader = imageLoader;
        this.mAppManager = appManager;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.mErrorHandler = null;
        this.mAppManager = null;
        this.mImageLoader = null;
        this.mApplication = null;
    }

}

--------------------------------------------------------------------------------------


Name: AutoView
--------------------------------------------------------------------------------------
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.ViewGroup;

import com.zhy.autolayout.AutoLayoutInfo;
import com.zhy.autolayout.utils.AutoLayoutHelper;

/**
 * 此Template用于生成AutoLayout需要的的Auto系列View,如需要使ScrollView适配,使用此Template输入ScrollView,即可生成
 * AutoScrollView,使用此View即可自适应
 * Created by jess on 16/4/14.
 */
public class Auto${NAME} extends ${NAME} {
    private AutoLayoutHelper mHelper = new AutoLayoutHelper(this);

    public Auto${NAME}(Context context) {
        super(context);
    }

    public Auto${NAME}(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public Auto${NAME}(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
    {
        if (!isInEditMode())
            mHelper.adjustChildren();
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }


    @Override
    protected void onLayout(boolean changed, int l, int t, int r, int b)
    {
        super.onLayout(changed, l, t, r, b);
    }


    @Override
    public LayoutParams generateLayoutParams(AttributeSet attrs) {
        return new LayoutParams(getContext(), attrs);
    }


    public static class LayoutParams extends ${NAME}.LayoutParams
            implements AutoLayoutHelper.AutoLayoutParams
    {
        private AutoLayoutInfo mAutoLayoutInfo;

        public LayoutParams(Context c, AttributeSet attrs)
        {
            super(c, attrs);
            mAutoLayoutInfo = AutoLayoutHelper.getAutoLayoutInfo(c, attrs);
        }

        @Override
        public AutoLayoutInfo getAutoLayoutInfo()
        {
            return mAutoLayoutInfo;
        }


        public LayoutParams(int width, int height)
        {
            super(width, height);
        }


        public LayoutParams(ViewGroup.LayoutParams source)
        {
            super(source);
        }

        public LayoutParams(MarginLayoutParams source)
        {
            super(source);
        }

    }
}

--------------------------------------------------------------------------------------



================================================
FILE: README.md
================================================
![Logo](image/arms_banner_v1.0.jpg)
![Official](image/official.jpeg)

<p align="center">
   <a href="https://bintray.com/jessyancoding/maven/MVPArms/_latestVersion">
    <img src="https://img.shields.io/badge/Jcenter-v2.5.2-brightgreen.svg?style=flat-square" alt="Latest Stable Version" />
  </a>
  <a href="https://travis-ci.org/JessYanCoding/MVPArms">
    <img src="https://travis-ci.org/JessYanCoding/MVPArms.svg?branch=master" alt="Build Status" />
  </a>
  <a href="https://developer.android.com/about/versions/android-4.0.html">
    <img src="https://img.shields.io/badge/API-14%2B-blue.svg?style=flat-square" alt="Min Sdk Version" />
  </a>
  <a href="http://www.apache.org/licenses/LICENSE-2.0">
    <img src="http://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square" alt="License" />
  </a>
  <a href="https://www.jianshu.com/u/1d0c0bc634db">
    <img src="https://img.shields.io/badge/Author-JessYan-orange.svg?style=flat-square" alt="Author" />
  </a>
  <a href="https://shang.qq.com/wpa/qunwpa?idkey=7e59e59145e6c7c68932ace10f52790636451f01d1ecadb6a652b1df234df753">
    <img src="https://img.shields.io/badge/QQ%E7%BE%A4-455850365%20%7C%20301733278-orange.svg?style=flat-square" alt="QQ Group" />
  </a>
</p>

<p align="center">
  <a href="MVPArms.md">
    <b>中文说明</b>
  </a>
</p> 

## A common Architecture for Android Applications developing based on MVP, integrates many Open Source Projects (like Dagger2、RxJava、Retrofit ...), to make your developing quicker and easier.

## Architectural
<img src="https://github.com/JessYanCoding/MVPArms/raw/master/image/Architecture.png" width="80%" height="80%">

## Usage
> New Project (**The following steps are too cumbersome? Now you can use the [new feature (generate an app Module with one click)](https://github.com/JessYanCoding/MVPArms-Module-Template) in new projects, to avoid the cumbersome configuration of the project, to quickly open the world of MVPArms**)
>> If you are building a new project, directly to the entire project **clone** (or download), as **demo** as the main **Module** (It is recommended to remove the **arms Module** and use **Gradle** to [depend](https://github.com/JessYanCoding/MVPArms/wiki#1.1) on this framework remotely for easy updates), then the package name into their own package name, **demo Module** contains the package structure can be used directly, a mainstream `MVP` +` Dagger2` + `Retrofit` +` RxJava` framework so easy to build successful, and now you refer **Mvp** Package under the **UserActivity** format, [Use Template to automatically generate MVP, Dagger2 related classes](https://github.com/JessYanCoding/MVPArmsTemplate), With access to [Wiki documents](https://github.com/JessYanCoding/MVPArms/wiki) slowly grasp the framework to see more articles as soon as possible in the project to use it, in practice, learning is the fastest

> Old Project
>> [Old projects would like to introduce this framework, you can refer to the Wiki documentation, written in great detail](https://github.com/JessYanCoding/MVPArms/wiki)

## Wiki
[Detailed usage reference Wiki (**Must see!!!**)](https://github.com/JessYanCoding/MVPArms/wiki)


## Notice

* [MVPArms Learning Project](https://github.com/JessYanCoding/MVPArms/blob/master/CONTRIBUTING_APP.md)

* [Collection Box](https://github.com/JessYanCoding/MVPArms/issues/40)

* [Update Log](https://github.com/JessYanCoding/MVPArms/wiki/UpdateLog)

* [Common Issues](https://github.com/JessYanCoding/MVPArms/wiki/Issues)

* The use of these technologies for the latter part of the project maintenance and iterative, especially large projects is very helpful, but is to develop a pre-write a page to write a lot of `MVP`,` Dagger2` class and interface, which is indeed a headache for the development of pre- Now the framework has been able to [Template](https://github.com/JessYanCoding/MVPArmsTemplate) automatically generate some `MVP`,` Dagger2` template code, and now we can very easily use the framework.

* Use this frame comes with automatic screen adaptation function, please refer to [AndroidAutoSize](https://github.com/JessYanCoding/AndroidAutoSize).

* This framework does not provide any third-party libraries associated with the **UI**.

## Functionality & Libraries
1. [`Mvp` Google's official` Mvp` architecture project, which contains several different schema branches (this is the Dagger branch).](https://github.com/googlesamples/android-architecture/tree/todo-mvp-dagger/)
2. [`Dagger2`](https://github.com/google/dagger)
3. [`RxJava`](https://github.com/ReactiveX/RxJava)
4. [`RxAndroid`](https://github.com/ReactiveX/RxAndroid)
5. [`Rxlifecycle`](https://github.com/trello/RxLifecycle)
6. [`RxCache`](https://github.com/VictorAlbertos/RxCache)
7. [`RxPermissions`](https://github.com/tbruyelle/RxPermissions)
8. [`RxErroHandler`](https://github.com/JessYanCoding/RxErrorHandler)
9. [`Retrofit`](https://github.com/square/retrofit)
10. [`Okhttp`](https://github.com/square/okhttp)
11. [`AndroidAutoSize`](https://github.com/JessYanCoding/AndroidAutoSize)
12. [`Gson`](https://github.com/google/gson)
13. [`Butterknife`](https://github.com/JakeWharton/butterknife)
14. [`AndroidEventBus`](https://github.com/hehonghui/AndroidEventBus)
15. [`Timber`](https://github.com/JakeWharton/timber)
16. [`Glide`](https://github.com/bumptech/glide)
17. [`LeakCanary`](https://github.com/square/leakcanary)

## Who is using MVPArms?

**天府通** | **小顶家装 工长端** | **小顶家装 工人端** | **小顶家装 材料端** | **小顶网** |
:-------------------------------------------------------------------:|:----------:|:---------------:|:--------:|:--------------:|
[<img src="image/tianfutong_logo.png" width="80" height="80">](https://android.myapp.com/myapp/detail.htm?apkName=com.chinarainbow.tft) | [<img src="image/xiaoding_foreman_logo.png" width="80" height="80">](http://www.dggxdjz.com) | [<img src="image/xiaoding_worker_logo.png" width="80" height="80">](http://www.dggxdjz.com) | [<img src="image/xiaoding_material_logo.png" width="80" height="80">](http://www.dggxdjz.com) | [<img src="image/top_net_work_logo.png" width="80" height="80">](http://www.dgg.net/appload.htm) |
**天天视频** | **天天直播** | **中斗通航** | **中斗祥云** | **麋鹿旅行** |
[<img src="image/tiantian_video_logo.png" width="80" height="80">](http://sj.qq.com/myapp/detail.htm?apkName=com.dzwh.ttys) | [<img src="image/tiantian_live_logo.png" width="80" height="80">](http://www.25pp.com/android/detail_7611392/) | [<img src="image/tong_hang_logo.png" width="80" height="80">](https://fir.im/3176) | <img src="image/xiang_yun_logo.png" width="80" height="80">  | [<img src="image/mi_lu_logo.png" width="80" height="80">](http://android.myapp.com/myapp/detail.htm?apkName=com.elk.tourist) |
**汇财富** | **觅窝** | **晒墨宝** | **智播**  | **(Your App ...)** |
[<img src="image/hui_cai_fu_logo.png" width="80" height="80">](http://android.myapp.com/myapp/detail.htm?apkName=com.tahone.client) | [<img src="image/mi_wo_logo.png" width="80" height="80">](http://miwo.ai/) | [<img src="image/shaimobao_logo.png" width="80" height="80">](http://sj.qq.com/myapp/search.htm?kw=%E6%99%92%E5%A2%A8%E5%AE%9D)  | [<img src="image/zhibo_logo.png" width="80" height="80">](http://www.zhibocloud.cn/) | <img src="image/android_logo.png" width="80" height="80"> |


## Acknowledgements 
Thanks to all the three libraries used in this framework **Author**, and all for the **Open Source** selfless contributions **Developer** and **Organizations**, so that we can better work and study, I will also spare time return to the open source community

## About Me
* **Email**: <jess.yan.effort@gmail.com>  
* **Home**: <http://jessyan.me>
* **掘金**: <https://juejin.im/user/57a9dbd9165abd0061714613>
* **简书**: <https://www.jianshu.com/u/1d0c0bc634db>

## License
``` 
 Copyright 2016, jessyan       
  
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at 
 
       http://www.apache.org/licenses/LICENSE-2.0 

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
```


================================================
FILE: arms/.gitignore
================================================
/build


================================================
FILE: arms/build.gradle
================================================
apply plugin: 'com.android.library'

android {
    compileSdkVersion rootProject.ext.android["compileSdkVersion"]
    buildToolsVersion rootProject.ext.android["buildToolsVersion"]
    useLibrary 'org.apache.http.legacy'

    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        minSdkVersion rootProject.ext.android["minSdkVersion"]
        targetSdkVersion rootProject.ext.android["targetSdkVersion"]
        versionCode rootProject.ext.android["versionCode"]
        versionName rootProject.ext.android["versionName"]
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    api(rootProject.ext.dependencies["legacy-support-v4"]) {
        exclude module: 'annotation'
        exclude module: 'coordinatorlayout'
    }
    //androidx
    api(rootProject.ext.dependencies["appcompat"]) {
        exclude module: 'annotation'
    }
    compileOnly rootProject.ext.dependencies["design"]
    api(rootProject.ext.dependencies["recyclerview"]) {
        exclude module: 'annotation'
    }
    api rootProject.ext.dependencies["annotations"]

    //view
    compileOnly rootProject.ext.dependencies["autolayout"]
    api(rootProject.ext.dependencies["butterknife"]) {
        exclude module: 'annotation'
        exclude module: 'core'
    }

    //rx
    api rootProject.ext.dependencies["rxjava2"]
    api(rootProject.ext.dependencies["rxandroid2"]) {
        exclude module: 'rxjava'
    }
    api(rootProject.ext.dependencies["rxcache2"]) {
        exclude module: 'rxjava'
        exclude module: 'dagger'
        exclude module: 'api'
    }
    implementation(rootProject.ext.dependencies["rxcache-jolyglot-gson"]) {
        exclude module: 'gson'
    }
    api(rootProject.ext.dependencies["rxlifecycle2"]) {
        exclude module: 'rxjava'
        exclude module: 'jsr305'
    }
    api(rootProject.ext.dependencies["rxlifecycle2-android"]) {
        exclude module: 'annotation'
        exclude module: 'rxjava'
        exclude module: 'rxandroid'
        exclude module: 'rxlifecycle'
    }
    api(rootProject.ext.dependencies["rxpermissions2"]) {
        exclude module: 'rxjava'
        exclude module: 'annotation'
    }
    api rootProject.ext.dependencies['rxerrorhandler2']

    //network
    api(rootProject.ext.dependencies["retrofit"]) {
        exclude module: 'okhttp'
        exclude module: 'okio'
    }
    implementation(rootProject.ext.dependencies["retrofit-converter-gson"]) {
        exclude module: 'gson'
        exclude module: 'okhttp'
        exclude module: 'okio'
        exclude module: 'retrofit'
    }
    implementation(rootProject.ext.dependencies["retrofit-adapter-rxjava2"]) {
        exclude module: 'rxjava'
        exclude module: 'okhttp'
        exclude module: 'retrofit'
        exclude module: 'okio'
    }
    api rootProject.ext.dependencies["okhttp3"]
    compileOnly rootProject.ext.dependencies["glide"]
    annotationProcessor(rootProject.ext.dependencies["glide-compiler"]) {
        exclude module: 'jsr305'
    }

    //tools
    compileOnly rootProject.ext.dependencies["javax.annotation"]
    api rootProject.ext.dependencies["dagger2"]
    annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
    compileOnly rootProject.ext.dependencies["androideventbus"]
    compileOnly rootProject.ext.dependencies["eventbus"]
    api rootProject.ext.dependencies["gson"]

    //test
    api rootProject.ext.dependencies["timber"]
}

apply from: '../bintray.gradle'

================================================
FILE: arms/gradle.properties
================================================
POM_NAME=MVPArms


================================================
FILE: arms/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/jess/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

-optimizationpasses 5


-dontusemixedcaseclassnames

-dontskipnonpubliclibraryclasses

-dontskipnonpubliclibraryclassmembers

-dontpreverify

-verbose
-printmapping priguardMapping.txt

-optimizations !code/simplification/artithmetic,!field/*,!class/merging/*



################common###############

-keep public class * implements com.jess.arms.integration.ConfigModule

 #实体类不参与混淆
-keep class com.jess.arms.widget.** { *; } #自定义控件不参与混淆
-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}
-keepnames class * implements java.io.Serializable
-keepattributes Signature
-keep class **.R$* {*;}
-ignorewarnings
-keepclassmembers class **.R$* {
    public static <fields>;
}

-keepclasseswithmembernames class * { # 保持native方法不被混淆
    native <methods>;
}

-keepclassmembers enum * {  # 使用enum类型时需要注意避免以下两个方法混淆,因为enum类的特殊性,以下两个方法会被反射调用,
    public static **[] values();
    public static ** valueOf(java.lang.String);
}


################support###############
-keep class android.support.** { *; }
-keep interface android.support.** { *; }
-dontwarn android.support.**


################alipay###############

-keep class com.alipay.android.app.IAlixPay{*;}
-keep class com.alipay.android.app.IAlixPay$Stub{*;}
-keep class com.alipay.android.app.IRemoteServiceCallback{*;}
-keep class com.alipay.android.app.IRemoteServiceCallback$Stub{*;}
-keep class com.alipay.sdk.app.PayTask{ public *;}
-keep class com.alipay.sdk.app.AuthTask{ public *;}

################retrofit###############
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions

################butterknife###############
-keep class butterknife.** { *; }
-dontwarn butterknife.internal.**
-keep class **$$ViewBinder { *; }
-keepclasseswithmembernames class * {
   @butterknife.* <fields>;
}
-keepclasseswithmembernames class * {
 @butterknife.* <methods>;
}


################gson###############
-keepattributes Signature
-keepattributes *Annotation*
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.stream.** { *; }
# Application classes that will be serialized/deserialized over Gson
-keep class com.sunloto.shandong.bean.** { *; }


################glide###############
-keep public class * implements com.bumptech.glide.module.AppGlideModule
-keep public class * implements com.bumptech.glide.module.LibraryGlideModule
-keep class com.bumptech.glide.** { *; }
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
    **[] $VALUES;
    public *;
}

################okhttp###############
-keepattributes Signature
-keepattributes *Annotation*
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn com.squareup.okhttp.**


################androidEventBus###############
-keep class org.simple.** { *; }
-keep interface org.simple.** { *; }
-keepclassmembers class * {
    @org.simple.eventbus.Subscriber <methods>;
}
-keepattributes *Annotation*


################EventBus###############
-keepclassmembers class * {
    @org.greenrobot.eventbus.Subscribe <methods>;
}
-keep class org.greenrobot.eventbus.EventBus { *; }
-keep enum org.greenrobot.eventbus.ThreadMode { *; }

-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
    <init>(java.lang.Throwable);
}

################autolayout###############
-keep class com.zhy.autolayout.** { *; }
-keep interface com.zhy.autolayout.** { *; }


################RxJava and RxAndroid###############
-dontwarn org.mockito.**
-dontwarn org.junit.**
-dontwarn org.robolectric.**

-keep class io.reactivex.** { *; }
-keep interface io.reactivex.** { *; }

-keepattributes Signature
-keepattributes *Annotation*
-keep class com.squareup.okhttp.** { *; }
-dontwarn okio.**
-keep interface com.squareup.okhttp.** { *; }
-dontwarn com.squareup.okhttp.**

-dontwarn io.reactivex.**
-dontwarn retrofit.**
-keep class retrofit.** { *; }
-keepclasseswithmembers class * {
    @retrofit.http.* <methods>;
}

-keep class sun.misc.Unsafe { *; }

-dontwarn java.lang.invoke.*

-keep class io.reactivex.schedulers.Schedulers {
    public static <methods>;
}
-keep class io.reactivex.schedulers.ImmediateScheduler {
    public <methods>;
}
-keep class io.reactivex.schedulers.TestScheduler {
    public <methods>;
}
-keep class io.reactivex.schedulers.Schedulers {
    public static ** test();
}
-keepclassmembers class io.reactivex.internal.util.unsafe.*ArrayQueue*Field* {
    long producerIndex;
    long consumerIndex;
}
-keepclassmembers class io.reactivex.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
    long producerNode;
    long consumerNode;
}

-keepclassmembers class io.reactivex.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
    io.reactivex.internal.util.atomic.LinkedQueueNode producerNode;
}
-keepclassmembers class io.reactivex.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
    io.reactivex.internal.util.atomic.LinkedQueueNode consumerNode;
}

-dontwarn io.reactivex.internal.util.unsafe.**



################espresso###############
-keep class android.support.test.espresso.** { *; }
-keep interface android.support.test.espresso.** { *; }



################annotation###############
-keep class android.support.annotation.** { *; }
-keep interface android.support.annotation.** { *; }


################RxLifeCycle#################
-keep class com.trello.rxlifecycle2.** { *; }
-keep interface com.trello.rxlifecycle2.** { *; }


################RxPermissions#################
-keep class com.tbruyelle.rxpermissions2.** { *; }
-keep interface com.tbruyelle.rxpermissions2.** { *; }

################RxCache#################
-dontwarn io.rx_cache2.internal.**
-keep class io.rx_cache2.internal.Record { *; }
-keep class io.rx_cache2.Source { *; }

-keep class io.victoralbertos.jolyglot.** { *; }
-keep interface io.victoralbertos.jolyglot.** { *; }

################RxErrorHandler#################
 -keep class me.jessyan.rxerrorhandler.** { *; }
 -keep interface me.jessyan.rxerrorhandler.** { *; }

################Timber#################
-dontwarn org.jetbrains.annotations.**


################Canary#################
-dontwarn com.squareup.haha.guava.**
-dontwarn com.squareup.haha.perflib.**
-dontwarn com.squareup.haha.trove.**
-dontwarn com.squareup.leakcanary.**
-keep class com.squareup.haha.** { *; }
-keep class com.squareup.leakcanary.** { *; }

# Marshmallow removed Notification.setLatestEventInfo()
-dontwarn android.app.Notification
























================================================
FILE: arms/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.jess.arms">

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
</manifest>


================================================
FILE: arms/src/main/java/com/jess/arms/base/AdapterViewPager.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;

import java.util.List;

/**
 * ================================================
 * 基类 {@link FragmentStatePagerAdapter}
 * <p>
 * Created by JessYan on 22/03/2016
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public class AdapterViewPager extends FragmentStatePagerAdapter {
    private List<Fragment> mList;
    private CharSequence[] mTitles;

    public AdapterViewPager(FragmentManager fragmentManager, List<Fragment> list) {
        super(fragmentManager);
        this.mList = list;
    }

    public AdapterViewPager(FragmentManager fragmentManager, List<Fragment> list, CharSequence[] titles) {
        super(fragmentManager);
        this.mList = list;
        this.mTitles = titles;
    }

    @Override
    public Fragment getItem(int position) {
        return mList.get(position);
    }

    @Override
    public CharSequence getPageTitle(int position) {
        if (mTitles != null && position < mTitles.length) {
            return mTitles[position];
        }
        return super.getPageTitle(position);
    }

    @Override
    public int getCount() {
        return mList.size();
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/App.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base;

import androidx.annotation.NonNull;

import com.jess.arms.di.component.AppComponent;

/**
 * ================================================
 * 框架要求框架中的每个 {@link android.app.Application} 都需要实现此类, 以满足规范
 *
 * @see BaseApplication
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki">请配合官方 Wiki 文档学习本框架</a>
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki/UpdateLog">更新日志, 升级必看!</a>
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki/Issues">常见 Issues, 踩坑必看!</a>
 * @see <a href="https://github.com/JessYanCoding/ArmsComponent/wiki">MVPArms 官方组件化方案 ArmsComponent, 进阶指南!</a>
 * Created by JessYan on 25/04/2017 14:54
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public interface App {
    @NonNull
    AppComponent getAppComponent();
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/BaseActivity.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.InflateException;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;

import com.jess.arms.base.delegate.IActivity;
import com.jess.arms.integration.cache.Cache;
import com.jess.arms.integration.cache.CacheType;
import com.jess.arms.integration.lifecycle.ActivityLifecycleable;
import com.jess.arms.mvp.IPresenter;
import com.jess.arms.utils.ArmsUtils;
import com.trello.rxlifecycle2.android.ActivityEvent;

import javax.inject.Inject;

import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.subjects.BehaviorSubject;
import io.reactivex.subjects.Subject;

import static com.jess.arms.utils.ThirdViewUtil.convertAutoView;

/**
 * ================================================
 * 因为 Java 只能单继承, 所以如果要用到需要继承特定 {@link Activity} 的三方库, 那你就需要自己自定义 {@link Activity}
 * 继承于这个特定的 {@link Activity}, 然后再按照 {@link BaseActivity} 的格式, 将代码复制过去, 记住一定要实现{@link IActivity}
 *
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki">请配合官方 Wiki 文档学习本框架</a>
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki/UpdateLog">更新日志, 升级必看!</a>
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki/Issues">常见 Issues, 踩坑必看!</a>
 * @see <a href="https://github.com/JessYanCoding/ArmsComponent/wiki">MVPArms 官方组件化方案 ArmsComponent, 进阶指南!</a>
 * Created by JessYan on 22/03/2016
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public abstract class BaseActivity<P extends IPresenter> extends AppCompatActivity implements IActivity, ActivityLifecycleable {
    protected final String TAG = this.getClass().getSimpleName();
    private final BehaviorSubject<ActivityEvent> mLifecycleSubject = BehaviorSubject.create();
    @Inject
    @Nullable
    protected P mPresenter;//如果当前页面逻辑简单, Presenter 可以为 null
    private Cache<String, Object> mCache;
    private Unbinder mUnbinder;

    @NonNull
    @Override
    public synchronized Cache<String, Object> provideCache() {
        if (mCache == null) {
            //noinspection unchecked
            mCache = ArmsUtils.obtainAppComponentFromContext(this).cacheFactory().build(CacheType.ACTIVITY_CACHE);
        }
        return mCache;
    }

    @NonNull
    @Override
    public final Subject<ActivityEvent> provideLifecycleSubject() {
        return mLifecycleSubject;
    }

    @Override
    public View onCreateView(String name, Context context, AttributeSet attrs) {
        View view = convertAutoView(name, context, attrs);
        return view == null ? super.onCreateView(name, context, attrs) : view;
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        try {
            int layoutResID = initView(savedInstanceState);
            //如果initView返回0,框架则不会调用setContentView(),当然也不会 Bind ButterKnife
            if (layoutResID != 0) {
                setContentView(layoutResID);
                //绑定到butterknife
                mUnbinder = ButterKnife.bind(this);
            }
        } catch (Exception e) {
            if (e instanceof InflateException) {
                throw e;
            }
            e.printStackTrace();
        }
        initData(savedInstanceState);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (mUnbinder != null && mUnbinder != Unbinder.EMPTY) {
            mUnbinder.unbind();
        }
        this.mUnbinder = null;
        if (mPresenter != null) {
            mPresenter.onDestroy();//释放资源
        }
        this.mPresenter = null;
    }

    /**
     * 是否使用 EventBus
     * Arms 核心库现在并不会依赖某个 EventBus, 要想使用 EventBus, 还请在项目中自行依赖对应的 EventBus
     * 现在支持两种 EventBus, greenrobot 的 EventBus 和畅销书 《Android源码设计模式解析与实战》的作者 何红辉 所作的 AndroidEventBus
     * 确保依赖后, 将此方法返回 true, Arms 会自动检测您依赖的 EventBus, 并自动注册
     * 这种做法可以让使用者有自行选择三方库的权利, 并且还可以减轻 Arms 的体积
     *
     * @return 返回 {@code true} (默认为 {@code true}), Arms 会自动注册 EventBus
     */
    @Override
    public boolean useEventBus() {
        return true;
    }

    /**
     * 这个 {@link Activity} 是否会使用 {@link Fragment}, 框架会根据这个属性判断是否注册 {@link FragmentManager.FragmentLifecycleCallbacks}
     * 如果返回 {@code false}, 那意味着这个 {@link Activity} 不需要绑定 {@link Fragment}, 那你再在这个 {@link Activity} 中绑定继承于 {@link BaseFragment} 的 {@link Fragment} 将不起任何作用
     *
     * @return 返回 {@code true} (默认为 {@code true}), 则需要使用 {@link Fragment}
     */
    @Override
    public boolean useFragment() {
        return true;
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/BaseApplication.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base;

import android.app.Application;
import android.content.Context;

import androidx.annotation.NonNull;

import com.jess.arms.base.delegate.AppDelegate;
import com.jess.arms.base.delegate.AppLifecycles;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.utils.ArmsUtils;
import com.jess.arms.utils.Preconditions;

/**
 * ================================================
 * MVPArms 是一个整合了大量主流开源项目的 Android MVP 快速搭建框架, 其中包含 Dagger2、Retrofit、RxJava 以及
 * RxLifecycle、RxCache 等 Rx 系三方库, 并且提供 UI 自适应方案, 本框架将它们结合起来, 并全部使用 Dagger2 管理
 * 并提供给开发者使用, 使用本框架开发您的项目, 就意味着您已经拥有一个 MVP + Dagger2 + Retrofit + RxJava 项目
 *
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki">请配合官方 Wiki 文档学习本框架</a>
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki/UpdateLog">更新日志, 升级必看!</a>
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki/Issues">常见 Issues, 踩坑必看!</a>
 * @see <a href="https://github.com/JessYanCoding/ArmsComponent/wiki">MVPArms 官方组件化方案 ArmsComponent, 进阶指南!</a>
 * Created by JessYan on 22/03/2016
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public class BaseApplication extends Application implements App {
    private AppLifecycles mAppDelegate;

    /**
     * 这里会在 {@link BaseApplication#onCreate} 之前被调用,可以做一些较早的初始化
     * 常用于 MultiDex 以及插件化框架的初始化
     *
     * @param base
     */
    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        if (mAppDelegate == null) {
            this.mAppDelegate = new AppDelegate(base);
        }
        this.mAppDelegate.attachBaseContext(base);
    }

    @Override
    public void onCreate() {
        super.onCreate();
        if (mAppDelegate != null) {
            this.mAppDelegate.onCreate(this);
        }
    }

    /**
     * 在模拟环境中程序终止时会被调用
     */
    @Override
    public void onTerminate() {
        super.onTerminate();
        if (mAppDelegate != null) {
            this.mAppDelegate.onTerminate(this);
        }
    }

    /**
     * 将 {@link AppComponent} 返回出去, 供其它地方使用, {@link AppComponent} 接口中声明的方法所返回的实例, 在 {@link #getAppComponent()} 拿到对象后都可以直接使用
     *
     * @return AppComponent
     * @see ArmsUtils#obtainAppComponentFromContext(Context) 可直接获取 {@link AppComponent}
     */
    @NonNull
    @Override
    public AppComponent getAppComponent() {
        Preconditions.checkNotNull(mAppDelegate, "%s cannot be null", AppDelegate.class.getName());
        Preconditions.checkState(mAppDelegate instanceof App, "%s must be implements %s", mAppDelegate.getClass().getName(), App.class.getName());
        return ((App) mAppDelegate).getAppComponent();
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/BaseFragment.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base;

import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.jess.arms.base.delegate.IFragment;
import com.jess.arms.integration.cache.Cache;
import com.jess.arms.integration.cache.CacheType;
import com.jess.arms.integration.lifecycle.FragmentLifecycleable;
import com.jess.arms.mvp.IPresenter;
import com.jess.arms.utils.ArmsUtils;
import com.trello.rxlifecycle2.android.FragmentEvent;

import javax.inject.Inject;

import io.reactivex.subjects.BehaviorSubject;
import io.reactivex.subjects.Subject;

/**
 * ================================================
 * 因为 Java 只能单继承, 所以如果要用到需要继承特定 @{@link Fragment} 的三方库, 那你就需要自己自定义 @{@link Fragment}
 * 继承于这个特定的 @{@link Fragment}, 然后再按照 {@link BaseFragment} 的格式, 将代码复制过去, 记住一定要实现{@link IFragment}
 *
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki">请配合官方 Wiki 文档学习本框架</a>
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki/UpdateLog">更新日志, 升级必看!</a>
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki/Issues">常见 Issues, 踩坑必看!</a>
 * @see <a href="https://github.com/JessYanCoding/ArmsComponent/wiki">MVPArms 官方组件化方案 ArmsComponent, 进阶指南!</a>
 * Created by JessYan on 22/03/2016
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public abstract class BaseFragment<P extends IPresenter> extends Fragment implements IFragment, FragmentLifecycleable {
    protected final String TAG = this.getClass().getSimpleName();
    private final BehaviorSubject<FragmentEvent> mLifecycleSubject = BehaviorSubject.create();
    protected Context mContext;
    @Inject
    @Nullable
    protected P mPresenter;//如果当前页面逻辑简单, Presenter 可以为 null
    private Cache<String, Object> mCache;

    @NonNull
    @Override
    public synchronized Cache<String, Object> provideCache() {
        if (mCache == null) {
            //noinspection unchecked
            mCache = ArmsUtils.obtainAppComponentFromContext(getActivity()).cacheFactory().build(CacheType.FRAGMENT_CACHE);
        }
        return mCache;
    }

    @NonNull
    @Override
    public final Subject<FragmentEvent> provideLifecycleSubject() {
        return mLifecycleSubject;
    }

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        mContext = context;
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return initView(inflater, container, savedInstanceState);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        if (mPresenter != null) {
            mPresenter.onDestroy();//释放资源
        }
        this.mPresenter = null;
    }

    @Override
    public void onDetach() {
        super.onDetach();
        mContext = null;
    }

    /**
     * 是否使用 EventBus
     * Arms 核心库现在并不会依赖某个 EventBus, 要想使用 EventBus, 还请在项目中自行依赖对应的 EventBus
     * 现在支持两种 EventBus, greenrobot 的 EventBus 和畅销书 《Android源码设计模式解析与实战》的作者 何红辉 所作的 AndroidEventBus
     * 确保依赖后, 将此方法返回 true, Arms 会自动检测您依赖的 EventBus, 并自动注册
     * 这种做法可以让使用者有自行选择三方库的权利, 并且还可以减轻 Arms 的体积
     *
     * @return 返回 {@code true} (默认为 {@code true}), Arms 会自动注册 EventBus
     */
    @Override
    public boolean useEventBus() {
        return true;
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/BaseHolder.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base;

import android.view.View;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.jess.arms.utils.ThirdViewUtil;
import com.zhy.autolayout.utils.AutoUtils;

/**
 * ================================================
 * 基类 {@link RecyclerView.ViewHolder}
 * <p>
 * Created by JessYan on 2015/11/24.
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public abstract class BaseHolder<T> extends RecyclerView.ViewHolder implements View.OnClickListener {
    protected final String TAG = this.getClass().getSimpleName();
    protected OnViewClickListener mOnViewClickListener = null;

    public BaseHolder(View itemView) {
        super(itemView);
        //点击事件
        itemView.setOnClickListener(this);
        //屏幕适配
        if (ThirdViewUtil.isUseAutolayout()) {
            AutoUtils.autoSize(itemView);
        }
        //绑定 ButterKnife
        ThirdViewUtil.bindTarget(this, itemView);
    }

    /**
     * 设置数据
     *
     * @param data     数据
     * @param position 在 RecyclerView 中的位置
     */
    public abstract void setData(@NonNull T data, int position);

    /**
     * 在 Activity 的 onDestroy 中使用 {@link DefaultAdapter#releaseAllHolder(RecyclerView)} 方法 (super.onDestroy() 之前)
     * {@link BaseHolder#onRelease()} 才会被调用, 可以在此方法中释放一些资源
     */
    protected void onRelease() {

    }

    @Override
    public void onClick(View view) {
        if (mOnViewClickListener != null) {
            mOnViewClickListener.onViewClick(view, this.getPosition());
        }
    }

    public void setOnItemClickListener(OnViewClickListener listener) {
        this.mOnViewClickListener = listener;
    }

    /**
     * item 点击事件
     */
    public interface OnViewClickListener {

        /**
         * item 被点击
         *
         * @param view     被点击的 {@link View}
         * @param position 在 RecyclerView 中的位置
         */
        void onViewClick(View view, int position);
    }
}

================================================
FILE: arms/src/main/java/com/jess/arms/base/BaseLazyLoadFragment.java
================================================
package com.jess.arms.base;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;

import com.jess.arms.mvp.IPresenter;

import java.util.List;

import javax.inject.Inject;

/**
 * 子类覆写{@link BaseLazyLoadFragment}lazyLoadData可快速实现Fragment懒加载
 */
public abstract class BaseLazyLoadFragment<P extends IPresenter> extends BaseFragment<P> {

    @Inject
    Unused mUnused;

    private boolean isViewCreated; // 界面是否已创建完成
    private boolean isVisibleToUser; // 是否对用户可见
    private boolean isDataLoaded; // 数据是否已请求

    /**
     * 第一次可见时触发调用,此处实现具体的数据请求逻辑
     */
    protected abstract void lazyLoadData();

    @Override
    public void setUserVisibleHint(boolean isVisibleToUser) {
        super.setUserVisibleHint(isVisibleToUser);
        this.isVisibleToUser = isVisibleToUser;
        tryLoadData();
    }

    /**
     * 保证在initData后触发
     */
    @Override
    public void onResume() {
        super.onResume();
        isViewCreated = true;
        tryLoadData();
    }

    /**
     * ViewPager场景下,判断父fragment是否可见
     */
    private boolean isParentVisible() {
        Fragment fragment = getParentFragment();
        return fragment == null || (fragment instanceof BaseLazyLoadFragment && ((BaseLazyLoadFragment) fragment).isVisibleToUser);
    }

    /**
     * ViewPager场景下,当前fragment可见时,如果其子fragment也可见,则让子fragment请求数据
     */
    private void dispatchParentVisibleState() {
        FragmentManager fragmentManager = getChildFragmentManager();
        List<Fragment> fragments = fragmentManager.getFragments();
        if (fragments.isEmpty()) {
            return;
        }
        for (Fragment child : fragments) {
            if (child instanceof BaseLazyLoadFragment && ((BaseLazyLoadFragment) child).isVisibleToUser) {
                ((BaseLazyLoadFragment) child).tryLoadData();
            }
        }
    }

    public void tryLoadData() {
        if (isViewCreated && isVisibleToUser && isParentVisible() && !isDataLoaded) {
            lazyLoadData();
            isDataLoaded = true;
            //通知子Fragment请求数据
            dispatchParentVisibleState();
        }
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/BaseService.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

import androidx.annotation.Nullable;

import com.jess.arms.integration.EventBusManager;

import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;

/**
 * ================================================
 * 基类 {@link Service}
 * <p>
 * Created by jess on 2016/5/6.
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public abstract class BaseService extends Service {
    protected final String TAG = this.getClass().getSimpleName();
    protected CompositeDisposable mCompositeDisposable;

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        if (useEventBus()) {
            EventBusManager.getInstance().register(this);
        }
        init();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        if (useEventBus()) {
            EventBusManager.getInstance().unregister(this);
        }
        unDispose();//解除订阅
        this.mCompositeDisposable = null;
    }

    /**
     * 是否使用 EventBus
     * Arms 核心库现在并不会依赖某个 EventBus, 要想使用 EventBus, 还请在项目中自行依赖对应的 EventBus
     * 现在支持两种 EventBus, greenrobot 的 EventBus 和畅销书 《Android源码设计模式解析与实战》的作者 何红辉 所作的 AndroidEventBus
     * 确保依赖后, 将此方法返回 true, Arms 会自动检测您依赖的 EventBus, 并自动注册
     * 这种做法可以让使用者有自行选择三方库的权利, 并且还可以减轻 Arms 的体积
     *
     * @return 返回 {@code true} (默认为 {@code true}), Arms 会自动注册 EventBus
     */
    public boolean useEventBus() {
        return true;
    }

    protected void addDispose(Disposable disposable) {
        if (mCompositeDisposable == null) {
            mCompositeDisposable = new CompositeDisposable();
        }
        mCompositeDisposable.add(disposable);//将所有 Disposable 放入容器集中处理
    }

    protected void unDispose() {
        if (mCompositeDisposable != null) {
            mCompositeDisposable.clear();//保证 Activity 结束时取消所有正在执行的订阅
        }
    }

    /**
     * 初始化
     */
    abstract public void init();
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/DefaultAdapter.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import org.jetbrains.annotations.NotNull;

import java.util.List;

/**
 * ================================================
 * 基类 {@link RecyclerView.Adapter}, 如果需要实现非常复杂的 {@link RecyclerView}, 请尽量使用其他优秀的三方库
 * <p>
 * Created by jess on 2015/11/27.
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public abstract class DefaultAdapter<T> extends RecyclerView.Adapter<BaseHolder<T>> {
    protected List<T> mInfos;
    protected OnRecyclerViewItemClickListener mOnItemClickListener = null;

    public DefaultAdapter(List<T> infos) {
        super();
        this.mInfos = infos;
    }

    /**
     * 遍历所有 {@link BaseHolder}, 释放他们需要释放的资源
     *
     * @param recyclerView {@link RecyclerView}
     */
    public static void releaseAllHolder(RecyclerView recyclerView) {
        if (recyclerView == null) {
            return;
        }
        for (int i = recyclerView.getChildCount() - 1; i >= 0; i--) {
            final View view = recyclerView.getChildAt(i);
            RecyclerView.ViewHolder viewHolder = recyclerView.getChildViewHolder(view);
            if (viewHolder instanceof BaseHolder) {
                ((BaseHolder) viewHolder).onRelease();
            }
        }
    }

    /**
     * 创建 {@link BaseHolder}
     *
     * @param parent   父容器
     * @param viewType 布局类型
     * @return {@link BaseHolder}
     */
    @NotNull
    @Override
    public BaseHolder<T> onCreateViewHolder(ViewGroup parent, final int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(getLayoutId(viewType), parent, false);
        BaseHolder<T> mHolder = getHolder(view, viewType);
        //设置Item点击事件
        mHolder.setOnItemClickListener((view1, position) -> {
            if (mOnItemClickListener != null && mInfos.size() > 0) {
                //noinspection unchecked
                mOnItemClickListener.onItemClick(view1, viewType, mInfos.get(position), position);
            }
        });
        return mHolder;
    }

    /**
     * 绑定数据
     *
     * @param holder   {@link BaseHolder}
     * @param position 在 RecyclerView 中的位置
     */
    @Override
    public void onBindViewHolder(BaseHolder<T> holder, int position) {
        holder.setData(mInfos.get(position), position);
    }

    /**
     * 返回数据总个数
     *
     * @return 数据总个数
     */
    @Override
    public int getItemCount() {
        return mInfos.size();
    }

    /**
     * 返回数据集合
     *
     * @return 数据集合
     */
    public List<T> getInfos() {
        return mInfos;
    }

    /**
     * 获得 RecyclerView 中某个 position 上的 item 数据
     *
     * @param position 在 RecyclerView 中的位置
     * @return 数据
     */
    public T getItem(int position) {
        return mInfos == null ? null : mInfos.get(position);
    }

    /**
     * 让子类实现用以提供 {@link BaseHolder}
     *
     * @param v        用于展示的 {@link View}
     * @param viewType 布局类型
     * @return {@link BaseHolder}
     */
    @NonNull
    public abstract BaseHolder<T> getHolder(@NonNull View v, int viewType);

    /**
     * 提供用于 item 布局的 {@code layoutId}
     *
     * @param viewType 布局类型
     * @return 布局 id
     */
    public abstract int getLayoutId(int viewType);

    /**
     * 设置 item 点击事件
     *
     * @param listener
     */
    public void setOnItemClickListener(OnRecyclerViewItemClickListener listener) {
        this.mOnItemClickListener = listener;
    }

    /**
     * item 点击事件
     *
     * @param <T>
     */
    public interface OnRecyclerViewItemClickListener<T> {

        /**
         * item 被点击
         *
         * @param view     被点击的 {@link View}
         * @param viewType 布局类型
         * @param data     数据
         * @param position 在 RecyclerView 中的位置
         */
        void onItemClick(@NonNull View view, int viewType, @NonNull T data, int position);
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/Platform.java
================================================
/*
 * Copyright 2018 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base;

/**
 * ================================================
 * Created by JessYan on 2018/7/27 15:32
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public class Platform {
    public static final boolean DEPENDENCY_AUTO_LAYOUT;
    public static final boolean DEPENDENCY_SUPPORT_DESIGN;
    public static final boolean DEPENDENCY_GLIDE;
    public static final boolean DEPENDENCY_ANDROID_EVENTBUS;
    public static final boolean DEPENDENCY_EVENTBUS;

    static {
        DEPENDENCY_AUTO_LAYOUT = findClassByClassName("com.zhy.autolayout.AutoLayoutInfo");
        DEPENDENCY_SUPPORT_DESIGN = findClassByClassName("com.google.android.material.snackbar.Snackbar");
        DEPENDENCY_GLIDE = findClassByClassName("com.bumptech.glide.Glide");
        DEPENDENCY_ANDROID_EVENTBUS = findClassByClassName("org.simple.eventbus.EventBus");
        DEPENDENCY_EVENTBUS = findClassByClassName("org.greenrobot.eventbus.EventBus");
    }

    private static boolean findClassByClassName(String className) {
        boolean hasDependency;
        try {
            Class.forName(className);
            hasDependency = true;
        } catch (ClassNotFoundException e) {
            hasDependency = false;
        }
        return hasDependency;
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/Unused.java
================================================
package com.jess.arms.base;

import javax.inject.Inject;

/**
 * Created by yexiaokang on 2019/11/12.
 */
public class Unused {

    @Inject
    public Unused() {

    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/delegate/ActivityDelegate.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base.delegate;

import android.app.Activity;
import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
 * ================================================
 * {@link Activity} 代理类,用于框架内部在每个 {@link Activity} 的对应生命周期中插入需要的逻辑
 *
 * @see ActivityDelegateImpl
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki#3.13">ActivityDelegate wiki 官方文档</a>
 * Created by JessYan on 26/04/2017 20:23
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public interface ActivityDelegate {
    String LAYOUT_LINEARLAYOUT = "LinearLayout";
    String LAYOUT_FRAMELAYOUT = "FrameLayout";
    String LAYOUT_RELATIVELAYOUT = "RelativeLayout";
    String ACTIVITY_DELEGATE = "ACTIVITY_DELEGATE";

    void onCreate(@Nullable Bundle savedInstanceState);

    void onStart();

    void onResume();

    void onPause();

    void onStop();

    void onSaveInstanceState(@NonNull Bundle outState);

    void onDestroy();
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/delegate/ActivityDelegateImpl.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base.delegate;

import android.app.Activity;
import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.jess.arms.integration.EventBusManager;
import com.jess.arms.utils.ArmsUtils;

/**
 * ================================================
 * {@link ActivityDelegate} 默认实现类
 * <p>
 * Created by JessYan on 26/04/2017 20:23
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public class ActivityDelegateImpl implements ActivityDelegate {
    private Activity mActivity;
    private IActivity iActivity;

    public ActivityDelegateImpl(@NonNull Activity activity) {
        this.mActivity = activity;
        this.iActivity = (IActivity) activity;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        //如果要使用 EventBus 请将此方法返回 true
        if (iActivity.useEventBus()) {
            //注册到事件主线
            EventBusManager.getInstance().register(mActivity);
        }

        //这里提供 AppComponent 对象给 BaseActivity 的子类, 用于 Dagger2 的依赖注入
        iActivity.setupActivityComponent(ArmsUtils.obtainAppComponentFromContext(mActivity));
    }

    @Override
    public void onStart() {

    }

    @Override
    public void onResume() {

    }

    @Override
    public void onPause() {

    }

    @Override
    public void onStop() {

    }

    @Override
    public void onSaveInstanceState(@NonNull Bundle outState) {

    }

    @Override
    public void onDestroy() {
        //如果要使用 EventBus 请将此方法返回 true
        if (iActivity != null && iActivity.useEventBus()) {
            EventBusManager.getInstance().unregister(mActivity);
        }
        this.iActivity = null;
        this.mActivity = null;
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/delegate/AppDelegate.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base.delegate;

import android.app.Activity;
import android.app.Application;
import android.app.Service;
import android.content.ComponentCallbacks2;
import android.content.ContentProvider;
import android.content.Context;
import android.content.res.Configuration;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;

import com.jess.arms.base.App;
import com.jess.arms.base.BaseApplication;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.di.component.DaggerAppComponent;
import com.jess.arms.di.module.GlobalConfigModule;
import com.jess.arms.integration.ConfigModule;
import com.jess.arms.integration.ManifestParser;
import com.jess.arms.integration.cache.IntelligentCache;
import com.jess.arms.utils.ArmsUtils;
import com.jess.arms.utils.Preconditions;

import java.util.ArrayList;
import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

/**
 * ================================================
 * AppDelegate 可以代理 Application 的生命周期,在对应的生命周期,执行对应的逻辑,因为 Java 只能单继承
 * 所以当遇到某些三方库需要继承于它的 Application 的时候,就只有自定义 Application 并继承于三方库的 Application
 * 这时就不用再继承 BaseApplication,只用在自定义Application中对应的生命周期调用AppDelegate对应的方法
 * (Application一定要实现APP接口),框架就能照常运行
 *
 * @see BaseApplication
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki#3.12">AppDelegate wiki 官方文档</a>
 * Created by JessYan on 24/04/2017 09:44
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public class AppDelegate implements App, AppLifecycles {
    @Inject
    @Named("ActivityLifecycle")
    protected Application.ActivityLifecycleCallbacks mActivityLifecycle;
    @Inject
    @Named("ActivityLifecycleForRxLifecycle")
    protected Application.ActivityLifecycleCallbacks mActivityLifecycleForRxLifecycle;
    private Application mApplication;
    private AppComponent mAppComponent;
    private List<ConfigModule> mModules;
    private List<AppLifecycles> mAppLifecycles = new ArrayList<>();
    private List<Application.ActivityLifecycleCallbacks> mActivityLifecycles = new ArrayList<>();
    private ComponentCallbacks2 mComponentCallback;

    public AppDelegate(@NonNull Context context) {

        //用反射, 将 AndroidManifest.xml 中带有 ConfigModule 标签的 class 转成对象集合(List<ConfigModule>)
        this.mModules = new ManifestParser(context).parse();

        //遍历之前获得的集合, 执行每一个 ConfigModule 实现类的某些方法
        for (ConfigModule module : mModules) {

            //将框架外部, 开发者实现的 Application 的生命周期回调 (AppLifecycles) 存入 mAppLifecycles 集合 (此时还未注册回调)
            module.injectAppLifecycle(context, mAppLifecycles);

            //将框架外部, 开发者实现的 Activity 的生命周期回调 (ActivityLifecycleCallbacks) 存入 mActivityLifecycles 集合 (此时还未注册回调)
            module.injectActivityLifecycle(context, mActivityLifecycles);
        }
    }

    @Override
    public void attachBaseContext(@NonNull Context base) {

        //遍历 mAppLifecycles, 执行所有已注册的 AppLifecycles 的 attachBaseContext() 方法 (框架外部, 开发者扩展的逻辑)
        for (AppLifecycles lifecycle : mAppLifecycles) {
            lifecycle.attachBaseContext(base);
        }
    }

    @Override
    public void onCreate(@NonNull Application application) {
        this.mApplication = application;
        mAppComponent = DaggerAppComponent
                .builder()
                .application(mApplication)//提供application
                .globalConfigModule(getGlobalConfigModule(mApplication, mModules))//全局配置
                .build();
        mAppComponent.inject(this);

        //将 ConfigModule 的实现类的集合存放到缓存 Cache, 可以随时获取
        //使用 IntelligentCache.KEY_KEEP 作为 key 的前缀, 可以使储存的数据永久存储在内存中
        //否则存储在 LRU 算法的存储空间中 (大于或等于缓存所能允许的最大 size, 则会根据 LRU 算法清除之前的条目)
        //前提是 extras 使用的是 IntelligentCache (框架默认使用)
        mAppComponent.extras().put(IntelligentCache.getKeyOfKeep(ConfigModule.class.getName()), mModules);

        this.mModules = null;

        //注册框架内部已实现的 Activity 生命周期逻辑
        mApplication.registerActivityLifecycleCallbacks(mActivityLifecycle);

        //注册框架内部已实现的 RxLifecycle 逻辑
        mApplication.registerActivityLifecycleCallbacks(mActivityLifecycleForRxLifecycle);

        //注册框架外部, 开发者扩展的 Activity 生命周期逻辑
        //每个 ConfigModule 的实现类可以声明多个 Activity 的生命周期回调
        //也可以有 N 个 ConfigModule 的实现类 (完美支持组件化项目 各个 Module 的各种独特需求)
        for (Application.ActivityLifecycleCallbacks lifecycle : mActivityLifecycles) {
            mApplication.registerActivityLifecycleCallbacks(lifecycle);
        }

        mComponentCallback = new AppComponentCallbacks(mApplication, mAppComponent);

        //注册回掉: 内存紧张时释放部分内存
        mApplication.registerComponentCallbacks(mComponentCallback);

        //执行框架外部, 开发者扩展的 App onCreate 逻辑
        for (AppLifecycles lifecycle : mAppLifecycles) {
            lifecycle.onCreate(mApplication);
        }
    }

    @Override
    public void onTerminate(@NonNull Application application) {
        if (mActivityLifecycle != null) {
            mApplication.unregisterActivityLifecycleCallbacks(mActivityLifecycle);
        }
        if (mActivityLifecycleForRxLifecycle != null) {
            mApplication.unregisterActivityLifecycleCallbacks(mActivityLifecycleForRxLifecycle);
        }
        if (mComponentCallback != null) {
            mApplication.unregisterComponentCallbacks(mComponentCallback);
        }
        if (mActivityLifecycles != null && mActivityLifecycles.size() > 0) {
            for (Application.ActivityLifecycleCallbacks lifecycle : mActivityLifecycles) {
                mApplication.unregisterActivityLifecycleCallbacks(lifecycle);
            }
        }
        if (mAppLifecycles != null && mAppLifecycles.size() > 0) {
            for (AppLifecycles lifecycle : mAppLifecycles) {
                lifecycle.onTerminate(mApplication);
            }
        }
        this.mAppComponent = null;
        this.mActivityLifecycle = null;
        this.mActivityLifecycleForRxLifecycle = null;
        this.mActivityLifecycles = null;
        this.mComponentCallback = null;
        this.mAppLifecycles = null;
        this.mApplication = null;
    }

    /**
     * 将app的全局配置信息封装进module(使用Dagger注入到需要配置信息的地方)
     * 需要在AndroidManifest中声明{@link ConfigModule}的实现类,和Glide的配置方式相似
     *
     * @return GlobalConfigModule
     */
    private GlobalConfigModule getGlobalConfigModule(Context context, List<ConfigModule> modules) {
        GlobalConfigModule.Builder builder = GlobalConfigModule
                .builder();

        //遍历 ConfigModule 集合, 给全局配置 GlobalConfigModule 添加参数
        for (ConfigModule module : modules) {
            module.applyOptions(context, builder);
        }

        return builder.build();
    }

    /**
     * 将 {@link AppComponent} 返回出去, 供其它地方使用, {@link AppComponent} 接口中声明的方法返回的实例, 在 {@link #getAppComponent()} 拿到对象后都可以直接使用
     *
     * @return AppComponent
     * @see ArmsUtils#obtainAppComponentFromContext(Context) 可直接获取 {@link AppComponent}
     */
    @NonNull
    @Override
    public AppComponent getAppComponent() {
        Preconditions.checkNotNull(mAppComponent,
                "%s == null, first call %s#onCreate(Application) in %s#onCreate()",
                AppComponent.class.getName(), getClass().getName(), mApplication == null
                        ? Application.class.getName() : mApplication.getClass().getName());
        return mAppComponent;
    }

    /**
     * {@link ComponentCallbacks2} 是一个细粒度的内存回收管理回调
     * {@link Application}、{@link Activity}、{@link Service}、{@link ContentProvider}、{@link Fragment} 实现了 {@link ComponentCallbacks2} 接口
     * 开发者应该实现 {@link ComponentCallbacks2#onTrimMemory(int)} 方法, 细粒度 release 内存, 参数的值不同可以体现出不同程度的内存可用情况
     * 响应 {@link ComponentCallbacks2#onTrimMemory(int)} 回调, 开发者的 App 会存活的更持久, 有利于用户体验
     * 不响应 {@link ComponentCallbacks2#onTrimMemory(int)} 回调, 系统 kill 掉进程的几率更大
     */
    private static class AppComponentCallbacks implements ComponentCallbacks2 {

        AppComponentCallbacks(Application application, AppComponent appComponent) {
        }

        /**
         * 在你的 App 生命周期的任何阶段, {@link ComponentCallbacks2#onTrimMemory(int)} 发生的回调都预示着你设备的内存资源已经开始紧张
         * 你应该根据 {@link ComponentCallbacks2#onTrimMemory(int)} 发生回调时的内存级别来进一步决定释放哪些资源
         * {@link ComponentCallbacks2#onTrimMemory(int)} 的回调可以发生在 {@link Application}、{@link Activity}、{@link Service}、{@link ContentProvider}、{@link Fragment}
         *
         * @param level 内存级别
         * @see <a href="https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_MODERATE">level 官方文档</a>
         */
        @Override
        public void onTrimMemory(int level) {
            //状态1. 当开发者的 App 正在运行
            //设备开始运行缓慢, 不会被 kill, 也不会被列为可杀死的, 但是设备此时正运行于低内存状态下, 系统开始触发杀死 LRU 列表中的进程的机制
//                case TRIM_MEMORY_RUNNING_MODERATE:


            //设备运行更缓慢了, 不会被 kill, 但请你回收 unused 资源, 以便提升系统的性能, 你应该释放不用的资源用来提升系统性能 (但是这也会直接影响到你的 App 的性能)
//                case TRIM_MEMORY_RUNNING_LOW:


            //设备运行特别慢, 当前 App 还不会被杀死, 但是系统已经把 LRU 列表中的大多数进程都已经杀死, 因此你应该立即释放所有非必须的资源
            //如果系统不能回收到足够的 RAM 数量, 系统将会清除所有的 LRU 列表中的进程, 并且开始杀死那些之前被认为不应该杀死的进程, 例如那个包含了一个运行态 Service 的进程
//                case TRIM_MEMORY_RUNNING_CRITICAL:


            //状态2. 当前 App UI 不再可见, 这是一个回收大个资源的好时机
//                case TRIM_MEMORY_UI_HIDDEN:


            //状态3. 当前的 App 进程被置于 Background LRU 列表中
            //进程位于 LRU 列表的上端, 尽管你的 App 进程并不是处于被杀掉的高危险状态, 但系统可能已经开始杀掉 LRU 列表中的其他进程了
            //你应该释放那些容易恢复的资源, 以便于你的进程可以保留下来, 这样当用户回退到你的 App 的时候才能够迅速恢复
//                case TRIM_MEMORY_BACKGROUND:


            //系统正运行于低内存状态并且你的进程已经已经接近 LRU 列表的中部位置, 如果系统的内存开始变得更加紧张, 你的进程是有可能被杀死的
//                case TRIM_MEMORY_MODERATE:


            //系统正运行于低内存的状态并且你的进程正处于 LRU 列表中最容易被杀掉的位置, 你应该释放任何不影响你的 App 恢复状态的资源
            //低于 API 14 的 App 可以使用 onLowMemory 回调
//                case TRIM_MEMORY_COMPLETE:
        }

        @Override
        public void onConfigurationChanged(Configuration newConfig) {

        }

        /**
         * 当系统开始清除 LRU 列表中的进程时, 尽管它会首先按照 LRU 的顺序来清除, 但是它同样会考虑进程的内存使用量, 因此消耗越少的进程则越容易被留下来
         * {@link ComponentCallbacks2#onTrimMemory(int)} 的回调是在 API 14 才被加进来的, 对于老的版本, 你可以使用 {@link ComponentCallbacks2#onLowMemory} 方法来进行兼容
         * {@link ComponentCallbacks2#onLowMemory} 相当于 {@code onTrimMemory(TRIM_MEMORY_COMPLETE)}
         *
         * @see #TRIM_MEMORY_COMPLETE
         */
        @Override
        public void onLowMemory() {
            //系统正运行于低内存的状态并且你的进程正处于 LRU 列表中最容易被杀掉的位置, 你应该释放任何不影响你的 App 恢复状态的资源
        }
    }
}



================================================
FILE: arms/src/main/java/com/jess/arms/base/delegate/AppLifecycles.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base.delegate;

import android.app.Application;
import android.content.Context;

import androidx.annotation.NonNull;

/**
 * ================================================
 * 用于代理 {@link Application} 的生命周期
 *
 * @see AppDelegate
 * Created by JessYan on 18/07/2017 17:43
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public interface AppLifecycles {
    void attachBaseContext(@NonNull Context base);

    void onCreate(@NonNull Application application);

    void onTerminate(@NonNull Application application);
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/delegate/FragmentDelegate.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base.delegate;

import android.content.Context;
import android.os.Bundle;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

/**
 * ================================================
 * {@link Fragment} 代理类,用于框架内部在每个 {@link Fragment} 的对应生命周期中插入需要的逻辑
 *
 * @see FragmentDelegateImpl
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki#3.13">FragmentDelegate wiki 官方文档</a>
 * Created by JessYan on 29/04/2017 14:30
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public interface FragmentDelegate {
    String FRAGMENT_DELEGATE = "FRAGMENT_DELEGATE";

    void onAttach(@NonNull Context context);

    void onCreate(@Nullable Bundle savedInstanceState);

    void onCreateView(@Nullable View view, @Nullable Bundle savedInstanceState);

    void onActivityCreate(@Nullable Bundle savedInstanceState);

    void onStart();

    void onResume();

    void onPause();

    void onStop();

    void onSaveInstanceState(@NonNull Bundle outState);

    void onDestroyView();

    void onDestroy();

    void onDetach();

    /**
     * Return true if the fragment is currently added to its activity.
     */
    boolean isAdded();
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/delegate/FragmentDelegateImpl.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base.delegate;

import android.content.Context;
import android.os.Bundle;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;

import com.jess.arms.integration.EventBusManager;
import com.jess.arms.utils.ArmsUtils;

import butterknife.ButterKnife;
import butterknife.Unbinder;
import timber.log.Timber;

/**
 * ================================================
 * {@link FragmentDelegate} 默认实现类
 * <p>
 * Created by JessYan on 29/04/2017 16:12
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public class FragmentDelegateImpl implements FragmentDelegate {
    private FragmentManager mFragmentManager;
    private Fragment mFragment;
    private IFragment iFragment;
    private Unbinder mUnbinder;

    public FragmentDelegateImpl(@NonNull FragmentManager fragmentManager, @NonNull Fragment fragment) {
        this.mFragmentManager = fragmentManager;
        this.mFragment = fragment;
        this.iFragment = (IFragment) fragment;
    }

    @Override
    public void onAttach(@NonNull Context context) {

    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        if (iFragment.useEventBus())//如果要使用eventbus请将此方法返回true
        {
            EventBusManager.getInstance().register(mFragment);//注册到事件主线
        }
        iFragment.setupFragmentComponent(ArmsUtils.obtainAppComponentFromContext(mFragment.getActivity()));
    }

    @Override
    public void onCreateView(@Nullable View view, @Nullable Bundle savedInstanceState) {
        //绑定到butterknife
        if (view != null) {
            mUnbinder = ButterKnife.bind(mFragment, view);
        }
    }

    @Override
    public void onActivityCreate(@Nullable Bundle savedInstanceState) {
        iFragment.initData(savedInstanceState);
    }

    @Override
    public void onStart() {

    }

    @Override
    public void onResume() {

    }

    @Override
    public void onPause() {

    }

    @Override
    public void onStop() {

    }

    @Override
    public void onSaveInstanceState(@NonNull Bundle outState) {

    }

    @Override
    public void onDestroyView() {
        if (mUnbinder != null && mUnbinder != Unbinder.EMPTY) {
            try {
                mUnbinder.unbind();
            } catch (IllegalStateException e) {
                e.printStackTrace();
                //fix Bindings already cleared
                Timber.w("onDestroyView: %s", e.getMessage());
            }
        }
    }

    @Override
    public void onDestroy() {
        if (iFragment != null && iFragment.useEventBus())//如果要使用eventbus请将此方法返回true
        {
            EventBusManager.getInstance().unregister(mFragment);//注册到事件主线
        }
        this.mUnbinder = null;
        this.mFragmentManager = null;
        this.mFragment = null;
        this.iFragment = null;
    }

    @Override
    public void onDetach() {

    }

    /**
     * Return true if the fragment is currently added to its activity.
     */
    @Override
    public boolean isAdded() {
        return mFragment != null && mFragment.isAdded();
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/delegate/IActivity.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base.delegate;


import android.app.Activity;
import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;

import com.jess.arms.base.BaseActivity;
import com.jess.arms.base.BaseFragment;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.integration.ActivityLifecycle;
import com.jess.arms.integration.cache.Cache;
import com.jess.arms.integration.cache.LruCache;

/**
 * ================================================
 * 框架要求框架中的每个 {@link Activity} 都需要实现此类,以满足规范
 *
 * @see BaseActivity
 * Created by JessYan on 26/04/2017 21:42
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public interface IActivity {

    /**
     * 提供在 {@link Activity} 生命周期内的缓存容器, 可向此 {@link Activity} 存取一些必要的数据
     * 此缓存容器和 {@link Activity} 的生命周期绑定, 如果 {@link Activity} 在屏幕旋转或者配置更改的情况下
     * 重新创建, 那此缓存容器中的数据也会被清空, 如果你想避免此种情况请使用 <a href="https://github.com/JessYanCoding/LifecycleModel">LifecycleModel</a>
     *
     * @return like {@link LruCache}
     */
    @NonNull
    Cache<String, Object> provideCache();

    /**
     * 提供 AppComponent (提供所有的单例对象) 给实现类, 进行 Component 依赖
     *
     * @param appComponent
     */
    void setupActivityComponent(@NonNull AppComponent appComponent);

    /**
     * 是否使用 EventBus
     * Arms 核心库现在并不会依赖某个 EventBus, 要想使用 EventBus, 还请在项目中自行依赖对应的 EventBus
     * 现在支持两种 EventBus, greenrobot 的 EventBus 和畅销书 《Android源码设计模式解析与实战》的作者 何红辉 所作的 AndroidEventBus
     * 确保依赖后, 将此方法返回 true, Arms 会自动检测您依赖的 EventBus, 并自动注册
     * 这种做法可以让使用者有自行选择三方库的权利, 并且还可以减轻 Arms 的体积
     *
     * @return 返回 {@code true}, Arms 会自动注册 EventBus
     */
    boolean useEventBus();

    /**
     * 初始化 View, 如果 {@link #initView(Bundle)} 返回 0, 框架则不会调用 {@link Activity#setContentView(int)}
     *
     * @param savedInstanceState
     * @return
     */
    int initView(@Nullable Bundle savedInstanceState);

    /**
     * 初始化数据
     *
     * @param savedInstanceState
     */
    void initData(@Nullable Bundle savedInstanceState);

    /**
     * 这个 Activity 是否会使用 Fragment,框架会根据这个属性判断是否注册 {@link FragmentManager.FragmentLifecycleCallbacks}
     * 如果返回{@code false},那意味着这个 Activity 不需要绑定 Fragment,那你再在这个 Activity 中绑定继承于 {@link BaseFragment} 的 Fragment 将不起任何作用
     *
     * @return
     * @see ActivityLifecycle#registerFragmentCallbacks (Fragment 的注册过程)
     */
    boolean useFragment();
}


================================================
FILE: arms/src/main/java/com/jess/arms/base/delegate/IFragment.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.base.delegate;

import android.app.Activity;
import android.os.Bundle;
import android.os.Message;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.jess.arms.base.BaseFragment;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.integration.cache.Cache;
import com.jess.arms.integration.cache.LruCache;

/**
 * ================================================
 * 框架要求框架中的每个 {@link Fragment} 都需要实现此类,以满足规范
 *
 * @see BaseFragment
 * Created by JessYan on 29/04/2017 14:31
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public interface IFragment {

    /**
     * 提供在 {@link Fragment} 生命周期内的缓存容器, 可向此 {@link Fragment} 存取一些必要的数据
     * 此缓存容器和 {@link Fragment} 的生命周期绑定, 如果 {@link Fragment} 在屏幕旋转或者配置更改的情况下
     * 重新创建, 那此缓存容器中的数据也会被清空, 如果你想避免此种情况请使用 <a href="https://github.com/JessYanCoding/LifecycleModel">LifecycleModel</a>
     *
     * @return like {@link LruCache}
     */
    @NonNull
    Cache<String, Object> provideCache();

    /**
     * 提供 AppComponent (提供所有的单例对象) 给实现类, 进行 Component 依赖
     *
     * @param appComponent
     */
    void setupFragmentComponent(@NonNull AppComponent appComponent);

    /**
     * 是否使用 EventBus
     * Arms 核心库现在并不会依赖某个 EventBus, 要想使用 EventBus, 还请在项目中自行依赖对应的 EventBus
     * 现在支持两种 EventBus, greenrobot 的 EventBus 和畅销书 《Android源码设计模式解析与实战》的作者 何红辉 所作的 AndroidEventBus
     * 确保依赖后, 将此方法返回 true, Arms 会自动检测您依赖的 EventBus, 并自动注册
     * 这种做法可以让使用者有自行选择三方库的权利, 并且还可以减轻 Arms 的体积
     *
     * @return 返回 {@code true}, Arms 会自动注册 EventBus
     */
    boolean useEventBus();

    /**
     * 初始化 View
     *
     * @param inflater
     * @param container
     * @param savedInstanceState
     * @return
     */
    View initView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState);

    /**
     * 初始化数据
     *
     * @param savedInstanceState
     */
    void initData(@Nullable Bundle savedInstanceState);

    /**
     * 通过此方法可以使 Fragment 能够与外界做一些交互和通信, 比如说外部的 Activity 想让自己持有的某个 Fragment 对象执行一些方法,
     * 建议在有多个需要与外界交互的方法时, 统一传 {@link Message}, 通过 what 字段来区分不同的方法, 在 {@link #setData(Object)}
     * 方法中就可以 {@code switch} 做不同的操作, 这样就可以用统一的入口方法做多个不同的操作, 可以起到分发的作用
     * <p>
     * 调用此方法时请注意调用时 Fragment 的生命周期, 如果调用 {@link #setData(Object)} 方法时 {@link Fragment#onCreate(Bundle)} 还没执行
     * 但在 {@link #setData(Object)} 里却调用了 Presenter 的方法, 是会报空的, 因为 Dagger 注入是在 {@link Fragment#onCreate(Bundle)} 方法中执行的
     * 然后才创建的 Presenter, 如果要做一些初始化操作,可以不必让外部调用 {@link #setData(Object)}, 在 {@link #initData(Bundle)} 中初始化就可以了
     * <p>
     * Example usage:
     * <pre>
     * public void setData(@Nullable Object data) {
     *     if (data != null && data instanceof Message) {
     *         switch (((Message) data).what) {
     *             case 0:
     *                 loadData(((Message) data).arg1);
     *                 break;
     *             case 1:
     *                 refreshUI();
     *                 break;
     *             default:
     *                 //do something
     *                 break;
     *         }
     *     }
     * }
     *
     * // call setData(Object):
     * Message data = new Message();
     * data.what = 0;
     * data.arg1 = 1;
     * fragment.setData(data);
     * </pre>
     * <p>
     * {@link #setData(Object)} 框架是不会调用的, 是拿给开发者自己去调用的, 让 {@link Activity} 或者其他类可以和 {@link Fragment} 通信,
     * 并且因为 {@link #setData(Object)} 是 {@link IFragment} 的方法, 所以你可以通过多态, 持有父类,
     * 不持有具体子类的方式就可以和子类 {@link Fragment} 通信, 这样如果需要替换子类, 就不会影响到其他地方,
     * 并且 {@link #setData(Object)} 可以通过传入 {@link Message} 作为参数, 使外部统一调用 {@link #setData(Object)},
     * 方法内部再通过 {@code switch(message.what)} 的方式, 从而在外部调用方式不变的情况下, 却可以扩展更多的方法,
     * 让方法扩展更多的参数, 这样不管 {@link Fragment} 子类怎么变, 它内部的方法以及方法的参数怎么变, 却不会影响到外部调用的任何一行代码
     *
     * @param data 当不需要参数时 {@code data} 可以为 {@code null}
     */
    void setData(@Nullable Object data);
}


================================================
FILE: arms/src/main/java/com/jess/arms/di/component/AppComponent.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.di.component;

import android.app.Activity;
import android.app.Application;
import android.content.Context;

import com.google.gson.Gson;
import com.jess.arms.base.delegate.AppDelegate;
import com.jess.arms.di.module.AppModule;
import com.jess.arms.di.module.ClientModule;
import com.jess.arms.di.module.GlobalConfigModule;
import com.jess.arms.http.imageloader.BaseImageLoaderStrategy;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.integration.ConfigModule;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.integration.cache.Cache;
import com.jess.arms.utils.ArmsUtils;

import java.io.File;
import java.util.concurrent.ExecutorService;

import javax.inject.Singleton;

import dagger.BindsInstance;
import dagger.Component;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
import okhttp3.OkHttpClient;

/**
 * ================================================
 * 可通过 {@link ArmsUtils#obtainAppComponentFromContext(Context)} 拿到此接口的实现类
 * 拥有此接口的实现类即可调用对应的方法拿到 Dagger 提供的对应实例
 *
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki#2.2">AppComponent wiki 官方文档</a>
 * Created by JessYan on 8/4/2016
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
@Singleton
@Component(modules = {AppModule.class, ClientModule.class, GlobalConfigModule.class})
public interface AppComponent {
    Application application();

    /**
     * 用于管理所有 {@link Activity}
     * 之前 {@link AppManager} 使用 Dagger 保证单例, 只能使用 {@link AppComponent#appManager()} 访问
     * 现在直接将 AppManager 独立为单例类, 可以直接通过静态方法 {@link AppManager#getAppManager()} 访问, 更加方便
     * 但为了不影响之前使用 {@link AppComponent#appManager()} 获取 {@link AppManager} 的项目, 所以暂时保留这种访问方式
     *
     * @return {@link AppManager}
     * @deprecated Use {@link AppManager#getAppManager()} instead
     */
    @Deprecated
    AppManager appManager();

    /**
     * 用于管理网络请求层, 以及数据缓存层
     *
     * @return {@link IRepositoryManager}
     */
    IRepositoryManager repositoryManager();

    /**
     * RxJava 错误处理管理类
     *
     * @return {@link RxErrorHandler}
     */
    RxErrorHandler rxErrorHandler();

    /**
     * 图片加载管理器, 用于加载图片的管理类, 使用策略者模式, 可在运行时动态替换任何图片加载框架
     * arms-imageloader-glide 提供 Glide 的策略实现类, 也可以自行实现
     * 需要在 {@link ConfigModule#applyOptions(Context, GlobalConfigModule.Builder)} 中
     * 手动注册 {@link BaseImageLoaderStrategy}, {@link ImageLoader} 才能正常使用
     *
     * @return
     */
    ImageLoader imageLoader();

    /**
     * 网络请求框架
     *
     * @return {@link OkHttpClient}
     */
    OkHttpClient okHttpClient();

    /**
     * Json 序列化库
     *
     * @return {@link Gson}
     */
    Gson gson();

    /**
     * 缓存文件根目录 (RxCache 和 Glide 的缓存都已经作为子文件夹放在这个根目录下), 应该将所有缓存都统一放到这个根目录下
     * 便于管理和清理, 可在 {@link ConfigModule#applyOptions(Context, GlobalConfigModule.Builder)} 种配置
     *
     * @return {@link File}
     */
    File cacheFile();

    /**
     * 用来存取一些整个 App 公用的数据, 切勿大量存放大容量数据, 这里的存放的数据和 {@link Application} 的生命周期一致
     *
     * @return {@link Cache}
     */
    Cache<String, Object> extras();

    /**
     * 用于创建框架所需缓存对象的工厂
     *
     * @return {@link Cache.Factory}
     */
    Cache.Factory cacheFactory();

    /**
     * 返回一个全局公用的线程池,适用于大多数异步需求。
     * 避免多个线程池创建带来的资源消耗。
     *
     * @return {@link ExecutorService}
     */
    ExecutorService executorService();

    void inject(AppDelegate delegate);

    @Component.Builder
    interface Builder {
        @BindsInstance
        Builder application(Application application);

        Builder globalConfigModule(GlobalConfigModule globalConfigModule);

        AppComponent build();
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/di/module/AppModule.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.di.module;

import android.app.Application;
import android.content.Context;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.integration.ActivityLifecycle;
import com.jess.arms.integration.AppManager;
import com.jess.arms.integration.FragmentLifecycle;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.integration.RepositoryManager;
import com.jess.arms.integration.cache.Cache;
import com.jess.arms.integration.cache.CacheType;
import com.jess.arms.integration.lifecycle.ActivityLifecycleForRxLifecycle;

import java.util.ArrayList;
import java.util.List;

import javax.inject.Named;
import javax.inject.Singleton;

import dagger.Binds;
import dagger.Module;
import dagger.Provides;

/**
 * ================================================
 * 提供一些框架必须的实例的 {@link Module}
 * <p>
 * Created by JessYan on 8/4/2016.
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
@Module
public abstract class AppModule {

    @Singleton
    @Provides
    static Gson provideGson(Application application, @Nullable GsonConfiguration configuration) {
        GsonBuilder builder = new GsonBuilder();
        if (configuration != null) {
            configuration.configGson(application, builder);
        }
        return builder.create();
    }

    /**
     * 之前 {@link AppManager} 使用 Dagger 保证单例, 只能使用 {@link AppComponent#appManager()} 访问
     * 现在直接将 AppManager 独立为单例类, 可以直接通过静态方法 {@link AppManager#getAppManager()} 访问, 更加方便
     * 但为了不影响之前使用 {@link AppComponent#appManager()} 获取 {@link AppManager} 的项目, 所以暂时保留这种访问方式
     *
     * @param application
     * @return
     */
    @Singleton
    @Provides
    static AppManager provideAppManager(Application application) {
        return AppManager.getAppManager().init(application);
    }

    @Singleton
    @Provides
    static Cache<String, Object> provideExtras(Cache.Factory cacheFactory) {
        //noinspection unchecked
        return cacheFactory.build(CacheType.EXTRAS);
    }

    @Singleton
    @Provides
    static List<FragmentManager.FragmentLifecycleCallbacks> provideFragmentLifecycles() {
        return new ArrayList<>();
    }

    @Binds
    abstract IRepositoryManager bindRepositoryManager(RepositoryManager repositoryManager);

    @Binds
    @Named("ActivityLifecycle")
    abstract Application.ActivityLifecycleCallbacks bindActivityLifecycle(ActivityLifecycle activityLifecycle);

    @Binds
    @Named("ActivityLifecycleForRxLifecycle")
    abstract Application.ActivityLifecycleCallbacks bindActivityLifecycleForRxLifecycle(ActivityLifecycleForRxLifecycle activityLifecycleForRxLifecycle);

    @Binds
    abstract FragmentManager.FragmentLifecycleCallbacks bindFragmentLifecycle(FragmentLifecycle fragmentLifecycle);

    public interface GsonConfiguration {
        void configGson(@NonNull Context context, @NonNull GsonBuilder builder);
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/di/module/ClientModule.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.di.module;

import android.app.Application;
import android.content.Context;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.google.gson.Gson;
import com.jess.arms.http.GlobalHttpHandler;
import com.jess.arms.http.log.RequestInterceptor;
import com.jess.arms.utils.DataHelper;

import java.io.File;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;

import javax.inject.Named;
import javax.inject.Singleton;

import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import io.rx_cache2.internal.RxCache;
import io.victoralbertos.jolyglot.GsonSpeaker;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
import me.jessyan.rxerrorhandler.handler.listener.ResponseErrorListener;
import okhttp3.Dispatcher;
import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * ================================================
 * 提供一些三方库客户端实例的 {@link Module}
 * <p>
 * Created by JessYan on 2016/3/14.
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
@Module
public abstract class ClientModule {
    private static final int TIME_OUT = 10;

    /**
     * 提供 {@link Retrofit}
     *
     * @param application   {@link Application}
     * @param configuration {@link RetrofitConfiguration}
     * @param builder       {@link Retrofit.Builder}
     * @param client        {@link OkHttpClient}
     * @param httpUrl       {@link HttpUrl}
     * @param gson          {@link Gson}
     * @return {@link Retrofit}
     */
    @Singleton
    @Provides
    static Retrofit provideRetrofit(Application application, @Nullable RetrofitConfiguration configuration, Retrofit.Builder builder, OkHttpClient client
            , HttpUrl httpUrl, Gson gson) {
        builder
                .baseUrl(httpUrl)//域名
                .client(client);//设置 OkHttp

        if (configuration != null) {
            configuration.configRetrofit(application, builder);
        }

        builder
                .addCallAdapterFactory(RxJava2CallAdapterFactory.create())//使用 RxJava
                .addConverterFactory(GsonConverterFactory.create(gson));//使用 Gson
        return builder.build();
    }

    /**
     * 提供 {@link OkHttpClient}
     *
     * @param application     {@link Application}
     * @param configuration   {@link OkhttpConfiguration}
     * @param builder         {@link OkHttpClient.Builder}
     * @param intercept       {@link Interceptor}
     * @param interceptors    {@link List<Interceptor>}
     * @param handler         {@link GlobalHttpHandler}
     * @param executorService {@link ExecutorService}
     * @return {@link OkHttpClient}
     */
    @Singleton
    @Provides
    static OkHttpClient provideClient(Application application, @Nullable OkhttpConfiguration configuration, OkHttpClient.Builder builder, Interceptor intercept
            , @Nullable List<Interceptor> interceptors, @Nullable GlobalHttpHandler handler, ExecutorService executorService) {
        builder
                .connectTimeout(TIME_OUT, TimeUnit.SECONDS)
                .readTimeout(TIME_OUT, TimeUnit.SECONDS)
                .addNetworkInterceptor(intercept);

        if (handler != null) {
            builder.addInterceptor(chain -> chain.proceed(handler.onHttpRequestBefore(chain, chain.request())));
        }

        //如果外部提供了 Interceptor 的集合则遍历添加
        if (interceptors != null) {
            for (Interceptor interceptor : interceptors) {
                builder.addInterceptor(interceptor);
            }
        }

        //为 OkHttp 设置默认的线程池
        builder.dispatcher(new Dispatcher(executorService));

        if (configuration != null) {
            configuration.configOkhttp(application, builder);
        }
        return builder.build();
    }

    @Singleton
    @Provides
    static Retrofit.Builder provideRetrofitBuilder() {
        return new Retrofit.Builder();
    }

    @Singleton
    @Provides
    static OkHttpClient.Builder provideClientBuilder() {
        return new OkHttpClient.Builder();
    }

    /**
     * 提供 {@link RxCache}
     *
     * @param application    {@link Application}
     * @param configuration  {@link RxCacheConfiguration}
     * @param cacheDirectory RxCache 缓存路径
     * @param gson           {@link Gson}
     * @return {@link RxCache}
     */
    @Singleton
    @Provides
    static RxCache provideRxCache(Application application, @Nullable RxCacheConfiguration configuration
            , @Named("RxCacheDirectory") File cacheDirectory, Gson gson) {
        RxCache.Builder builder = new RxCache.Builder();
        RxCache rxCache = null;
        if (configuration != null) {
            rxCache = configuration.configRxCache(application, builder);
        }
        if (rxCache != null) {
            return rxCache;
        }
        return builder
                .persistence(cacheDirectory, new GsonSpeaker(gson));
    }

    /**
     * 需要单独给 {@link RxCache} 提供子缓存文件
     *
     * @param cacheDir 框架缓存文件
     * @return {@link File}
     */
    @Singleton
    @Provides
    @Named("RxCacheDirectory")
    static File provideRxCacheDirectory(File cacheDir) {
        File cacheDirectory = new File(cacheDir, "RxCache");
        return DataHelper.makeDirs(cacheDirectory);
    }

    /**
     * 提供处理 RxJava 错误的管理器
     *
     * @param application {@link Application}
     * @param listener    {@link ResponseErrorListener}
     * @return {@link RxErrorHandler}
     */
    @Singleton
    @Provides
    static RxErrorHandler proRxErrorHandler(Application application, ResponseErrorListener listener) {
        return RxErrorHandler
                .builder()
                .with(application)
                .responseErrorListener(listener)
                .build();
    }

    @Binds
    abstract Interceptor bindInterceptor(RequestInterceptor interceptor);

    /**
     * {@link Retrofit} 自定义配置接口
     */
    public interface RetrofitConfiguration {
        void configRetrofit(@NonNull Context context, @NonNull Retrofit.Builder builder);
    }

    /**
     * {@link OkHttpClient} 自定义配置接口
     */
    public interface OkhttpConfiguration {
        void configOkhttp(@NonNull Context context, @NonNull OkHttpClient.Builder builder);
    }

    /**
     * {@link RxCache} 自定义配置接口
     */
    public interface RxCacheConfiguration {
        /**
         * 若想自定义 RxCache 的缓存文件夹或者解析方式, 如改成 FastJson
         * 请 {@code return rxCacheBuilder.persistence(cacheDirectory, new FastJsonSpeaker());}, 否则请 {@code return null;}
         *
         * @param context {@link Context}
         * @param builder {@link RxCache.Builder}
         * @return {@link RxCache}
         */
        RxCache configRxCache(@NonNull Context context, @NonNull RxCache.Builder builder);
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/di/module/GlobalConfigModule.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.di.module;

import android.app.Application;
import android.text.TextUtils;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.jess.arms.http.BaseUrl;
import com.jess.arms.http.GlobalHttpHandler;
import com.jess.arms.http.imageloader.BaseImageLoaderStrategy;
import com.jess.arms.http.log.DefaultFormatPrinter;
import com.jess.arms.http.log.FormatPrinter;
import com.jess.arms.http.log.RequestInterceptor;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.integration.cache.Cache;
import com.jess.arms.integration.cache.CacheType;
import com.jess.arms.integration.cache.IntelligentCache;
import com.jess.arms.integration.cache.LruCache;
import com.jess.arms.utils.DataHelper;
import com.jess.arms.utils.Preconditions;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import me.jessyan.rxerrorhandler.handler.listener.ResponseErrorListener;
import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.internal.Util;

/**
 * ================================================
 * 框架独创的建造者模式 {@link Module},可向框架中注入外部配置的自定义参数
 *
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki#3.1">GlobalConfigModule Wiki 官方文档</a>
 * Created by JessYan on 2016/3/14.
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
@Module
public class GlobalConfigModule {
    private HttpUrl mApiUrl;
    private BaseUrl mBaseUrl;
    private BaseImageLoaderStrategy mLoaderStrategy;
    private GlobalHttpHandler mHandler;
    private List<Interceptor> mInterceptors;
    private ResponseErrorListener mErrorListener;
    private File mCacheFile;
    private ClientModule.RetrofitConfiguration mRetrofitConfiguration;
    private ClientModule.OkhttpConfiguration mOkhttpConfiguration;
    private ClientModule.RxCacheConfiguration mRxCacheConfiguration;
    private AppModule.GsonConfiguration mGsonConfiguration;
    private RequestInterceptor.Level mPrintHttpLogLevel;
    private FormatPrinter mFormatPrinter;
    private Cache.Factory mCacheFactory;
    private ExecutorService mExecutorService;
    private IRepositoryManager.ObtainServiceDelegate mObtainServiceDelegate;

    private GlobalConfigModule(Builder builder) {
        this.mApiUrl = builder.apiUrl;
        this.mBaseUrl = builder.baseUrl;
        this.mLoaderStrategy = builder.loaderStrategy;
        this.mHandler = builder.handler;
        this.mInterceptors = builder.interceptors;
        this.mErrorListener = builder.responseErrorListener;
        this.mCacheFile = builder.cacheFile;
        this.mRetrofitConfiguration = builder.retrofitConfiguration;
        this.mOkhttpConfiguration = builder.okhttpConfiguration;
        this.mRxCacheConfiguration = builder.rxCacheConfiguration;
        this.mGsonConfiguration = builder.gsonConfiguration;
        this.mPrintHttpLogLevel = builder.printHttpLogLevel;
        this.mFormatPrinter = builder.formatPrinter;
        this.mCacheFactory = builder.cacheFactory;
        this.mExecutorService = builder.executorService;
        this.mObtainServiceDelegate = builder.obtainServiceDelegate;
    }

    public static Builder builder() {
        return new Builder();
    }

    @Singleton
    @Provides
    @Nullable
    List<Interceptor> provideInterceptors() {
        return mInterceptors;
    }

    /**
     * 提供 BaseUrl,默认使用 <"https://api.github.com/">
     *
     * @return
     */
    @Singleton
    @Provides
    HttpUrl provideBaseUrl() {
        if (mBaseUrl != null) {
            HttpUrl httpUrl = mBaseUrl.url();
            if (httpUrl != null) {
                return httpUrl;
            }
        }
        return mApiUrl == null ? HttpUrl.parse("https://api.github.com/") : mApiUrl;
    }

    /**
     * 提供图片加载框架,默认使用 {@link Glide}
     *
     * @return
     */
    @Singleton
    @Provides
    @Nullable
    BaseImageLoaderStrategy provideImageLoaderStrategy() {
        return mLoaderStrategy;
    }

    /**
     * 提供处理 Http 请求和响应结果的处理类
     *
     * @return
     */
    @Singleton
    @Provides
    @Nullable
    GlobalHttpHandler provideGlobalHttpHandler() {
        return mHandler;
    }

    /**
     * 提供缓存文件
     */
    @Singleton
    @Provides
    File provideCacheFile(Application application) {
        return mCacheFile == null ? DataHelper.getCacheFile(application) : mCacheFile;
    }

    /**
     * 提供处理 RxJava 错误的管理器的回调
     *
     * @return
     */
    @Singleton
    @Provides
    ResponseErrorListener provideResponseErrorListener() {
        return mErrorListener == null ? ResponseErrorListener.EMPTY : mErrorListener;
    }

    @Singleton
    @Provides
    @Nullable
    ClientModule.RetrofitConfiguration provideRetrofitConfiguration() {
        return mRetrofitConfiguration;
    }

    @Singleton
    @Provides
    @Nullable
    ClientModule.OkhttpConfiguration provideOkhttpConfiguration() {
        return mOkhttpConfiguration;
    }

    @Singleton
    @Provides
    @Nullable
    ClientModule.RxCacheConfiguration provideRxCacheConfiguration() {
        return mRxCacheConfiguration;
    }

    @Singleton
    @Provides
    @Nullable
    AppModule.GsonConfiguration provideGsonConfiguration() {
        return mGsonConfiguration;
    }

    @Singleton
    @Provides
    RequestInterceptor.Level providePrintHttpLogLevel() {
        return mPrintHttpLogLevel == null ? RequestInterceptor.Level.ALL : mPrintHttpLogLevel;
    }

    @Singleton
    @Provides
    FormatPrinter provideFormatPrinter() {
        return mFormatPrinter == null ? new DefaultFormatPrinter() : mFormatPrinter;
    }

    @Singleton
    @Provides
    Cache.Factory provideCacheFactory(Application application) {
        return mCacheFactory == null ? type -> {
            //若想自定义 LruCache 的 size, 或者不想使用 LruCache, 想使用自己自定义的策略
            //使用 GlobalConfigModule.Builder#cacheFactory() 即可扩展
            switch (type.getCacheTypeId()) {
                //Activity、Fragment 以及 Extras 使用 IntelligentCache (具有 LruCache 和 可永久存储数据的 Map)
                case CacheType.EXTRAS_TYPE_ID:
                case CacheType.ACTIVITY_CACHE_TYPE_ID:
                case CacheType.FRAGMENT_CACHE_TYPE_ID:
                    return new IntelligentCache(type.calculateCacheSize(application));
                //其余使用 LruCache (当达到最大容量时可根据 LRU 算法抛弃不合规数据)
                default:
                    return new LruCache(type.calculateCacheSize(application));
            }
        } : mCacheFactory;
    }

    /**
     * 返回一个全局公用的线程池,适用于大多数异步需求。
     * 避免多个线程池创建带来的资源消耗。
     *
     * @return {@link Executor}
     */
    @Singleton
    @Provides
    ExecutorService provideExecutorService() {
        return mExecutorService == null ? new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60, TimeUnit.SECONDS,
                new SynchronousQueue<>(), Util.threadFactory("Arms Executor", false)) : mExecutorService;
    }

    @Singleton
    @Provides
    @Nullable
    IRepositoryManager.ObtainServiceDelegate provideObtainServiceDelegate() {
        return mObtainServiceDelegate;
    }

    public static final class Builder {
        private HttpUrl apiUrl;
        private BaseUrl baseUrl;
        private BaseImageLoaderStrategy loaderStrategy;
        private GlobalHttpHandler handler;
        private List<Interceptor> interceptors;
        private ResponseErrorListener responseErrorListener;
        private File cacheFile;
        private ClientModule.RetrofitConfiguration retrofitConfiguration;
        private ClientModule.OkhttpConfiguration okhttpConfiguration;
        private ClientModule.RxCacheConfiguration rxCacheConfiguration;
        private AppModule.GsonConfiguration gsonConfiguration;
        private RequestInterceptor.Level printHttpLogLevel;
        private FormatPrinter formatPrinter;
        private Cache.Factory cacheFactory;
        private ExecutorService executorService;
        private IRepositoryManager.ObtainServiceDelegate obtainServiceDelegate;

        private Builder() {
        }

        public Builder baseurl(String baseUrl) {//基础url
            if (TextUtils.isEmpty(baseUrl)) {
                throw new NullPointerException("BaseUrl can not be empty");
            }
            this.apiUrl = HttpUrl.parse(baseUrl);
            return this;
        }

        public Builder baseurl(BaseUrl baseUrl) {
            this.baseUrl = Preconditions.checkNotNull(baseUrl, BaseUrl.class.getCanonicalName() + "can not be null.");
            return this;
        }

        public Builder imageLoaderStrategy(BaseImageLoaderStrategy loaderStrategy) {//用来请求网络图片
            this.loaderStrategy = loaderStrategy;
            return this;
        }

        public Builder globalHttpHandler(GlobalHttpHandler handler) {//用来处理http响应结果
            this.handler = handler;
            return this;
        }

        public Builder addInterceptor(Interceptor interceptor) {//动态添加任意个interceptor
            if (interceptors == null) {
                interceptors = new ArrayList<>();
            }
            this.interceptors.add(interceptor);
            return this;
        }

        public Builder responseErrorListener(ResponseErrorListener listener) {//处理所有RxJava的onError逻辑
            this.responseErrorListener = listener;
            return this;
        }

        public Builder cacheFile(File cacheFile) {
            this.cacheFile = cacheFile;
            return this;
        }

        public Builder retrofitConfiguration(ClientModule.RetrofitConfiguration retrofitConfiguration) {
            this.retrofitConfiguration = retrofitConfiguration;
            return this;
        }

        public Builder okhttpConfiguration(ClientModule.OkhttpConfiguration okhttpConfiguration) {
            this.okhttpConfiguration = okhttpConfiguration;
            return this;
        }

        public Builder rxCacheConfiguration(ClientModule.RxCacheConfiguration rxCacheConfiguration) {
            this.rxCacheConfiguration = rxCacheConfiguration;
            return this;
        }

        public Builder gsonConfiguration(AppModule.GsonConfiguration gsonConfiguration) {
            this.gsonConfiguration = gsonConfiguration;
            return this;
        }

        public Builder printHttpLogLevel(RequestInterceptor.Level printHttpLogLevel) {//是否让框架打印 Http 的请求和响应信息
            this.printHttpLogLevel = Preconditions.checkNotNull(printHttpLogLevel, "The printHttpLogLevel can not be null, use RequestInterceptor.Level.NONE instead.");
            return this;
        }

        public Builder formatPrinter(FormatPrinter formatPrinter) {
            this.formatPrinter = Preconditions.checkNotNull(formatPrinter, FormatPrinter.class.getCanonicalName() + "can not be null.");
            return this;
        }

        public Builder cacheFactory(Cache.Factory cacheFactory) {
            this.cacheFactory = cacheFactory;
            return this;
        }

        public Builder executorService(ExecutorService executorService) {
            this.executorService = executorService;
            return this;
        }

        public Builder obtainServiceDelegate(IRepositoryManager.ObtainServiceDelegate obtainServiceDelegate) {
            this.obtainServiceDelegate = obtainServiceDelegate;
            return this;
        }

        public GlobalConfigModule build() {
            return new GlobalConfigModule(this);
        }
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/di/scope/ActivityScope.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.di.scope;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;

import javax.inject.Scope;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * A scoping annotation to permit objects whose lifetime should
 * conform to the life of the activity to be memorized in the
 * correct component.
 */
@Scope
@Documented
@Retention(RUNTIME)
public @interface ActivityScope {
}


================================================
FILE: arms/src/main/java/com/jess/arms/di/scope/FragmentScope.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.di.scope;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;

import javax.inject.Scope;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * A scoping annotation to permit objects whose lifetime should
 * conform to the life of the fragment to be memorized in the
 * correct component.
 */
@Scope
@Documented
@Retention(RUNTIME)
public @interface FragmentScope {
}


================================================
FILE: arms/src/main/java/com/jess/arms/http/BaseUrl.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.http;

import androidx.annotation.NonNull;

import okhttp3.HttpUrl;

/**
 * ================================================
 * 针对于 BaseUrl 在 App 启动时不能确定,需要请求服务器接口动态获取的应用场景
 * <p>
 * Created by JessYan on 11/07/2017 14:58
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public interface BaseUrl {
    /**
     * 在调用 Retrofit API 接口之前,使用 Okhttp 或其他方式,请求到正确的 BaseUrl 并通过此方法返回
     *
     * @return
     */
    @NonNull
    HttpUrl url();
}


================================================
FILE: arms/src/main/java/com/jess/arms/http/GlobalHttpHandler.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.http;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.jess.arms.di.module.GlobalConfigModule;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

/**
 * ================================================
 * 处理 Http 请求和响应结果的处理类
 * 使用 {@link GlobalConfigModule.Builder#globalHttpHandler(GlobalHttpHandler)} 方法配置
 *
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki#3.2">GlobalHttpHandler Wiki 官方文档</a>
 * Created by JessYan on 8/30/16 17:47
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public interface GlobalHttpHandler {

    /**
     * 空实现
     */
    GlobalHttpHandler EMPTY = new GlobalHttpHandler() {

        @NonNull
        @Override
        public Response onHttpResultResponse(@Nullable String httpResult, @NonNull Interceptor.Chain chain, @NonNull Response response) {
            //不管是否处理, 都必须将 response 返回出去
            return response;
        }

        @NonNull
        @Override
        public Request onHttpRequestBefore(@NonNull Interceptor.Chain chain, @NonNull Request request) {
            //不管是否处理, 都必须将 request 返回出去
            return request;
        }
    };

    /**
     * 这里可以先客户端一步拿到每一次 Http 请求的结果, 可以先解析成 Json, 再做一些操作, 如检测到 token 过期后
     * 重新请求 token, 并重新执行请求
     *
     * @param httpResult 服务器返回的结果 (已被框架自动转换为字符串)
     * @param chain      {@link okhttp3.Interceptor.Chain}
     * @param response   {@link Response}
     * @return {@link Response}
     */
    @NonNull
    Response onHttpResultResponse(@Nullable String httpResult, @NonNull Interceptor.Chain chain, @NonNull Response response);

    /**
     * 这里可以在请求服务器之前拿到 {@link Request}, 做一些操作比如给 {@link Request} 统一添加 token 或者 header 以及参数加密等操作
     *
     * @param chain   {@link okhttp3.Interceptor.Chain}
     * @param request {@link Request}
     * @return {@link Request}
     */
    @NonNull
    Request onHttpRequestBefore(@NonNull Interceptor.Chain chain, @NonNull Request request);
}


================================================
FILE: arms/src/main/java/com/jess/arms/http/OkHttpStreamFetcher.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.http;

import android.util.Log;

import androidx.annotation.NonNull;

import com.bumptech.glide.Priority;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.HttpException;
import com.bumptech.glide.load.data.DataFetcher;
import com.bumptech.glide.load.model.GlideUrl;
import com.bumptech.glide.util.ContentLengthInputStream;
import com.bumptech.glide.util.Preconditions;

import java.io.IOException;
import java.io.InputStream;
import java.util.Map;

import okhttp3.Call;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;

/**
 * Fetches an {@link InputStream} using the okhttp library.
 */
public class OkHttpStreamFetcher implements DataFetcher<InputStream>, okhttp3.Callback {
    private static final String TAG = "OkHttpFetcher";
    private final Call.Factory client;
    private final GlideUrl url;
    private InputStream stream;
    private ResponseBody responseBody;
    private DataCallback<? super InputStream> callback;
    // call may be accessed on the main thread while the object is in use on other threads. All other
    // accesses to variables may occur on different threads, but only one at a time.
    private volatile Call call;

    // Public API.
    @SuppressWarnings("WeakerAccess")
    public OkHttpStreamFetcher(Call.Factory client, GlideUrl url) {
        this.client = client;
        this.url = url;
    }

    @Override
    public void loadData(@NonNull Priority priority,
                         @NonNull final DataCallback<? super InputStream> callback) {
        Request.Builder requestBuilder = new Request.Builder().url(url.toStringUrl());
        for (Map.Entry<String, String> headerEntry : url.getHeaders().entrySet()) {
            String key = headerEntry.getKey();
            requestBuilder.addHeader(key, headerEntry.getValue());
        }
        Request request = requestBuilder.build();
        this.callback = callback;

        call = client.newCall(request);
        call.enqueue(this);
    }

    @Override
    public void onFailure(@NonNull Call call, @NonNull IOException e) {
        if (Log.isLoggable(TAG, Log.DEBUG)) {
            Log.d(TAG, "OkHttp failed to obtain result", e);
        }

        callback.onLoadFailed(e);
    }

    @Override
    public void onResponse(@NonNull Call call, @NonNull Response response) {
        responseBody = response.body();
        if (response.isSuccessful()) {
            long contentLength = Preconditions.checkNotNull(responseBody).contentLength();
            stream = ContentLengthInputStream.obtain(responseBody.byteStream(), contentLength);
            callback.onDataReady(stream);
        } else {
            callback.onLoadFailed(new HttpException(response.message(), response.code()));
        }
    }

    @Override
    public void cleanup() {
        try {
            if (stream != null) {
                stream.close();
            }
        } catch (IOException e) {
            // Ignored
        }
        if (responseBody != null) {
            responseBody.close();
        }
        callback = null;
    }

    @Override
    public void cancel() {
        Call local = call;
        if (local != null) {
            local.cancel();
        }
    }

    @NonNull
    @Override
    public Class<InputStream> getDataClass() {
        return InputStream.class;
    }

    @NonNull
    @Override
    public DataSource getDataSource() {
        return DataSource.REMOTE;
    }
}

================================================
FILE: arms/src/main/java/com/jess/arms/http/OkHttpUrlLoader.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.http;

import androidx.annotation.NonNull;

import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.model.GlideUrl;
import com.bumptech.glide.load.model.ModelLoader;
import com.bumptech.glide.load.model.ModelLoaderFactory;
import com.bumptech.glide.load.model.MultiModelLoaderFactory;

import org.jetbrains.annotations.NotNull;

import java.io.InputStream;

import okhttp3.Call;
import okhttp3.OkHttpClient;

/**
 * A simple model loader for fetching media over http/https using OkHttp.
 */
public class OkHttpUrlLoader implements ModelLoader<GlideUrl, InputStream> {

    private final Call.Factory client;

    // Public API.
    @SuppressWarnings("WeakerAccess")
    public OkHttpUrlLoader(@NonNull Call.Factory client) {
        this.client = client;
    }

    @Override
    public boolean handles(@NonNull GlideUrl url) {
        return true;
    }

    @Override
    public LoadData<InputStream> buildLoadData(@NonNull GlideUrl model, int width, int height,
                                               @NonNull Options options) {
        return new LoadData<>(model, new OkHttpStreamFetcher(client, model));
    }

    /**
     * The default factory for {@link OkHttpUrlLoader}s.
     */
    // Public API.
    @SuppressWarnings("WeakerAccess")
    public static class Factory implements ModelLoaderFactory<GlideUrl, InputStream> {
        private static volatile Call.Factory internalClient;
        private final Call.Factory client;

        /**
         * Constructor for a new Factory that runs requests using a static singleton client.
         */
        public Factory() {
            this(getInternalClient());
        }

        /**
         * Constructor for a new Factory that runs requests using given client.
         *
         * @param client this is typically an instance of {@code OkHttpClient}.
         */
        public Factory(@NonNull Call.Factory client) {
            this.client = client;
        }

        private static Call.Factory getInternalClient() {
            if (internalClient == null) {
                synchronized (Factory.class) {
                    if (internalClient == null) {
                        internalClient = new OkHttpClient();
                    }
                }
            }
            return internalClient;
        }

        @NonNull
        @Override
        public ModelLoader<GlideUrl, InputStream> build(@NotNull MultiModelLoaderFactory multiFactory) {
            return new OkHttpUrlLoader(client);
        }

        @Override
        public void teardown() {
            // Do nothing, this instance doesn't own the client.
        }
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/http/imageloader/BaseImageLoaderStrategy.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.http.imageloader;

import android.content.Context;

import androidx.annotation.Nullable;

/**
 * ================================================
 * 图片加载策略,实现 {@link BaseImageLoaderStrategy}
 * 并通过 {@link ImageLoader#setLoadImgStrategy(BaseImageLoaderStrategy)} 配置后,才可进行图片请求
 * <p>
 * Created by JessYan on 8/5/2016 15:50
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public interface BaseImageLoaderStrategy<T extends ImageConfig> {

    /**
     * 加载图片
     *
     * @param ctx    {@link Context}
     * @param config 图片加载配置信息
     */
    void loadImage(@Nullable Context ctx, @Nullable T config);

    /**
     * 停止加载
     *
     * @param ctx    {@link Context}
     * @param config 图片加载配置信息
     */
    void clear(@Nullable Context ctx, @Nullable T config);
}


================================================
FILE: arms/src/main/java/com/jess/arms/http/imageloader/ImageConfig.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.http.imageloader;

import android.widget.ImageView;

/**
 * ================================================
 * 这里是图片加载配置信息的基类,定义一些所有图片加载框架都可以用的通用参数
 * 每个 {@link BaseImageLoaderStrategy} 应该对应一个 {@link ImageConfig} 实现类
 * <p>
 * Created by JessYan on 8/5/16 15:19
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public class ImageConfig {
    protected String url;
    protected ImageView imageView;
    protected int placeholder;//占位符
    protected int errorPic;//错误占位符

    public String getUrl() {
        return url;
    }

    public ImageView getImageView() {
        return imageView;
    }

    public int getPlaceholder() {
        return placeholder;
    }

    public int getErrorPic() {
        return errorPic;
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/http/imageloader/ImageLoader.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.http.imageloader;

import android.content.Context;

import androidx.annotation.Nullable;

import com.jess.arms.utils.Preconditions;

import javax.inject.Inject;
import javax.inject.Singleton;

/**
 * ================================================
 * {@link ImageLoader} 使用策略模式和建造者模式,可以动态切换图片请求框架(比如说切换成 Picasso )
 * 当需要切换图片请求框架或图片请求框架升级后变更了 Api 时
 * 这里可以将影响范围降到最低,所以封装 {@link ImageLoader} 是为了屏蔽这个风险
 *
 * @see <a href="https://github.com/JessYanCoding/MVPArms/wiki#3.4">ImageLoader wiki 文档</a>
 * Created by JessYan on 8/5/16 15:57
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
@Singleton
public final class ImageLoader {
    @Inject
    @Nullable
    BaseImageLoaderStrategy mStrategy;

    @Inject
    public ImageLoader() {
    }

    /**
     * 加载图片
     *
     * @param context
     * @param config
     * @param <T>
     */
    public <T extends ImageConfig> void loadImage(Context context, T config) {
        Preconditions.checkNotNull(mStrategy, "Please implement BaseImageLoaderStrategy and call GlobalConfigModule.Builder#imageLoaderStrategy(BaseImageLoaderStrategy) in the applyOptions method of ConfigModule");
        //noinspection unchecked
        this.mStrategy.loadImage(context, config);
    }

    /**
     * 停止加载或清理缓存
     *
     * @param context
     * @param config
     * @param <T>
     */
    public <T extends ImageConfig> void clear(Context context, T config) {
        Preconditions.checkNotNull(mStrategy, "Please implement BaseImageLoaderStrategy and call GlobalConfigModule.Builder#imageLoaderStrategy(BaseImageLoaderStrategy) in the applyOptions method of ConfigModule");
        //noinspection unchecked
        this.mStrategy.clear(context, config);
    }

    @Nullable
    public BaseImageLoaderStrategy getLoadImgStrategy() {
        return mStrategy;
    }

    /**
     * 可在运行时随意切换 {@link BaseImageLoaderStrategy}
     *
     * @param strategy
     */
    public void setLoadImgStrategy(BaseImageLoaderStrategy strategy) {
        Preconditions.checkNotNull(strategy, "strategy == null");
        this.mStrategy = strategy;
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/http/imageloader/glide/GlideAppliesOptions.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.http.imageloader.glide;

import android.content.Context;

import androidx.annotation.NonNull;

import com.bumptech.glide.Glide;
import com.bumptech.glide.GlideBuilder;
import com.bumptech.glide.Registry;
import com.jess.arms.http.imageloader.BaseImageLoaderStrategy;

/**
 * ================================================
 * 如果你想具有配置 @{@link Glide} 的权利,则需要让 {@link BaseImageLoaderStrategy}
 * 的实现类也必须实现 {@link GlideAppliesOptions}
 * <p>
 * Created by JessYan on 13/08/2017 22:02
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public interface GlideAppliesOptions {

    /**
     * 配置 @{@link Glide} 的自定义参数,此方法在 @{@link Glide} 初始化时执行(@{@link Glide} 在第一次被调用时初始化),只会执行一次
     *
     * @param context
     * @param builder {@link GlideBuilder} 此类被用来创建 Glide
     */
    void applyGlideOptions(@NonNull Context context, @NonNull GlideBuilder builder);

    /**
     * 注册{@link Glide}的组件,参考{@link com.bumptech.glide.module.LibraryGlideModule}
     *
     * @param context  Android context
     * @param glide    {@link Glide}
     * @param registry {@link Registry}
     */
    void registerComponents(@NonNull Context context, @NonNull Glide glide, @NonNull Registry registry);
}


================================================
FILE: arms/src/main/java/com/jess/arms/http/imageloader/glide/GlideConfiguration.java
================================================
/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.http.imageloader.glide;

import android.content.Context;

import androidx.annotation.NonNull;

import com.bumptech.glide.Glide;
import com.bumptech.glide.GlideBuilder;
import com.bumptech.glide.Registry;
import com.bumptech.glide.annotation.GlideModule;
import com.bumptech.glide.load.engine.bitmap_recycle.LruBitmapPool;
import com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper;
import com.bumptech.glide.load.engine.cache.LruResourceCache;
import com.bumptech.glide.load.engine.cache.MemorySizeCalculator;
import com.bumptech.glide.load.model.GlideUrl;
import com.bumptech.glide.module.AppGlideModule;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.http.OkHttpUrlLoader;
import com.jess.arms.http.imageloader.BaseImageLoaderStrategy;
import com.jess.arms.utils.ArmsUtils;
import com.jess.arms.utils.DataHelper;

import java.io.File;
import java.io.InputStream;

/**
 * ================================================
 * {@link AppGlideModule} 的默认实现类
 * 用于配置缓存文件夹,切换图片请求框架等操作
 * <p>
 * Created by JessYan on 16/4/15.
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
@GlideModule(glideName = "GlideArms")
public class GlideConfiguration extends AppGlideModule {
    public static final int IMAGE_DISK_CACHE_MAX_SIZE = 100 * 1024 * 1024;//图片缓存文件最大值为100Mb

    @Override
    public void applyOptions(@NonNull Context context, @NonNull GlideBuilder builder) {
        final AppComponent appComponent = ArmsUtils.obtainAppComponentFromContext(context);
        builder.setDiskCache(() -> {
            // Careful: the external cache directory doesn't enforce permissions
            return DiskLruCacheWrapper.create(DataHelper.makeDirs(new File(appComponent.cacheFile(), "Glide")), IMAGE_DISK_CACHE_MAX_SIZE);
        });

        MemorySizeCalculator calculator = new MemorySizeCalculator.Builder(context).build();
        int defaultMemoryCacheSize = calculator.getMemoryCacheSize();
        int defaultBitmapPoolSize = calculator.getBitmapPoolSize();

        int customMemoryCacheSize = (int) (1.2 * defaultMemoryCacheSize);
        int customBitmapPoolSize = (int) (1.2 * defaultBitmapPoolSize);

        builder.setMemoryCache(new LruResourceCache(customMemoryCacheSize));
        builder.setBitmapPool(new LruBitmapPool(customBitmapPoolSize));

        //将配置 Glide 的机会转交给 GlideImageLoaderStrategy,如你觉得框架提供的 GlideImageLoaderStrategy
        //并不能满足自己的需求,想自定义 BaseImageLoaderStrategy,那请你最好实现 GlideAppliesOptions
        //因为只有成为 GlideAppliesOptions 的实现类,这里才能调用 applyGlideOptions(),让你具有配置 Glide 的权利
        BaseImageLoaderStrategy loadImgStrategy = appComponent.imageLoader().getLoadImgStrategy();
        if (loadImgStrategy instanceof GlideAppliesOptions) {
            ((GlideAppliesOptions) loadImgStrategy).applyGlideOptions(context, builder);
        }
    }

    @Override
    public void registerComponents(@NonNull Context context, @NonNull Glide glide, @NonNull Registry registry) {
        //Glide 默认使用 HttpURLConnection 做网络请求,在这切换成 Okhttp 请求
        AppComponent appComponent = ArmsUtils.obtainAppComponentFromContext(context);
        registry.replace(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(appComponent.okHttpClient()));

        BaseImageLoaderStrategy loadImgStrategy = appComponent.imageLoader().getLoadImgStrategy();
        if (loadImgStrategy instanceof GlideAppliesOptions) {
            ((GlideAppliesOptions) loadImgStrategy).registerComponents(context, glide, registry);
        }
    }

    @Override
    public boolean isManifestParsingEnabled() {
        return false;
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/http/log/DefaultFormatPrinter.java
================================================
/*
 * Copyright 2018 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.http.log;

import android.text.TextUtils;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.jess.arms.di.module.GlobalConfigModule;
import com.jess.arms.utils.CharacterHandler;
import com.jess.arms.utils.LogUtils;

import java.util.List;

import okhttp3.MediaType;
import okhttp3.Request;

/**
 * ================================================
 * 对 OkHttp 的请求和响应信息进行更规范和清晰的打印, 此类为框架默认实现, 以默认格式打印信息, 若觉得默认打印格式
 * 并不能满足自己的需求, 可自行扩展自己理想的打印格式
 *
 * @see GlobalConfigModule.Builder#formatPrinter(FormatPrinter)
 * Created by JessYan on 25/01/2018 14:51
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public class DefaultFormatPrinter implements FormatPrinter {
    private static final String TAG = "ArmsHttpLog";
    private static final String LINE_SEPARATOR = System.getProperty("line.separator");
    private static final String DOUBLE_SEPARATOR = LINE_SEPARATOR + LINE_SEPARATOR;

    private static final String[] OMITTED_RESPONSE = {LINE_SEPARATOR, "Omitted response body"};
    private static final String[] OMITTED_REQUEST = {LINE_SEPARATOR, "Omitted request body"};

    private static final String N = "\n";
    private static final String T = "\t";
    private static final String REQUEST_UP_LINE = "   ┌────── Request ────────────────────────────────────────────────────────────────────────";
    private static final String END_LINE = "   └───────────────────────────────────────────────────────────────────────────────────────";
    private static final String RESPONSE_UP_LINE = "   ┌────── Response ───────────────────────────────────────────────────────────────────────";
    private static final String BODY_TAG = "Body:";
    private static final String URL_TAG = "URL: ";
    private static final String METHOD_TAG = "Method: @";
    private static final String HEADERS_TAG = "Headers:";
    private static final String STATUS_CODE_TAG = "Status Code: ";
    private static final String RECEIVED_TAG = "Received in: ";
    private static final String CORNER_UP = "┌ ";
    private static final String CORNER_BOTTOM = "└ ";
    private static final String CENTER_LINE = "├ ";
    private static final String DEFAULT_LINE = "│ ";
    private static final String[] ARMS = new String[]{"-A-", "-R-", "-M-", "-S-"};
    private static ThreadLocal<Integer> last = new ThreadLocal<Integer>() {
        @Override
        protected Integer initialValue() {
            return 0;
        }
    };

    private static boolean isEmpty(String line) {
        return TextUtils.isEmpty(line) || N.equals(line) || T.equals(line) || TextUtils.isEmpty(line.trim());
    }

    /**
     * 对 {@code lines} 中的信息进行逐行打印
     *
     * @param tag
     * @param lines
     * @param withLineSize 为 {@code true} 时, 每行的信息长度不会超过110, 超过则自动换行
     */
    private static void logLines(String tag, String[] lines, boolean withLineSize) {
        for (String line : lines) {
            int lineLength = line.length();
            int maxLongSize = withLineSize ? 110 : lineLength;
            for (int i = 0; i <= lineLength / maxLongSize; i++) {
                int start = i * maxLongSize;
                int end = (i + 1) * maxLongSize;
                end = end > line.length() ? line.length() : end;
                LogUtils.debugInfo(resolveTag(tag), DEFAULT_LINE + line.substring(start, end));
            }
        }
    }

    private static String computeKey() {
        if (last.get() >= 4) {
            last.set(0);
        }
        String s = ARMS[last.get()];
        last.set(last.get() + 1);
        return s;
    }

    /**
     * 此方法是为了解决在 AndroidStudio v3.1 以上 Logcat 输出的日志无法对齐的问题
     * <p>
     * 此问题引起的原因, 据 JessYan 猜测, 可能是因为 AndroidStudio v3.1 以上将极短时间内以相同 tag 输出多次的 log 自动合并为一次输出
     * 导致本来对称的输出日志, 出现不对称的问题
     * AndroidStudio v3.1 此次对输出日志的优化, 不小心使市面上所有具有日志格式化输出功能的日志框架无法正常工作
     * 现在暂时能想到的解决方案有两个: 1. 改变每行的 tag (每行 tag 都加一个可变化的 token) 2. 延迟每行日志打印的间隔时间
     * <p>
     * {@link #resolveTag(String)} 使用第一种解决方案
     *
     * @param tag
     */
    private static String resolveTag(String tag) {
        return computeKey() + tag;
    }

    private static String[] getRequest(Request request) {
        String log;
        String header = request.headers().toString();
        log = METHOD_TAG + request.method() + DOUBLE_SEPARATOR +
                (isEmpty(header) ? "" : HEADERS_TAG + LINE_SEPARATOR + dotHeaders(header));
        return log.split(LINE_SEPARATOR);
    }

    private static String[] getResponse(String header, long tookMs, int code, boolean isSuccessful,
                                        List<String> segments, String message) {
        String log;
        String segmentString = slashSegments(segments);
        log = ((!TextUtils.isEmpty(segmentString) ? segmentString + " - " : "") + "is success : "
                + isSuccessful + " - " + RECEIVED_TAG + tookMs + "ms" + DOUBLE_SEPARATOR + STATUS_CODE_TAG +
                code + " / " + message + DOUBLE_SEPARATOR + (isEmpty(header) ? "" : HEADERS_TAG + LINE_SEPARATOR +
                dotHeaders(header)));
        return log.split(LINE_SEPARATOR);
    }

    private static String slashSegments(List<String> segments) {
        StringBuilder segmentString = new StringBuilder();
        for (String segment : segments) {
            segmentString.append("/").append(segment);
        }
        return segmentString.toString();
    }

    /**
     * 对 {@code header} 按规定的格式进行处理
     *
     * @param header
     * @return
     */
    private static String dotHeaders(String header) {
        String[] headers = header.split(LINE_SEPARATOR);
        StringBuilder builder = new StringBuilder();
        String tag = "─ ";
        if (headers.length > 1) {
            for (int i = 0; i < headers.length; i++) {
                if (i == 0) {
                    tag = CORNER_UP;
                } else if (i == headers.length - 1) {
                    tag = CORNER_BOTTOM;
                } else {
                    tag = CENTER_LINE;
                }
                builder.append(tag).append(headers[i]).append("\n");
            }
        } else {
            for (String item : headers) {
                builder.append(tag).append(item).append("\n");
            }
        }
        return builder.toString();
    }

    private static String getTag(boolean isRequest) {
        if (isRequest) {
            return TAG + "-Request";
        } else {
            return TAG + "-Response";
        }
    }

    /**
     * 打印网络请求信息, 当网络请求时 {{@link okhttp3.RequestBody}} 可以解析的情况
     *
     * @param request
     * @param bodyString
     */
    @Override
    public void printJsonRequest(@NonNull Request request, @NonNull String bodyString) {
        final String requestBody = LINE_SEPARATOR + BODY_TAG + LINE_SEPARATOR + bodyString;
        final String tag = getTag(true);

        LogUtils.debugInfo(tag, REQUEST_UP_LINE);
        logLines(tag, new String[]{URL_TAG + request.url()}, false);
        logLines(tag, getRequest(request), true);
        logLines(tag, requestBody.split(LINE_SEPARATOR), true);
        LogUtils.debugInfo(tag, END_LINE);
    }

    /**
     * 打印网络请求信息, 当网络请求时 {{@link okhttp3.RequestBody}} 为 {@code null} 或不可解析的情况
     *
     * @param request
     */
    @Override
    public void printFileRequest(@NonNull Request request) {
        final String tag = getTag(true);

        LogUtils.debugInfo(tag, REQUEST_UP_LINE);
        logLines(tag, new String[]{URL_TAG + request.url()}, false);
        logLines(tag, getRequest(request), true);
        logLines(tag, OMITTED_REQUEST, true);
        LogUtils.debugInfo(tag, END_LINE);
    }

    /**
     * 打印网络响应信息, 当网络响应时 {{@link okhttp3.ResponseBody}} 可以解析的情况
     *
     * @param chainMs      服务器响应耗时(单位毫秒)
     * @param isSuccessful 请求是否成功
     * @param code         响应码
     * @param headers      请求头
     * @param contentType  服务器返回数据的数据类型
     * @param bodyString   服务器返回的数据(已解析)
     * @param segments     域名后面的资源地址
     * @param message      响应信息
     * @param responseUrl  请求地址
     */
    @Override
    public void printJsonResponse(long chainMs, boolean isSuccessful, int code, @NonNull String headers, @Nullable MediaType contentType,
                                  @Nullable String bodyString, @NonNull List<String> segments, @NonNull String message, @NonNull final String responseUrl) {
        bodyString = RequestInterceptor.isJson(contentType) ? CharacterHandler.jsonFormat(bodyString)
                : RequestInterceptor.isXml(contentType) ? CharacterHandler.xmlFormat(bodyString) : bodyString;

        final String responseBody = LINE_SEPARATOR + BODY_TAG + LINE_SEPARATOR + bodyString;
        final String tag = getTag(false);
        final String[] urlLine = {URL_TAG + responseUrl, N};

        LogUtils.debugInfo(tag, RESPONSE_UP_LINE);
        logLines(tag, urlLine, true);
        logLines(tag, getResponse(headers, chainMs, code, isSuccessful, segments, message), true);
        logLines(tag, responseBody.split(LINE_SEPARATOR), true);
        LogUtils.debugInfo(tag, END_LINE);
    }

    /**
     * 打印网络响应信息, 当网络响应时 {{@link okhttp3.ResponseBody}} 为 {@code null} 或不可解析的情况
     *
     * @param chainMs      服务器响应耗时(单位毫秒)
     * @param isSuccessful 请求是否成功
     * @param code         响应码
     * @param headers      请求头
     * @param segments     域名后面的资源地址
     * @param message      响应信息
     * @param responseUrl  请求地址
     */
    @Override
    public void printFileResponse(long chainMs, boolean isSuccessful, int code, @NonNull String headers,
                                  @NonNull List<String> segments, @NonNull String message, @NonNull final String responseUrl) {
        final String tag = getTag(false);
        final String[] urlLine = {URL_TAG + responseUrl, N};

        LogUtils.debugInfo(tag, RESPONSE_UP_LINE);
        logLines(tag, urlLine, true);
        logLines(tag, getResponse(headers, chainMs, code, isSuccessful, segments, message), true);
        logLines(tag, OMITTED_RESPONSE, true);
        LogUtils.debugInfo(tag, END_LINE);
    }
}


================================================
FILE: arms/src/main/java/com/jess/arms/http/log/FormatPrinter.java
================================================
/*
 * Copyright 2018 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jess.arms.http.log;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.jess.arms.di.module.GlobalConfigModule;

import java.util.List;

import okhttp3.MediaType;
import okhttp3.Request;

/**
 * ================================================
 * 对 OkHttp 的请求和响应信息进行更规范和清晰的打印, 开发者可更根据自己的需求自行扩展打印格式
 *
 * @see DefaultFormatPrinter
 * @see GlobalConfigModule.Builder#formatPrinter(FormatPrinter)
 * Created by JessYan on 31/01/2018 17:36
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */

public interface FormatPrinter {

    /**
     * 打印网络请求信息, 当网络请求时 {{@link okhttp3.RequestBody}} 可以解析的情况
     *
     * @param request
     * @param bodyString 发送给服务器的请求体中的数据(已解析)
     */
    void printJsonRequest(@NonNull Request request, @NonNull String bodyString);

    /**
     * 打印网络请求信息, 当网络请求时 {{@link okhttp3.RequestBody}} 为 {@code null} 或不可解析的情况
     *
     * @param request
     */
    void printFileRequest(@NonNull Request request);

    /**
     * 打印网络响应信息, 当网络响应时 {{@link okhttp3.ResponseBody}} 可以解析的情况
     *
     * @param chainMs      服务器响应耗时(单位毫秒)
     * @param isSuccessful 请求是否成功
     * @param code         响应码
     * @param headers      请求头
     * @param contentType  服务器返回数据的数据类型
     * @param bodyString   服务器返回的数据(已解析)
     * @param segments     域名后面的资源地址
     * @param message      响应信息
     * @param responseUrl  请求地址
     */
    void printJsonResponse(long chainMs, boolean isSuccessful, int code, @NonNull String headers, @Nullable MediaType contentType,
                           @Nullable 
Download .txt
gitextract_p0iu70qk/

├── .github/
│   └── ISSUE_TEMPLATE.md
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CONTRIBUTING_APP.md
├── LICENSE
├── MVPArms.md
├── MVP_generator_solution
├── README.md
├── arms/
│   ├── .gitignore
│   ├── build.gradle
│   ├── gradle.properties
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── jess/
│           │           └── arms/
│           │               ├── base/
│           │               │   ├── AdapterViewPager.java
│           │               │   ├── App.java
│           │               │   ├── BaseActivity.java
│           │               │   ├── BaseApplication.java
│           │               │   ├── BaseFragment.java
│           │               │   ├── BaseHolder.java
│           │               │   ├── BaseLazyLoadFragment.java
│           │               │   ├── BaseService.java
│           │               │   ├── DefaultAdapter.java
│           │               │   ├── Platform.java
│           │               │   ├── Unused.java
│           │               │   └── delegate/
│           │               │       ├── ActivityDelegate.java
│           │               │       ├── ActivityDelegateImpl.java
│           │               │       ├── AppDelegate.java
│           │               │       ├── AppLifecycles.java
│           │               │       ├── FragmentDelegate.java
│           │               │       ├── FragmentDelegateImpl.java
│           │               │       ├── IActivity.java
│           │               │       └── IFragment.java
│           │               ├── di/
│           │               │   ├── component/
│           │               │   │   └── AppComponent.java
│           │               │   ├── module/
│           │               │   │   ├── AppModule.java
│           │               │   │   ├── ClientModule.java
│           │               │   │   └── GlobalConfigModule.java
│           │               │   └── scope/
│           │               │       ├── ActivityScope.java
│           │               │       └── FragmentScope.java
│           │               ├── http/
│           │               │   ├── BaseUrl.java
│           │               │   ├── GlobalHttpHandler.java
│           │               │   ├── OkHttpStreamFetcher.java
│           │               │   ├── OkHttpUrlLoader.java
│           │               │   ├── imageloader/
│           │               │   │   ├── BaseImageLoaderStrategy.java
│           │               │   │   ├── ImageConfig.java
│           │               │   │   ├── ImageLoader.java
│           │               │   │   └── glide/
│           │               │   │       ├── GlideAppliesOptions.java
│           │               │   │       └── GlideConfiguration.java
│           │               │   └── log/
│           │               │       ├── DefaultFormatPrinter.java
│           │               │       ├── FormatPrinter.java
│           │               │       └── RequestInterceptor.java
│           │               ├── integration/
│           │               │   ├── ActivityLifecycle.java
│           │               │   ├── AppManager.java
│           │               │   ├── ConfigModule.java
│           │               │   ├── EventBusManager.java
│           │               │   ├── FragmentLifecycle.java
│           │               │   ├── IRepositoryManager.java
│           │               │   ├── ManifestParser.java
│           │               │   ├── RepositoryManager.java
│           │               │   ├── RetrofitServiceProxyHandler.java
│           │               │   ├── cache/
│           │               │   │   ├── Cache.java
│           │               │   │   ├── CacheType.java
│           │               │   │   ├── IntelligentCache.java
│           │               │   │   └── LruCache.java
│           │               │   └── lifecycle/
│           │               │       ├── ActivityLifecycleForRxLifecycle.java
│           │               │       ├── ActivityLifecycleable.java
│           │               │       ├── FragmentLifecycleForRxLifecycle.java
│           │               │       ├── FragmentLifecycleable.java
│           │               │       └── Lifecycleable.java
│           │               ├── mvp/
│           │               │   ├── BaseModel.java
│           │               │   ├── BasePresenter.java
│           │               │   ├── IModel.java
│           │               │   ├── IPresenter.java
│           │               │   └── IView.java
│           │               ├── utils/
│           │               │   ├── ArmsUtils.java
│           │               │   ├── CharacterHandler.java
│           │               │   ├── DataHelper.java
│           │               │   ├── DeviceUtils.java
│           │               │   ├── DrawableProvider.java
│           │               │   ├── FastBlur.java
│           │               │   ├── LogUtils.java
│           │               │   ├── PermissionUtil.java
│           │               │   ├── Preconditions.java
│           │               │   ├── RxLifecycleUtils.java
│           │               │   ├── ThirdViewUtil.java
│           │               │   ├── UrlEncoderUtils.java
│           │               │   └── ZipHelper.java
│           │               └── widget/
│           │                   └── CustomPopupWindow.java
│           └── res/
│               └── values/
│                   └── strings.xml
├── arms-autolayout/
│   ├── .gitignore
│   ├── build.gradle
│   ├── gradle.properties
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── jess/
│           │           └── arms/
│           │               └── widget/
│           │                   └── autolayout/
│           │                       ├── AutoAppBarLayout.java
│           │                       ├── AutoCardView.java
│           │                       ├── AutoCollapsingToolbarLayout.java
│           │                       ├── AutoRadioGroup.java
│           │                       ├── AutoScrollView.java
│           │                       ├── AutoTabLayout.java
│           │                       └── AutoToolbar.java
│           └── res/
│               └── values/
│                   ├── attrs.xml
│                   └── strings.xml
├── arms-imageloader-glide/
│   ├── .gitignore
│   ├── build.gradle
│   ├── gradle.properties
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── jess/
│           │           └── arms/
│           │               └── http/
│           │                   └── imageloader/
│           │                       └── glide/
│           │                           ├── BlurTransformation.java
│           │                           ├── CacheStrategy.java
│           │                           ├── GlideImageLoaderStrategy.java
│           │                           └── ImageConfigImpl.java
│           └── res/
│               └── values/
│                   └── strings.xml
├── bintray.gradle
├── build.gradle
├── config.gradle
├── demo/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       ├── androidTest/
│       │   └── java/
│       │       └── me/
│       │           └── jessyan/
│       │               └── mvparms/
│       │                   └── demo/
│       │                       └── ApplicationTest.java
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── java/
│       │   │   └── me/
│       │   │       └── jessyan/
│       │   │           └── mvparms/
│       │   │               └── demo/
│       │   │                   ├── app/
│       │   │                   │   ├── ActivityLifecycleCallbacksImpl.java
│       │   │                   │   ├── AppLifecyclesImpl.java
│       │   │                   │   ├── EventBusTags.java
│       │   │                   │   ├── FragmentLifecycleCallbacksImpl.java
│       │   │                   │   ├── GlobalConfiguration.java
│       │   │                   │   ├── GlobalHttpHandlerImpl.java
│       │   │                   │   ├── ResponseErrorListenerImpl.java
│       │   │                   │   ├── service/
│       │   │                   │   │   └── DemoService.java
│       │   │                   │   └── utils/
│       │   │                   │       └── RxUtils.java
│       │   │                   ├── di/
│       │   │                   │   ├── component/
│       │   │                   │   │   └── UserComponent.java
│       │   │                   │   └── module/
│       │   │                   │       └── UserModule.java
│       │   │                   └── mvp/
│       │   │                       ├── contract/
│       │   │                       │   └── UserContract.java
│       │   │                       ├── model/
│       │   │                       │   ├── UserModel.java
│       │   │                       │   ├── api/
│       │   │                       │   │   ├── Api.java
│       │   │                       │   │   ├── cache/
│       │   │                       │   │   │   └── CommonCache.java
│       │   │                       │   │   └── service/
│       │   │                       │   │       ├── CommonService.java
│       │   │                       │   │       └── UserService.java
│       │   │                       │   └── entity/
│       │   │                       │       ├── BaseResponse.java
│       │   │                       │       └── User.java
│       │   │                       ├── presenter/
│       │   │                       │   └── UserPresenter.java
│       │   │                       └── ui/
│       │   │                           ├── activity/
│       │   │                           │   └── UserActivity.java
│       │   │                           ├── adapter/
│       │   │                           │   └── UserAdapter.java
│       │   │                           └── holder/
│       │   │                               └── UserItemHolder.java
│       │   └── res/
│       │       ├── anim/
│       │       │   ├── translate_center_to_left.xml
│       │       │   ├── translate_center_to_right.xml
│       │       │   ├── translate_left_to_center.xml
│       │       │   └── translate_right_to_center.xml
│       │       ├── layout/
│       │       │   ├── activity_user.xml
│       │       │   ├── include_title.xml
│       │       │   └── recycle_list.xml
│       │       └── values/
│       │           ├── colors.xml
│       │           ├── strings.xml
│       │           └── styles.xml
│       └── test/
│           └── java/
│               └── me/
│                   └── jessyan/
│                       └── mvparms/
│                           └── demo/
│                               └── ExampleUnitTest.java
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
Download .txt
SYMBOL INDEX (974 symbols across 108 files)

FILE: arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoAppBarLayout.java
  class AutoAppBarLayout (line 38) | public class AutoAppBarLayout extends AppBarLayout {
    method AutoAppBarLayout (line 42) | public AutoAppBarLayout(Context context) {
    method AutoAppBarLayout (line 46) | public AutoAppBarLayout(Context context, AttributeSet attrs) {
    method onMeasure (line 50) | @Override
    method onLayout (line 58) | @Override
    method generateLayoutParams (line 63) | @Override
    class LayoutParams (line 68) | public static class LayoutParams extends AppBarLayout.LayoutParams
      method LayoutParams (line 72) | public LayoutParams(Context c, AttributeSet attrs) {
      method LayoutParams (line 77) | public LayoutParams(int width, int height) {
      method LayoutParams (line 81) | public LayoutParams(ViewGroup.LayoutParams source) {
      method LayoutParams (line 85) | public LayoutParams(ViewGroup.MarginLayoutParams source) {
      method getAutoLayoutInfo (line 89) | @Override

FILE: arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoCardView.java
  class AutoCardView (line 38) | public class AutoCardView extends CardView {
    method AutoCardView (line 41) | public AutoCardView(Context context) {
    method AutoCardView (line 45) | public AutoCardView(Context context, AttributeSet attrs) {
    method AutoCardView (line 49) | public AutoCardView(Context context, AttributeSet attrs, int defStyleA...
    method generateLayoutParams (line 53) | @Override
    method onMeasure (line 58) | @Override

FILE: arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoCollapsingToolbarLayout.java
  class AutoCollapsingToolbarLayout (line 38) | public class AutoCollapsingToolbarLayout extends CollapsingToolbarLayout {
    method AutoCollapsingToolbarLayout (line 41) | public AutoCollapsingToolbarLayout(Context context) {
    method AutoCollapsingToolbarLayout (line 45) | public AutoCollapsingToolbarLayout(Context context, AttributeSet attrs) {
    method AutoCollapsingToolbarLayout (line 49) | public AutoCollapsingToolbarLayout(Context context, AttributeSet attrs...
    method onMeasure (line 53) | @Override
    method onLayout (line 61) | @Override
    method generateLayoutParams (line 66) | @Override
    class LayoutParams (line 71) | public static class LayoutParams extends CollapsingToolbarLayout.Layou...
      method LayoutParams (line 75) | public LayoutParams(Context c, AttributeSet attrs) {
      method LayoutParams (line 80) | public LayoutParams(int width, int height) {
      method LayoutParams (line 84) | public LayoutParams(ViewGroup.LayoutParams source) {
      method LayoutParams (line 88) | public LayoutParams(ViewGroup.MarginLayoutParams source) {
      method getAutoLayoutInfo (line 92) | @Override

FILE: arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoRadioGroup.java
  class AutoRadioGroup (line 38) | public class AutoRadioGroup extends RadioGroup {
    method AutoRadioGroup (line 41) | public AutoRadioGroup(Context context) {
    method AutoRadioGroup (line 45) | public AutoRadioGroup(Context context, AttributeSet attrs) {
    method onMeasure (line 49) | @Override
    method onLayout (line 57) | @Override
    method generateLayoutParams (line 62) | @Override
    class LayoutParams (line 67) | public static class LayoutParams extends RadioGroup.LayoutParams
      method LayoutParams (line 71) | public LayoutParams(Context c, AttributeSet attrs) {
      method LayoutParams (line 76) | public LayoutParams(int width, int height) {
      method LayoutParams (line 80) | public LayoutParams(ViewGroup.LayoutParams source) {
      method LayoutParams (line 84) | public LayoutParams(MarginLayoutParams source) {
      method getAutoLayoutInfo (line 88) | @Override

FILE: arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoScrollView.java
  class AutoScrollView (line 40) | public class AutoScrollView extends ScrollView {
    method AutoScrollView (line 43) | public AutoScrollView(Context context) {
    method AutoScrollView (line 47) | public AutoScrollView(Context context, @Nullable AttributeSet attrs) {
    method AutoScrollView (line 51) | public AutoScrollView(Context context, @Nullable AttributeSet attrs, i...
    method onMeasure (line 55) | @Override
    method onLayout (line 63) | @Override
    method generateLayoutParams (line 68) | @Override
    class LayoutParams (line 73) | public static class LayoutParams extends ScrollView.LayoutParams
      method LayoutParams (line 77) | public LayoutParams(Context c, AttributeSet attrs) {
      method LayoutParams (line 82) | public LayoutParams(int width, int height) {
      method LayoutParams (line 86) | public LayoutParams(ViewGroup.LayoutParams source) {
      method LayoutParams (line 90) | public LayoutParams(MarginLayoutParams source) {
      method getAutoLayoutInfo (line 94) | @Override

FILE: arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoTabLayout.java
  class AutoTabLayout (line 43) | public class AutoTabLayout extends TabLayout {
    method AutoTabLayout (line 48) | public AutoTabLayout(Context context) {
    method AutoTabLayout (line 52) | public AutoTabLayout(Context context, AttributeSet attrs) {
    method AutoTabLayout (line 56) | public AutoTabLayout(Context context, AttributeSet attrs, int defStyle...
    method initTextSizeBaseWidth (line 70) | private void initTextSizeBaseWidth(Context context, AttributeSet attrs) {
    method loadTextSizeFromTextAppearance (line 76) | private int loadTextSizeFromTextAppearance(int textAppearanceResId) {
    method addTab (line 90) | @Override
    method addTab (line 96) | @Override
    method setUpTabTextSize (line 102) | private void setUpTabTextSize(Tab tab) {

FILE: arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoToolbar.java
  class AutoToolbar (line 46) | public class AutoToolbar extends Toolbar {
    method AutoToolbar (line 52) | public AutoToolbar(Context context, AttributeSet attrs, int defStyleAt...
    method AutoToolbar (line 69) | public AutoToolbar(Context context, AttributeSet attrs) {
    method AutoToolbar (line 73) | public AutoToolbar(Context context) {
    method loadTextSizeFromTextAppearance (line 77) | private int loadTextSizeFromTextAppearance(int textAppearanceResId) {
    method setUpTitleTextSize (line 90) | private void setUpTitleTextSize() {
    method setUpTitleTextSize (line 101) | private void setUpTitleTextSize(String name, int val) {
    method onMeasure (line 116) | @Override
    method onLayout (line 125) | @Override
    method generateLayoutParams (line 130) | @Override
    class LayoutParams (line 135) | public static class LayoutParams extends Toolbar.LayoutParams implemen...
      method LayoutParams (line 138) | public LayoutParams(Context c, AttributeSet attrs) {
      method LayoutParams (line 143) | public LayoutParams(int width, int height) {
      method LayoutParams (line 147) | public LayoutParams(android.view.ViewGroup.LayoutParams source) {
      method LayoutParams (line 151) | public LayoutParams(MarginLayoutParams source) {
      method getAutoLayoutInfo (line 155) | @Override

FILE: arms-imageloader-glide/src/main/java/com/jess/arms/http/imageloader/glide/BlurTransformation.java
  class BlurTransformation (line 39) | public class BlurTransformation extends BitmapTransformation {
    method BlurTransformation (line 45) | public BlurTransformation(@IntRange(from = 0) int radius) {
    method updateDiskCacheKey (line 49) | @Override
    method transform (line 55) | @Override
    method equals (line 60) | @Override
    method hashCode (line 65) | @Override

FILE: arms-imageloader-glide/src/main/java/com/jess/arms/http/imageloader/glide/CacheStrategy.java
  type CacheStrategy (line 18) | public interface CacheStrategy {

FILE: arms-imageloader-glide/src/main/java/com/jess/arms/http/imageloader/glide/GlideImageLoaderStrategy.java
  class GlideImageLoaderStrategy (line 53) | public class GlideImageLoaderStrategy implements BaseImageLoaderStrategy...
    method loadImage (line 55) | @Override
    method clear (line 129) | @Override
    method applyGlideOptions (line 163) | @Override
    method registerComponents (line 168) | @Override

FILE: arms-imageloader-glide/src/main/java/com/jess/arms/http/imageloader/glide/ImageConfigImpl.java
  class ImageConfigImpl (line 36) | public class ImageConfigImpl extends ImageConfig {
    method ImageConfigImpl (line 54) | private ImageConfigImpl(Builder builder) {
    method builder (line 72) | public static Builder builder() {
    method getCacheStrategy (line 76) | public @CacheStrategy.Strategy
    method getTransformation (line 81) | public BitmapTransformation getTransformation() {
    method getImageViews (line 85) | public ImageView[] getImageViews() {
    method isClearMemory (line 89) | public boolean isClearMemory() {
    method isClearDiskCache (line 93) | public boolean isClearDiskCache() {
    method getFallback (line 97) | public int getFallback() {
    method getBlurValue (line 101) | public int getBlurValue() {
    method isBlurImage (line 105) | public boolean isBlurImage() {
    method getImageRadius (line 109) | public int getImageRadius() {
    method isImageRadius (line 113) | public boolean isImageRadius() {
    method isCrossFade (line 117) | public boolean isCrossFade() {
    method isCenterCrop (line 121) | public boolean isCenterCrop() {
    method isCircle (line 125) | public boolean isCircle() {
    class Builder (line 129) | public static final class Builder {
      method Builder (line 151) | private Builder() {
      method url (line 154) | public Builder url(String url) {
      method placeholder (line 159) | public Builder placeholder(int placeholder) {
      method errorPic (line 164) | public Builder errorPic(int errorPic) {
      method fallback (line 169) | public Builder fallback(int fallback) {
      method imageView (line 174) | public Builder imageView(ImageView imageView) {
      method cacheStrategy (line 179) | public Builder cacheStrategy(@CacheStrategy.Strategy int cacheStrate...
      method imageRadius (line 184) | public Builder imageRadius(int imageRadius) {
      method blurValue (line 189) | public Builder blurValue(int blurValue) { //blurValue 建议设置为 15
      method transformation (line 205) | @Deprecated
      method imageViews (line 211) | public Builder imageViews(ImageView... imageViews) {
      method isCrossFade (line 216) | public Builder isCrossFade(boolean isCrossFade) {
      method isCenterCrop (line 221) | public Builder isCenterCrop(boolean isCenterCrop) {
      method isCircle (line 226) | public Builder isCircle(boolean isCircle) {
      method isClearMemory (line 231) | public Builder isClearMemory(boolean isClearMemory) {
      method isClearDiskCache (line 236) | public Builder isClearDiskCache(boolean isClearDiskCache) {
      method build (line 241) | public ImageConfigImpl build() {

FILE: arms/src/main/java/com/jess/arms/base/AdapterViewPager.java
  class AdapterViewPager (line 33) | public class AdapterViewPager extends FragmentStatePagerAdapter {
    method AdapterViewPager (line 37) | public AdapterViewPager(FragmentManager fragmentManager, List<Fragment...
    method AdapterViewPager (line 42) | public AdapterViewPager(FragmentManager fragmentManager, List<Fragment...
    method getItem (line 48) | @Override
    method getPageTitle (line 53) | @Override
    method getCount (line 61) | @Override

FILE: arms/src/main/java/com/jess/arms/base/App.java
  type App (line 36) | public interface App {
    method getAppComponent (line 37) | @NonNull

FILE: arms/src/main/java/com/jess/arms/base/BaseActivity.java
  class BaseActivity (line 62) | public abstract class BaseActivity<P extends IPresenter> extends AppComp...
    method provideCache (line 71) | @NonNull
    method provideLifecycleSubject (line 81) | @NonNull
    method onCreateView (line 87) | @Override
    method onCreate (line 93) | @Override
    method onDestroy (line 113) | @Override
    method useEventBus (line 135) | @Override
    method useFragment (line 146) | @Override

FILE: arms/src/main/java/com/jess/arms/base/BaseApplication.java
  class BaseApplication (line 44) | public class BaseApplication extends Application implements App {
    method attachBaseContext (line 53) | @Override
    method onCreate (line 62) | @Override
    method onTerminate (line 73) | @Override
    method getAppComponent (line 87) | @NonNull

FILE: arms/src/main/java/com/jess/arms/base/BaseFragment.java
  class BaseFragment (line 55) | public abstract class BaseFragment<P extends IPresenter> extends Fragmen...
    method provideCache (line 64) | @NonNull
    method provideLifecycleSubject (line 74) | @NonNull
    method onAttach (line 80) | @Override
    method onCreateView (line 86) | @Nullable
    method onDestroy (line 92) | @Override
    method onDetach (line 101) | @Override
    method useEventBus (line 116) | @Override

FILE: arms/src/main/java/com/jess/arms/base/BaseHolder.java
  class BaseHolder (line 35) | public abstract class BaseHolder<T> extends RecyclerView.ViewHolder impl...
    method BaseHolder (line 39) | public BaseHolder(View itemView) {
    method setData (line 57) | public abstract void setData(@NonNull T data, int position);
    method onRelease (line 63) | protected void onRelease() {
    method onClick (line 67) | @Override
    method setOnItemClickListener (line 74) | public void setOnItemClickListener(OnViewClickListener listener) {
    type OnViewClickListener (line 81) | public interface OnViewClickListener {
      method onViewClick (line 89) | void onViewClick(View view, int position);

FILE: arms/src/main/java/com/jess/arms/base/BaseLazyLoadFragment.java
  class BaseLazyLoadFragment (line 15) | public abstract class BaseLazyLoadFragment<P extends IPresenter> extends...
    method lazyLoadData (line 27) | protected abstract void lazyLoadData();
    method setUserVisibleHint (line 29) | @Override
    method onResume (line 39) | @Override
    method isParentVisible (line 49) | private boolean isParentVisible() {
    method dispatchParentVisibleState (line 57) | private void dispatchParentVisibleState() {
    method tryLoadData (line 70) | public void tryLoadData() {

FILE: arms/src/main/java/com/jess/arms/base/BaseService.java
  class BaseService (line 38) | public abstract class BaseService extends Service {
    method onBind (line 42) | @Nullable
    method onCreate (line 48) | @Override
    method onDestroy (line 57) | @Override
    method useEventBus (line 76) | public boolean useEventBus() {
    method addDispose (line 80) | protected void addDispose(Disposable disposable) {
    method unDispose (line 87) | protected void unDispose() {
    method init (line 96) | abstract public void init();

FILE: arms/src/main/java/com/jess/arms/base/DefaultAdapter.java
  class DefaultAdapter (line 38) | public abstract class DefaultAdapter<T> extends RecyclerView.Adapter<Bas...
    method DefaultAdapter (line 42) | public DefaultAdapter(List<T> infos) {
    method releaseAllHolder (line 52) | public static void releaseAllHolder(RecyclerView recyclerView) {
    method onCreateViewHolder (line 72) | @NotNull
    method onBindViewHolder (line 93) | @Override
    method getItemCount (line 103) | @Override
    method getInfos (line 113) | public List<T> getInfos() {
    method getItem (line 123) | public T getItem(int position) {
    method getHolder (line 134) | @NonNull
    method getLayoutId (line 143) | public abstract int getLayoutId(int viewType);
    method setOnItemClickListener (line 150) | public void setOnItemClickListener(OnRecyclerViewItemClickListener lis...
    type OnRecyclerViewItemClickListener (line 159) | public interface OnRecyclerViewItemClickListener<T> {
      method onItemClick (line 169) | void onItemClick(@NonNull View view, int viewType, @NonNull T data, ...

FILE: arms/src/main/java/com/jess/arms/base/Platform.java
  class Platform (line 25) | public class Platform {
    method findClassByClassName (line 40) | private static boolean findClassByClassName(String className) {

FILE: arms/src/main/java/com/jess/arms/base/Unused.java
  class Unused (line 8) | public class Unused {
    method Unused (line 10) | @Inject

FILE: arms/src/main/java/com/jess/arms/base/delegate/ActivityDelegate.java
  type ActivityDelegate (line 35) | public interface ActivityDelegate {
    method onCreate (line 41) | void onCreate(@Nullable Bundle savedInstanceState);
    method onStart (line 43) | void onStart();
    method onResume (line 45) | void onResume();
    method onPause (line 47) | void onPause();
    method onStop (line 49) | void onStop();
    method onSaveInstanceState (line 51) | void onSaveInstanceState(@NonNull Bundle outState);
    method onDestroy (line 53) | void onDestroy();

FILE: arms/src/main/java/com/jess/arms/base/delegate/ActivityDelegateImpl.java
  class ActivityDelegateImpl (line 36) | public class ActivityDelegateImpl implements ActivityDelegate {
    method ActivityDelegateImpl (line 40) | public ActivityDelegateImpl(@NonNull Activity activity) {
    method onCreate (line 45) | @Override
    method onStart (line 57) | @Override
    method onResume (line 62) | @Override
    method onPause (line 67) | @Override
    method onStop (line 72) | @Override
    method onSaveInstanceState (line 77) | @Override
    method onDestroy (line 82) | @Override

FILE: arms/src/main/java/com/jess/arms/base/delegate/AppDelegate.java
  class AppDelegate (line 60) | public class AppDelegate implements App, AppLifecycles {
    method AppDelegate (line 74) | public AppDelegate(@NonNull Context context) {
    method attachBaseContext (line 90) | @Override
    method onCreate (line 99) | @Override
    method onTerminate (line 141) | @Override
    method getGlobalConfigModule (line 177) | private GlobalConfigModule getGlobalConfigModule(Context context, List...
    method getAppComponent (line 195) | @NonNull
    class AppComponentCallbacks (line 212) | private static class AppComponentCallbacks implements ComponentCallbac...
      method AppComponentCallbacks (line 214) | AppComponentCallbacks(Application application, AppComponent appCompo...
      method onTrimMemory (line 225) | @Override
      method onConfigurationChanged (line 260) | @Override
      method onLowMemory (line 272) | @Override

FILE: arms/src/main/java/com/jess/arms/base/delegate/AppLifecycles.java
  type AppLifecycles (line 33) | public interface AppLifecycles {
    method attachBaseContext (line 34) | void attachBaseContext(@NonNull Context base);
    method onCreate (line 36) | void onCreate(@NonNull Application application);
    method onTerminate (line 38) | void onTerminate(@NonNull Application application);

FILE: arms/src/main/java/com/jess/arms/base/delegate/FragmentDelegate.java
  type FragmentDelegate (line 37) | public interface FragmentDelegate {
    method onAttach (line 40) | void onAttach(@NonNull Context context);
    method onCreate (line 42) | void onCreate(@Nullable Bundle savedInstanceState);
    method onCreateView (line 44) | void onCreateView(@Nullable View view, @Nullable Bundle savedInstanceS...
    method onActivityCreate (line 46) | void onActivityCreate(@Nullable Bundle savedInstanceState);
    method onStart (line 48) | void onStart();
    method onResume (line 50) | void onResume();
    method onPause (line 52) | void onPause();
    method onStop (line 54) | void onStop();
    method onSaveInstanceState (line 56) | void onSaveInstanceState(@NonNull Bundle outState);
    method onDestroyView (line 58) | void onDestroyView();
    method onDestroy (line 60) | void onDestroy();
    method onDetach (line 62) | void onDetach();
    method isAdded (line 67) | boolean isAdded();

FILE: arms/src/main/java/com/jess/arms/base/delegate/FragmentDelegateImpl.java
  class FragmentDelegateImpl (line 43) | public class FragmentDelegateImpl implements FragmentDelegate {
    method FragmentDelegateImpl (line 49) | public FragmentDelegateImpl(@NonNull FragmentManager fragmentManager, ...
    method onAttach (line 55) | @Override
    method onCreate (line 60) | @Override
    method onCreateView (line 69) | @Override
    method onActivityCreate (line 77) | @Override
    method onStart (line 82) | @Override
    method onResume (line 87) | @Override
    method onPause (line 92) | @Override
    method onStop (line 97) | @Override
    method onSaveInstanceState (line 102) | @Override
    method onDestroyView (line 107) | @Override
    method onDestroy (line 120) | @Override
    method onDetach (line 132) | @Override
    method isAdded (line 140) | @Override

FILE: arms/src/main/java/com/jess/arms/base/delegate/IActivity.java
  type IActivity (line 43) | public interface IActivity {
    method provideCache (line 52) | @NonNull
    method setupActivityComponent (line 60) | void setupActivityComponent(@NonNull AppComponent appComponent);
    method useEventBus (line 71) | boolean useEventBus();
    method initView (line 79) | int initView(@Nullable Bundle savedInstanceState);
    method initData (line 86) | void initData(@Nullable Bundle savedInstanceState);
    method useFragment (line 95) | boolean useFragment();

FILE: arms/src/main/java/com/jess/arms/base/delegate/IFragment.java
  type IFragment (line 44) | public interface IFragment {
    method provideCache (line 53) | @NonNull
    method setupFragmentComponent (line 61) | void setupFragmentComponent(@NonNull AppComponent appComponent);
    method useEventBus (line 72) | boolean useEventBus();
    method initView (line 82) | View initView(@NonNull LayoutInflater inflater, @Nullable ViewGroup co...
    method initData (line 89) | void initData(@Nullable Bundle savedInstanceState);
    method setData (line 134) | void setData(@Nullable Object data);

FILE: arms/src/main/java/com/jess/arms/di/component/AppComponent.java
  type AppComponent (line 56) | @Singleton
    method application (line 59) | Application application();
    method appManager (line 70) | @Deprecated
    method repositoryManager (line 78) | IRepositoryManager repositoryManager();
    method rxErrorHandler (line 85) | RxErrorHandler rxErrorHandler();
    method imageLoader (line 95) | ImageLoader imageLoader();
    method okHttpClient (line 102) | OkHttpClient okHttpClient();
    method gson (line 109) | Gson gson();
    method cacheFile (line 117) | File cacheFile();
    method extras (line 124) | Cache<String, Object> extras();
    method cacheFactory (line 131) | Cache.Factory cacheFactory();
    method executorService (line 139) | ExecutorService executorService();
    method inject (line 141) | void inject(AppDelegate delegate);
    type Builder (line 143) | @Component.Builder
      method application (line 145) | @BindsInstance
      method globalConfigModule (line 148) | Builder globalConfigModule(GlobalConfigModule globalConfigModule);
      method build (line 150) | AppComponent build();

FILE: arms/src/main/java/com/jess/arms/di/module/AppModule.java
  class AppModule (line 56) | @Module
    method provideGson (line 59) | @Singleton
    method provideAppManager (line 77) | @Singleton
    method provideExtras (line 83) | @Singleton
    method provideFragmentLifecycles (line 90) | @Singleton
    method bindRepositoryManager (line 96) | @Binds
    method bindActivityLifecycle (line 99) | @Binds
    method bindActivityLifecycleForRxLifecycle (line 103) | @Binds
    method bindFragmentLifecycle (line 107) | @Binds
    type GsonConfiguration (line 110) | public interface GsonConfiguration {
      method configGson (line 111) | void configGson(@NonNull Context context, @NonNull GsonBuilder build...

FILE: arms/src/main/java/com/jess/arms/di/module/ClientModule.java
  class ClientModule (line 61) | @Module
    method provideRetrofit (line 76) | @Singleton
    method provideClient (line 106) | @Singleton
    method provideRetrofitBuilder (line 135) | @Singleton
    method provideClientBuilder (line 141) | @Singleton
    method provideRxCache (line 156) | @Singleton
    method provideRxCacheDirectory (line 178) | @Singleton
    method proRxErrorHandler (line 193) | @Singleton
    method bindInterceptor (line 203) | @Binds
    type RetrofitConfiguration (line 209) | public interface RetrofitConfiguration {
      method configRetrofit (line 210) | void configRetrofit(@NonNull Context context, @NonNull Retrofit.Buil...
    type OkhttpConfiguration (line 216) | public interface OkhttpConfiguration {
      method configOkhttp (line 217) | void configOkhttp(@NonNull Context context, @NonNull OkHttpClient.Bu...
    type RxCacheConfiguration (line 223) | public interface RxCacheConfiguration {
      method configRxCache (line 232) | RxCache configRxCache(@NonNull Context context, @NonNull RxCache.Bui...

FILE: arms/src/main/java/com/jess/arms/di/module/GlobalConfigModule.java
  class GlobalConfigModule (line 66) | @Module
    method GlobalConfigModule (line 85) | private GlobalConfigModule(Builder builder) {
    method builder (line 104) | public static Builder builder() {
    method provideInterceptors (line 108) | @Singleton
    method provideBaseUrl (line 120) | @Singleton
    method provideImageLoaderStrategy (line 137) | @Singleton
    method provideGlobalHttpHandler (line 149) | @Singleton
    method provideCacheFile (line 159) | @Singleton
    method provideResponseErrorListener (line 170) | @Singleton
    method provideRetrofitConfiguration (line 176) | @Singleton
    method provideOkhttpConfiguration (line 183) | @Singleton
    method provideRxCacheConfiguration (line 190) | @Singleton
    method provideGsonConfiguration (line 197) | @Singleton
    method providePrintHttpLogLevel (line 204) | @Singleton
    method provideFormatPrinter (line 210) | @Singleton
    method provideCacheFactory (line 216) | @Singleton
    method provideExecutorService (line 241) | @Singleton
    method provideObtainServiceDelegate (line 248) | @Singleton
    class Builder (line 255) | public static final class Builder {
      method Builder (line 273) | private Builder() {
      method baseurl (line 276) | public Builder baseurl(String baseUrl) {//基础url
      method baseurl (line 284) | public Builder baseurl(BaseUrl baseUrl) {
      method imageLoaderStrategy (line 289) | public Builder imageLoaderStrategy(BaseImageLoaderStrategy loaderStr...
      method globalHttpHandler (line 294) | public Builder globalHttpHandler(GlobalHttpHandler handler) {//用来处理h...
      method addInterceptor (line 299) | public Builder addInterceptor(Interceptor interceptor) {//动态添加任意个int...
      method responseErrorListener (line 307) | public Builder responseErrorListener(ResponseErrorListener listener)...
      method cacheFile (line 312) | public Builder cacheFile(File cacheFile) {
      method retrofitConfiguration (line 317) | public Builder retrofitConfiguration(ClientModule.RetrofitConfigurat...
      method okhttpConfiguration (line 322) | public Builder okhttpConfiguration(ClientModule.OkhttpConfiguration ...
      method rxCacheConfiguration (line 327) | public Builder rxCacheConfiguration(ClientModule.RxCacheConfiguratio...
      method gsonConfiguration (line 332) | public Builder gsonConfiguration(AppModule.GsonConfiguration gsonCon...
      method printHttpLogLevel (line 337) | public Builder printHttpLogLevel(RequestInterceptor.Level printHttpL...
      method formatPrinter (line 342) | public Builder formatPrinter(FormatPrinter formatPrinter) {
      method cacheFactory (line 347) | public Builder cacheFactory(Cache.Factory cacheFactory) {
      method executorService (line 352) | public Builder executorService(ExecutorService executorService) {
      method obtainServiceDelegate (line 357) | public Builder obtainServiceDelegate(IRepositoryManager.ObtainServic...
      method build (line 362) | public GlobalConfigModule build() {

FILE: arms/src/main/java/com/jess/arms/http/BaseUrl.java
  type BaseUrl (line 31) | public interface BaseUrl {
    method url (line 37) | @NonNull

FILE: arms/src/main/java/com/jess/arms/http/GlobalHttpHandler.java
  type GlobalHttpHandler (line 38) | public interface GlobalHttpHandler {
    method onHttpResultResponse (line 45) | @NonNull
    method onHttpRequestBefore (line 52) | @NonNull
    method onHttpResultResponse (line 69) | @NonNull
    method onHttpRequestBefore (line 79) | @NonNull

FILE: arms/src/main/java/com/jess/arms/http/OkHttpStreamFetcher.java
  class OkHttpStreamFetcher (line 42) | public class OkHttpStreamFetcher implements DataFetcher<InputStream>, ok...
    method OkHttpStreamFetcher (line 54) | @SuppressWarnings("WeakerAccess")
    method loadData (line 60) | @Override
    method onFailure (line 75) | @Override
    method onResponse (line 84) | @Override
    method cleanup (line 96) | @Override
    method cancel (line 111) | @Override
    method getDataClass (line 119) | @NonNull
    method getDataSource (line 125) | @NonNull

FILE: arms/src/main/java/com/jess/arms/http/OkHttpUrlLoader.java
  class OkHttpUrlLoader (line 36) | public class OkHttpUrlLoader implements ModelLoader<GlideUrl, InputStrea...
    method OkHttpUrlLoader (line 41) | @SuppressWarnings("WeakerAccess")
    method handles (line 46) | @Override
    method buildLoadData (line 51) | @Override
    class Factory (line 61) | @SuppressWarnings("WeakerAccess")
      method Factory (line 69) | public Factory() {
      method Factory (line 78) | public Factory(@NonNull Call.Factory client) {
      method getInternalClient (line 82) | private static Call.Factory getInternalClient() {
      method build (line 93) | @NonNull
      method teardown (line 99) | @Override

FILE: arms/src/main/java/com/jess/arms/http/imageloader/BaseImageLoaderStrategy.java
  type BaseImageLoaderStrategy (line 32) | public interface BaseImageLoaderStrategy<T extends ImageConfig> {
    method loadImage (line 40) | void loadImage(@Nullable Context ctx, @Nullable T config);
    method clear (line 48) | void clear(@Nullable Context ctx, @Nullable T config);

FILE: arms/src/main/java/com/jess/arms/http/imageloader/ImageConfig.java
  class ImageConfig (line 30) | public class ImageConfig {
    method getUrl (line 36) | public String getUrl() {
    method getImageView (line 40) | public ImageView getImageView() {
    method getPlaceholder (line 44) | public int getPlaceholder() {
    method getErrorPic (line 48) | public int getErrorPic() {

FILE: arms/src/main/java/com/jess/arms/http/imageloader/ImageLoader.java
  class ImageLoader (line 39) | @Singleton
    method ImageLoader (line 45) | @Inject
    method loadImage (line 56) | public <T extends ImageConfig> void loadImage(Context context, T confi...
    method clear (line 69) | public <T extends ImageConfig> void clear(Context context, T config) {
    method getLoadImgStrategy (line 75) | @Nullable
    method setLoadImgStrategy (line 85) | public void setLoadImgStrategy(BaseImageLoaderStrategy strategy) {

FILE: arms/src/main/java/com/jess/arms/http/imageloader/glide/GlideAppliesOptions.java
  type GlideAppliesOptions (line 37) | public interface GlideAppliesOptions {
    method applyGlideOptions (line 45) | void applyGlideOptions(@NonNull Context context, @NonNull GlideBuilder...
    method registerComponents (line 54) | void registerComponents(@NonNull Context context, @NonNull Glide glide...

FILE: arms/src/main/java/com/jess/arms/http/imageloader/glide/GlideConfiguration.java
  class GlideConfiguration (line 51) | @GlideModule(glideName = "GlideArms")
    method applyOptions (line 55) | @Override
    method registerComponents (line 82) | @Override
    method isManifestParsingEnabled (line 94) | @Override

FILE: arms/src/main/java/com/jess/arms/http/log/DefaultFormatPrinter.java
  class DefaultFormatPrinter (line 43) | public class DefaultFormatPrinter implements FormatPrinter {
    method initialValue (line 68) | @Override
    method isEmpty (line 74) | private static boolean isEmpty(String line) {
    method logLines (line 85) | private static void logLines(String tag, String[] lines, boolean withL...
    method computeKey (line 98) | private static String computeKey() {
    method resolveTag (line 119) | private static String resolveTag(String tag) {
    method getRequest (line 123) | private static String[] getRequest(Request request) {
    method getResponse (line 131) | private static String[] getResponse(String header, long tookMs, int co...
    method slashSegments (line 142) | private static String slashSegments(List<String> segments) {
    method dotHeaders (line 156) | private static String dotHeaders(String header) {
    method getTag (line 179) | private static String getTag(boolean isRequest) {
    method printJsonRequest (line 193) | @Override
    method printFileRequest (line 210) | @Override
    method printJsonResponse (line 234) | @Override
    method printFileResponse (line 262) | @Override

FILE: arms/src/main/java/com/jess/arms/http/log/FormatPrinter.java
  type FormatPrinter (line 40) | public interface FormatPrinter {
    method printJsonRequest (line 48) | void printJsonRequest(@NonNull Request request, @NonNull String bodySt...
    method printFileRequest (line 55) | void printFileRequest(@NonNull Request request);
    method printJsonResponse (line 70) | void printJsonResponse(long chainMs, boolean isSuccessful, int code, @...
    method printFileResponse (line 84) | void printFileResponse(long chainMs, boolean isSuccessful, int code, @...

FILE: arms/src/main/java/com/jess/arms/http/log/RequestInterceptor.java
  class RequestInterceptor (line 57) | @Singleton
    method RequestInterceptor (line 67) | @Inject
    method parseParams (line 78) | public static String parseParams(Request request) throws UnsupportedEn...
    method isParseable (line 108) | public static boolean isParseable(MediaType mediaType) {
    method isText (line 117) | public static boolean isText(MediaType mediaType) {
    method isPlain (line 124) | public static boolean isPlain(MediaType mediaType) {
    method isJson (line 131) | public static boolean isJson(MediaType mediaType) {
    method isXml (line 138) | public static boolean isXml(MediaType mediaType) {
    method isHtml (line 145) | public static boolean isHtml(MediaType mediaType) {
    method isForm (line 152) | public static boolean isForm(MediaType mediaType) {
    method convertCharset (line 159) | public static String convertCharset(Charset charset) {
    method intercept (line 168) | @Override
    method printResult (line 238) | @Nullable
    method parseContent (line 270) | private String parseContent(ResponseBody responseBody, String encoding...
    type Level (line 289) | public enum Level {

FILE: arms/src/main/java/com/jess/arms/integration/ActivityLifecycle.java
  class ActivityLifecycle (line 54) | @Singleton
    method ActivityLifecycle (line 68) | @Inject
    method onActivityCreated (line 72) | @Override
    method onActivityStarted (line 100) | @Override
    method onActivityResumed (line 108) | @Override
    method onActivityPaused (line 118) | @Override
    method onActivityStopped (line 126) | @Override
    method onActivitySaveInstanceState (line 138) | @Override
    method onActivityDestroyed (line 146) | @Override
    method registerFragmentCallbacks (line 164) | private void registerFragmentCallbacks(Activity activity) {
    method fetchActivityDelegate (line 191) | private ActivityDelegate fetchActivityDelegate(Activity activity) {
    method getCacheFromActivity (line 200) | @NonNull

FILE: arms/src/main/java/com/jess/arms/integration/AppManager.java
  class AppManager (line 53) | public final class AppManager {
    method AppManager (line 76) | private AppManager() {
    method getAppManager (line 79) | public static AppManager getAppManager() {
    method post (line 97) | @Deprecated
    method init (line 102) | public AppManager init(Application application) {
    method onReceive (line 114) | @Deprecated
    method getHandleListener (line 121) | @Deprecated
    method setHandleListener (line 135) | @Deprecated
    method showSnackbar (line 146) | public void showSnackbar(String message, boolean isLong) {
    method startActivity (line 172) | public void startActivity(Intent intent) {
    method startActivity (line 188) | public void startActivity(Class activityClass) {
    method release (line 195) | public void release() {
    method getCurrentActivity (line 215) | @Nullable
    method setCurrentActivity (line 228) | public void setCurrentActivity(Activity currentActivity) {
    method getTopActivity (line 242) | @Nullable
    method getActivityList (line 256) | public List<Activity> getActivityList() {
    method addActivity (line 266) | public void addActivity(Activity activity) {
    method removeActivity (line 280) | public void removeActivity(Activity activity) {
    method removeActivity (line 295) | public Activity removeActivity(int location) {
    method killActivity (line 313) | public void killActivity(Class<?> activityClass) {
    method activityInstanceIsLive (line 337) | public boolean activityInstanceIsLive(Activity activity) {
    method activityClassIsLive (line 351) | public boolean activityClassIsLive(Class<?> activityClass) {
    method findActivity (line 370) | public Activity findActivity(Class<?> activityClass) {
    method killAll (line 386) | public void killAll() {
    method killAll (line 405) | public void killAll(Class<?>... excludeActivityClasses) {
    method killAll (line 427) | public void killAll(String... excludeActivityName) {
    method appExit (line 451) | public void appExit() {
    type HandleListener (line 461) | @Deprecated
      method handleMessage (line 463) | void handleMessage(AppManager appManager, Message message);

FILE: arms/src/main/java/com/jess/arms/integration/ConfigModule.java
  type ConfigModule (line 41) | public interface ConfigModule {
    method applyOptions (line 48) | void applyOptions(@NonNull Context context, @NonNull GlobalConfigModul...
    method injectAppLifecycle (line 56) | void injectAppLifecycle(@NonNull Context context, @NonNull List<AppLif...
    method injectActivityLifecycle (line 64) | void injectActivityLifecycle(@NonNull Context context, @NonNull List<A...
    method injectFragmentLifecycle (line 72) | void injectFragmentLifecycle(@NonNull Context context, @NonNull List<F...

FILE: arms/src/main/java/com/jess/arms/integration/EventBusManager.java
  class EventBusManager (line 37) | public final class EventBusManager {
    method EventBusManager (line 40) | private EventBusManager() {
    method getInstance (line 43) | public static EventBusManager getInstance() {
    method register (line 59) | public void register(Object subscriber) {
    method unregister (line 75) | public void unregister(Object subscriber) {
    method post (line 91) | public void post(Object event) {
    method postSticky (line 104) | public void postSticky(Object event) {
    method removeStickyEvent (line 119) | public <T> T removeStickyEvent(Class<T> eventType) {
    method clear (line 132) | public void clear() {
    method haveAnnotation (line 147) | private boolean haveAnnotation(Object subscriber) {
    method isSystemCalss (line 177) | private boolean isSystemCalss(String name) {

FILE: arms/src/main/java/com/jess/arms/integration/FragmentLifecycle.java
  class FragmentLifecycle (line 46) | @Singleton
    method FragmentLifecycle (line 49) | @Inject
    method onFragmentAttached (line 53) | @Override
    method onFragmentCreated (line 68) | @Override
    method onFragmentViewCreated (line 76) | @Override
    method onFragmentActivityCreated (line 84) | @Override
    method onFragmentStarted (line 92) | @Override
    method onFragmentResumed (line 100) | @Override
    method onFragmentPaused (line 108) | @Override
    method onFragmentStopped (line 116) | @Override
    method onFragmentSaveInstanceState (line 124) | @Override
    method onFragmentViewDestroyed (line 132) | @Override
    method onFragmentDestroyed (line 140) | @Override
    method onFragmentDetached (line 148) | @Override
    method fetchFragmentDelegate (line 156) | private FragmentDelegate fetchFragmentDelegate(Fragment fragment) {
    method getCacheFromFragment (line 164) | @NonNull

FILE: arms/src/main/java/com/jess/arms/integration/IRepositoryManager.java
  type IRepositoryManager (line 38) | public interface IRepositoryManager {
    method obtainRetrofitService (line 47) | @NonNull
    method obtainCacheService (line 58) | @NonNull
    method clearAllCache (line 64) | void clearAllCache();
    method getContext (line 71) | @NonNull
    type ObtainServiceDelegate (line 74) | interface ObtainServiceDelegate {
      method createRetrofitService (line 76) | @Nullable

FILE: arms/src/main/java/com/jess/arms/integration/ManifestParser.java
  class ManifestParser (line 35) | public final class ManifestParser {
    method ManifestParser (line 39) | public ManifestParser(Context context) {
    method parseModule (line 43) | private static ConfigModule parseModule(String className) {
    method parse (line 66) | public List<ConfigModule> parse() {

FILE: arms/src/main/java/com/jess/arms/integration/RepositoryManager.java
  class RepositoryManager (line 49) | @SuppressWarnings("unchecked")
    method RepositoryManager (line 67) | @Inject
    method obtainRetrofitService (line 78) | @NonNull
    method obtainCacheService (line 110) | @NonNull
    method clearAllCache (line 130) | @Override
    method getContext (line 135) | @NonNull

FILE: arms/src/main/java/com/jess/arms/integration/RetrofitServiceProxyHandler.java
  class RetrofitServiceProxyHandler (line 13) | public class RetrofitServiceProxyHandler implements InvocationHandler {
    method RetrofitServiceProxyHandler (line 19) | public RetrofitServiceProxyHandler(Retrofit retrofit, Class<?> service...
    method invoke (line 24) | @Override
    method getRetrofitService (line 49) | private Object getRetrofitService() {

FILE: arms/src/main/java/com/jess/arms/integration/cache/Cache.java
  type Cache (line 40) | public interface Cache<K, V> {
    method size (line 47) | int size();
    method getMaxSize (line 54) | int getMaxSize();
    method get (line 62) | @Nullable
    method put (line 73) | @Nullable
    method remove (line 83) | @Nullable
    method containsKey (line 92) | boolean containsKey(K key);
    method keySet (line 99) | Set<K> keySet();
    method clear (line 104) | void clear();
    type Factory (line 106) | interface Factory {
      method build (line 114) | @NonNull

FILE: arms/src/main/java/com/jess/arms/integration/cache/CacheType.java
  type CacheType (line 38) | public interface CacheType {
    method getCacheTypeId (line 51) | @Override
    method calculateCacheSize (line 56) | @Override
    method getCacheTypeId (line 74) | @Override
    method calculateCacheSize (line 79) | @Override
    method getCacheTypeId (line 97) | @Override
    method calculateCacheSize (line 102) | @Override
    method getCacheTypeId (line 120) | @Override
    method calculateCacheSize (line 125) | @Override
    method getCacheTypeId (line 143) | @Override
    method calculateCacheSize (line 148) | @Override
    method getCacheTypeId (line 164) | int getCacheTypeId();
    method calculateCacheSize (line 171) | int calculateCacheSize(Context context);

FILE: arms/src/main/java/com/jess/arms/integration/cache/IntelligentCache.java
  class IntelligentCache (line 43) | public class IntelligentCache<V> implements Cache<String, V> {
    method IntelligentCache (line 48) | public IntelligentCache(int size) {
    method getKeyOfKeep (line 59) | @NonNull
    method size (line 70) | @Override
    method getMaxSize (line 80) | @Override
    method get (line 91) | @Nullable
    method put (line 107) | @Nullable
    method remove (line 122) | @Nullable
    method containsKey (line 137) | @Override
    method keySet (line 150) | @Override
    method clear (line 160) | @Override

FILE: arms/src/main/java/com/jess/arms/integration/cache/LruCache.java
  class LruCache (line 41) | public class LruCache<K, V> implements Cache<K, V> {
    method LruCache (line 52) | public LruCache(int size) {
    method setSizeMultiplier (line 63) | public synchronized void setSizeMultiplier(float multiplier) {
    method getItemSize (line 78) | protected int getItemSize(V item) {
    method onItemEvicted (line 88) | protected void onItemEvicted(K key, V value) {
    method getMaxSize (line 97) | @Override
    method size (line 107) | @Override
    method containsKey (line 118) | @Override
    method keySet (line 128) | @Override
    method get (line 139) | @Override
    method put (line 156) | @Override
    method remove (line 184) | @Override
    method clear (line 197) | @Override
    method trimToSize (line 207) | protected synchronized void trimToSize(int size) {
    method evict (line 222) | private void evict() {

FILE: arms/src/main/java/com/jess/arms/integration/lifecycle/ActivityLifecycleForRxLifecycle.java
  class ActivityLifecycleForRxLifecycle (line 42) | @Singleton
    method ActivityLifecycleForRxLifecycle (line 47) | @Inject
    method onActivityCreated (line 55) | @Override
    method onActivityStarted (line 65) | @Override
    method onActivityResumed (line 72) | @Override
    method onActivityPaused (line 79) | @Override
    method onActivityStopped (line 86) | @Override
    method onActivitySaveInstanceState (line 93) | @Override
    method onActivityDestroyed (line 98) | @Override
    method obtainSubject (line 110) | private Subject<ActivityEvent> obtainSubject(Activity activity) {

FILE: arms/src/main/java/com/jess/arms/integration/lifecycle/ActivityLifecycleable.java
  type ActivityLifecycleable (line 32) | public interface ActivityLifecycleable extends Lifecycleable<ActivityEve...

FILE: arms/src/main/java/com/jess/arms/integration/lifecycle/FragmentLifecycleForRxLifecycle.java
  class FragmentLifecycleForRxLifecycle (line 45) | @Singleton
    method FragmentLifecycleForRxLifecycle (line 48) | @Inject
    method onFragmentAttached (line 52) | @Override
    method onFragmentCreated (line 59) | @Override
    method onFragmentViewCreated (line 66) | @Override
    method onFragmentStarted (line 73) | @Override
    method onFragmentResumed (line 80) | @Override
    method onFragmentPaused (line 87) | @Override
    method onFragmentStopped (line 94) | @Override
    method onFragmentViewDestroyed (line 101) | @Override
    method onFragmentDestroyed (line 108) | @Override
    method onFragmentDetached (line 115) | @Override
    method obtainSubject (line 122) | private Subject<FragmentEvent> obtainSubject(Fragment fragment) {

FILE: arms/src/main/java/com/jess/arms/integration/lifecycle/FragmentLifecycleable.java
  type FragmentLifecycleable (line 32) | public interface FragmentLifecycleable extends Lifecycleable<FragmentEve...

FILE: arms/src/main/java/com/jess/arms/integration/lifecycle/Lifecycleable.java
  type Lifecycleable (line 39) | public interface Lifecycleable<E> {
    method provideLifecycleSubject (line 40) | @NonNull

FILE: arms/src/main/java/com/jess/arms/mvp/BaseModel.java
  class BaseModel (line 35) | public class BaseModel implements IModel, LifecycleObserver {
    method BaseModel (line 38) | public BaseModel(IRepositoryManager repositoryManager) {
    method onDestroy (line 45) | @Override
    method onDestroy (line 50) | @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)

FILE: arms/src/main/java/com/jess/arms/mvp/BasePresenter.java
  class BasePresenter (line 47) | public class BasePresenter<M extends IModel, V extends IView> implements...
    method BasePresenter (line 59) | public BasePresenter(M model, V rootView) {
    method BasePresenter (line 72) | public BasePresenter(V rootView) {
    method BasePresenter (line 78) | public BasePresenter() {
    method onStart (line 82) | @Override
    method onDestroy (line 100) | @Override
    method onDestroy (line 122) | @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    method useEventBus (line 142) | public boolean useEventBus() {
    method addDispose (line 153) | public void addDispose(Disposable disposable) {
    method unDispose (line 163) | public void unDispose() {

FILE: arms/src/main/java/com/jess/arms/mvp/IModel.java
  type IModel (line 29) | public interface IModel {
    method onDestroy (line 34) | void onDestroy();

FILE: arms/src/main/java/com/jess/arms/mvp/IPresenter.java
  type IPresenter (line 31) | public interface IPresenter {
    method onStart (line 36) | void onStart();
    method onDestroy (line 41) | void onDestroy();

FILE: arms/src/main/java/com/jess/arms/mvp/IView.java
  type IView (line 40) | public interface IView {
    method showLoading (line 45) | default void showLoading() {
    method hideLoading (line 52) | default void hideLoading() {
    method showMessage (line 61) | void showMessage(@NonNull String message);
    method launchActivity (line 68) | default void launchActivity(@NonNull Intent intent) {
    method killMyself (line 76) | default void killMyself() {

FILE: arms/src/main/java/com/jess/arms/utils/ArmsUtils.java
  class ArmsUtils (line 57) | public class ArmsUtils {
    method ArmsUtils (line 60) | private ArmsUtils() {
    method setViewHintSize (line 71) | public static void setViewHintSize(Context context, int size, TextView...
    method dip2px (line 90) | public static int dip2px(@NonNull Context context, float dpValue) {
    method pix2dip (line 102) | public static int pix2dip(@NonNull Context context, int pxValue) {
    method sp2px (line 114) | public static int sp2px(@NonNull Context context, float spValue) {
    method px2sp (line 126) | public static int px2sp(@NonNull Context context, float pxValue) {
    method getResources (line 134) | public static Resources getResources(Context context) {
    method getStringArray (line 141) | public static String[] getStringArray(Context context, int id) {
    method getDimens (line 152) | public static int getDimens(Context context, int id) {
    method getDimens (line 163) | public static float getDimens(Context context, String dimenName) {
    method getString (line 173) | public static String getString(Context context, int stringID) {
    method getString (line 182) | public static String getString(Context context, String strName) {
    method findViewByName (line 194) | public static <T extends View> T findViewByName(Context context, View ...
    method findViewByName (line 207) | public static <T extends View> T findViewByName(Context context, Activ...
    method findLayout (line 218) | public static int findLayout(Context context, String layoutName) {
    method inflate (line 228) | public static View inflate(Context context, int detailScreen) {
    method makeText (line 237) | @SuppressLint("ShowToast")
    method snackbarText (line 255) | public static void snackbarText(String text) {
    method snackbarTextWithLong (line 268) | public static void snackbarTextWithLong(String text) {
    method getDrawablebyResource (line 278) | public static Drawable getDrawablebyResource(Context context, int rID) {
    method startActivity (line 287) | public static void startActivity(Class activityClass) {
    method startActivity (line 296) | public static void startActivity(Intent content) {
    method startActivity (line 306) | public static void startActivity(Activity activity, Class homeActivity...
    method startActivity (line 316) | public static void startActivity(Activity activity, Intent intent) {
    method getScreenWidth (line 325) | public static int getScreenWidth(Context context) {
    method getScreenHeidth (line 334) | public static int getScreenHeidth(Context context) {
    method getColor (line 341) | public static int getColor(Context context, int rid) {
    method getColor (line 348) | public static int getColor(Context context, String colorName) {
    method removeChild (line 357) | public static void removeChild(View view) {
    method isEmpty (line 365) | public static boolean isEmpty(Object obj) {
    method encodeToMD5 (line 376) | public static String encodeToMD5(String string) {
    method statuInScreen (line 404) | public static void statuInScreen(Activity activity) {
    method configRecycleView (line 419) | @Deprecated
    method configRecyclerView (line 434) | public static void configRecyclerView(final RecyclerView recyclerView
    method killAll (line 445) | public static void killAll() {
    method exitApp (line 452) | public static void exitApp() {
    method obtainAppComponentFromContext (line 456) | public static AppComponent obtainAppComponentFromContext(Context conte...

FILE: arms/src/main/java/com/jess/arms/utils/CharacterHandler.java
  class CharacterHandler (line 48) | public class CharacterHandler {
    method filter (line 55) | @Override
    method CharacterHandler (line 68) | private CharacterHandler() {
    method str2HexStr (line 77) | public static String str2HexStr(String str) {
    method jsonFormat (line 99) | public static String jsonFormat(String json) {
    method xmlFormat (line 129) | public static String xmlFormat(String xml) {

FILE: arms/src/main/java/com/jess/arms/utils/DataHelper.java
  class DataHelper (line 40) | public class DataHelper {
    method DataHelper (line 44) | private DataHelper() {
    method setStringSF (line 54) | public static void setStringSF(Context context, String key, String val...
    method getStringSF (line 67) | public static String getStringSF(Context context, String key) {
    method setIntergerSF (line 80) | public static void setIntergerSF(Context context, String key, int valu...
    method getIntergerSF (line 93) | public static int getIntergerSF(Context context, String key) {
    method removeSF (line 103) | public static void removeSF(Context context, String key) {
    method clearShareprefrence (line 113) | public static void clearShareprefrence(Context context) {
    method saveDeviceData (line 127) | public static <T> boolean saveDeviceData(Context context, String key, ...
    method getDeviceData (line 155) | public static <T> T getDeviceData(Context context, String key) {
    method getCacheFile (line 188) | public static File getCacheFile(Context context) {
    method getCacheFilePath (line 208) | public static String getCacheFilePath(Context context) {
    method makeDirs (line 219) | public static File makeDirs(File file) {
    method getDirSize (line 232) | public static long getDirSize(File dir) {
    method deleteDir (line 258) | public static boolean deleteDir(File dir) {
    method bytyToString (line 276) | public static String bytyToString(InputStream in) throws IOException {

FILE: arms/src/main/java/com/jess/arms/utils/DeviceUtils.java
  class DeviceUtils (line 60) | @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
    method DeviceUtils (line 81) | private DeviceUtils() {
    method dpToPixel (line 92) | public static float dpToPixel(Context context, float dp) {
    method pixelsToDp (line 103) | public static float pixelsToDp(Context context, float f) {
    method getDefaultLoadFactor (line 107) | public static int getDefaultLoadFactor(Context context) {
    method getDensity (line 117) | public static float getDensity(Context context) {
    method getDisplayMetrics (line 124) | public static DisplayMetrics getDisplayMetrics(Context context) {
    method getScreenHeight (line 138) | public static float getScreenHeight(Context context) {
    method getScreenWidth (line 148) | public static float getScreenWidth(Context context) {
    method getRealScreenSize (line 158) | public static int[] getRealScreenSize(Activity activity) {
    method getStatusBarHeight (line 200) | public static int getStatusBarHeight(Context context) {
    method hasBigScreen (line 218) | public static boolean hasBigScreen(Context context) {
    method hasCamera (line 246) | public static boolean hasCamera(Context context) {
    method hasHardwareMenuKey (line 266) | public static boolean hasHardwareMenuKey(Context context) {
    method hasInternet (line 284) | public static boolean hasInternet(Context context) {
    method isPackageExist (line 298) | public static boolean isPackageExist(Context context, String pckName) {
    method hideAnimatedView (line 311) | public static void hideAnimatedView(View view) {
    method hideSoftKeyboard (line 323) | public static void hideSoftKeyboard(Context context, View view) {
    method isLandscape (line 341) | public static boolean isLandscape(Context context) {
    method isPortrait (line 353) | public static boolean isPortrait(Context context) {
    method isTablet (line 361) | public static boolean isTablet(Context context) {
    method showAnimatedView (line 371) | public static void showAnimatedView(View view) {
    method showSoftKeyboard (line 377) | public static void showSoftKeyboard(Dialog dialog) {
    method showSoftKeyboard (line 381) | public static void showSoftKeyboard(Context context, View view) {
    method toogleSoftKeyboard (line 387) | public static void toogleSoftKeyboard(Context context, View view) {
    method isSdcardReady (line 393) | public static boolean isSdcardReady() {
    method getCurCountryLan (line 398) | public static String getCurCountryLan(Context context) {
    method isZhCN (line 406) | public static boolean isZhCN(Context context) {
    method percent (line 412) | public static String percent(double p1, double p2) {
    method percent2 (line 421) | public static String percent2(double p1, double p2) {
    method isHaveMarket (line 430) | public static boolean isHaveMarket(Context context) {
    method setFullScreen (line 439) | public static void setFullScreen(Activity activity) {
    method cancelFullScreen (line 448) | public static void cancelFullScreen(Activity activity) {
    method getPackageInfo (line 457) | public static PackageInfo getPackageInfo(Context context, String pckNa...
    method getVersionCode (line 473) | public static int getVersionCode(Context context) {
    method getVersionCode (line 492) | public static int getVersionCode(Context context, String packageName) {
    method getVersionName (line 509) | public static String getVersionName(Context context) {
    method isScreenOn (line 521) | public static boolean isScreenOn(Context context) {
    method installAPK (line 532) | public static void installAPK(Context context, File file) {
    method getInstallApkIntent (line 544) | public static Intent getInstallApkIntent(File file) {
    method openDial (line 559) | public static void openDial(Context context, String number) {
    method openSMS (line 565) | public static void openSMS(Context context, String smsBody, String tel) {
    method openDail (line 572) | public static void openDail(Context context) {
    method openSendMsg (line 578) | public static void openSendMsg(Context context) {
    method openCamera (line 585) | public static void openCamera(Context context) {
    method getIMEI (line 592) | public static String getIMEI(Context context) {
    method getPhoneType (line 597) | public static String getPhoneType() {
    method openApp (line 601) | public static void openApp(Context context, String packageName) {
    method openAppActivity (line 610) | public static boolean openAppActivity(Context context, String packageN...
    method isWifiOpen (line 630) | public static boolean isWifiOpen(Context context) {
    method uninstallApk (line 654) | public static void uninstallApk(Context context, String packageName) {
    method copyTextToBoard (line 663) | @SuppressWarnings("deprecation")
    method sendEmail (line 681) | public static void sendEmail(Context context, String subject,
    method getStatuBarHeight (line 697) | public static int getStatuBarHeight(Context context) {
    method hasStatusBar (line 716) | public static boolean hasStatusBar(Activity activity) {
    method showSystemShareOption (line 728) | public static void showSystemShareOption(Activity context,
    method getNetworkType (line 742) | public static int getNetworkType(Context context) {
    method netIsConnected (line 765) | public static boolean netIsConnected(Context context) {
    method isExitsSdcard (line 780) | public static boolean isExitsSdcard() {

FILE: arms/src/main/java/com/jess/arms/utils/DrawableProvider.java
  class DrawableProvider (line 37) | public class DrawableProvider {
    method DrawableProvider (line 39) | private DrawableProvider() {
    method getStateListDrawable (line 50) | public static Drawable getStateListDrawable(Drawable normalDrawable, D...
    method getScaleDrawableForRadioButton (line 64) | public static Drawable getScaleDrawableForRadioButton(float percent, T...
    method getScaleDrawableForRadioButton2 (line 81) | public static Drawable getScaleDrawableForRadioButton2(float width, Te...
    method getScaleDrawable (line 98) | public static Drawable getScaleDrawable(float percent, Drawable drawab...
    method getScaleDrawable2 (line 109) | public static Drawable getScaleDrawable2(float width, Drawable drawabl...
    method setLeftDrawable (line 120) | public static void setLeftDrawable(TextView tv, Drawable drawable) {
    method getReSizeBitmap (line 130) | public static Bitmap getReSizeBitmap(Bitmap bitmap, float targetWidth,...
    method rotateBitmapByDegree (line 157) | public static Bitmap rotateBitmapByDegree(Bitmap bm, int degree) {
    method getBitmapDegree (line 184) | public static int getBitmapDegree(String path) {

FILE: arms/src/main/java/com/jess/arms/utils/FastBlur.java
  class FastBlur (line 35) | public class FastBlur {
    method FastBlur (line 37) | private FastBlur() {
    method doBlur (line 41) | public static Bitmap doBlur(Bitmap sentBitmap, int radius, boolean can...
    method blur (line 283) | public static void blur(Context context, Bitmap bkg, View view) {
    method blurBitmap (line 311) | public static Bitmap blurBitmap(Bitmap bkg, int width, int height) {

FILE: arms/src/main/java/com/jess/arms/utils/LogUtils.java
  class LogUtils (line 30) | public class LogUtils {
    method LogUtils (line 34) | private LogUtils() {
    method isLog (line 38) | public static boolean isLog() {
    method setLog (line 42) | public static void setLog(boolean isLog) {
    method debugInfo (line 46) | public static void debugInfo(String tag, String msg) {
    method debugInfo (line 54) | public static void debugInfo(String msg) {
    method warnInfo (line 58) | public static void warnInfo(String tag, String msg) {
    method warnInfo (line 66) | public static void warnInfo(String msg) {
    method debugLongInfo (line 76) | public static void debugLongInfo(String tag, String msg) {
    method debugLongInfo (line 96) | public static void debugLongInfo(String msg) {

FILE: arms/src/main/java/com/jess/arms/utils/PermissionUtil.java
  class PermissionUtil (line 41) | public class PermissionUtil {
    method PermissionUtil (line 44) | private PermissionUtil() {
    method requestPermission (line 48) | public static void requestPermission(final RequestPermission requestPe...
    method launchCamera (line 103) | public static void launchCamera(RequestPermission requestPermission, R...
    method externalStorage (line 110) | public static void externalStorage(RequestPermission requestPermission...
    method sendSms (line 117) | public static void sendSms(RequestPermission requestPermission, RxPerm...
    method callPhone (line 124) | public static void callPhone(RequestPermission requestPermission, RxPe...
    method readPhonestate (line 131) | public static void readPhonestate(RequestPermission requestPermission,...
    type RequestPermission (line 135) | public interface RequestPermission {
      method onRequestPermissionSuccess (line 140) | void onRequestPermissionSuccess();
      method onRequestPermissionFailure (line 147) | void onRequestPermissionFailure(List<String> permissions);
      method onRequestPermissionFailureWithAskNeverAgain (line 154) | void onRequestPermissionFailureWithAskNeverAgain(List<String> permis...

FILE: arms/src/main/java/com/jess/arms/utils/Preconditions.java
  class Preconditions (line 27) | public final class Preconditions {
    method Preconditions (line 29) | private Preconditions() {
    method checkArgument (line 33) | public static void checkArgument(boolean expression) {
    method checkArgument (line 39) | public static void checkArgument(boolean expression, @Nullable Object ...
    method checkArgument (line 45) | public static void checkArgument(boolean expression, @Nullable String ...
    method checkState (line 51) | public static void checkState(boolean expression) {
    method checkState (line 57) | public static void checkState(boolean expression, @Nullable Object err...
    method checkState (line 63) | public static void checkState(boolean expression, @Nullable String err...
    method checkNotNull (line 69) | public static <T> T checkNotNull(T reference) {
    method checkNotNull (line 77) | public static <T> T checkNotNull(T reference, @Nullable Object errorMe...
    method checkNotNull (line 85) | public static <T> T checkNotNull(T reference, @Nullable String errorMe...
    method checkElementIndex (line 93) | public static int checkElementIndex(int index, int size) {
    method checkElementIndex (line 97) | public static int checkElementIndex(int index, int size, @Nullable Str...
    method badElementIndex (line 105) | private static String badElementIndex(int index, int size, String desc) {
    method checkPositionIndex (line 115) | public static int checkPositionIndex(int index, int size) {
    method checkPositionIndex (line 119) | public static int checkPositionIndex(int index, int size, @Nullable St...
    method badPositionIndex (line 127) | private static String badPositionIndex(int index, int size, String des...
    method checkPositionIndexes (line 137) | public static void checkPositionIndexes(int start, int end, int size) {
    method badPositionIndexes (line 143) | private static String badPositionIndexes(int start, int end, int size) {
    method format (line 147) | static String format(String template, @Nullable Object... args) {

FILE: arms/src/main/java/com/jess/arms/utils/RxLifecycleUtils.java
  class RxLifecycleUtils (line 40) | public class RxLifecycleUtils {
    method RxLifecycleUtils (line 42) | private RxLifecycleUtils() {
    method bindUntilEvent (line 54) | public static <T> LifecycleTransformer<T> bindUntilEvent(@NonNull fina...
    method bindUntilEvent (line 72) | public static <T> LifecycleTransformer<T> bindUntilEvent(@NonNull fina...
    method bindUntilEvent (line 82) | public static <T, R> LifecycleTransformer<T> bindUntilEvent(@NonNull f...
    method bindToLifecycle (line 95) | public static <T> LifecycleTransformer<T> bindToLifecycle(@NonNull IVi...
    method bindToLifecycle (line 104) | public static <T> LifecycleTransformer<T> bindToLifecycle(@NonNull Lif...

FILE: arms/src/main/java/com/jess/arms/utils/ThirdViewUtil.java
  class ThirdViewUtil (line 47) | public class ThirdViewUtil {
    method ThirdViewUtil (line 50) | private ThirdViewUtil() {
    method isUseAutolayout (line 54) | public static boolean isUseAutolayout() {
    method bindTarget (line 58) | public static Unbinder bindTarget(Object target, Object source) {
    method convertAutoView (line 70) | @Nullable

FILE: arms/src/main/java/com/jess/arms/utils/UrlEncoderUtils.java
  class UrlEncoderUtils (line 25) | public class UrlEncoderUtils {
    method UrlEncoderUtils (line 27) | private UrlEncoderUtils() {
    method hasUrlEncoded (line 39) | public static boolean hasUrlEncoded(String str) {
    method isValidHexChar (line 64) | private static boolean isValidHexChar(char c) {

FILE: arms/src/main/java/com/jess/arms/utils/ZipHelper.java
  class ZipHelper (line 43) | public class ZipHelper {
    method ZipHelper (line 45) | private ZipHelper() {
    method decompressToStringForZlib (line 55) | public static String decompressToStringForZlib(byte[] bytesToDecompres...
    method decompressToStringForZlib (line 66) | public static String decompressToStringForZlib(byte[] bytesToDecompres...
    method decompressForZlib (line 96) | public static byte[] decompressForZlib(byte[] bytesToDecompress) {
    method compressForZlib (line 149) | public static byte[] compressForZlib(byte[] bytesToCompress) {
    method compressForZlib (line 178) | public static byte[] compressForZlib(String stringToCompress) {
    method compressForGzip (line 207) | public static byte[] compressForGzip(String string) {
    method decompressForGzip (line 235) | public static String decompressForGzip(byte[] compressed) {
    method decompressForGzip (line 246) | public static String decompressForGzip(byte[] compressed, String chars...
    method closeQuietly (line 269) | public static void closeQuietly(Closeable closeable) {

FILE: arms/src/main/java/com/jess/arms/widget/CustomPopupWindow.java
  class CustomPopupWindow (line 39) | public class CustomPopupWindow extends PopupWindow {
    method CustomPopupWindow (line 49) | private CustomPopupWindow(Builder builder) {
    method builder (line 61) | public static Builder builder() {
    method inflateView (line 72) | public static View inflateView(ContextThemeWrapper context, int layout...
    method initLayout (line 77) | private void initLayout() {
    method getContentView (line 96) | @Override
    method show (line 101) | public void show() {//默认显示到中间
    type CustomPopupWindowListener (line 109) | public interface CustomPopupWindowListener {
      method initPopupView (line 110) | void initPopupView(View contentView);
    class Builder (line 113) | public static final class Builder {
      method Builder (line 123) | private Builder() {
      method contentView (line 126) | public Builder contentView(View contentView) {
      method parentView (line 131) | public Builder parentView(View parentView) {
      method isWrap (line 136) | public Builder isWrap(boolean isWrap) {
      method customListener (line 141) | public Builder customListener(CustomPopupWindowListener listener) {
      method isOutsideTouch (line 146) | public Builder isOutsideTouch(boolean isOutsideTouch) {
      method isFocus (line 151) | public Builder isFocus(boolean isFocus) {
      method backgroundDrawable (line 156) | public Builder backgroundDrawable(Drawable backgroundDrawable) {
      method animationStyle (line 161) | public Builder animationStyle(int animationStyle) {
      method build (line 166) | public CustomPopupWindow build() {

FILE: demo/src/androidTest/java/me/jessyan/mvparms/demo/ApplicationTest.java
  class ApplicationTest (line 9) | public class ApplicationTest extends ApplicationTestCase<Application> {
    method ApplicationTest (line 10) | public ApplicationTest() {

FILE: demo/src/main/java/me/jessyan/mvparms/demo/app/ActivityLifecycleCallbacksImpl.java
  class ActivityLifecycleCallbacksImpl (line 40) | public class ActivityLifecycleCallbacksImpl implements Application.Activ...
    method onActivityCreated (line 42) | @Override
    method onActivityStarted (line 47) | @Override
    method onActivityResumed (line 75) | @Override
    method onActivityPaused (line 80) | @Override
    method onActivityStopped (line 85) | @Override
    method onActivitySaveInstanceState (line 90) | @Override
    method onActivityDestroyed (line 95) | @Override

FILE: demo/src/main/java/me/jessyan/mvparms/demo/app/AppLifecyclesImpl.java
  class AppLifecyclesImpl (line 37) | public class AppLifecyclesImpl implements AppLifecycles {
    method attachBaseContext (line 39) | @Override
    method onCreate (line 44) | @Override
    method onTerminate (line 70) | @Override

FILE: demo/src/main/java/me/jessyan/mvparms/demo/app/EventBusTags.java
  type EventBusTags (line 30) | public interface EventBusTags {

FILE: demo/src/main/java/me/jessyan/mvparms/demo/app/FragmentLifecycleCallbacksImpl.java
  class FragmentLifecycleCallbacksImpl (line 38) | public class FragmentLifecycleCallbacksImpl extends FragmentManager.Frag...
    method onFragmentAttached (line 40) | @Override
    method onFragmentCreated (line 45) | @Override
    method onFragmentViewCreated (line 55) | @Override
    method onFragmentActivityCreated (line 60) | @Override
    method onFragmentStarted (line 65) | @Override
    method onFragmentResumed (line 70) | @Override
    method onFragmentPaused (line 75) | @Override
    method onFragmentStopped (line 80) | @Override
    method onFragmentSaveInstanceState (line 85) | @Override
    method onFragmentViewDestroyed (line 90) | @Override
    method onFragmentDestroyed (line 95) | @Override
    method onFragmentDetached (line 100) | @Override

FILE: demo/src/main/java/me/jessyan/mvparms/demo/app/GlobalConfiguration.java
  class GlobalConfiguration (line 55) | public final class GlobalConfiguration implements ConfigModule {
    method applyOptions (line 58) | @Override
    method injectAppLifecycle (line 155) | @Override
    method injectActivityLifecycle (line 162) | @Override
    method injectFragmentLifecycle (line 169) | @Override

FILE: demo/src/main/java/me/jessyan/mvparms/demo/app/GlobalHttpHandlerImpl.java
  class GlobalHttpHandlerImpl (line 46) | public class GlobalHttpHandlerImpl implements GlobalHttpHandler {
    method GlobalHttpHandlerImpl (line 49) | public GlobalHttpHandlerImpl(Context context) {
    method onHttpResultResponse (line 62) | @NonNull
    method onHttpRequestBefore (line 98) | @NonNull

FILE: demo/src/main/java/me/jessyan/mvparms/demo/app/ResponseErrorListenerImpl.java
  class ResponseErrorListenerImpl (line 43) | public class ResponseErrorListenerImpl implements ResponseErrorListener {
    method handleResponseError (line 45) | @Override
    method convertStatusCode (line 64) | private String convertStatusCode(HttpException httpException) {

FILE: demo/src/main/java/me/jessyan/mvparms/demo/app/service/DemoService.java
  class DemoService (line 29) | public class DemoService extends BaseService {
    method init (line 30) | @Override

FILE: demo/src/main/java/me/jessyan/mvparms/demo/app/utils/RxUtils.java
  class RxUtils (line 36) | public class RxUtils {
    method RxUtils (line 38) | private RxUtils() {
    method applySchedulers (line 41) | public static <T> ObservableTransformer<T, T> applySchedulers(final IV...
    method bindToLifecycle (line 62) | @Deprecated

FILE: demo/src/main/java/me/jessyan/mvparms/demo/di/component/UserComponent.java
  type UserComponent (line 37) | @ActivityScope
    method inject (line 40) | void inject(UserActivity activity);
    type Builder (line 42) | @Component.Builder
      method view (line 44) | @BindsInstance
      method appComponent (line 47) | UserComponent.Builder appComponent(AppComponent appComponent);
      method build (line 49) | UserComponent build();

FILE: demo/src/main/java/me/jessyan/mvparms/demo/di/module/UserModule.java
  class UserModule (line 46) | @Module
    method provideRxPermissions (line 49) | @ActivityScope
    method provideLayoutManager (line 55) | @ActivityScope
    method provideUserList (line 61) | @ActivityScope
    method provideUserAdapter (line 67) | @ActivityScope
    method bindUserModel (line 73) | @Binds

FILE: demo/src/main/java/me/jessyan/mvparms/demo/mvp/contract/UserContract.java
  type UserContract (line 39) | public interface UserContract {
    type View (line 41) | interface View extends IView {
      method startLoadMore (line 42) | void startLoadMore();
      method endLoadMore (line 44) | void endLoadMore();
      method getActivity (line 46) | Activity getActivity();
      method getRxPermissions (line 49) | RxPermissions getRxPermissions();
    type Model (line 53) | interface Model extends IModel {
      method getUsers (line 54) | Observable<List<User>> getUsers(int lastIdQueried, boolean update);

FILE: demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/UserModel.java
  class UserModel (line 50) | @ActivityScope
    method UserModel (line 54) | @Inject
    method getUsers (line 59) | @Override
    method onPause (line 73) | @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)

FILE: demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/api/Api.java
  type Api (line 27) | public interface Api {

FILE: demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/api/cache/CommonCache.java
  type CommonCache (line 38) | public interface CommonCache {
    method getUsers (line 40) | @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)

FILE: demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/api/service/CommonService.java
  type CommonService (line 27) | public interface CommonService {

FILE: demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/api/service/UserService.java
  type UserService (line 37) | public interface UserService {
    method getUsers (line 40) | @Headers({HEADER_API_VERSION})

FILE: demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/entity/BaseResponse.java
  class BaseResponse (line 32) | public class BaseResponse<T> implements Serializable {
    method getData (line 37) | public T getData() {
    method getCode (line 41) | public String getCode() {
    method getMsg (line 45) | public String getMsg() {
    method isSuccess (line 54) | public boolean isSuccess() {

FILE: demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/entity/User.java
  class User (line 29) | public class User {
    method User (line 34) | public User(int id, String login, String avatarUrl) {
    method getAvatarUrl (line 40) | public String getAvatarUrl() {
    method getId (line 48) | public int getId() {
    method getLogin (line 52) | public String getLogin() {
    method toString (line 56) | @NotNull

FILE: demo/src/main/java/me/jessyan/mvparms/demo/mvp/presenter/UserPresenter.java
  class UserPresenter (line 54) | @ActivityScope
    method UserPresenter (line 71) | @Inject
    method onCreate (line 80) | @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    method requestUsers (line 85) | public void requestUsers(final boolean pullToRefresh) {
    method requestFromModel (line 108) | private void requestFromModel(boolean pullToRefresh) {
    method onDestroy (line 160) | @Override

FILE: demo/src/main/java/me/jessyan/mvparms/demo/mvp/ui/activity/UserActivity.java
  class UserActivity (line 56) | public class UserActivity extends BaseActivity<UserPresenter> implements...
    method setupActivityComponent (line 72) | @Override
    method initView (line 82) | @Override
    method initData (line 87) | @Override
    method onRefresh (line 95) | @Override
    method initRecyclerView (line 103) | private void initRecyclerView() {
    method showLoading (line 109) | @Override
    method hideLoading (line 115) | @Override
    method showMessage (line 121) | @Override
    method launchActivity (line 127) | @Override
    method killMyself (line 133) | @Override
    method startLoadMore (line 141) | @Override
    method endLoadMore (line 149) | @Override
    method getActivity (line 154) | @Override
    method getRxPermissions (line 159) | @Override
    method initPaginate (line 167) | private void initPaginate() {
    method onDestroy (line 193) | @Override

FILE: demo/src/main/java/me/jessyan/mvparms/demo/mvp/ui/adapter/UserAdapter.java
  class UserAdapter (line 40) | public class UserAdapter extends DefaultAdapter<User> {
    method UserAdapter (line 42) | public UserAdapter(List<User> infos) {
    method getHolder (line 46) | @NonNull
    method getLayoutId (line 52) | @Override

FILE: demo/src/main/java/me/jessyan/mvparms/demo/mvp/ui/holder/UserItemHolder.java
  class UserItemHolder (line 45) | public class UserItemHolder extends BaseHolder<User> {
    method UserItemHolder (line 57) | public UserItemHolder(View itemView) {
    method setData (line 64) | @Override
    method onRelease (line 81) | @Override

FILE: demo/src/test/java/me/jessyan/mvparms/demo/ExampleUnitTest.java
  class ExampleUnitTest (line 10) | public class ExampleUnitTest {
    method addition_isCorrect (line 11) | @Test
Condensed preview — 163 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (585K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "chars": 944,
    "preview": "## Look at here\n\n- → Did you conform to the [Rules](https://github.com/JessYanCoding/MVPArms/issues/150)?\n- → Did you re"
  },
  {
    "path": ".gitignore",
    "chars": 470,
    "preview": "# Built application files\n*.apk\n*.ap_\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated file"
  },
  {
    "path": ".travis.yml",
    "chars": 658,
    "preview": "language: android\njdk: oraclejdk8\nbefore_install:\n  - yes | sdkmanager \"platforms;android-28\"\n\nenv:\n  global:\n    - ANDR"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 68,
    "preview": "[UpdateLog](https://github.com/JessYanCoding/MVPArms/wiki/UpdateLog)"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3213,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 1194,
    "preview": "# Contributing\nIf you would like to contribute code you can do so through GitHub by forking the repository and sending a"
  },
  {
    "path": "CONTRIBUTING_APP.md",
    "chars": 2303,
    "preview": "**如果您使用或基于 MVPArms 开发过开源的 APP 或者 Framework, 恳请您将项目地址 [Pull Request](https://github.com/JessYanCoding/MVPArms/pull/new/ma"
  },
  {
    "path": "LICENSE",
    "chars": 11357,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "MVPArms.md",
    "chars": 8380,
    "preview": "![Logo](image/arms_banner_v1.0.jpg)\n![Official](image/official.jpeg)\n\n<p align=\"center\">\n   <a href=\"https://bintray.com"
  },
  {
    "path": "MVP_generator_solution",
    "chars": 14646,
    "preview": "MVPArms框架自动生成MVP及Dagger2相关文件解决方案\n\n第二代模版已经开源到 https://github.com/JessYanCoding/MVPArmsTemplate ,一键生成所有文件\n\n(设置)Setting -> "
  },
  {
    "path": "README.md",
    "chars": 8337,
    "preview": "![Logo](image/arms_banner_v1.0.jpg)\n![Official](image/official.jpeg)\n\n<p align=\"center\">\n   <a href=\"https://bintray.com"
  },
  {
    "path": "arms/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "arms/build.gradle",
    "chars": 3683,
    "preview": "apply plugin: 'com.android.library'\n\nandroid {\n    compileSdkVersion rootProject.ext.android[\"compileSdkVersion\"]\n    bu"
  },
  {
    "path": "arms/gradle.properties",
    "chars": 17,
    "preview": "POM_NAME=MVPArms\n"
  },
  {
    "path": "arms/proguard-rules.pro",
    "chars": 7263,
    "preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /U"
  },
  {
    "path": "arms/src/main/AndroidManifest.xml",
    "chars": 304,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package="
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/AdapterViewPager.java",
    "chars": 2066,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/App.java",
    "chars": 1524,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/BaseActivity.java",
    "chars": 5628,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/BaseApplication.java",
    "chars": 3466,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/BaseFragment.java",
    "chars": 4318,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/BaseHolder.java",
    "chars": 2766,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/BaseLazyLoadFragment.java",
    "chars": 2133,
    "preview": "package com.jess.arms.base;\n\nimport androidx.fragment.app.Fragment;\nimport androidx.fragment.app.FragmentManager;\n\nimpor"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/BaseService.java",
    "chars": 2828,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/DefaultAdapter.java",
    "chars": 4865,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/Platform.java",
    "chars": 1988,
    "preview": "/*\n * Copyright 2018 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/Unused.java",
    "chars": 172,
    "preview": "package com.jess.arms.base;\n\nimport javax.inject.Inject;\n\n/**\n * Created by yexiaokang on 2019/11/12.\n */\npublic class U"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/delegate/ActivityDelegate.java",
    "chars": 1694,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/delegate/ActivityDelegateImpl.java",
    "chars": 2438,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/delegate/AppDelegate.java",
    "chars": 11171,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/delegate/AppLifecycles.java",
    "chars": 1261,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/delegate/FragmentDelegate.java",
    "chars": 1966,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/delegate/FragmentDelegateImpl.java",
    "chars": 3899,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/delegate/IActivity.java",
    "chars": 3129,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/base/delegate/IFragment.java",
    "chars": 4776,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/di/component/AppComponent.java",
    "chars": 4375,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/di/module/AppModule.java",
    "chars": 3785,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/di/module/ClientModule.java",
    "chars": 7860,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/di/module/GlobalConfigModule.java",
    "chars": 12699,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/di/scope/ActivityScope.java",
    "chars": 1025,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/di/scope/FragmentScope.java",
    "chars": 1025,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/http/BaseUrl.java",
    "chars": 1181,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/http/GlobalHttpHandler.java",
    "chars": 2702,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/http/OkHttpStreamFetcher.java",
    "chars": 4061,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/http/OkHttpUrlLoader.java",
    "chars": 3256,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/http/imageloader/BaseImageLoaderStrategy.java",
    "chars": 1509,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/http/imageloader/ImageConfig.java",
    "chars": 1474,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/http/imageloader/ImageLoader.java",
    "chars": 2820,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/http/imageloader/glide/GlideAppliesOptions.java",
    "chars": 1922,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/http/imageloader/glide/GlideConfiguration.java",
    "chars": 4301,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/http/log/DefaultFormatPrinter.java",
    "chars": 10751,
    "preview": "/*\n * Copyright 2018 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/http/log/FormatPrinter.java",
    "chars": 2931,
    "preview": "/*\n * Copyright 2018 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/http/log/RequestInterceptor.java",
    "chars": 9941,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/ActivityLifecycle.java",
    "chars": 7729,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/AppManager.java",
    "chars": 15016,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/ConfigModule.java",
    "chars": 2793,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/EventBusManager.java",
    "chars": 6161,
    "preview": "/*\n * Copyright 2018 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/FragmentLifecycle.java",
    "chars": 6383,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/IRepositoryManager.java",
    "chars": 2109,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/ManifestParser.java",
    "chars": 3021,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/RepositoryManager.java",
    "chars": 4584,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/RetrofitServiceProxyHandler.java",
    "chars": 1723,
    "preview": "package com.jess.arms.integration;\n\nimport androidx.annotation.Nullable;\n\nimport java.lang.reflect.InvocationHandler;\nim"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/cache/Cache.java",
    "chars": 3051,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/cache/CacheType.java",
    "chars": 5675,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/cache/IntelligentCache.java",
    "chars": 4840,
    "preview": "/*\n * Copyright 2018 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/cache/LruCache.java",
    "chars": 6176,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/lifecycle/ActivityLifecycleForRxLifecycle.java",
    "chars": 3726,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/lifecycle/ActivityLifecycleable.java",
    "chars": 1184,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/lifecycle/FragmentLifecycleForRxLifecycle.java",
    "chars": 4234,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/lifecycle/FragmentLifecycleable.java",
    "chars": 1194,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/integration/lifecycle/Lifecycleable.java",
    "chars": 1409,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/mvp/BaseModel.java",
    "chars": 1814,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/mvp/BasePresenter.java",
    "chars": 5864,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/mvp/IModel.java",
    "chars": 1187,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/mvp/IPresenter.java",
    "chars": 1278,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/mvp/IView.java",
    "chars": 1939,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/ArmsUtils.java",
    "chars": 13931,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/CharacterHandler.java",
    "chars": 4731,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/DataHelper.java",
    "chars": 8429,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/DeviceUtils.java",
    "chars": 24546,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/DrawableProvider.java",
    "chars": 6398,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/FastBlur.java",
    "chars": 10604,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/LogUtils.java",
    "chars": 2721,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/PermissionUtil.java",
    "chars": 6194,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/Preconditions.java",
    "chars": 6604,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/RxLifecycleUtils.java",
    "chars": 4293,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/ThirdViewUtil.java",
    "chars": 4355,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/UrlEncoderUtils.java",
    "chars": 2180,
    "preview": "/*\n * Copyright 2018 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/utils/ZipHelper.java",
    "chars": 8040,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms/src/main/java/com/jess/arms/widget/CustomPopupWindow.java",
    "chars": 5880,
    "preview": "/*\r\n * Copyright 2017 JessYan\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not us"
  },
  {
    "path": "arms/src/main/res/values/strings.xml",
    "chars": 67,
    "preview": "<resources>\n    <string name=\"app_name\">arms</string>\n</resources>\n"
  },
  {
    "path": "arms-autolayout/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "arms-autolayout/build.gradle",
    "chars": 1300,
    "preview": "apply plugin: 'com.android.library'\n\nandroid {\n    compileSdkVersion rootProject.ext.android[\"compileSdkVersion\"]\n    bu"
  },
  {
    "path": "arms-autolayout/gradle.properties",
    "chars": 35,
    "preview": "POM_NAME=MVPArms-AndroidAutoLayout\n"
  },
  {
    "path": "arms-autolayout/proguard-rules.pro",
    "chars": 751,
    "preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
  },
  {
    "path": "arms-autolayout/src/main/AndroidManifest.xml",
    "chars": 55,
    "preview": "<manifest package=\"com.jess.arms.widget.autolayout\" />\n"
  },
  {
    "path": "arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoAppBarLayout.java",
    "chars": 3014,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoCardView.java",
    "chars": 2201,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoCollapsingToolbarLayout.java",
    "chars": 3238,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoRadioGroup.java",
    "chars": 2971,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoScrollView.java",
    "chars": 3162,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoTabLayout.java",
    "chars": 4334,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms-autolayout/src/main/java/com/jess/arms/widget/autolayout/AutoToolbar.java",
    "chars": 5648,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms-autolayout/src/main/res/values/attrs.xml",
    "chars": 204,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <declare-styleable name=\"AutoTabLayout\">\n        <attr name=\"auto"
  },
  {
    "path": "arms-autolayout/src/main/res/values/strings.xml",
    "chars": 78,
    "preview": "<resources>\n    <string name=\"app_name\">arms-autolayout</string>\n</resources>\n"
  },
  {
    "path": "arms-imageloader-glide/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "arms-imageloader-glide/build.gradle",
    "chars": 900,
    "preview": "apply plugin: 'com.android.library'\n\nandroid {\n    compileSdkVersion rootProject.ext.android[\"compileSdkVersion\"]\n    bu"
  },
  {
    "path": "arms-imageloader-glide/gradle.properties",
    "chars": 35,
    "preview": "POM_NAME=MVPArms-ImageLoader-Glide\n"
  },
  {
    "path": "arms-imageloader-glide/proguard-rules.pro",
    "chars": 751,
    "preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
  },
  {
    "path": "arms-imageloader-glide/src/main/AndroidManifest.xml",
    "chars": 60,
    "preview": "<manifest package=\"com.jess.arms.http.imageloader.glide\" />\n"
  },
  {
    "path": "arms-imageloader-glide/src/main/java/com/jess/arms/http/imageloader/glide/BlurTransformation.java",
    "chars": 2180,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms-imageloader-glide/src/main/java/com/jess/arms/http/imageloader/glide/CacheStrategy.java",
    "chars": 770,
    "preview": "package com.jess.arms.http.imageloader.glide;\n\nimport androidx.annotation.IntDef;\n\nimport java.lang.annotation.Retention"
  },
  {
    "path": "arms-imageloader-glide/src/main/java/com/jess/arms/http/imageloader/glide/GlideImageLoaderStrategy.java",
    "chars": 6188,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms-imageloader-glide/src/main/java/com/jess/arms/http/imageloader/glide/ImageConfigImpl.java",
    "chars": 7691,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "arms-imageloader-glide/src/main/res/values/strings.xml",
    "chars": 73,
    "preview": "<resources>\n    <string name=\"app_name\">arms-glide</string>\n</resources>\n"
  },
  {
    "path": "bintray.gradle",
    "chars": 3184,
    "preview": "apply plugin: 'com.jfrog.bintray'\napply plugin: 'com.github.dcendents.android-maven'\n\nProperties properties = new Proper"
  },
  {
    "path": "build.gradle",
    "chars": 1536,
    "preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\napply from: \"config."
  },
  {
    "path": "config.gradle",
    "chars": 8357,
    "preview": "ext {\n\n    android = [\n            compileSdkVersion: 29,\n            buildToolsVersion: \"29.0.3\",\n            minSdkVer"
  },
  {
    "path": "demo/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "demo/build.gradle",
    "chars": 3549,
    "preview": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion rootProject.ext.android[\"compileSdkVersion\"]\n  "
  },
  {
    "path": "demo/proguard-rules.pro",
    "chars": 765,
    "preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /U"
  },
  {
    "path": "demo/src/androidTest/java/me/jessyan/mvparms/demo/ApplicationTest.java",
    "chars": 354,
    "preview": "package me.jessyan.mvparms.demo;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a hr"
  },
  {
    "path": "demo/src/main/AndroidManifest.xml",
    "chars": 1999,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:to"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/app/ActivityLifecycleCallbacksImpl.java",
    "chars": 4014,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/app/AppLifecyclesImpl.java",
    "chars": 2949,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/app/EventBusTags.java",
    "chars": 1235,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/app/FragmentLifecycleCallbacksImpl.java",
    "chars": 3888,
    "preview": "/*\n * Copyright 2018 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/app/GlobalConfiguration.java",
    "chars": 8977,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/app/GlobalHttpHandlerImpl.java",
    "chars": 3860,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/app/ResponseErrorListenerImpl.java",
    "chars": 2770,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/app/service/DemoService.java",
    "chars": 1085,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/app/utils/RxUtils.java",
    "chars": 2260,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/di/component/UserComponent.java",
    "chars": 1757,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/di/module/UserModule.java",
    "chars": 2371,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/mvp/contract/UserContract.java",
    "chars": 1732,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/UserModel.java",
    "chars": 2822,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/api/Api.java",
    "chars": 1061,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/api/cache/CommonCache.java",
    "chars": 1523,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/api/service/CommonService.java",
    "chars": 981,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/api/service/UserService.java",
    "chars": 1499,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/entity/BaseResponse.java",
    "chars": 1579,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/mvp/model/entity/User.java",
    "chars": 1641,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/mvp/presenter/UserPresenter.java",
    "chars": 6187,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/mvp/ui/activity/UserActivity.java",
    "chars": 5429,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/mvp/ui/adapter/UserAdapter.java",
    "chars": 1650,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/java/me/jessyan/mvparms/demo/mvp/ui/holder/UserItemHolder.java",
    "chars": 3221,
    "preview": "/*\n * Copyright 2017 JessYan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th"
  },
  {
    "path": "demo/src/main/res/anim/translate_center_to_left.xml",
    "chars": 223,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:durat"
  },
  {
    "path": "demo/src/main/res/anim/translate_center_to_right.xml",
    "chars": 222,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:durat"
  },
  {
    "path": "demo/src/main/res/anim/translate_left_to_center.xml",
    "chars": 223,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:durat"
  },
  {
    "path": "demo/src/main/res/anim/translate_right_to_center.xml",
    "chars": 222,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:durat"
  },
  {
    "path": "demo/src/main/res/layout/activity_user.xml",
    "chars": 954,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmln"
  },
  {
    "path": "demo/src/main/res/layout/include_title.xml",
    "chars": 1316,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.appcompat.widget.Toolbar xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "demo/src/main/res/layout/recycle_list.xml",
    "chars": 959,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "demo/src/main/res/values/colors.xml",
    "chars": 248,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#3FA862</color>\n    <color name=\"color"
  },
  {
    "path": "demo/src/main/res/values/strings.xml",
    "chars": 70,
    "preview": "<resources>\n    <string name=\"app_name\">MVPArms</string>\n</resources>\n"
  },
  {
    "path": "demo/src/main/res/values/styles.xml",
    "chars": 892,
    "preview": "<resources>\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n"
  },
  {
    "path": "demo/src/test/java/me/jessyan/mvparms/demo/ExampleUnitTest.java",
    "chars": 328,
    "preview": "package me.jessyan.mvparms.demo;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\n/**\n * To work o"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "chars": 232,
    "preview": "#Wed Feb 26 13:45:30 CST 2020\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
  },
  {
    "path": "gradle.properties",
    "chars": 1148,
    "preview": "## Project-wide Gradle settings.\n#\n# For more details on how to configure your build environment visit\n# http://www.grad"
  },
  {
    "path": "gradlew",
    "chars": 4971,
    "preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start "
  },
  {
    "path": "gradlew.bat",
    "chars": 2404,
    "preview": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@r"
  },
  {
    "path": "settings.gradle",
    "chars": 72,
    "preview": "include ':demo', ':arms', ':arms-autolayout', ':arms-imageloader-glide'\n"
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the JessYanCoding/MVPArms GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 163 files (536.1 KB), approximately 139.4k tokens, and a symbol index with 974 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!