Full Code of Werb/MoreType for AI

master 371878a4003a cached
137 files
227.3 KB
61.9k tokens
2 symbols
1 requests
Download .txt
Showing preview only (269K chars total). Download the full file or copy to clipboard to get everything.
Repository: Werb/MoreType
Branch: master
Commit: 371878a4003a
Files: 137
Total size: 227.3 KB

Directory structure:
gitextract_uxrnujua/

├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── README_EN.md
├── README_ZH.md
├── app/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       ├── androidTest/
│       │   └── java/
│       │       └── com/
│       │           └── werb/
│       │               └── moretype/
│       │                   └── ExampleInstrumentedTest.kt
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── werb/
│       │   │           └── moretype/
│       │   │               ├── MyApp.kt
│       │   │               ├── TitleViewHolder.kt
│       │   │               ├── Utils.kt
│       │   │               ├── anim/
│       │   │               │   ├── AnimActivity.kt
│       │   │               │   ├── AnimType.kt
│       │   │               │   └── AnimViewHolder.kt
│       │   │               ├── click/
│       │   │               │   ├── ItemClick.kt
│       │   │               │   ├── ItemClickActivity.kt
│       │   │               │   ├── ItemClickOneViewHolder.kt
│       │   │               │   └── ItemClickTwoViewHolder.kt
│       │   │               ├── complete/
│       │   │               │   ├── Complete.kt
│       │   │               │   ├── CompleteActivity.kt
│       │   │               │   ├── CompleteViewHolder.kt
│       │   │               │   ├── FootViewHolder.kt
│       │   │               │   ├── Footer.kt
│       │   │               │   ├── HorizontalData.kt
│       │   │               │   ├── HorizontalItemViewHolder.kt
│       │   │               │   ├── HorizontalViewHolder.kt
│       │   │               │   └── OnLoadMoreListener.kt
│       │   │               ├── data/
│       │   │               │   └── DataServer.kt
│       │   │               ├── diff/
│       │   │               │   ├── DiffDataActivity.kt
│       │   │               │   └── DiffDataCallback.kt
│       │   │               ├── main/
│       │   │               │   ├── MainActivity.kt
│       │   │               │   ├── MainCard.kt
│       │   │               │   ├── MainCardViewHolder.kt
│       │   │               │   └── PayLoadOne.kt
│       │   │               ├── me/
│       │   │               │   ├── AboutMeActivity.kt
│       │   │               │   ├── MeInfo.kt
│       │   │               │   ├── MeInfoViewHolder.kt
│       │   │               │   ├── MeMessage.kt
│       │   │               │   ├── MeMessageViewHolder.kt
│       │   │               │   ├── MeThanks.kt
│       │   │               │   ├── MeThanksViewHolder.kt
│       │   │               │   └── MeTitleViewType.kt
│       │   │               ├── multi/
│       │   │               │   ├── ImageSize.kt
│       │   │               │   ├── Message.kt
│       │   │               │   ├── MessageInViewHolder.kt
│       │   │               │   ├── MessageOutViewHolder.kt
│       │   │               │   └── MultiRegisterActivity.kt
│       │   │               └── single/
│       │   │                   ├── SingleImage.kt
│       │   │                   ├── SingleItemDecoration.kt
│       │   │                   ├── SingleRegisterActivity.kt
│       │   │                   ├── SingleText.kt
│       │   │                   ├── SingleTypeOneViewHolder.kt
│       │   │                   └── SingleTypeTwoViewHolder.kt
│       │   └── res/
│       │       ├── drawable/
│       │       │   ├── widget_button_bg.xml
│       │       │   ├── widget_input_bg.xml
│       │       │   ├── widget_input_edit_bg.xml
│       │       │   ├── widget_message_in_text_bg.xml
│       │       │   ├── widget_message_out_text_bg.xml
│       │       │   ├── widget_round_bg.xml
│       │       │   └── widget_spinner_bg.xml
│       │       ├── layout/
│       │       │   ├── activity_anim.xml
│       │       │   ├── activity_complete.xml
│       │       │   ├── activity_diff.xml
│       │       │   ├── activity_item_click.xml
│       │       │   ├── activity_main.xml
│       │       │   ├── activity_me.xml
│       │       │   ├── activity_multi_register.xml
│       │       │   ├── activity_single_register.xml
│       │       │   ├── item_view_about_me_info.xml
│       │       │   ├── item_view_about_me_message.xml
│       │       │   ├── item_view_about_me_thx.xml
│       │       │   ├── item_view_about_me_title.xml
│       │       │   ├── item_view_anim.xml
│       │       │   ├── item_view_click_one.xml
│       │       │   ├── item_view_click_two.xml
│       │       │   ├── item_view_complete.xml
│       │       │   ├── item_view_footer.xml
│       │       │   ├── item_view_horizontal_item.xml
│       │       │   ├── item_view_horizontal_list.xml
│       │       │   ├── item_view_main.xml
│       │       │   ├── item_view_multi_message_in.xml
│       │       │   ├── item_view_multi_message_out.xml
│       │       │   ├── item_view_single_type_one.xml
│       │       │   ├── item_view_single_type_two.xml
│       │       │   ├── item_view_title.xml
│       │       │   ├── widget_view_complete_text.xml
│       │       │   ├── widget_view_message_in_image.xml
│       │       │   ├── widget_view_message_in_text.xml
│       │       │   ├── widget_view_message_input.xml
│       │       │   ├── widget_view_message_out_image.xml
│       │       │   └── widget_view_message_out_text.xml
│       │       ├── values/
│       │       │   ├── arrays.xml
│       │       │   ├── colors.xml
│       │       │   ├── strings.xml
│       │       │   └── styles.xml
│       │       └── xml/
│       │           └── shortcuts.xml
│       └── test/
│           └── java/
│               └── com/
│                   └── werb/
│                       └── moretype/
│                           └── ExampleUnitTest.kt
├── build.gradle
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── library/
│   ├── .gitignore
│   ├── bintray.gradle
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── kotlin/
│       │   │   └── com/
│       │   │       └── werb/
│       │   │           └── library/
│       │   │               ├── MoreAdapter.kt
│       │   │               ├── MoreType.kt
│       │   │               ├── MoreViewHolder.kt
│       │   │               ├── action/
│       │   │               │   ├── DataAction.kt
│       │   │               │   └── MoreClickListener.kt
│       │   │               ├── annotation/
│       │   │               │   └── MoreInject.kt
│       │   │               ├── exception/
│       │   │               │   ├── ModelNotRegisterException.kt
│       │   │               │   ├── MultiModelNotRegisterException.kt
│       │   │               │   └── ViewHolderInitErrorException.kt
│       │   │               ├── extension/
│       │   │               │   ├── AlphaAnimation.kt
│       │   │               │   ├── AnimExtension.kt
│       │   │               │   ├── MoreAnimation.kt
│       │   │               │   ├── ScaleInAnimation.kt
│       │   │               │   ├── SlideInBottomAnimation.kt
│       │   │               │   ├── SlideInLeftAnimation.kt
│       │   │               │   └── SlideInRightAnimation.kt
│       │   │               └── link/
│       │   │                   ├── LayoutID.kt
│       │   │                   ├── MoreLink.kt
│       │   │                   ├── MoreLinkManager.kt
│       │   │                   ├── MultiLink.kt
│       │   │                   ├── RegisterItem.kt
│       │   │                   ├── SoleLinkManager.kt
│       │   │                   └── XDiffCallback.kt
│       │   └── res/
│       │       └── values/
│       │           └── ids.xml
│       └── test/
│           └── java/
│               └── com/
│                   └── werb/
│                       └── library/
│                           └── ExampleUnitTest.java
└── settings.gradle

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

================================================
FILE: .gitignore
================================================
# Generated files
bin/
gen/
release/

# Gradle files
.gradle/
build/

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

# IntelliJ project files
*.iml
.idea/

# Eclipse project files
.settings/

# Misc
.DS_Store

.classpath
.project


================================================
FILE: .travis.yml
================================================
language: android
jdk: oraclejdk8
sudo: false

android:
  components:
  - build-tools-28.0.3
  - android-28
  - extra-android-m2repository
  - extra-android-support
  licenses:
    - 'android-sdk-preview-license-52d11cd2'
    - 'android-sdk-license-.+'
    - 'google-gdk-license-.+'

before_install:
  - chmod +x gradlew
  - mkdir "$ANDROID_HOME/licenses" || true
  - echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
  - echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"

before_script:
- touch local.properties

script:
  - "./gradlew assembleRelease"

================================================
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 2017 Werb

   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: README.md
================================================
# MoreType

> new method to build data in RecyclerView with Kotlin!

<a href="https://fir.im/k9yq"><img src="https://raw.githubusercontent.com/Werb/MoreType/master/app/src/main/res/mipmap-xhdpi/app_icon.png" width = "90" alt="download" align=center /></a>

Click icon download lastest sample

[English](https://github.com/Werb/MoreType/blob/master/README_EN.md) | [中文版](https://github.com/Werb/MoreType/blob/master/README_ZH.md)

[![Build Status](https://travis-ci.org/werbhelius/MoreType.svg?branch=master)](https://travis-ci.org/werbhelius/MoreType)
[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/Werb/MoreType/blob/master/LICENSE)
 [ ![Download](https://api.bintray.com/packages/werbhelius/maven/moretype/images/download.svg) ](https://bintray.com/werbhelius/maven/moretype/_latestVersion)
 [![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=16)

 **Keyword: Data driven view 【数据驱动视图】**

 ## Preview
![more-type-one](./screenshot/type1.png)
![more-type-two](./screenshot/type2.png)

## Dependency
```gradle
compile 'com.werb.moretype:moretype:$last_version'
```
or
```gradle
implementation 'com.werb.moretype:moretype:$last_version'
```

## Update log
#### [v0.4.0](https://github.com/Werb/MoreType/releases/tag/v0.4.0)
* bug fix
* update MoreViewHolder Constructor

## Usage

Keyword: Data driven view 【数据驱动视图】

#### Step 1. create a data model class, like:
```kotlin
data class SingleText(val title: String, val desc: String, val url: String)
```
or
```kotlin
class SingleText {
    var title: String? = null
    var desc: String? = null
    var url: String? = null
}
```

### Step 2. create a class (xxxViewHolder) extends abstract class `MoreViewHolder<T : Any>()` , like:

```kotlin
// Register layoutID here or Register with adapter in Activity
@LayoutID(R.layout.item_view_single_type_one)
class SingleTypeOneViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<SingleText>(containerView) {

    override fun bindData(data: SingleText, payloads: List<Any>) {
        title.text = data.title
        desc.text = data.desc
        icon.setImageURI(data.url)
    }

}
```

### Step 3. `register` and `attach` to `recyclerview` in Any where you build list, like:

```kotlin
import kotlinx.android.synthetic.main.activity_single_register.*

class SingleRegisterActivity: AppCompatActivity() {

    private val adapter = MoreAdapter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_single_register)

        list.layoutManager = LinearLayoutManager(this)

        /* register ViewHolder and attach to recyclerView */
        adapter.apply {
            // two method register Layout
            register(RegisterItem(R.layout.item_view_single_type_one, SingleTypeOneViewHolder::class.java))
            // or
            register(SingleTypeOneViewHolder::class.java)
            attachTo(single_register_list)
        }

        /* load any data List or model object */
        adapter.loadData(DataServer.getSingleRegisterData())

    }

}
```
Upon completion of these three steps, a list based on the [Data Driven View] has been completed.



================================================
FILE: README_EN.md
================================================
# MoreType

> new method to build data in RecyclerView with Kotlin!

<a href="https://fir.im/k9yq"><img src="https://raw.githubusercontent.com/Werb/MoreType/master/app/src/main/res/mipmap-xhdpi/app_icon.png" width = "90" alt="download" align=center /></a>

Click icon download lastest sample

English | [中文版](https://github.com/Werb/MoreType/blob/master/README_ZH.md)

[![Build Status](https://travis-ci.org/werbhelius/MoreType.svg?branch=master)](https://travis-ci.org/werbhelius/MoreType)
[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/Werb/MoreType/blob/master/LICENSE)
 [ ![Download](https://api.bintray.com/packages/werbhelius/maven/moretype/images/download.svg) ](https://bintray.com/werbhelius/maven/moretype/_latestVersion)
 [![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=16)

Keyword: Data driven view 【数据驱动视图】

Before writing a project in the company, we need to write a large number of recyclerViews to display data, which means that each recyclerView must write an Adapter, but also for different views according to getItemViewType () write different ViewHolder, in the presence of multiple views Time, an adapter in the code will be very redundant, And the coupling is very high, the follow-up changes are very friendly. 

**Any of our recyclerViews are based on the data returned by the server to build, so I was wondering, can not simply use the data to drive the view, which is the core of the MoreType 【data driven view】.**

I am not The first thought of this concept, I first saw the concept of practice, is [drakeet's MultiType](https://github.com/drakeet/MultiType). After watching his project, i know this is what I hope [Data driven view]. 

**Kotlin on Android Now official.** Don't have to worry about the NullPointerException, simple code style, in the first time I like to like it, so I decided to use Kotlin to develop a **【data-driven view】** third-party library  of the , this was MoreType **【Give you more likely】**.

## Preview
![more-type-one](./screenshot/type1.png)
![more-type-two](./screenshot/type2.png)

## Dependency
```gradle
compile 'com.werb.moretype:moretype:$last_version'
```
or
```gradle
implementation 'com.werb.moretype:moretype:$last_version'
```

## Usage

Keyword: Data driven view 【数据驱动视图】

#### Step 1. create a data model class, like:
```kotlin
data class SingleText(val title: String, val desc: String, val url: String)
```
or
```kotlin
class SingleText {
    var title: String? = null
    var desc: String? = null
    var url: String? = null
}
```

### Step 2. create a class (xxxViewHolder) extends abstract class `MoreViewHolder<T : Any>()` , like:

```kotlin
// Register layoutID here or Register with adapter in Activity
@LayoutID(R.layout.item_view_single_type_one)
class SingleTypeOneViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<SingleText>(containerView) {

    override fun bindData(data: SingleText, payloads: List<Any>) {
        title.text = data.title
        desc.text = data.desc
        icon.setImageURI(data.url)
    }

}
```

### Step 3. `register` and `attach` to `recyclerview` in Any where you build list, like:

```kotlin
import kotlinx.android.synthetic.main.activity_single_register.*

class SingleRegisterActivity: AppCompatActivity() {

    private val adapter = MoreAdapter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_single_register)

        list.layoutManager = LinearLayoutManager(this)

        /* register ViewHolder and attach to recyclerView */
        adapter.apply {
            // two method register Layout
            register(RegisterItem(R.layout.item_view_single_type_one, SingleTypeOneViewHolder::class.java))
            // or
            register(SingleTypeOneViewHolder::class.java)
            attachTo(single_register_list)
        }

        /* load any data List or model object */
        adapter.loadData(DataServer.getSingleRegisterData())

    }

}
```

Upon completion of these three steps, a list based on the [Data Driven View] has been completed.

## Feature
### Multi Register: Register one2more ViewHolder

Usually data and view are one-to-one relationships, like Feeds list, MoreType alse provide Multi Register like IM list, one data to Many views, MoreType can do it easily.

```kotlin
adapter.apply {
    multiRegister(object : MultiLink<Message>() {
        override fun link(data: Message): RegisterItem {
            return if (data.me){
                RegisterItem(R.layout.item_view_multi_message_out, MessageOutViewHolder::class.java)
            }else {
                RegisterItem(R.layout.item_view_multi_message_in, MessageInViewHolder::class.java)
            }
        }
    })
    attachTo(multi_register_list)
}
```
### Animation: Provides five types of Animation

Provide 5 animations: **Alpha** , **Scale** , **SlideInBottom** , **SlideInLeft** , **SlideInRight**

```Kotlin
    adapter.register(TitleViewType())
            .register(AnimViewType())
            /* assign Animation */
            .renderWithAnimation(AlphaAnimation())
            /* set Animation start position in list */
            .startAnimPosition(1)
            /* set is always show animation or show in first display */
            .firstShowAnim(true)
            .attachTo(anim_list)
```

Also suppost custom Animation, create a class implement `MoreAnimation` and override `getItemAnimators(view: View)` , like:
```kotlin
class SlideInLeftAnimation : MoreAnimation {

    override fun getItemAnimators(view: View): Array<Animator>{
        return arrayOf(ObjectAnimator.ofFloat(view, "translationX", -view.rootView.width.toFloat(), 0f))
    }

}
```

### ItemClick: Support onItemClick and onItemLongClick

Two ways to achieve ItemClick: **In ViewHolder** and **In Activity**

**In ViewType** : Just use `view.setOnClickListener {}` in ViewType

**In Activity** : 
1. use `addOnClickListener(view: View)` or `addOnClickListener(viewId: Int)` to bind event in ViewType
2. In the Activity through the `MoreClickListener ()` to create a click event object, you can pass in the registration

[sample](https://github.com/Werb/MoreType/tree/master/app/src/main/java/com/werb/moretype/click)

### Refresh and loadMore
**Refresh**: use `SwipeRefreshLayout`

**LoadMore**: build `Footer.class` and `FootViewType` , when list smooth to last position - 1, show  `FootViewType` and remove `FootViewType`  when new data load successful

[sample](https://github.com/Werb/MoreType/blob/master/app/src/main/java/com/werb/moretype/complete/CompleteActivity.kt)

### Sole Global ViewType
**Register global viewType in Custom Application**
```kotlin
class MyApp: Application() {

   companion object {
       @Volatile lateinit var myApp: MyApp
           private set
   }

    override fun onCreate() {
        super.onCreate()
        myApp = this
        // Sole Global Register, like footer , Cutting line
        MoreType.soleRegister(RegisterItem(R.layout.item_view_footer, FootViewHolder::class.java))
    }
}
```

and we can use it in any where with `adapter.userSoleRegister()`

### inject Value In ViewHolder
```kotlin
    adapter.apply {
        injectValueInAllHolder(mapOf("qqqqqq" to "1233333333")) // inject in All Holder
        register(MainCardViewHolder::class.java, playLoadClick, mapOf("someValue" to "123")) // inject in single holder
        attachTo(more_list)
    }
```

## Thanks
[MultiType](https://github.com/drakeet/MultiType)

[recyclerview-animators](https://github.com/wasabeef/recyclerview-animators)

## LICENSE
[Apache License](./LICENSE)





================================================
FILE: README_ZH.md
================================================
# MoreType

> new method to build data in RecyclerView with Kotlin!

<a href="https://fir.im/k9yq"><img src="https://raw.githubusercontent.com/Werb/MoreType/master/app/src/main/res/mipmap-xhdpi/app_icon.png" width = "90" alt="download" align=center /></a>

Click icon download lastest sample

[English](https://github.com/Werb/MoreType/blob/master/README_EN.md) | [中文版](https://github.com/Werb/MoreType/blob/master/README_ZH.md)

[![Build Status](https://travis-ci.org/werbhelius/MoreType.svg?branch=master)](https://travis-ci.org/werbhelius/MoreType)
[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/Werb/MoreType/blob/master/LICENSE)
 [ ![Download](https://api.bintray.com/packages/werbhelius/maven/moretype/images/download.svg) ](https://bintray.com/werbhelius/maven/moretype/_latestVersion)
 [![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=16)

关键词:【数据驱动视图】

之前在写公司的项目的时候,需要写大量的界面,这就意味着每一个界面都要写一个 Adapter,同时还要对不同的视图根据 getItemViewHolder() 写不同的 ViewHolder,在存在多种视图的时候,一个 Adapter 中的代码就会很冗余,而且耦合度很高,对后续的修改很不友好。

**我们任意一个界面都是依靠服务器返回的数据构建的,所以我就在想,能不能简单的使用数据来驱动视图,这就也是 MoreType 的核心所在【数据驱动视图】。**

我并不是第一个想到这个概念的人,我最早看到这个概念的实践,是 drakeet 的 [MultiType](https://github.com/drakeet/MultiType) 。当时看完他的项目之后,有一种醍醐灌顶的畅快,这就是我所希望的【数据驱动视图】。

大概在一个月前,开始接触 Kotlin,Kotlin 是一个让开发者用起来很爽的语言,不必深陷烦人的空指针异常,简洁的代码风格,在初次尝时候我就喜欢上了它,所以我决定用 Kotlin 来开发一个【数据驱动视图】的第三方库,从而就有了 MoreType 的产生【给你更多的可能】。

[与 MultiType 的异同](https://github.com/Werb/MoreType/issues/1)

## Preview
![more-type-one](./screenshot/type1.png)
![more-type-two](./screenshot/type2.png)

## Dependency
```gradle
compile 'com.werb.moretype:moretype:$last_version'
```
or
```gradle
implementation 'com.werb.moretype:moretype:$last_version'
```

## Usage

Keyword: 【数据驱动视图】

#### Step 1. 创建一个数据模型类,例如:
```kotlin
data class SingleText(val title: String, val desc: String, val url: String)
```
or
```kotlin
class SingleText {
    var title: String? = null
    var desc: String? = null
    var url: String? = null
}
```

### Step 2. 创建一个类 xxxViewHolder 继承抽象类 `MoreViewHolder<T : Any>()` 例如:

```kotlin
// Register layoutID here or Register with adapter in Activity
@LayoutID(R.layout.item_view_single_type_one)
class SingleTypeOneViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<SingleText>(containerView) {

    override fun bindData(data: SingleText, payloads: List<Any>) {
        title.text = data.title
        desc.text = data.desc
        icon.setImageURI(data.url)
    }

}
```

### Step 3. 在使用 `RecyclerView` 的地方,声明 `MoreAdapter()`对象,`register` 需要的 `ViewHolder`,同时和 `RecyclerView` 绑定

```kotlin
import kotlinx.android.synthetic.main.activity_single_register.*

class SingleRegisterActivity: AppCompatActivity() {

    private val adapter = MoreAdapter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_single_register)

        list.layoutManager = LinearLayoutManager(this)

        /* register ViewHolder and attach to recyclerView */
        adapter.apply {
            // two method register Layout
            register(RegisterItem(R.layout.item_view_single_type_one, SingleTypeOneViewHolder::class.java))
            // or
            register(SingleTypeOneViewHolder::class.java)
            attachTo(single_register_list)
        }

        /* load any data List or model object */
        adapter.loadData(DataServer.getSingleRegisterData())

    }

}
```

完成这三步,一个根据【数据驱动视图】的列表就已经构建完成。


## Feature
### Multi Register: Register one2more ViewHolder

通常我们的数据和视图是一对一的关系,比如瀑布流。MoreType 同时提供一种数据类型对应多种视图的情况,例如私信界面。

```kotlin
adapter.apply {
    multiRegister(object : MultiLink<Message>() {
        override fun link(data: Message): RegisterItem {
            return if (data.me){
                RegisterItem(R.layout.item_view_multi_message_out, MessageOutViewHolder::class.java)
            }else {
                RegisterItem(R.layout.item_view_multi_message_in, MessageInViewHolder::class.java)
            }
        }
    })
    attachTo(multi_register_list)
}
```

### Animation: Provides five types of Animation

提供五种动画支持: **Alpha** , **Scale** , **SlideInBottom** , **SlideInLeft** , **SlideInRight**

```Kotlin
    adapter.register(TitleViewHolder())
            .register(AnimViewHolder())
            /* assign Animation */
            .renderWithAnimation(AlphaAnimation())
            /* set Animation start position in list */
            .startAnimPosition(1)
            /* set is always show animation or show in first display */
            .firstShowAnim(true)
            .attachTo(anim_list)
```

同时支持自定义动画, 创建一个类实现接口 `MoreAnimation` and 重写 `getItemAnimators(view: View)` 例如:
```kotlin
class SlideInLeftAnimation : MoreAnimation {

    override fun getItemAnimators(view: View): Array<Animator>{
        return arrayOf(ObjectAnimator.ofFloat(view, "translationX", -view.rootView.width.toFloat(), 0f))
    }

}
```

### ItemClick: Support onItemClick and onItemLongClick

两种方式实现点击事件: **In ViewHolder** and **In Activity**

**In ViewHolder 中处理点击事件** : 在ViewHolder中使用 `view.setOnClickListener {}` 

**In Activity 中处理点击事件** :
1. 在 ViewHolder 中使用 `addOnClickListener(view: View)` or `addOnClickListener(viewId: Int)` 绑定点击事件
2. 在 Activity 中通过 `MoreClickListener()` 创建点击事件对象,在注册的时候传入即可

[sample](https://github.com/Werb/MoreType/tree/master/app/src/main/java/com/werb/moretype/click)

### Refresh and loadMore
**Refresh**: 使用 `SwipeRefreshLayout` 就可以实现下拉刷新

**LoadMore**: 通过构建 `Footer.class` 和 `FootViewHolder` 实现数据和视图的绑定, 当 RecyclerView 滚动在底部时显示 `FootViewHolder`,在数据请求成功后移除 `FootViewHolder`

[sample](https://github.com/Werb/MoreType/blob/master/app/src/main/java/com/werb/moretype/complete/CompleteActivity.kt)

### 全局 ViewHolder
**在自定义 Application中注册全局 ViewHolder**
```kotlin
class MyApp: Application() {

   companion object {
       @Volatile lateinit var myApp: MyApp
           private set
   }

    override fun onCreate() {
        super.onCreate()
        myApp = this
        // Sole Global Register, like footer , Cutting line
        MoreType.soleRegister(RegisterItem(R.layout.item_view_footer, FootViewHolder::class.java))
    }
}
```

通过 `adapter.userSoleRegister()` 调用使用全局 ViewHolder

### 向 ViewHolder 中传递数据
```kotlin
    adapter.apply {
        injectValueInAllHolder(mapOf("qqqqqq" to "1233333333")) // inject in All Holder
        register(MainCardViewHolder::class.java, playLoadClick, mapOf("someValue" to "123")) // inject in single holder
        attachTo(more_list)
    }
```

## Thanks
[MultiType](https://github.com/drakeet/MultiType)

[recyclerview-animators](https://github.com/wasabeef/recyclerview-animators)

## LICENSE
[Apache License](./LICENSE)





================================================
FILE: app/.gitignore
================================================
/build


================================================
FILE: app/build.gradle
================================================
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.werb.moretype"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    androidExtensions {
        experimental = true
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0-alpha4', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    testImplementation 'junit:junit:4.12'
    implementation project(':library')
    implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
    implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha02'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.google.android.material:material:1.1.0-alpha03'
    implementation 'com.facebook.fresco:fresco:1.7.1'
    implementation 'com.werb.permissionschecker:permissionschecker:0.0.1-beta2'
    implementation('com.werb.pickphotoview:pickphotoview:0.3.6-beta1', {
        exclude group: 'com.android.support'
        exclude group: 'com.werb.moretype'
    })
}


================================================
FILE: app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/wanbo/Dev/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 *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile


================================================
FILE: app/src/androidTest/java/com/werb/moretype/ExampleInstrumentedTest.kt
================================================
package com.werb.moretype

import androidx.test.InstrumentationRegistry
import androidx.test.runner.AndroidJUnit4
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

/**
 * Instrumented test, which will execute on an Android device.
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
    @Test
    fun useAppContext() {
        // Context of the app under test.
        val appContext = InstrumentationRegistry.getTargetContext()
        assertEquals("com.werb.moretype", appContext.packageName)
    }
}


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

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.CAMERA" />

    <application
        android:name=".MyApp"
        android:allowBackup="true"
        android:icon="@mipmap/app_icon"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/app_icon"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

        <activity android:name=".main.MainActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data
                android:name="android.app.shortcuts"
                android:resource="@xml/shortcuts"/>
        </activity>

        <activity android:name=".single.SingleRegisterActivity" />

        <activity android:name=".multi.MultiRegisterActivity"/>

        <activity android:name=".anim.AnimActivity"
            android:theme="@style/AnimTheme"/>

        <activity android:name=".click.ItemClickActivity" />

        <activity android:name=".complete.CompleteActivity" />

        <activity android:name=".me.AboutMeActivity"/>

        <activity android:name=".diff.DiffDataActivity"
            android:theme="@style/AnimTheme"/>

        <provider
            android:name="com.werb.pickphotoview.provider.PickProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/pick_file_paths" />
        </provider>
    </application>

</manifest>

================================================
FILE: app/src/main/java/com/werb/moretype/MyApp.kt
================================================
package com.werb.moretype

import android.app.Application
import com.facebook.drawee.backends.pipeline.Fresco
import com.werb.library.MoreType
import com.werb.library.link.RegisterItem
import com.werb.moretype.complete.FootViewHolder

/**
 * Created by wanbo on 2017/7/12.
 */
class MyApp: Application() {

   companion object {
       @Volatile lateinit var myApp: MyApp
           private set
   }

    override fun onCreate() {
        super.onCreate()
        myApp = this
        Fresco.initialize(myApp)
        // Sole Global Register, like footer , Cutting line
        MoreType.soleRegister(RegisterItem(R.layout.item_view_footer, FootViewHolder::class.java))
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/TitleViewHolder.kt
================================================
package com.werb.moretype

import android.view.View
import com.werb.library.MoreViewHolder
import com.werb.library.link.LayoutID
import com.werb.moretype.main.MainCard
import kotlinx.android.synthetic.main.item_view_title.view.*

/**
 * Created by wanbo on 2017/7/14.
 */

@LayoutID(R.layout.item_view_title)
class TitleViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<MainCard>(values, containerView) {

    private val title = containerView.title
    private val desc = containerView.desc

    override fun bindData(data: MainCard, payloads: List<Any>) {
        title.text = data.cardTitle
        desc.text = data.cardDesc
    }


}

================================================
FILE: app/src/main/java/com/werb/moretype/Utils.kt
================================================
package com.werb.moretype

import android.graphics.BitmapFactory
import com.werb.library.MoreViewHolder
import com.werb.moretype.multi.ImageSize
import java.io.File
import java.text.SimpleDateFormat
import java.util.*


/**
 * Created by wanbo on 2017/7/14.
 */
object Utils {

    fun sendTime(ms: Long): String {
        val calendar = Calendar.getInstance()
        calendar.timeInMillis = ms
        val format = SimpleDateFormat("MM/dd HH:mm")
        return format.format(Date(ms))
    }

    fun dp2px(dpValue: Float): Int {
        val scale = MyApp.myApp.resources.displayMetrics.density
        return (dpValue * scale + 0.5f).toInt()
    }

    fun getIMImageSize(width: Double, height: Double): ImageSize {
        val fixWidth: Int
        val fixHeight: Int
        var ratio = width.toFloat() / height.toFloat()
        if (ratio > 1) {
            if (ratio > 3) {
                ratio = 3f
            }
            fixWidth = dp2px(200f)
            fixHeight = (fixWidth / ratio).toInt()
        } else {
            if (ratio < 0.3) {
                ratio = 0.3f
            }
            fixHeight = dp2px(200f)
            fixWidth = (ratio * fixHeight).toInt()
        }
        return ImageSize(fixWidth, fixHeight)
    }

    fun readImageSize(path: String): ImageSize? {
        val orFile = File(path)
        if (!orFile.exists()) {
            return null
        }
        val options = BitmapFactory.Options()
        options.inJustDecodeBounds = true
        BitmapFactory.decodeFile(orFile.absolutePath, options)
        return ImageSize(options.outWidth, options.outHeight)
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/anim/AnimActivity.kt
================================================
package com.werb.moretype.anim

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.AdapterView
import android.widget.AdapterView.OnItemSelectedListener
import android.widget.CompoundButton
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.RecyclerView
import com.werb.library.MoreAdapter
import com.werb.library.extension.*
import com.werb.library.link.RegisterItem
import com.werb.moretype.R
import com.werb.moretype.TitleViewHolder
import com.werb.moretype.data.DataServer
import kotlinx.android.synthetic.main.activity_anim.*


/**
 * Created by wanbo on 2017/7/15.
 */
class AnimActivity : AppCompatActivity() {

    private val adapter = MoreAdapter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_anim)

        toolbar.setNavigationIcon(R.mipmap.ic_close_white_24dp)
        toolbar.setNavigationOnClickListener { finish() }

        anim_list.layoutManager = androidx.recyclerview.widget.LinearLayoutManager(this)
        adapter.apply {
            register(RegisterItem(R.layout.item_view_title, TitleViewHolder::class.java))
            register(RegisterItem(R.layout.item_view_anim, AnimViewHolder::class.java))
            startAnimPosition(1)
        }

        switch_view.setOnCheckedChangeListener({ _: CompoundButton, check: Boolean ->
            adapter.firstShowAnim(check)
        })

        spinner.onItemSelectedListener = object : OnItemSelectedListener {

            override fun onNothingSelected(p0: AdapterView<*>?) {

            }

            override fun onItemSelected(p0: AdapterView<*>?, view: View?, position: Int, p3: Long) {
                when (position) {
                    0 -> {
                        adapter.removeAllData()
                        adapter.renderWithAnimation(AlphaAnimation())
                        adapter.loadData(DataServer.getAnimData())
                        adapter.attachTo(anim_list)
                    }
                    1 -> {
                        adapter.removeAllData()
                        adapter.renderWithAnimation(ScaleInAnimation())
                        adapter.loadData(DataServer.getAnimData())
                        adapter.attachTo(anim_list)
                    }
                    2 -> {
                        adapter.removeAllData()
                        adapter.renderWithAnimation(SlideInLeftAnimation())
                        adapter.loadData(DataServer.getAnimData())
                        adapter.attachTo(anim_list)
                    }
                    3 -> {
                        adapter.removeAllData()
                        adapter.renderWithAnimation(SlideInRightAnimation())
                        adapter.loadData(DataServer.getAnimData())
                        adapter.attachTo(anim_list)
                    }
                    4 -> {
                        adapter.removeAllData()
                        adapter.renderWithAnimation(SlideInBottomAnimation())
                        adapter.loadData(DataServer.getAnimData())
                        adapter.attachTo(anim_list)
                    }
                }
            }

        }
    }

    companion object {

        fun startActivity(activity: Activity) {
            activity.startActivity(Intent(activity, AnimActivity::class.java))
        }
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/anim/AnimType.kt
================================================
package com.werb.moretype.anim

/**
 * Created by wanbo on 2017/7/15.
 */
class AnimType(val title: String,
                    val type: String,
                    val typeIcon: String,
                    val thumb: String)

================================================
FILE: app/src/main/java/com/werb/moretype/anim/AnimViewHolder.kt
================================================
package com.werb.moretype.anim

import android.view.View
import com.werb.library.MoreViewHolder
import kotlinx.android.synthetic.main.item_view_anim.*

/**
 * Created by wanbo on 2017/7/15.
 */
class AnimViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<AnimType>(values, containerView) {

    override fun bindData(data: AnimType, payloads: List<Any>) {
        title.text = data.title
        type.text = data.type
        icon.setImageURI(data.typeIcon)
        thumb.setImageURI(data.thumb)
    }
} 

================================================
FILE: app/src/main/java/com/werb/moretype/click/ItemClick.kt
================================================
package com.werb.moretype.click

/**
 * Created by wanbo on 2017/7/15.
 */
data class ItemClick(val title: String, val url: String, val click: Boolean)

================================================
FILE: app/src/main/java/com/werb/moretype/click/ItemClickActivity.kt
================================================
package com.werb.moretype.click

import android.app.Activity
import android.content.DialogInterface
import android.content.Intent
import android.os.Bundle
import android.view.MotionEvent
import android.view.View
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import com.werb.library.MoreAdapter
import com.werb.library.action.MoreClickListener
import com.werb.library.link.MultiLink
import com.werb.library.link.RegisterItem
import com.werb.moretype.R
import com.werb.moretype.TitleViewHolder
import com.werb.moretype.data.DataServer
import kotlinx.android.synthetic.main.activity_item_click.*


/**
 * Created by wanbo on 2017/7/15.
 */
class ItemClickActivity : AppCompatActivity() {

    private val adapter = MoreAdapter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_item_click)

        toolbar.setNavigationIcon(R.mipmap.ic_close_white_24dp)
        toolbar.setNavigationOnClickListener { finish() }

        item_click_list.layoutManager = androidx.recyclerview.widget.LinearLayoutManager(this)
        item_click_list.adapter = adapter
        adapter.apply {
            register(RegisterItem(R.layout.item_view_title, TitleViewHolder::class.java))
            multiRegister(object : MultiLink<ItemClick>() {
                override fun link(data: ItemClick): RegisterItem {
                    return if (data.click) {
                        RegisterItem(R.layout.item_view_click_one, ItemClickOneViewHolder::class.java, oneClick)
                    } else {
                        RegisterItem(R.layout.item_view_click_two, ItemClickTwoViewHolder::class.java, twoClick)
                    }
                }
            })
        }

        adapter.loadData(DataServer.getItemClickData())
    }


    private val oneClick = object : MoreClickListener() {
        override fun onItemClick(view: View, position: Int) {
            when (view.id) {
                R.id.icon -> {
                    val url = view.tag as String
                    Toast.makeText(view.context, "click icon in Activity icon url is " + url, Toast.LENGTH_SHORT).show()
                }
                R.id.button -> {
                    Toast.makeText(view.context, "click button in Activity position is " + position.toString(), Toast.LENGTH_SHORT).show()
                }
            }
        }

        override fun onItemTouch(view: View, event: MotionEvent, position: Int): Boolean {
            Toast.makeText(this@ItemClickActivity, "111", Toast.LENGTH_SHORT).show()
            return true
        }

        override fun onItemLongClick(view: View, position: Int): Boolean {
            return false
        }
    }

    private val twoClick = object : MoreClickListener() {
        override fun onItemClick(view: View, position: Int) {
            when (view.id) {
                R.id.icon -> {
                    val url = view.tag as String
                    Toast.makeText(view.context, "click icon in Activity icon url is " + url, Toast.LENGTH_SHORT).show()
                }
            }
        }

        override fun onItemLongClick(view: View, position: Int): Boolean {
            when (view.id) {
                R.id.button -> {
                    AlertDialog.Builder(view.context)
                            .setTitle("Button click in Activity position is " + position.toString())
                            .setPositiveButton("sure", { _: DialogInterface, _: Int -> })
                            .show()
                }
            }
            return true
        }
    }

    companion object {
        fun startActivity(activity: Activity) {
            activity.startActivity(Intent(activity, ItemClickActivity::class.java))
        }
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/click/ItemClickOneViewHolder.kt
================================================
package com.werb.moretype.click

import android.view.View
import android.widget.Toast
import com.werb.library.MoreViewHolder
import kotlinx.android.synthetic.main.item_view_click_one.*

/**
 * Created by wanbo on 2017/7/15.
 */
class ItemClickOneViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<ItemClick>(values, containerView) {

    override fun bindData(data: ItemClick, payloads: List<Any>) {
        title.text = data.title
        icon.setImageURI(data.url)
        /* click in viewType */
        itemView.setOnClickListener {
            Toast.makeText(containerView.context, " click in ViewType position is " + layoutPosition.toString(), Toast.LENGTH_SHORT).show()
        }
        icon.tag = data.url
        /* click in activity */
        addOnClickListener(icon)
        addOnClickListener(button)
        addOnTouchListener(containerView)
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/click/ItemClickTwoViewHolder.kt
================================================
package com.werb.moretype.click

import android.view.View
import android.widget.Toast
import com.werb.library.MoreViewHolder
import kotlinx.android.synthetic.main.item_view_click_two.*

/**
 * Created by wanbo on 2017/7/15.
 */
class ItemClickTwoViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<ItemClick>(values, containerView) {

    override fun bindData(data: ItemClick, payloads: List<Any>) {
        title.text = data.title
        icon.setImageURI(data.url)
        itemView.setOnClickListener {
            Toast.makeText(containerView.context, " click in ViewType position is " + layoutPosition.toString(), Toast.LENGTH_SHORT).show()
        }
        icon.tag = data.url
        addOnClickListener(icon)
        addOnLongClickListener(button)
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/complete/Complete.kt
================================================
package com.werb.moretype.complete

/**
 * Created by wanbo on 2017/7/15.
 */
data class Complete(val name: String,
                    val desc: String,
                    val icon: String,
                    val time: String,
                    val text: String,
                    val image: String,
                    val width: String,
                    val height: String)

================================================
FILE: app/src/main/java/com/werb/moretype/complete/CompleteActivity.kt
================================================
package com.werb.moretype.complete

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.werb.library.MoreAdapter
import com.werb.library.link.RegisterItem
import com.werb.moretype.R
import com.werb.moretype.TitleViewHolder
import com.werb.moretype.anim.AnimViewHolder
import com.werb.moretype.data.DataServer
import com.werb.moretype.main.MainCard
import kotlinx.android.synthetic.main.activity_complete.*


/**
 * Created by wanbo on 2017/7/15.
 */
class CompleteActivity : AppCompatActivity() {

    private val adapter = MoreAdapter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_complete)

        toolbar.setNavigationIcon(R.mipmap.ic_close_white_24dp)
        toolbar.setNavigationOnClickListener { finish() }

        complete_list.layoutManager = androidx.recyclerview.widget.LinearLayoutManager(this)
        adapter.apply {
            userSoleRegister()
            register(RegisterItem(R.layout.item_view_title, TitleViewHolder::class.java))
            register(RegisterItem(R.layout.item_view_anim, AnimViewHolder::class.java))
            register(RegisterItem(R.layout.item_view_complete, CompleteViewHolder::class.java))
            register(RegisterItem(R.layout.item_view_horizontal_list, HorizontalViewHolder::class.java))
            renderWithAnimation()
                    .startAnimPosition(1)
                    .attachTo(complete_list)
        }

        adapter.loadData(MainCard("Complete Example", "A combination of elegant implementation layouts with refresh and loadMore"))
        adapter.loadData(DataServer.getCompleteData())

        //refresh
        refresh.setOnRefreshListener {
            adapter.removeDataFromIndex(1)
            adapter.loadData(DataServer.getCompleteData())
            refresh.isRefreshing = false
        }

        //loadMore
        complete_list.addOnScrollListener(loadMoreListener)
    }

    /** [OnLoadMoreListener] this is a sample by use OnScrollListener  to achieve loadMore Data*/
    private val loadMoreListener = object : OnLoadMoreListener() {

        override fun isHasMore(): Boolean = true

        override fun onLoadMore(v: View) {
            v.postDelayed({
                val any = adapter.getData(adapter.itemCount - 1)
                if (any is Footer) {
                    adapter.removeData(any)
                    isShowFooter = false
                    adapter.loadData(DataServer.getCompleteData())
                }
            }, 500)
        }

        override fun showFooter(v: View) {
            if (!isShowFooter) {
                isShowFooter = true
                if (adapter.itemCount > 0 && adapter.getData(adapter.itemCount - 1) !is Footer) {
                    val footer = Footer()
                    adapter.loadData(footer)
                }
            }
        }

    }

    companion object {
        fun startActivity(activity: Activity) {
            activity.startActivity(Intent(activity, CompleteActivity::class.java))
        }
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/complete/CompleteViewHolder.kt
================================================
package com.werb.moretype.complete

import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import android.widget.LinearLayout
import android.widget.RelativeLayout
import android.widget.Toast
import androidx.appcompat.widget.AppCompatTextView
import com.facebook.drawee.view.SimpleDraweeView
import com.werb.library.MoreViewHolder
import com.werb.moretype.R
import com.werb.moretype.Utils
import kotlinx.android.synthetic.main.item_view_complete.*

/**
 * Created by wanbo on 2017/7/15.
 */
class CompleteViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<Complete>(values, containerView) {

    override fun bindData(data: Complete, payloads: List<Any>) {
        icon.setImageURI(data.icon)
        name.text = data.name
        desc.text = data.desc
        time.text = Utils.sendTime(data.time.toLong() * 1000)
        complete_content_layout.removeAllViews()
        if(!TextUtils.isEmpty(data.text)){
            val currentLayout = LayoutInflater.from(containerView.context).inflate(R.layout.widget_view_complete_text, complete_content_layout, false) as RelativeLayout
            val text = currentLayout.findViewById<AppCompatTextView>(R.id.complete_text)
            text.text = data.text
            complete_content_layout.addView(currentLayout)
            val params = currentLayout.layoutParams as LinearLayout.LayoutParams
            params.bottomMargin = 15
        }
        if(!TextUtils.isEmpty(data.image)){
            val currentLayout = LayoutInflater.from(containerView.context).inflate(R.layout.widget_view_message_in_image, complete_content_layout, false) as RelativeLayout
            val image = currentLayout.findViewById<SimpleDraweeView>(R.id.message_in_image)
            image.setImageURI(data.image)
            setImgSize(data.width, data.height, image)
            complete_content_layout.addView(currentLayout)
            val params = currentLayout.layoutParams as LinearLayout.LayoutParams
            params.topMargin = 10
        }

        itemView.setOnClickListener {
            Toast.makeText(containerView.context, " click in ViewType position is " + layoutPosition.toString(), Toast.LENGTH_SHORT).show()
        }
    }

    private fun setImgSize(width: String, height: String, image: SimpleDraweeView) {
        val size = Utils.getIMImageSize(width.toDouble(), height.toDouble())
        val lp = image.layoutParams
        lp.width = size.width
        lp.height = size.height
        image.layoutParams = lp
    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/complete/FootViewHolder.kt
================================================
package com.werb.moretype.complete

import android.view.View
import com.werb.library.MoreViewHolder
import com.werb.moretype.R

/**
 * Created by wanbo on 2017/7/15.
 */
class FootViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<Footer>(values, containerView) {

    override fun bindData(data: Footer, payloads: List<Any>) {

    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/complete/Footer.kt
================================================
package com.werb.moretype.complete

/**
 * Created by wanbo on 2017/7/15.
 */
class Footer {
}

================================================
FILE: app/src/main/java/com/werb/moretype/complete/HorizontalData.kt
================================================
package com.werb.moretype.complete

import com.werb.moretype.single.SingleText

/**
 * Created by wanbo on 2017/7/15.
 */
data class HorizontalData(val url: String, val title: String, val list: List<SingleText>)

================================================
FILE: app/src/main/java/com/werb/moretype/complete/HorizontalItemViewHolder.kt
================================================
package com.werb.moretype.complete

import android.view.View
import com.werb.library.MoreViewHolder
import com.werb.moretype.single.SingleText
import kotlinx.android.synthetic.main.item_view_horizontal_item.*

/**
 * Created by wanbo on 2017/7/15.
 */
class HorizontalItemViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<SingleText>(values, containerView) {

    override fun bindData(data: SingleText, payloads: List<Any>) {
        icon.setImageURI(data.url)
        title.text = data.title
        desc.text = data.desc
        addOnClickListener(close)
    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/complete/HorizontalViewHolder.kt
================================================
package com.werb.moretype.complete

import android.view.View
import android.widget.Toast
import com.werb.library.MoreAdapter
import com.werb.library.MoreViewHolder
import com.werb.library.action.MoreClickListener
import com.werb.library.link.RegisterItem
import com.werb.moretype.R
import kotlinx.android.synthetic.main.item_view_horizontal_list.*

/**
 * Created by wanbo on 2017/7/15.
 */
class HorizontalViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<HorizontalData>(values, containerView) {

    private val adapter: MoreAdapter by lazy {
        MoreAdapter().apply {
            register(RegisterItem(R.layout.item_view_horizontal_item, HorizontalItemViewHolder::class.java, click))
            attachTo(horizontal_list)
        }
    }

    override fun bindData(data: HorizontalData, payloads: List<Any>) {
        icon.setImageURI(data.url)
        title.text = data.title
        adapter.removeAllData()
        adapter.loadData(data.list)
        itemView.setOnClickListener {
            Toast.makeText(containerView.context, " click in ViewType position is " + layoutPosition.toString(), Toast.LENGTH_SHORT).show()
        }
    }


    val click = object : MoreClickListener() {
        override fun onItemClick(view: View, position: Int) {
            when (view.id) {
                R.id.close -> {
                    adapter.removeData(position)
                }
            }
        }

    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/complete/OnLoadMoreListener.kt
================================================
package com.werb.moretype.complete

import android.util.Log
import android.view.View
import androidx.recyclerview.widget.RecyclerView


/**
 * Created by wanbo on 2017/7/15.
 */

abstract class OnLoadMoreListener : androidx.recyclerview.widget.RecyclerView.OnScrollListener() {

    private var itemCount: Int = 0
    private var lastItemCount: Int = 0
    var isShowFooter: Boolean = false

    abstract fun isHasMore(): Boolean

    abstract fun onLoadMore(v: View)

    abstract fun showFooter(v: View)

    fun doOnScrolled(recyclerView: androidx.recyclerview.widget.RecyclerView, dx: Int, dy: Int) {

    }

    fun doOnScrollStateChanged() {

    }

    override fun onScrollStateChanged(recyclerView: androidx.recyclerview.widget.RecyclerView, newState: Int) {
        if (newState == androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_DRAGGING) {
            doOnScrollStateChanged()
        }
    }

    override fun onScrolled(recyclerView: androidx.recyclerview.widget.RecyclerView, dx: Int, dy: Int) {

        doOnScrolled(recyclerView, dx, dy)

        if (dy <= 0) {
            return
        }
        val layoutManager: androidx.recyclerview.widget.LinearLayoutManager
        if (recyclerView.layoutManager is androidx.recyclerview.widget.LinearLayoutManager) {
            layoutManager = recyclerView.layoutManager as androidx.recyclerview.widget.LinearLayoutManager
            itemCount = layoutManager.itemCount
        } else {
            Log.e("OnLoadMoreListener", "The OnLoadMoreListener only support LinearLayoutManager")
            return
        }

        val lastVisibleItem = layoutManager.findLastVisibleItemPosition()
        itemCount = layoutManager.itemCount
        if (lastItemCount != itemCount && lastVisibleItem + 1 == itemCount && !isShowFooter) {
            if (isHasMore()) {
                recyclerView.post {
                    showFooter(recyclerView)
                    onLoadMore(recyclerView)
                }
            } else {
                lastItemCount = itemCount
            }
        }
    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/data/DataServer.kt
================================================
package com.werb.moretype.data

import com.werb.moretype.MyApp
import com.werb.moretype.R
import com.werb.moretype.anim.AnimType
import com.werb.moretype.click.ItemClick
import com.werb.moretype.complete.Complete
import com.werb.moretype.complete.HorizontalData
import com.werb.moretype.main.MainCard
import com.werb.moretype.me.MeInfo
import com.werb.moretype.me.MeMessage
import com.werb.moretype.me.MeThanks
import com.werb.moretype.multi.Message
import com.werb.moretype.single.SingleImage
import com.werb.moretype.single.SingleText

/**
 * Created by wanbo on 2017/7/14.
 */
object DataServer {

    fun getMainCardData(): List<MainCard> {
        val mainCardList = arrayListOf<MainCard>()
        mainCardList.add(MainCard("Single Register", "Register one2one ViewType"))
        mainCardList.add(MainCard("Multi Register", "Register one2more ViewType"))
        mainCardList.add(MainCard("Animation", "Provides five types of Animation"))
        mainCardList.add(MainCard("ItemClick", "Support onItemClick and onItemLongClick"))
        mainCardList.add(MainCard("Complete Example", "A combination of elegant implementation layouts with refresh and loadMore"))
        mainCardList.add(MainCard("Diff Data", "Diff data when refresh and loadMore"))
        mainCardList.add(MainCard("About Me", "Developer & Designer"))
        return mainCardList
    }

    fun getSingleRegisterData(): List<Any> {
        val singleRegisterList = arrayListOf<Any>()
        singleRegisterList.add(MainCard("Single Register", "Register one2one ViewType"))
        singleRegisterList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        singleRegisterList.add(SingleImage(MyApp.myApp.getString(R.string.app_name), "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9"))
        return singleRegisterList
    }

    fun getMultiRegisterData(): List<Any> {
        val multiRegisterList = arrayListOf<Any>()
        multiRegisterList.add(MainCard("Multi Register", "Register one2more ViewType"))
        multiRegisterList.add(Message(
                "https://avatars5.githubusercontent.com/u/12763277?v=4&s=460",
                "text",
                false,
                "Hello, i am wanbo",
                "",
                "1500048339",
                "",
                "",
                true
        ))
        multiRegisterList.add(Message(
                "",
                "text",
                true,
                "Hello, this is MoreType, new method to build data in RecyclerView with Kotlin!",
                "",
                "1500048446",
                "",
                "",
                false
        ))
        multiRegisterList.add(Message(
                "https://avatars5.githubusercontent.com/u/12763277?v=4&s=460",
                "image",
                false,
                "",
                "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9",
                "1500049048",
                "467",
                "292",
                true
        ))
        multiRegisterList.add(Message(
                "",
                "text",
                true,
                "Wow, so cool, i like it",
                "",
                "1500049067",
                "",
                "",
                false
        ))
        multiRegisterList.add(Message(
                "",
                "image",
                true,
                "",
                "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782",
                "1500049067",
                "3794",
                "2133",
                false
        ))
        return multiRegisterList
    }

    fun getAnimData(): List<Any> {
        val animDataList = arrayListOf<Any>()
        animDataList.add(MainCard("Animation", "Provides five types of Animation"))
        animDataList.add(AnimType("看图:这里是过去24小时发生的重要的事", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170715103111KHrZm3894Ys7uGIB.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("盗版碟商贩,本周的时代预言家 | 好奇心辞典", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714180204gKehPAICiFdx1Uwm.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("这部纪录片美极了,而且居然没有用到特效", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170712164259UN4sqz2rogl0bWKY.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("诺兰表示,《敦刻尔克》的叙事结构可能是他所有作品中最复杂的。?", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714133142RYHh7qjSKcUPa9wp.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("看图:这里是过去24小时发生的重要的事", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170715103111KHrZm3894Ys7uGIB.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("盗版碟商贩,本周的时代预言家 | 好奇心辞典", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714180204gKehPAICiFdx1Uwm.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("这部纪录片美极了,而且居然没有用到特效", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170712164259UN4sqz2rogl0bWKY.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("诺兰表示,《敦刻尔克》的叙事结构可能是他所有作品中最复杂的。?", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714133142RYHh7qjSKcUPa9wp.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("看图:这里是过去24小时发生的重要的事", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170715103111KHrZm3894Ys7uGIB.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("盗版碟商贩,本周的时代预言家 | 好奇心辞典", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714180204gKehPAICiFdx1Uwm.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("这部纪录片美极了,而且居然没有用到特效", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170712164259UN4sqz2rogl0bWKY.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("诺兰表示,《敦刻尔克》的叙事结构可能是他所有作品中最复杂的。?", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714133142RYHh7qjSKcUPa9wp.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("看图:这里是过去24小时发生的重要的事", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170715103111KHrZm3894Ys7uGIB.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("盗版碟商贩,本周的时代预言家 | 好奇心辞典", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714180204gKehPAICiFdx1Uwm.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("这部纪录片美极了,而且居然没有用到特效", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170712164259UN4sqz2rogl0bWKY.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("诺兰表示,《敦刻尔克》的叙事结构可能是他所有作品中最复杂的。?", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714133142RYHh7qjSKcUPa9wp.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("看图:这里是过去24小时发生的重要的事", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170715103111KHrZm3894Ys7uGIB.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("盗版碟商贩,本周的时代预言家 | 好奇心辞典", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714180204gKehPAICiFdx1Uwm.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("这部纪录片美极了,而且居然没有用到特效", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170712164259UN4sqz2rogl0bWKY.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("诺兰表示,《敦刻尔克》的叙事结构可能是他所有作品中最复杂的。?", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714133142RYHh7qjSKcUPa9wp.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("看图:这里是过去24小时发生的重要的事", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170715103111KHrZm3894Ys7uGIB.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("盗版碟商贩,本周的时代预言家 | 好奇心辞典", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714180204gKehPAICiFdx1Uwm.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("这部纪录片美极了,而且居然没有用到特效", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170712164259UN4sqz2rogl0bWKY.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        animDataList.add(AnimType("诺兰表示,《敦刻尔克》的叙事结构可能是他所有作品中最复杂的。?", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714133142RYHh7qjSKcUPa9wp.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        return animDataList
    }

    fun getItemClickData(): List<Any> {
        val itemClickDataList = arrayListOf<Any>()
        itemClickDataList.add(MainCard("ItemClick", "Support onItemClick and onItemLongClick"))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782", true))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9", false))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782", true))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9", false))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782", true))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9", false))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782", true))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9", false))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782", true))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9", false))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782", true))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9", false))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782", true))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9", false))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782", true))
        itemClickDataList.add(ItemClick("MoreType ItemClick", "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9", false))
        return itemClickDataList
    }

    fun getCompleteData(): List<Any> {
        val completeDataList = arrayListOf<Any>()
        completeDataList.add(Complete(
                "wanbo",
                "Developer & Designer",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500106878",
                "new method to build data in RecyclerView with Kotlin!",
                "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782",
                "467",
                "292"
        ))
        completeDataList.add(Complete(
                "wanbo",
                "Curiosity",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500107414",
                "The motivation that drives me to keep trying is my curiosity",
                "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9",
                "467",
                "292"
        ))
        completeDataList.add(Complete(
                "wanbo",
                "I'm actually a musician",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500108765",
                "Can you read this paragraph? My dream is to make music. My idol is jay Chou. I want to stand on the stage like him and sing for my favorite people",
                "http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=e778191ebd3eb1354492bfbf932e84e5/9213b07eca8065386ba591e596dda144ac3482fc.jpg",
                "436",
                "600"
        ))
        completeDataList.add(HorizontalData(
                "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "MoreType",
                buildSingTextDataList()
        ))
        completeDataList.add(Complete(
                "wanbo",
                "Try all kinds of things",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500107762",
                "Pixel-Web ,It was my first Vue project",
                "https://raw.githubusercontent.com/Werb/Pixel-Web/master/screenshots/pixel-web-one.png",
                "1890",
                "850"
        ))
        completeDataList.add(Complete(
                "wanbo",
                "Android Developer",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500107779",
                "Forgot when I started liking Android",
                "http://img0.imgtn.bdimg.com/it/u=4177297633,2800217385&fm=26&gp=0.jpg",
                "580",
                "358"
        ))
        completeDataList.add(Complete(
                "wanbo",
                "Developer & Designer",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500106878",
                "new method to build data in RecyclerView with Kotlin!",
                "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782",
                "467",
                "292"
        ))
        completeDataList.add(HorizontalData(
                "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "MoreType",
                buildSingTextDataList()
        ))
        completeDataList.add(Complete(
                "wanbo",
                "Curiosity",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500107414",
                "The motivation that drives me to keep trying is my curiosity",
                "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9",
                "467",
                "292"
        ))
        completeDataList.add(Complete(
                "wanbo",
                "I'm actually a musician",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500108765",
                "Can you read this paragraph? My dream is to make music. My idol is jay Chou. I want to stand on the stage like him and sing for my favorite people",
                "http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=e778191ebd3eb1354492bfbf932e84e5/9213b07eca8065386ba591e596dda144ac3482fc.jpg",
                "436",
                "600"
        ))
        completeDataList.add(Complete(
                "wanbo",
                "Try all kinds of things",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500107762",
                "Pixel-Web ,It was my first Vue project",
                "https://raw.githubusercontent.com/Werb/Pixel-Web/master/screenshots/pixel-web-one.png",
                "1890",
                "850"
        ))
        completeDataList.add(HorizontalData(
                "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "MoreType",
                buildSingTextDataList()
        ))
        completeDataList.add(Complete(
                "wanbo",
                "Android Developer",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500107779",
                "Forgot when I started liking Android",
                "http://img0.imgtn.bdimg.com/it/u=4177297633,2800217385&fm=26&gp=0.jpg",
                "580",
                "358"
        ))
        return completeDataList
    }

    private fun buildSingTextDataList(): List<SingleText> {
        val singTextDataList = arrayListOf<SingleText>()
        singTextDataList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singTextDataList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singTextDataList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singTextDataList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singTextDataList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singTextDataList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singTextDataList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singTextDataList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singTextDataList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        singTextDataList.add(SingleText(MyApp.myApp.getString(R.string.app_name), MyApp.myApp.getString(R.string.app_desc), "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782"))
        return singTextDataList
    }

    fun getAboutMeData(): List<Any> {
        val aboutMeDataList = arrayListOf<Any>()
        aboutMeDataList.add(MainCard("About Me", "Developer & Designer"))
        aboutMeDataList.add(MeInfo(
                "wanbo", "Developer & Designer", "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "werbhelius@gmail.com", "https://github.com/Werb", "http://weibo.com/singerwannber "
        ))
        aboutMeDataList.add("设计初衷")
        aboutMeDataList.add(MeMessage(MyApp.myApp.getString(R.string.origin)))
        aboutMeDataList.add("MoreType 特性")
        aboutMeDataList.add(MeMessage(MyApp.myApp.getString(R.string.character)))
        aboutMeDataList.add("感谢")
        aboutMeDataList.add(MeThanks(
                "drakeet & MultiType",
                "在上学的时候,第一个关注的博客和 Github 就是 drakeet,他的项目无论是从代码结构还是设计模式上,都特别清晰,易懂,看完之后总有一种说不出的畅快,太棒了,一路跟着 drakeet 后面学习,感觉每一天都在飞速进步。",
                "http://ww4.sinaimg.cn/mw690/86e2ff85jw8esy5u72xzyg2050069jrv.gif",
                "https://github.com/drakeet/MultiType"
        ))
        aboutMeDataList.add(MeThanks(
                "wasabeef & recyclerview-animators",
                "MoreType 中对 Recyclerview 动画操作参考了这个非常棒的库,感谢开源的世界。",
                "https://raw.githubusercontent.com/wasabeef/recyclerview-animators/master/art/logo.jpg",
                "https://github.com/wasabeef/recyclerview-animators"
        ))
        aboutMeDataList.add("喜欢的一些话")
        aboutMeDataList.add(MeMessage(MyApp.myApp.getString(R.string.like_words_one)))
        aboutMeDataList.add(MeMessage(MyApp.myApp.getString(R.string.like_words_two)))
        return aboutMeDataList
    }

    fun getDiffData1(): List<Any> {
        val diffList = arrayListOf<Any>()
        diffList.add(Complete(
                "wanbo",
                "Developer & Designer",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500106878",
                "new method to build data in RecyclerView with Kotlin!",
                "https://boygeniusreport.files.wordpress.com/2014/12/ultimate-material-lollipop-collection-268.png?w=782",
                "467",
                "292"
        ))
        diffList.add(Complete(
                "wanbo",
                "Curiosity",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500107414",
                "The motivation that drives me to keep trying is my curiosity",
                "https://img.scoop.it/f9ZSLthhGIc6nSw9gF7Z1Tl72eJkfbmt4t8yenImKBVvK0kTmF0xjctABnaLJIm9",
                "467",
                "292"
        ))
        diffList.add(Complete(
                "wanbo",
                "I'm actually a musician",
                "http://wx3.sinaimg.cn/mw690/b447c185ly8fdocwsavc6j20ku0kuaba.jpg",
                "1500108765",
                "Can you read this paragraph? My dream is to make music. My idol is jay Chou. I want to stand on the stage like him and sing for my favorite people",
                "http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=e778191ebd3eb1354492bfbf932e84e5/9213b07eca8065386ba591e596dda144ac3482fc.jpg",
                "436",
                "600"
        ))
        diffList.add(AnimType("看图:这里是过去24小时发生的重要的事", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170715103111KHrZm3894Ys7uGIB.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        diffList.add(AnimType("盗版碟商贩,本周的时代预言家 | 好奇心辞典", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714180204gKehPAICiFdx1Uwm.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        diffList.add(AnimType("这部纪录片美极了,而且居然没有用到特效", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170712164259UN4sqz2rogl0bWKY.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        diffList.add(AnimType("诺兰表示,《敦刻尔克》的叙事结构可能是他所有作品中最复杂的。?", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714133142RYHh7qjSKcUPa9wp.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        return diffList
    }

    fun getDiffData2(): List<Any> {
        val diffList = arrayListOf<Any>()
        diffList.add(MainCard("Single Register", "Register one2one ViewType"))
        diffList.add(MainCard("Multi Register", "Register one2more ViewType"))
        diffList.add(MainCard("Animation", "Provides five types of Animation"))
        diffList.add(MainCard("ItemClick", "Support onItemClick and onItemLongClick"))
        diffList.add(MainCard("Complete Example", "A combination of elegant implementation layouts with refresh and loadMore"))
        diffList.add(MainCard("About Me", "Developer & Designer"))
        return diffList
    }

    fun getDiffData3(): List<Any> {
        val diffList = arrayListOf<Any>()
        diffList.add(AnimType("看图:这里是过去24小时发生的重要的事", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170715103111KHrZm3894Ys7uGIB.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        diffList.add(AnimType("盗版碟商贩,本周的时代预言家 | 好奇心辞典", "城市", "http://img.qdaily.com/category/icon_yellow_app/20160606004533uFozK3xI4CHZjfSM.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714180204gKehPAICiFdx1Uwm.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        diffList.add(AnimType("这部纪录片美极了,而且居然没有用到特效", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170712164259UN4sqz2rogl0bWKY.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        diffList.add(AnimType("诺兰表示,《敦刻尔克》的叙事结构可能是他所有作品中最复杂的。?", "娱乐", "http://img.qdaily.com/category/icon_yellow_app/20160606004531TgJK5XPy61qfS7rN.png?imageMogr2/auto-orient/thumbnail/!160x160r/gravity/Center/crop/160x160/quality/85/ignore-error/1",
                "http://img.qdaily.com/article/article_show/20170714133142RYHh7qjSKcUPa9wp.jpg?imageMogr2/auto-orient/thumbnail/!640x380r/gravity/Center/crop/640x380/quality/85/format/jpg/ignore-error/1"))
        diffList.add(MainCard("Single Register", "Register one2one ViewType"))
        diffList.add(MainCard("Multi Register", "Register one2more ViewType"))
        diffList.add(MainCard("Animation", "Provides five types of Animation"))
        diffList.add(MainCard("ItemClick", "Support onItemClick and onItemLongClick"))
        diffList.add(MainCard("Complete Example", "A combination of elegant implementation layouts with refresh and loadMore"))
        diffList.add(MainCard("About Me", "Developer & Designer"))
        return diffList
    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/diff/DiffDataActivity.kt
================================================
package com.werb.moretype.diff

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.AdapterView
import androidx.appcompat.app.AppCompatActivity
import com.werb.library.MoreAdapter
import com.werb.library.link.RegisterItem
import com.werb.moretype.R
import com.werb.moretype.TitleViewHolder
import com.werb.moretype.anim.AnimViewHolder
import com.werb.moretype.complete.CompleteViewHolder
import com.werb.moretype.data.DataServer
import com.werb.moretype.main.MainCard
import kotlinx.android.synthetic.main.activity_diff.*


/**
 * Created by wanbo on 2017/12/19.
 */
class DiffDataActivity : AppCompatActivity() {

    private val adapter = MoreAdapter()
    private val newList = mutableListOf<Any>()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_diff)

        toolbar.setNavigationIcon(R.mipmap.ic_close_white_24dp)
        toolbar.setNavigationOnClickListener { finish() }

        diff_list.layoutManager = androidx.recyclerview.widget.LinearLayoutManager(this)
        adapter.apply {
            userSoleRegister()
            register(RegisterItem(R.layout.item_view_title, TitleViewHolder::class.java))
            register(RegisterItem(R.layout.item_view_anim, AnimViewHolder::class.java))
            register(RegisterItem(R.layout.item_view_complete, CompleteViewHolder::class.java))
            attachTo(diff_list)
        }

        adapter.loadData(MainCard("Diff Data", "Diff data when refresh and loadMore"))
        adapter.loadData(DataServer.getDiffData1())
        (diff_list.itemAnimator as androidx.recyclerview.widget.DefaultItemAnimator).supportsChangeAnimations = false

        //refresh
        refresh.setOnRefreshListener {
            adapter.refresh(1, newList, DiffDataCallback::class.java)
            refresh.isRefreshing = false
        }

        spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {

            override fun onNothingSelected(p0: AdapterView<*>?) {

            }

            override fun onItemSelected(p0: AdapterView<*>?, view: View?, position: Int, p3: Long) {
                when (position) {
                    0 -> {
                        newList.clear()
                        newList.addAll(DataServer.getDiffData1())
                    }
                    1 -> {
                        newList.clear()
                        newList.addAll(DataServer.getDiffData2())
                    }
                    2 -> {
                        newList.clear()
                        newList.addAll(DataServer.getDiffData3())
                    }
                    3 -> {
                        newList.clear()
                        newList.addAll(adapter.list.subList(1, adapter.itemCount))
                    }
                }
            }

        }
    }

    companion object {
        fun startActivity(activity: Activity) {
            activity.startActivity(Intent(activity, DiffDataActivity::class.java))
        }
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/diff/DiffDataCallback.kt
================================================
package com.werb.moretype.diff

import com.werb.library.link.XDiffCallback
import com.werb.moretype.anim.AnimType
import com.werb.moretype.complete.Complete
import com.werb.moretype.main.MainCard

/**
 * Created by wanbo on 2017/12/19.
 */
class DiffDataCallback(oldItem: List<Any>, newItem: List<Any>) : XDiffCallback(oldItem, newItem) {

    override fun getOldListSize(): Int = oldItem.size

    override fun getNewListSize(): Int = newItem.size

    override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
        val old = oldItem[oldItemPosition]
        val new = newItem[newItemPosition]
        if (old is Complete && new is Complete) {
            return old.name == new.name
        } else if (old is AnimType && new is AnimType) {
            return old.title == new.title
        } else if (old is MainCard && new is MainCard) {
            return old.cardTitle == new.cardTitle
        }

        return false
    }

    override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
        val old = oldItem[oldItemPosition]
        val new = newItem[newItemPosition]
        if (old is Complete && new is Complete) {
            return old.desc == new.desc
        } else if (old is AnimType && new is AnimType) {
            return old.thumb == new.thumb
        } else if (old is MainCard && new is MainCard) {
            return old.cardDesc == new.cardDesc
        }

        return false
    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/main/MainActivity.kt
================================================
package com.werb.moretype.main

import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.werb.library.MoreAdapter
import com.werb.library.action.MoreClickListener
import com.werb.moretype.R
import com.werb.moretype.data.DataServer
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

    private val adapter = MoreAdapter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        adapter.apply {
            injectValueInAllHolder(mapOf("qqqqqq" to "1233333333"))
            register(MainCardViewHolder::class.java, playLoadClick, mapOf("someValue" to "123"))
            attachTo(more_list)
        }

        adapter.loadData(DataServer.getMainCardData())

    }

    private val playLoadClick = object : MoreClickListener() {
        override fun onItemClick(view: View, position: Int) {
            if (view.id == R.id.card_playLoad) {
                val payLoad = view.tag as Boolean
                if (payLoad) {
                    adapter.notifyItemChanged(position, PayLoadOne(true))
                } else {
                    adapter.notifyItemChanged(position, PayLoadOne(false))
                }
            }
        }
    }

}


================================================
FILE: app/src/main/java/com/werb/moretype/main/MainCard.kt
================================================
package com.werb.moretype.main

/**
 * Created by wanbo on 2017/7/14.
 */
data class MainCard(val cardTitle: String, val cardDesc: String)

================================================
FILE: app/src/main/java/com/werb/moretype/main/MainCardViewHolder.kt
================================================
package com.werb.moretype.main

import android.app.Activity
import android.view.View
import com.werb.library.MoreViewHolder
import com.werb.library.annotation.MoreInject
import com.werb.library.link.LayoutID
import com.werb.moretype.R
import com.werb.moretype.anim.AnimActivity
import com.werb.moretype.click.ItemClickActivity
import com.werb.moretype.complete.CompleteActivity
import com.werb.moretype.diff.DiffDataActivity
import com.werb.moretype.me.AboutMeActivity
import com.werb.moretype.multi.MultiRegisterActivity
import com.werb.moretype.single.SingleRegisterActivity
import kotlinx.android.extensions.LayoutContainer
import kotlinx.android.synthetic.main.item_view_main.*

/**
 * Created by wanbo on 2017/7/14.
 */

@LayoutID(R.layout.item_view_main)
class MainCardViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<MainCard>(values, containerView), LayoutContainer {

    private var someValue = values["someValue"]
    private var qqqq = values["qqqqqq"]

    override fun bindData(data: MainCard, payloads: List<Any>) {
        println("-----------$someValue")
        println("-----------$qqqq")
        card_playLoad.tag = false

        // user payloads we can update any view we want
        if (payloads.isNotEmpty()) {
            payloads.forEach {
                if (it is PayLoadOne) {
                    if (it.load) {
                        card_title.text = "PayLoadOne any view you want"
                        card_desc.text = "Payloads will be empty"

                    } else {
                        card_title.text = data.cardTitle
                        card_desc.text = data.cardDesc
                        card_playLoad.tag = true
                    }
                }
            }
        } else {
            card_title.text = data.cardTitle
            card_desc.text = data.cardDesc
        }

        addOnClickListener(card_playLoad)

        main_card_layout.setOnClickListener {
            when (layoutPosition) {
                0 -> {
                    SingleRegisterActivity.startActivity(containerView.context as Activity)
                }
                1 -> {
                    MultiRegisterActivity.startActivity(containerView.context as Activity)
                }
                2 -> {
                    AnimActivity.startActivity(containerView.context as Activity)
                }
                3 -> {
                    ItemClickActivity.startActivity(containerView.context as Activity)
                }
                4 -> {
                    CompleteActivity.startActivity(containerView.context as Activity)
                }
                5 -> {
                    DiffDataActivity.startActivity(containerView.context as Activity)
                }
                6 -> {
                    AboutMeActivity.startActivity(containerView.context as Activity)
                }
                else -> {

                }
            }
        }
    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/main/PayLoadOne.kt
================================================
package com.werb.moretype.main

/** Created by wanbo <werbhelius@gmail.com> on 2017/10/15. */

data class PayLoadOne(val load: Boolean)

================================================
FILE: app/src/main/java/com/werb/moretype/me/AboutMeActivity.kt
================================================
package com.werb.moretype.me

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.werb.library.MoreAdapter
import com.werb.library.link.RegisterItem
import com.werb.moretype.R
import com.werb.moretype.TitleViewHolder
import com.werb.moretype.data.DataServer
import com.werb.moretype.main.MainActivity
import kotlinx.android.synthetic.main.activity_me.*

/**
 * Created by wanbo on 2017/7/15.
 */
class AboutMeActivity: AppCompatActivity() {

    private val adapter = MoreAdapter()
    private var short = false

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_me)

        short = intent.action == "shortStart"

        toolbar.setNavigationIcon(R.mipmap.ic_close_white_24dp)
        toolbar.setNavigationOnClickListener { onBackPressed() }

        me_list.layoutManager = androidx.recyclerview.widget.LinearLayoutManager(this)
        adapter.apply {
            userSoleRegister()
            register(RegisterItem(R.layout.item_view_title, TitleViewHolder::class.java))
            register(RegisterItem(R.layout.item_view_about_me_info, MeInfoViewHolder::class.java))
            register(RegisterItem(R.layout.item_view_about_me_title, MeTitleViewType::class.java))
            register(RegisterItem(R.layout.item_view_about_me_message, MeMessageViewHolder::class.java))
            register(RegisterItem(R.layout.item_view_about_me_thx, MeThanksViewHolder::class.java))
            renderWithAnimation()
            startAnimPosition(1)
            attachTo(me_list)
        }

        adapter.loadData(DataServer.getAboutMeData())
        me_list.smoothScrollToPosition(0)
    }

    override fun onBackPressed() {
        if(!short){
            finish()
        } else {
            startActivity(Intent(AboutMeActivity@this, MainActivity::class.java))
            finish()
        }
    }

    companion object {
        fun startActivity(activity: Activity){
            activity.startActivity(Intent(activity, AboutMeActivity::class.java))
        }
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/me/MeInfo.kt
================================================
package com.werb.moretype.me

/**
 * Created by wanbo on 2017/7/15.
 */
data class MeInfo(val name: String,
                  val desc: String,
                  val icon: String,
                  val email: String,
                  val gitHub: String,
                  val weiBo: String)

================================================
FILE: app/src/main/java/com/werb/moretype/me/MeInfoViewHolder.kt
================================================
package com.werb.moretype.me

import android.content.Intent
import android.net.Uri
import android.view.View
import com.werb.library.MoreViewHolder
import kotlinx.android.synthetic.main.item_view_about_me_info.*


/**
 * Created by wanbo on 2017/7/15.
 */
class MeInfoViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<MeInfo>(values, containerView) {

    override fun bindData(data: MeInfo, payloads: List<Any>) {
        val context = containerView.context
        name.text = data.name
        desc.text = data.desc
        email.text = data.email
        github.text = data.gitHub
        weibo.text = data.weiBo
        icon.setImageURI(data.icon)
        email.setOnClickListener {
            val intent = Intent(Intent.ACTION_SEND)
            val tos = arrayOf(data.email)
            intent.putExtra(Intent.EXTRA_EMAIL, tos)
            intent.type = "message/rfc882"
            context.startActivity(Intent.createChooser(intent, "choose email client"))

        }
        github.setOnClickListener {
            val intent = Intent()
            intent.action = "android.intent.action.VIEW"
            intent.data = Uri.parse(data.gitHub)
            context.startActivity(intent)
        }
        weibo.setOnClickListener {
            val intent = Intent()
            intent.action = "android.intent.action.VIEW"
            intent.data = Uri.parse(data.weiBo)
            context.startActivity(intent)
        }
    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/me/MeMessage.kt
================================================
package com.werb.moretype.me

/**
 * Created by wanbo on 2017/7/15.
 */
data class MeMessage(val message: String)

================================================
FILE: app/src/main/java/com/werb/moretype/me/MeMessageViewHolder.kt
================================================
package com.werb.moretype.me

import android.view.View
import com.werb.library.MoreViewHolder
import kotlinx.android.synthetic.main.item_view_about_me_message.*

/**
 * Created by wanbo on 2017/7/15.
 */
class MeMessageViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<MeMessage>(values, containerView) {

    override fun bindData(data: MeMessage, payloads: List<Any>) {
        message.text = data.message
    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/me/MeThanks.kt
================================================
package com.werb.moretype.me

/**
 * Created by wanbo on 2017/7/15.
 */
data class MeThanks(val name: String, val desc: String, val url:String, val gitHub: String)

================================================
FILE: app/src/main/java/com/werb/moretype/me/MeThanksViewHolder.kt
================================================
package com.werb.moretype.me

import android.content.Intent
import android.net.Uri
import android.view.View
import com.werb.library.MoreViewHolder
import kotlinx.android.synthetic.main.item_view_about_me_thx.*

/**
 * Created by wanbo on 2017/7/15.
 */
class MeThanksViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<MeThanks>(values, containerView) {

    override fun bindData(data: MeThanks, payloads: List<Any>) {
        name.text = data.name
        desc.text = data.desc
        icon.setImageURI(data.url)
        itemView.setOnClickListener {
            val intent = Intent()
            intent.action = "android.intent.action.VIEW"
            intent.data = Uri.parse(data.gitHub)
            itemView.context.startActivity(intent)
        }
    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/me/MeTitleViewType.kt
================================================
package com.werb.moretype.me

import android.view.View
import com.werb.library.MoreViewHolder
import kotlinx.android.synthetic.main.item_view_about_me_title.*

/**
 * Created by wanbo on 2017/7/15.
 */
class MeTitleViewType(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<String>(values, containerView) {

    override fun bindData(data: String, payloads: List<Any>) {
        title.text = data
    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/multi/ImageSize.kt
================================================
package com.werb.moretype.multi

/**
 * Created by wanbo on 2017/7/14.
 */
data class ImageSize(val width: Int, val height: Int)

================================================
FILE: app/src/main/java/com/werb/moretype/multi/Message.kt
================================================
package com.werb.moretype.multi

/**
 * Created by wanbo on 2017/7/14.
 */
class Message(var icon: String,
                   var messageType: String,
                   var me: Boolean,
                   var text: String,
                   var url: String,
                   var time: String,
                   var width: String,
                   var height: String,
                   var showTime: Boolean)

================================================
FILE: app/src/main/java/com/werb/moretype/multi/MessageInViewHolder.kt
================================================
package com.werb.moretype.multi

import android.view.LayoutInflater
import android.view.View
import android.widget.RelativeLayout
import androidx.appcompat.widget.AppCompatTextView
import com.facebook.drawee.view.SimpleDraweeView
import com.werb.library.MoreViewHolder
import com.werb.moretype.R
import com.werb.moretype.Utils
import kotlinx.android.synthetic.main.item_view_multi_message_in.*


/**
 * Created by wanbo on 2017/7/14.
 */
class MessageInViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<Message>(values, containerView) {

    override fun bindData(data: Message, payloads: List<Any>) {
        message_icon.setImageURI(data.icon)
        if (data.showTime) {
            message_time.visibility = View.VISIBLE
            message_time.text = Utils.sendTime(data.time.toLong() * 1000)
        } else {
            message_time.visibility = View.INVISIBLE
        }
        message_content_layout.removeAllViews()
        var currentLayout: RelativeLayout? = null
        when (data.messageType) {
            "text" -> {
                currentLayout = LayoutInflater.from(containerView.context).inflate(R.layout.widget_view_message_in_text, message_content_layout, false) as RelativeLayout
                val text = currentLayout.findViewById<AppCompatTextView>(R.id.message_in_text)
                text.text = data.text
            }
            "image" -> {
                currentLayout = LayoutInflater.from(containerView.context).inflate(R.layout.widget_view_message_in_image, message_content_layout, false) as RelativeLayout
                val image = currentLayout.findViewById<SimpleDraweeView>(R.id.message_in_image)
                image.setImageURI(data.url)
                setImgSize(data.width, data.height, image)
            }
            else -> {

            }
        }
        message_content_layout.addView(currentLayout)
    }

    private fun setImgSize(width: String, height: String, image: SimpleDraweeView) {
        val size = Utils.getIMImageSize(width.toDouble(), height.toDouble())
        val lp = image.layoutParams
        lp.width = size.width
        lp.height = size.height
        image.layoutParams = lp
    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/multi/MessageOutViewHolder.kt
================================================
package com.werb.moretype.multi

import android.net.Uri
import android.view.LayoutInflater
import android.view.View
import android.widget.RelativeLayout
import androidx.appcompat.widget.AppCompatTextView
import com.facebook.drawee.view.SimpleDraweeView
import com.werb.library.MoreViewHolder
import com.werb.moretype.R
import com.werb.moretype.Utils
import kotlinx.android.synthetic.main.item_view_multi_message_out.*


/**
 * Created by wanbo on 2017/7/14.
 */
class MessageOutViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<Message>(values, containerView) {

    override fun bindData(data: Message, payloads: List<Any>) {

        if (data.showTime) {
            message_time.visibility = View.VISIBLE
            message_time.text = Utils.sendTime(data.time.toLong() * 1000)
        } else {
            message_time.visibility = View.INVISIBLE
        }
        message_content_layout.removeAllViews()
        var currentLayout: RelativeLayout? = null
        when (data.messageType) {
            "text" -> {
                currentLayout = LayoutInflater.from(containerView.context).inflate(R.layout.widget_view_message_out_text, message_content_layout, false) as RelativeLayout
                val text = currentLayout.findViewById<AppCompatTextView>(R.id.message_out_text)
                text.text = data.text
            }
            "image" -> {
                currentLayout = LayoutInflater.from(containerView.context).inflate(R.layout.widget_view_message_out_image, message_content_layout, false) as RelativeLayout
                val image = currentLayout.findViewById<SimpleDraweeView>(R.id.message_out_image)
                if (data.url.startsWith("http")){
                    image.setImageURI(data.url)
                }else {
                    val uri = Uri.parse("file://" + data.url)
                    image.setImageURI(uri)
                }
                setImgSize(data.width, data.height, image)
            }
            else -> {

            }
        }
        message_content_layout.addView(currentLayout)
    }

    private fun setImgSize(width: String, height: String, image: SimpleDraweeView) {
        val size = Utils.getIMImageSize(width.toDouble(), height.toDouble())
        val lp = image.layoutParams
        lp.width = size.width
        lp.height = size.height
        image.layoutParams = lp
    }
}

================================================
FILE: app/src/main/java/com/werb/moretype/multi/MultiRegisterActivity.kt
================================================
package com.werb.moretype.multi

import android.Manifest
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.text.TextUtils
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import com.werb.library.MoreAdapter
import com.werb.library.link.MultiLink
import com.werb.library.link.RegisterItem
import com.werb.moretype.R
import com.werb.moretype.TitleViewHolder
import com.werb.moretype.Utils
import com.werb.moretype.data.DataServer
import com.werb.permissionschecker.PermissionChecker
import com.werb.pickphotoview.PickPhotoView
import com.werb.pickphotoview.util.PickConfig
import kotlinx.android.synthetic.main.activity_multi_register.*
import kotlinx.android.synthetic.main.widget_view_message_input.*


/**
 * Created by wanbo on 2017/7/14.
 */
class MultiRegisterActivity : AppCompatActivity() {

    val PERMISSIONS = arrayOf(Manifest.permission.CAMERA, Manifest.permission.READ_EXTERNAL_STORAGE)
    private var permissionChecker: PermissionChecker? = null
    private val adapter = MoreAdapter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_multi_register)

        // permission check
        permissionChecker = PermissionChecker(this)

        toolbar.setNavigationIcon(R.mipmap.ic_close_white_24dp)
        toolbar.setNavigationOnClickListener { finish() }

        multi_register_list.layoutManager = LinearLayoutManager(this)
        adapter.apply {
            register(RegisterItem(R.layout.item_view_title, TitleViewHolder::class.java))
            multiRegister(object : MultiLink<Message>() {
                override fun link(data: Message): RegisterItem {
                    return if (data.me){
                        RegisterItem(R.layout.item_view_multi_message_out, MessageOutViewHolder::class.java)
                    }else {
                        RegisterItem(R.layout.item_view_multi_message_in, MessageInViewHolder::class.java)
                    }
                }
            })
            attachTo(multi_register_list)
        }

        adapter.loadData(DataServer.getMultiRegisterData())

        input_edit.setOnFocusChangeListener { view, hasFocus ->
            run {
                if (hasFocus) {
                    view.postDelayed({
                        multi_register_list.smoothScrollToPosition(adapter.itemCount -1)
                    }, 250)
                }
            }
        }

        layout_send.setOnClickListener(sendClick)
        input_image_layout.setOnClickListener(imageClick)
    }

    private val sendClick = View.OnClickListener {
        if (!TextUtils.isEmpty(input_edit.text.toString())) {
            adapter.loadData(buildSendMessageText())
            input_edit.setText("")
            multi_register_list.smoothScrollToPosition(adapter.itemCount)
            it.postDelayed({
                adapter.loadData(buildInMessageText())
                multi_register_list.smoothScrollToPosition(adapter.itemCount)
            }, 200)
        }
    }

    private val imageClick = View.OnClickListener {
        permissionChecker?.let {
            if (it.isLackPermissions(PERMISSIONS)) {
                it.requestPermissions()
            } else {
                pickPhoto()
            }
        }
    }

    private fun pickPhoto() {
        PickPhotoView.Builder(this@MultiRegisterActivity)
                .setPickPhotoSize(1)
                .setShowCamera(true)
                .setSpanCount(4)
                .setLightStatusBar(true)
                .setStatusBarColor(R.color.colorTextLight)
                .setToolbarColor(R.color.colorTextLight)
                .setToolbarTextColor(R.color.colorAccent)
                .setSelectIconColor(R.color.colorPrimary)
                .setShowGif(false)
                .start()
    }

    private fun buildSendMessageText(): Message {
        return Message(
                "",
                "text",
                true,
                input_edit.text.toString(),
                "",
                "",
                "",
                "",
                false
        )
    }

    private fun buildInMessageText(): Message {
        return Message(
                "https://avatars5.githubusercontent.com/u/12763277?v=4&s=460",
                "text",
                false,
                "收到你的消息",
                "",
                "",
                "",
                "",
                false
        )
    }

    private fun buildSendMessageImage(url: String, size: ImageSize): Message {
        return Message(
                "",
                "image",
                true,
                input_edit.text.toString(),
                url,
                "",
                size.width.toString(),
                size.height.toString(),
                false
        )
    }

    override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: IntArray) {
        permissionChecker?.let {
            when (requestCode) {
                PermissionChecker.PERMISSION_REQUEST_CODE -> {
                    if (it.hasAllPermissionsGranted(grantResults)) {
                        pickPhoto()
                    }
                }
                else -> {
                    it.showDialog()
                }
            }
        }
    }

    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        super.onActivityResult(requestCode, resultCode, data)
        if (resultCode == 0) {
            return
        }
        if (data == null) {
            return
        }
        if (requestCode == PickConfig.PICK_PHOTO_DATA) {
            val selectPaths = data.getSerializableExtra(PickConfig.INTENT_IMG_LIST_SELECT) as ArrayList<*>
            // do something u want
            val path = selectPaths[0] as String
            val imageSize = Utils.readImageSize(path)
            imageSize?.let {
                adapter.loadData(buildSendMessageImage(path, imageSize))
                multi_register_list.smoothScrollToPosition(adapter.itemCount)
            }
        }
    }

    companion object {
        fun startActivity(activity: Activity){
            activity.startActivity(Intent(activity, MultiRegisterActivity::class.java))
        }
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/single/SingleImage.kt
================================================
package com.werb.moretype.single

/**
 * Created by wanbo on 2017/7/14.
 */
data class SingleImage(val title: String, val url: String)

================================================
FILE: app/src/main/java/com/werb/moretype/single/SingleItemDecoration.kt
================================================
package com.werb.moretype.single

import android.graphics.Rect
import android.view.View

/**
 * Created by wanbo on 2017/7/14.
 */
class SingleItemDecoration(val space: Int) : androidx.recyclerview.widget.RecyclerView.ItemDecoration() {

    override fun getItemOffsets(outRect: Rect, view: View, parent: androidx.recyclerview.widget.RecyclerView, state: androidx.recyclerview.widget.RecyclerView.State) {
        parent?.let {
            val position = parent.getChildLayoutPosition(view)
            if (position != 0) {
                outRect?.right = space
                outRect?.left = space
            }
        }
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/single/SingleRegisterActivity.kt
================================================
package com.werb.moretype.single

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup
import com.werb.library.MoreAdapter
import com.werb.moretype.R
import com.werb.moretype.TitleViewHolder
import com.werb.moretype.data.DataServer
import kotlinx.android.synthetic.main.activity_single_register.*


/**
 * Created by wanbo on 2017/7/14.
 */
class SingleRegisterActivity : AppCompatActivity() {

    private val adapter = MoreAdapter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_single_register)

        toolbar.setNavigationIcon(R.mipmap.ic_close_white_24dp)
        toolbar.setNavigationOnClickListener { finish() }

        val gridLayoutManager = androidx.recyclerview.widget.GridLayoutManager(this, 3)
        val spanSizeLookup = object : SpanSizeLookup() {
            override fun getSpanSize(position: Int): Int {
                val item = adapter.getData(position)
                return if (item is SingleImage) 1 else 3
            }
        }
        gridLayoutManager.spanSizeLookup = spanSizeLookup
        single_register_list.layoutManager = gridLayoutManager
        single_register_list.addItemDecoration(SingleItemDecoration(12))

        /* register viewType and attach to recyclerView */
        adapter.apply {
            register(SingleTypeOneViewHolder::class.java)
            register(SingleTypeTwoViewHolder::class.java)
            register(TitleViewHolder::class.java)
            attachTo(single_register_list)
        }

        /* load any data List or model object */
        adapter.loadData(DataServer.getSingleRegisterData())

    }

    companion object {
        fun startActivity(activity: Activity) {
            activity.startActivity(Intent(activity, SingleRegisterActivity::class.java))
        }
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/single/SingleText.kt
================================================
package com.werb.moretype.single

/**
 * Created by wanbo on 2017/7/14.
 */
data class SingleText(val title: String, val desc: String, val url: String)

================================================
FILE: app/src/main/java/com/werb/moretype/single/SingleTypeOneViewHolder.kt
================================================
package com.werb.moretype.single

import android.view.View
import com.werb.library.MoreViewHolder
import com.werb.library.link.LayoutID
import com.werb.moretype.R
import kotlinx.android.synthetic.main.item_view_single_type_one.*

/**
 * Created by wanbo on 2017/7/14.
 */

@LayoutID(R.layout.item_view_single_type_one)
class SingleTypeOneViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<SingleText>(values, containerView) {

    override fun bindData(data: SingleText, payloads: List<Any>) {
        title.text = data.title
        desc.text = data.desc
        icon.setImageURI(data.url)
    }

}

================================================
FILE: app/src/main/java/com/werb/moretype/single/SingleTypeTwoViewHolder.kt
================================================
package com.werb.moretype.single

import android.view.View
import com.werb.library.MoreViewHolder
import com.werb.library.link.LayoutID
import com.werb.moretype.R
import kotlinx.android.synthetic.main.item_view_single_type_two.*

/**
 * Created by wanbo on 2017/7/14.
 */

@LayoutID(R.layout.item_view_single_type_two)
class SingleTypeTwoViewHolder(values: MutableMap<String, Any>, containerView: View) : MoreViewHolder<SingleImage>(values, containerView) {

    override fun bindData(data: SingleImage, payloads: List<Any>) {
        title.text = data.title
        icon.setImageURI(data.url)
    }
}

================================================
FILE: app/src/main/res/drawable/widget_button_bg.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/colorAccent" />
    <corners android:radius="100dp"/>
</shape>

================================================
FILE: app/src/main/res/drawable/widget_input_bg.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <solid android:color="@color/colorTopLine"/>
            <padding android:top="1px"/>
        </shape>
    </item>
    <item>
        <shape android:shape="rectangle">
            <solid android:color="@color/colorTextLight"/>
        </shape>
    </item>
</layer-list>

================================================
FILE: app/src/main/res/drawable/widget_input_edit_bg.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/colorTextLight" />
    <stroke
        android:width="2px"
        android:color="@color/colorTopLine" />
    <padding
        android:bottom="1dp"
        android:left="1dp"
        android:right="1dp"
        android:top="1dp" />
    <corners android:radius="3dp"/>
</shape>

================================================
FILE: app/src/main/res/drawable/widget_message_in_text_bg.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="@color/colorTextLight"/>
    <stroke
        android:width="2px"
        android:color="@color/colorMessageBackground" />
</shape>

================================================
FILE: app/src/main/res/drawable/widget_message_out_text_bg.xml
================================================
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <solid android:color="@color/colorMessageBackground"/>

    <corners android:radius="4dp"/>

</shape>

================================================
FILE: app/src/main/res/drawable/widget_round_bg.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle" >
    <corners android:radius="5dp" />
</shape>

================================================
FILE: app/src/main/res/drawable/widget_spinner_bg.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="ring">

    <solid android:color="@color/colorPrimaryDark"/>

</shape>

================================================
FILE: app/src/main/res/layout/activity_anim.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorBackground"
    android:orientation="vertical">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:elevation="0dp">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="@color/colorPrimary"/>

            <androidx.appcompat.widget.AppCompatTextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toLeftOf="@+id/switch_view"
                android:layout_marginRight="5dp"
                android:layout_centerVertical="true"
                android:textColor="@color/colorTextLight"
                android:text="firstShow"/>

            <Switch
                android:id="@+id/switch_view"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_toLeftOf="@+id/spinner"/>

            <Spinner
                android:id="@+id/spinner"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_centerVertical="true"
                android:layout_alignParentRight="true"
                android:theme="@style/SpinnerStyle"
                android:entries="@array/Animation"/>

        </RelativeLayout>

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/anim_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</LinearLayout>

================================================
FILE: app/src/main/res/layout/activity_complete.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorBackground"
    android:orientation="vertical">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:elevation="0dp">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/colorPrimary" />

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
        android:id="@+id/refresh"
        android:layout_below="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/complete_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/colorTextLight" />
    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>


</RelativeLayout>

================================================
FILE: app/src/main/res/layout/activity_diff.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorBackground"
    android:orientation="vertical">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:elevation="0dp">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="@color/colorPrimary"/>

            <Spinner
                android:id="@+id/spinner"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_centerVertical="true"
                android:layout_alignParentRight="true"
                android:theme="@style/SpinnerStyle"
                android:entries="@array/DiffData"/>

        </RelativeLayout>

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
        android:id="@+id/refresh"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/diff_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/colorTextLight" />
    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

</LinearLayout>

================================================
FILE: app/src/main/res/layout/activity_item_click.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorBackground"
    android:orientation="vertical">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:elevation="0dp">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/colorPrimary" />

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/item_click_list"
        android:layout_below="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorTextLight" />

</RelativeLayout>

================================================
FILE: app/src/main/res/layout/activity_main.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:background="@color/colorBackground"
    tools:context="com.werb.moretype.main.MainActivity">

    <RelativeLayout
        android:id="@+id/more_layout"
        android:layout_width="match_parent"
        android:layout_height="161dp"
        android:background="@color/colorPrimary">

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/app_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="30dp"
            android:layout_marginTop="30dp"
            android:textSize="36sp"
            android:textColor="@color/colorTextLight"
            android:text="@string/app_name"/>

        <androidx.appcompat.widget.AppCompatTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/app_name"
            android:layout_marginLeft="30dp"
            android:layout_marginRight="30dp"
            android:layout_marginTop="5dp"
            android:lineSpacingExtra="2dp"
            android:textSize="16sp"
            android:textColor="@color/colorTextLight"
            android:text="@string/app_desc"/>

    </RelativeLayout>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/more_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/more_layout"
        android:layout_marginTop="-27dp"
        android:layout_marginLeft="15dp"
        android:layout_marginRight="15dp"
        app:layoutManager="LinearLayoutManager"/>

</RelativeLayout>


================================================
FILE: app/src/main/res/layout/activity_me.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorBackground"
    android:orientation="vertical">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:elevation="0dp">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/colorPrimary" />

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/me_list"
        android:layout_below="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorTextLight" />

</RelativeLayout>

================================================
FILE: app/src/main/res/layout/activity_multi_register.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorBackground"
    android:orientation="vertical">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:elevation="0dp">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/colorPrimary" />

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/multi_register_list"
        android:layout_below="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorTextLight"
        android:layout_above="@+id/widget_input_layout"/>

    <include
        android:id="@+id/widget_input_layout"
        layout="@layout/widget_view_message_input"/>

</RelativeLayout>

================================================
FILE: app/src/main/res/layout/activity_single_register.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorBackground"
    android:orientation="vertical">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:elevation="0dp">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/colorPrimary" />

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/single_register_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</LinearLayout>

================================================
FILE: app/src/main/res/layout/item_view_about_me_info.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:tools="http://schemas.android.com/tools"
    android:focusable="true"
    android:clickable="true"
    android:layout_margin="5dp"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardPreventCornerOverlap="true"
    app:cardUseCompatPadding="true"
    app:contentPadding="8dp"
    app:cardElevation="2dp">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/icon"
            android:layout_width="56dp"
            android:layout_height="56dp"
            android:layout_marginLeft="5dp"
            app:actualImageScaleType="centerCrop"
            app:failureImage="@color/colorPrimary"
            app:placeholderImage="@color/colorPrimary"/>

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/icon"
            android:layout_marginTop="10dp"
            android:layout_marginLeft="10dp"
            android:textColor="@color/colorAccent"
            android:textSize="16sp"
            android:textStyle="bold"
            tools:text="wanbo"/>

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/desc"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/icon"
            android:layout_below="@+id/name"
            android:layout_marginLeft="10dp"
            android:textColor="@color/colorTextGary"
            android:textSize="12sp"
            tools:text="Developer &amp; Designer"/>

        <LinearLayout
            android:id="@+id/contact_me_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="3dp"
            android:layout_below="@+id/icon"
            android:orientation="horizontal">

            <androidx.appcompat.widget.AppCompatTextView
                android:layout_width="80dp"
                android:layout_height="50dp"
                android:text="Contact Me:"
                android:textColor="@color/colorAccent"
                android:gravity="end"/>

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/email"
                android:layout_width="wrap_content"
                android:layout_height="50dp"
                android:paddingLeft="10dp"
                android:textColor="@color/colorPrimary"
                android:gravity="center_vertical"/>
        </LinearLayout>

        <LinearLayout
            android:id="@+id/github_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/contact_me_layout"
            android:orientation="horizontal">

            <TextView
                android:layout_width="80dp"
                android:layout_height="50dp"
                android:text="Github:"
                android:textColor="@color/colorAccent"
                android:gravity="end"/>

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/github"
                android:layout_width="wrap_content"
                android:layout_height="50dp"
                android:paddingLeft="10dp"
                android:textColor="@color/colorPrimary"
                android:gravity="center_vertical"/>
        </LinearLayout>

        <LinearLayout
            android:id="@+id/weibo_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/github_layout"
            android:orientation="horizontal">

            <TextView
                android:layout_width="80dp"
                android:layout_height="50dp"
                android:text="WeiBo:"
                android:textColor="@color/colorAccent"
                android:gravity="end"/>

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/weibo"
                android:layout_width="wrap_content"
                android:layout_height="50dp"
                android:paddingLeft="10dp"
                android:textColor="@color/colorPrimary"
                android:gravity="center_vertical"/>
        </LinearLayout>

    </RelativeLayout>

</androidx.cardview.widget.CardView>

================================================
FILE: app/src/main/res/layout/item_view_about_me_message.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:focusable="true"
    android:clickable="true"
    android:layout_margin="5dp"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardPreventCornerOverlap="true"
    app:cardUseCompatPadding="true"
    app:contentPadding="20dp"
    app:cardElevation="2dp">

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/message"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="14dp"
        android:textColor="@color/colorAccent"
        android:lineSpacingMultiplier="1.8"
        android:enabled="true"
        android:textIsSelectable="true"
        android:focusable="true"
        android:longClickable="true"/>

</androidx.cardview.widget.CardView>

================================================
FILE: app/src/main/res/layout/item_view_about_me_thx.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:tools="http://schemas.android.com/tools"
    android:focusable="true"
    android:clickable="true"
    android:layout_margin="5dp"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardPreventCornerOverlap="true"
    app:cardUseCompatPadding="true"
    app:contentPadding="8dp"
    app:cardElevation="2dp">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/icon"
            android:layout_width="45dp"
            android:layout_height="45dp"
            android:layout_marginLeft="5dp"
            app:actualImageScaleType="centerCrop"
            app:failureImage="@color/colorPrimary"
            app:placeholderImage="@color/colorPrimary"
            app:roundAsCircle="true"/>

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/icon"
            android:layout_marginTop="10dp"
            android:layout_marginLeft="10dp"
            android:textColor="@color/colorAccent"
            android:textSize="16sp"
            android:textStyle="bold"
            tools:text="wanbo"/>

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/desc"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/icon"
            android:textSize="14dp"
            android:layout_marginTop="10dp"
            android:textColor="@color/colorAccent"
            android:lineSpacingMultiplier="1.8"
            android:enabled="true"
            android:textIsSelectable="true"
            android:focusable="true"
            android:longClickable="true"/>

    </RelativeLayout>

</androidx.cardview.widget.CardView>

================================================
FILE: app/src/main/res/layout/item_view_about_me_title.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="10dp"
    android:layout_marginRight="10dp"
    android:orientation="vertical">

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="36dp"
        android:textSize="16sp"
        android:textColor="@color/colorTextGary"
        android:gravity="center"
        tools:text="info"/>

</LinearLayout>

================================================
FILE: app/src/main/res/layout/item_view_anim.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:focusable="true"
    android:clickable="true"
    android:layout_margin="5dp"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardPreventCornerOverlap="true"
    app:cardUseCompatPadding="true"
    app:contentPadding="8dp"
    app:cardElevation="2dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:orientation="vertical">

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:layout_marginRight="5dp"
                android:textColor="@color/colorAccent"
                android:gravity="left" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/type"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:textSize="12sp"/>

                <com.facebook.drawee.view.SimpleDraweeView
                    android:id="@+id/icon"
                    android:layout_width="20dp"
                    android:layout_height="20dp" />

            </LinearLayout>

        </LinearLayout>

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/thumb"
            android:layout_width="150dp"
            android:layout_height="90dp" />

    </LinearLayout>

</androidx.cardview.widget.CardView>

================================================
FILE: app/src/main/res/layout/item_view_click_one.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:focusable="true"
    android:clickable="true"
    android:layout_margin="5dp"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardPreventCornerOverlap="true"
    app:cardUseCompatPadding="true"
    app:contentPadding="8dp"
    app:cardElevation="2dp">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/icon"
            android:layout_width="80dp"
            android:layout_height="80dp"
            android:layout_marginLeft="5dp"
            android:layout_centerVertical="true"
            app:actualImageScaleType="centerCrop"
            app:failureImage="@color/colorPrimary"
            app:placeholderImage="@color/colorPrimary" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dp"
            android:layout_marginTop="10dp"
            android:layout_toRightOf="@+id/icon"
            android:textColor="@color/colorAccent"
            android:textSize="16sp"
            android:gravity="left"
            tools:text="MoreType"/>

        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/button"
            android:layout_width="match_parent"
            android:layout_height="36dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:layout_toRightOf="@+id/icon"
            android:layout_below="@+id/title"
            android:background="@drawable/widget_button_bg"
            android:textColor="@color/colorTextLight"
            android:textAllCaps="false"
            android:text="Click"/>

    </RelativeLayout>

</androidx.cardview.widget.CardView>

================================================
FILE: app/src/main/res/layout/item_view_click_two.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:focusable="true"
    android:clickable="true"
    android:layout_margin="5dp"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardPreventCornerOverlap="true"
    app:cardUseCompatPadding="true"
    app:contentPadding="8dp"
    app:cardElevation="2dp">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/icon"
            android:layout_width="match_parent"
            android:layout_height="150dp"
            android:layout_marginRight="5dp"
            android:layout_alignParentRight="true"
            app:actualImageScaleType="centerCrop"
            app:failureImage="@color/colorPrimary"
            app:placeholderImage="@color/colorPrimary" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dp"
            android:layout_marginTop="10dp"
            android:layout_below="@+id/icon"
            android:textColor="@color/colorAccent"
            android:layout_centerHorizontal="true"
            android:textSize="16sp"
            android:gravity="left"
            tools:text="MoreType"/>

        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/button"
            android:layout_width="match_parent"
            android:layout_height="36dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:layout_below="@+id/title"
            android:background="@drawable/widget_button_bg"
            android:textColor="@color/colorTextLight"
            android:textAllCaps="false"
            android:text="Long Click"/>

    </RelativeLayout>

</androidx.cardview.widget.CardView>

================================================
FILE: app/src/main/res/layout/item_view_complete.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:focusable="true"
    android:clickable="true"
    android:layout_margin="5dp"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardPreventCornerOverlap="true"
    app:cardUseCompatPadding="true"
    app:contentPadding="8dp"
    app:cardElevation="2dp">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/icon"
            android:layout_width="45dp"
            android:layout_height="45dp"
            android:layout_gravity="center_vertical"
            android:layout_marginRight="6dp"
            android:layout_below="@+id/message_time"
            app:actualImageScaleType="focusCrop"
            app:fadeDuration="200"
            app:failureImage="@color/colorPrimary"
            app:failureImageScaleType="centerCrop"
            app:placeholderImage="@color/colorPrimary"
            app:placeholderImageScaleType="centerCrop"
            app:roundingBorderWidth="1px"
            app:roundingBorderColor="@color/colorTextGary"
            app:roundAsCircle="true"/>

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/icon"
            android:layout_marginTop="3dp"
            android:textColor="@color/colorAccent"
            android:textSize="16sp"
            android:textStyle="bold"
            tools:text="wanbo"/>

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/desc"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/icon"
            android:layout_below="@+id/name"
            android:textColor="@color/colorTextGary"
            android:textSize="12sp"
            tools:text="Developer &amp; Designer"/>

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_marginTop="15dp"
            android:textColor="@color/colorTextGary"
            android:textSize="12sp"
            tools:text="17/15"/>

        <LinearLayout
            android:id="@+id/complete_content_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/desc"
            android:layout_toRightOf="@+id/icon"
            android:layout_marginBottom="10dp"
            android:layout_marginTop="10dp"
            android:orientation="vertical"/>

    </RelativeLayout>

</androidx.cardview.widget.CardView>

================================================
FILE: app/src/main/res/layout/item_view_footer.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:layout_marginBottom="3dp"
    android:layout_marginTop="3dp"
    android:gravity="center_horizontal">

    <ProgressBar
        android:id="@+id/loadMore"
        android:layout_width="25dp"
        android:layout_height="25dp"
        android:layout_centerInParent="true"/>

</RelativeLayout>

================================================
FILE: app/src/main/res/layout/item_view_horizontal_item.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="150dp"
    android:layout_height="wrap_content"
    xmlns:tools="http://schemas.android.com/tools"
    android:focusable="true"
    android:clickable="true"
    android:layout_margin="5dp"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardPreventCornerOverlap="true"
    app:cardUseCompatPadding="true"
    app:contentPadding="8dp"
    app:cardElevation="1dp">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ImageView
            android:id="@+id/close"
            android:layout_width="18dp"
            android:layout_height="18dp"
            android:background="@mipmap/ic_close_black_24dp"
            android:layout_alignParentRight="true"/>

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/icon"
            android:layout_width="45dp"
            android:layout_height="45dp"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="20dp"
            app:actualImageScaleType="centerCrop"
            app:failureImage="@color/colorPrimary"
            app:placeholderImage="@color/colorPrimary"
            app:roundAsCircle="true"/>

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/title"
            android:layout_width="100dp"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_below="@+id/icon"
            android:layout_marginTop="8dp"
            android:gravity="center"
            android:textSize="16sp"
            android:textColor="@color/colorAccent"
            tools:text="MoreTypeMoreType"/>

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/desc"
            android:layout_width="100dp"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_below="@+id/title"
            android:layout_marginTop="5dp"
            android:layout_marginBottom="10dp"
            android:textSize="12sp"
            android:gravity="center"
            android:textColor="@color/colorTextGary"
            tools:text="MoreType"/>

    </RelativeLayout>

</androidx.cardview.widget.CardView>

================================================
FILE: app/src/main/res/layout/item_view_horizontal_list.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:tools="http://schemas.android.com/tools"
    android:focusable="true"
    android:clickable="true"
    android:layout_margin="5dp"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardPreventCornerOverlap="true"
    app:cardUseCompatPadding="true"
    app:contentPadding="8dp"
    app:cardElevation="2dp">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:id="@+id/layout"
            android:layout_width="match_parent"
            android:layout_height="36dp"
            android:orientation="horizontal">

            <com.facebook.drawee.view.SimpleDraweeView
                android:id="@+id/icon"
                android:layout_width="24dp"
                android:layout_height="24dp"
                android:layout_marginLeft="5dp"
                android:layout_gravity="center_vertical"
                app:actualImageScaleType="centerCrop"
                app:failureImage="@color/colorPrimary"
                app:placeholderImage="@color/colorPrimary"
                app:roundAsCircle="true"/>

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_marginLeft="5dp"
                android:textSize="14sp"
                android:textColor="@color/colorTextGary"
                tools:text="live"/>

        </LinearLayout>

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/horizontal_list"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/layout"
            app:layoutManager="LinearLayoutManager"
            android:orientation="horizontal">

        </androidx.recyclerview.widget.RecyclerView>

    </RelativeLayout>

</androidx.cardview.widget.CardView>

================================================
FILE: app/src/main/res/layout/item_view_main.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_marginTop="3dp"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:tools="http://schemas.android.com/tools">

    <androidx.cardview.widget.CardView
        android:id="@+id/main_card_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:foreground="?android:attr/selectableItemBackground"
        app:cardPreventCornerOverlap="true"
        app:cardUseCompatPadding="true"
        app:cardElevation="2dp">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="20dp"
            android:layout_marginBottom="20dp">

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/card_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="12dp"
                android:textSize="14sp"
                android:textStyle="bold"
                android:textColor="@color/colorAccent"
                tools:text="Single Register"/>

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/card_desc"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:layout_marginLeft="12dp"
                android:layout_toLeftOf="@id/card_playLoad"
                android:layout_alignParentLeft="true"
                android:layout_marginRight="20dp"
                android:layout_below="@+id/card_title"
                android:textSize="12sp"
                android:textStyle="bold"
                android:textColor="@color/colorTextGary"
                tools:text="Register one2one ViewType"/>

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/card_playLoad"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:layout_marginRight="12dp"
                android:layout_centerVertical="true"
                android:layout_alignParentRight="true"
                android:textSize="12sp"
                android:textStyle="bold"
                android:textColor="@color/colorTextGary"
                android:text="playLoad"/>

        </RelativeLayout>

    </androidx.cardview.widget.CardView>

</FrameLayout>

================================================
FILE: app/src/main/res/layout/item_view_multi_message_in.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:fresco="http://schemas.android.com/apk/res-auto"
    android:background="@color/colorTextLight"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingLeft="10dp"
    android:paddingRight="10dp">

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/message_time"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="8dp"
        android:layout_marginTop="8dp"
        android:textSize="12sp"
        android:textColor="@color/colorTextGary"
        tools:text="10:12" />

    <com.facebook.drawee.view.SimpleDraweeView
        android:id="@+id/message_icon"
        android:layout_width="36dp"
        android:layout_height="36dp"
        android:layout_gravity="center_vertical"
        android:layout_marginRight="6dp"
        android:layout_below="@+id/message_time"
        fresco:actualImageScaleType="focusCrop"
        fresco:fadeDuration="200"
        fresco:failureImage="@color/colorPrimary"
        fresco:failureImageScaleType="centerCrop"
        fresco:placeholderImage="@color/colorPrimary"
        fresco:placeholderImageScaleType="centerCrop" />

    <FrameLayout
        android:id="@+id/message_content_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginRight="20dp"
        android:layout_marginBottom="20dp"
        android:layout_below="@+id/message_time"
        android:layout_toRightOf="@+id/message_icon">

    </FrameLayout>

</RelativeLayout>

================================================
FILE: app/src/main/res/layout/item_view_multi_message_out.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:background="@color/colorTextLight"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingLeft="10dp"
    android:paddingRight="10dp">

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/message_time"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="8dp"
        android:layout_marginTop="8dp"
        android:textSize="12sp"
        android:textColor="@color/colorTextGary"
        tools:text="10:12" />

    <FrameLayout
        android:id="@+id/message_content_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_below="@+id/message_time">

    </FrameLayout>


</RelativeLayout>

================================================
FILE: app/src/main/res/layout/item_view_single_type_one.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/single_one_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="5dp"
    android:focusable="true"
    android:clickable="true"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardPreventCornerOverlap="true"
    app:cardUseCompatPadding="true"
    app:cardElevation="2dp">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/icon"
            android:layout_width="56dp"
            android:layout_height="56dp"
            android:layout_marginLeft="15dp"
            android:layout_centerVertical="true"
            app:actualImageScaleType="centerCrop"
            app:failureImage="@color/colorPrimary"
            app:placeholderImage="@color/colorPrimary" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dp"
            android:layout_marginTop="15dp"
            android:layout_toRightOf="@+id/icon"
            android:textColor="@color/colorAccent"
            android:textSize="16sp"
            android:gravity="left"
            tools:text="MoreType"/>

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/desc"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/title"
            android:layout_marginLeft="15dp"
            android:layout_marginTop="5dp"
            android:layout_marginBottom="15dp"
            android:layout_toRightOf="@+id/icon"
            android:textColor="@color/colorTextGary"
            android:textSize="14sp"
            android:gravity="left"
            tools:text="MoreType"/>

    </RelativeLayout>

</androidx.cardview.widget.CardView>

================================================
FILE: app/src/main/res/layout/item_view_single_type_two.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/single_one_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="5dp"
    android:focusable="true"
    android:clickable="true"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardPreventCornerOverlap="true"
    app:cardUseCompatPadding="true"
    app:cardElevation="2dp">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/icon"
            android:layout_width="match_parent"
            android:layout_height="80dp"
            android:layout_marginTop="15dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp"
            app:actualImageScaleType="centerCrop"
            app:failureImage="@color/colorPrimary"
            app:placeholderImage="@color/colorPrimary" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/icon"
            android:layout_margin="10dp"
            android:layout_centerHorizontal="true"
            tools:text="@string/app_name"
            android:textColor="@color/colorAccent"
            android:gravity="center"/>

    </RelativeLayout>

</androidx.cardview.widget.CardView>

================================================
FILE: app/src/main/res/layout/item_view_title.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:tools="http://schemas.android.com/tools"
    android:background="@color/colorPrimary">

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="30dp"
        android:layout_marginTop="20dp"
        android:textSize="20sp"
        android:textStyle="bold"
        android:textColor="@color/colorTextLight"
        tools:text="@string/single_register"/>

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/desc"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="30dp"
        android:layout_marginTop="8dp"
        android:layout_marginBottom="30dp"
        android:layout_below="@+id/title"
        android:textSize="16sp"
        android:textColor="@color/colorTextLight"
        tools:text="@string/single_register_desc"/>

</RelativeLayout>

================================================
FILE: app/src/main/res/layout/widget_view_complete_text.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/complete_text_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/colorTextLight"
    xmlns:tools="http://schemas.android.com/tools">

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/complete_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:lineSpacingExtra="1.2dp"
        android:textIsSelectable="true"
        android:textColor="@color/colorAccent"
        android:textSize="16sp"
        tools:text="你会看这段字吗?其实是我随笔写的,一直以来我的梦想是做音乐,我的偶像是周杰伦,我想像他一样站在舞台上,为喜欢的人唱歌"/>

</RelativeLayout>

================================================
FILE: app/src/main/res/layout/widget_view_message_in_image.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:fresco="http://schemas.android.com/apk/res-auto"
    android:id="@+id/message_in_image_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/colorTextLight">

    <com.facebook.drawee.view.SimpleDraweeView
        android:id="@+id/message_in_image"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        fresco:actualImageScaleType="centerCrop"
        fresco:failureImage="@color/colorPrimary"
        fresco:failureImageScaleType="centerInside"
        fresco:placeholderImage="@color/colorPrimary"
        fresco:roundedCornerRadius="4dp"
        fresco:roundingBorderColor="@color/colorPrimary" />

</RelativeLayout>

================================================
FILE: app/src/main/res/layout/widget_view_message_in_text.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/message_in_text_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/colorTextLight"
    xmlns:tools="http://schemas.android.com/tools">

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/message_in_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:background="@drawable/widget_message_in_text_bg"
        android:maxEms="15"
        android:padding="8dp"
        android:lineSpacingExtra="1.2dp"
        android:textIsSelectable="true"
        android:textColor="@color/colorAccent"
        android:textSize="16sp"
        tools:text="你会看这段字吗?其实是我随笔写的,一直以来我的梦想是做音乐,我的偶像是周杰伦,我想像他一样站在舞台上,为喜欢的人唱歌"/>

</RelativeLayout>

================================================
FILE: app/src/main/res/layout/widget_view_message_input.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/input_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:background="@drawable/widget_input_bg"
    android:minHeight="?attr/actionBarSize"
    android:orientation="horizontal">

    <FrameLayout
        android:id="@+id/input_image_layout"
        android:layout_width="36dp"
        android:layout_height="36dp"
        android:layout_gravity="center_vertical"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp">

        <ImageView
            android:layout_width="25dp"
            android:layout_height="25dp"
            android:layout_gravity="center"
            android:background="@mipmap/ic_camera_black_24dp" />

    </FrameLayout>

    <FrameLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1">

        <EditText
            android:id="@+id/input_edit"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="10dp"
            android:layout_marginLeft="5dp"
            android:layout_marginRight="5dp"
            android:layout_marginTop="10dp"
            android:background="@drawable/widget_input_edit_bg"
            android:gravity="center_vertical"
            android:hint="@string/send_message"
            android:minHeight="36dp"
            android:paddingLeft="5dp"
            android:textColor="@color/colorAccent"
            android:textSize="12sp" />

    </FrameLayout>

    <FrameLayout
        android:id="@+id/layout_send"
        android:layout_width="36dp"
        android:layout_height="36dp"
        android:layout_gravity="center_vertical"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp">

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/input_send_layout"
            android:layout_width="match_parent"
            android:layout_height="25dp"
            android:layout_gravity="center"
            android:gravity="center"
            android:text="@string/send"
            android:textColor="@color/colorPrimary"
            android:textSize="14sp" />
    </FrameLayout>


</LinearLayout>

================================================
FILE: app/src/main/res/layout/widget_view_message_out_image.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:fresco="http://schemas.android.com/apk/res-auto"
    android:id="@+id/message_out_image_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/colorTextLight">

    <com.facebook.drawee.view.SimpleDraweeView
        android:id="@+id/message_out_image"
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:layout_alignParentRight="true"
        fresco:actualImageScaleType="centerCrop"
        fresco:fadeDuration="200"
        fresco:failureImage="@color/colorPrimary"
        fresco:failureImageScaleType="centerInside"
        fresco:placeholderImage="@color/colorPrimary"
        fresco:roundedCornerRadius="4dp"
        fresco:roundingBorderColor="@color/colorPrimary" />


</RelativeLayout>

================================================
FILE: app/src/main/res/layout/widget_view_message_out_text.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/message_out_text_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/colorTextLight"
    xmlns:tools="http://schemas.android.com/tools">

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/message_out_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:background="@drawable/widget_message_out_text_bg"
            android:maxEms="15"
            android:padding="8dp"
            android:lineSpacingExtra="1.2dp"
            android:textIsSelectable="true"
            android:textColor="@color/colorAccent"
            android:textSize="16sp"
            tools:text="基本码"/>

</RelativeLayout>

================================================
FILE: app/src/main/res/values/arrays.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string-array name="Animation">
        <item>Alpha</item>
        <item>Scale </item>
        <item>Left</item>
        <item>Right</item>
        <item>Bottom</item>
    </string-array>

    <string-array name="DiffData">
        <item>Data1</ite
Download .txt
gitextract_uxrnujua/

├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── README_EN.md
├── README_ZH.md
├── app/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       ├── androidTest/
│       │   └── java/
│       │       └── com/
│       │           └── werb/
│       │               └── moretype/
│       │                   └── ExampleInstrumentedTest.kt
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── werb/
│       │   │           └── moretype/
│       │   │               ├── MyApp.kt
│       │   │               ├── TitleViewHolder.kt
│       │   │               ├── Utils.kt
│       │   │               ├── anim/
│       │   │               │   ├── AnimActivity.kt
│       │   │               │   ├── AnimType.kt
│       │   │               │   └── AnimViewHolder.kt
│       │   │               ├── click/
│       │   │               │   ├── ItemClick.kt
│       │   │               │   ├── ItemClickActivity.kt
│       │   │               │   ├── ItemClickOneViewHolder.kt
│       │   │               │   └── ItemClickTwoViewHolder.kt
│       │   │               ├── complete/
│       │   │               │   ├── Complete.kt
│       │   │               │   ├── CompleteActivity.kt
│       │   │               │   ├── CompleteViewHolder.kt
│       │   │               │   ├── FootViewHolder.kt
│       │   │               │   ├── Footer.kt
│       │   │               │   ├── HorizontalData.kt
│       │   │               │   ├── HorizontalItemViewHolder.kt
│       │   │               │   ├── HorizontalViewHolder.kt
│       │   │               │   └── OnLoadMoreListener.kt
│       │   │               ├── data/
│       │   │               │   └── DataServer.kt
│       │   │               ├── diff/
│       │   │               │   ├── DiffDataActivity.kt
│       │   │               │   └── DiffDataCallback.kt
│       │   │               ├── main/
│       │   │               │   ├── MainActivity.kt
│       │   │               │   ├── MainCard.kt
│       │   │               │   ├── MainCardViewHolder.kt
│       │   │               │   └── PayLoadOne.kt
│       │   │               ├── me/
│       │   │               │   ├── AboutMeActivity.kt
│       │   │               │   ├── MeInfo.kt
│       │   │               │   ├── MeInfoViewHolder.kt
│       │   │               │   ├── MeMessage.kt
│       │   │               │   ├── MeMessageViewHolder.kt
│       │   │               │   ├── MeThanks.kt
│       │   │               │   ├── MeThanksViewHolder.kt
│       │   │               │   └── MeTitleViewType.kt
│       │   │               ├── multi/
│       │   │               │   ├── ImageSize.kt
│       │   │               │   ├── Message.kt
│       │   │               │   ├── MessageInViewHolder.kt
│       │   │               │   ├── MessageOutViewHolder.kt
│       │   │               │   └── MultiRegisterActivity.kt
│       │   │               └── single/
│       │   │                   ├── SingleImage.kt
│       │   │                   ├── SingleItemDecoration.kt
│       │   │                   ├── SingleRegisterActivity.kt
│       │   │                   ├── SingleText.kt
│       │   │                   ├── SingleTypeOneViewHolder.kt
│       │   │                   └── SingleTypeTwoViewHolder.kt
│       │   └── res/
│       │       ├── drawable/
│       │       │   ├── widget_button_bg.xml
│       │       │   ├── widget_input_bg.xml
│       │       │   ├── widget_input_edit_bg.xml
│       │       │   ├── widget_message_in_text_bg.xml
│       │       │   ├── widget_message_out_text_bg.xml
│       │       │   ├── widget_round_bg.xml
│       │       │   └── widget_spinner_bg.xml
│       │       ├── layout/
│       │       │   ├── activity_anim.xml
│       │       │   ├── activity_complete.xml
│       │       │   ├── activity_diff.xml
│       │       │   ├── activity_item_click.xml
│       │       │   ├── activity_main.xml
│       │       │   ├── activity_me.xml
│       │       │   ├── activity_multi_register.xml
│       │       │   ├── activity_single_register.xml
│       │       │   ├── item_view_about_me_info.xml
│       │       │   ├── item_view_about_me_message.xml
│       │       │   ├── item_view_about_me_thx.xml
│       │       │   ├── item_view_about_me_title.xml
│       │       │   ├── item_view_anim.xml
│       │       │   ├── item_view_click_one.xml
│       │       │   ├── item_view_click_two.xml
│       │       │   ├── item_view_complete.xml
│       │       │   ├── item_view_footer.xml
│       │       │   ├── item_view_horizontal_item.xml
│       │       │   ├── item_view_horizontal_list.xml
│       │       │   ├── item_view_main.xml
│       │       │   ├── item_view_multi_message_in.xml
│       │       │   ├── item_view_multi_message_out.xml
│       │       │   ├── item_view_single_type_one.xml
│       │       │   ├── item_view_single_type_two.xml
│       │       │   ├── item_view_title.xml
│       │       │   ├── widget_view_complete_text.xml
│       │       │   ├── widget_view_message_in_image.xml
│       │       │   ├── widget_view_message_in_text.xml
│       │       │   ├── widget_view_message_input.xml
│       │       │   ├── widget_view_message_out_image.xml
│       │       │   └── widget_view_message_out_text.xml
│       │       ├── values/
│       │       │   ├── arrays.xml
│       │       │   ├── colors.xml
│       │       │   ├── strings.xml
│       │       │   └── styles.xml
│       │       └── xml/
│       │           └── shortcuts.xml
│       └── test/
│           └── java/
│               └── com/
│                   └── werb/
│                       └── moretype/
│                           └── ExampleUnitTest.kt
├── build.gradle
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── library/
│   ├── .gitignore
│   ├── bintray.gradle
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── kotlin/
│       │   │   └── com/
│       │   │       └── werb/
│       │   │           └── library/
│       │   │               ├── MoreAdapter.kt
│       │   │               ├── MoreType.kt
│       │   │               ├── MoreViewHolder.kt
│       │   │               ├── action/
│       │   │               │   ├── DataAction.kt
│       │   │               │   └── MoreClickListener.kt
│       │   │               ├── annotation/
│       │   │               │   └── MoreInject.kt
│       │   │               ├── exception/
│       │   │               │   ├── ModelNotRegisterException.kt
│       │   │               │   ├── MultiModelNotRegisterException.kt
│       │   │               │   └── ViewHolderInitErrorException.kt
│       │   │               ├── extension/
│       │   │               │   ├── AlphaAnimation.kt
│       │   │               │   ├── AnimExtension.kt
│       │   │               │   ├── MoreAnimation.kt
│       │   │               │   ├── ScaleInAnimation.kt
│       │   │               │   ├── SlideInBottomAnimation.kt
│       │   │               │   ├── SlideInLeftAnimation.kt
│       │   │               │   └── SlideInRightAnimation.kt
│       │   │               └── link/
│       │   │                   ├── LayoutID.kt
│       │   │                   ├── MoreLink.kt
│       │   │                   ├── MoreLinkManager.kt
│       │   │                   ├── MultiLink.kt
│       │   │                   ├── RegisterItem.kt
│       │   │                   ├── SoleLinkManager.kt
│       │   │                   └── XDiffCallback.kt
│       │   └── res/
│       │       └── values/
│       │           └── ids.xml
│       └── test/
│           └── java/
│               └── com/
│                   └── werb/
│                       └── library/
│                           └── ExampleUnitTest.java
└── settings.gradle
Download .txt
SYMBOL INDEX (2 symbols across 1 files)

FILE: library/src/test/java/com/werb/library/ExampleUnitTest.java
  class ExampleUnitTest (line 12) | public class ExampleUnitTest {
    method addition_isCorrect (line 13) | @Test
Condensed preview — 137 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (258K chars).
[
  {
    "path": ".gitignore",
    "chars": 244,
    "preview": "# Generated files\nbin/\ngen/\nrelease/\n\n# Gradle files\n.gradle/\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.p"
  },
  {
    "path": ".travis.yml",
    "chars": 661,
    "preview": "language: android\njdk: oraclejdk8\nsudo: false\n\nandroid:\n  components:\n  - build-tools-28.0.3\n  - android-28\n  - extra-an"
  },
  {
    "path": "LICENSE",
    "chars": 11302,
    "preview": "  Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/lice"
  },
  {
    "path": "README.md",
    "chars": 3259,
    "preview": "# MoreType\n\n> new method to build data in RecyclerView with Kotlin!\n\n<a href=\"https://fir.im/k9yq\"><img src=\"https://raw"
  },
  {
    "path": "README_EN.md",
    "chars": 7706,
    "preview": "# MoreType\n\n> new method to build data in RecyclerView with Kotlin!\n\n<a href=\"https://fir.im/k9yq\"><img src=\"https://raw"
  },
  {
    "path": "README_ZH.md",
    "chars": 6758,
    "preview": "# MoreType\n\n> new method to build data in RecyclerView with Kotlin!\n\n<a href=\"https://fir.im/k9yq\"><img src=\"https://raw"
  },
  {
    "path": "app/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "chars": 1883,
    "preview": "apply plugin: 'com.android.application'\napply plugin: 'kotlin-android'\napply plugin: 'kotlin-android-extensions'\n\nandroi"
  },
  {
    "path": "app/proguard-rules.pro",
    "chars": 930,
    "preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /U"
  },
  {
    "path": "app/src/androidTest/java/com/werb/moretype/ExampleInstrumentedTest.kt",
    "chars": 631,
    "preview": "package com.werb.moretype\n\nimport androidx.test.InstrumentationRegistry\nimport androidx.test.runner.AndroidJUnit4\nimport"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "chars": 2197,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package="
  },
  {
    "path": "app/src/main/java/com/werb/moretype/MyApp.kt",
    "chars": 677,
    "preview": "package com.werb.moretype\n\nimport android.app.Application\nimport com.facebook.drawee.backends.pipeline.Fresco\nimport com"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/TitleViewHolder.kt",
    "chars": 669,
    "preview": "package com.werb.moretype\n\nimport android.view.View\nimport com.werb.library.MoreViewHolder\nimport com.werb.library.link."
  },
  {
    "path": "app/src/main/java/com/werb/moretype/Utils.kt",
    "chars": 1618,
    "preview": "package com.werb.moretype\n\nimport android.graphics.BitmapFactory\nimport com.werb.library.MoreViewHolder\nimport com.werb."
  },
  {
    "path": "app/src/main/java/com/werb/moretype/anim/AnimActivity.kt",
    "chars": 3481,
    "preview": "package com.werb.moretype.anim\n\nimport android.app.Activity\nimport android.content.Intent\nimport android.os.Bundle\nimpor"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/anim/AnimType.kt",
    "chars": 226,
    "preview": "package com.werb.moretype.anim\n\n/**\n * Created by wanbo on 2017/7/15.\n */\nclass AnimType(val title: String,\n            "
  },
  {
    "path": "app/src/main/java/com/werb/moretype/anim/AnimViewHolder.kt",
    "chars": 535,
    "preview": "package com.werb.moretype.anim\n\nimport android.view.View\nimport com.werb.library.MoreViewHolder\nimport kotlinx.android.s"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/click/ItemClick.kt",
    "chars": 151,
    "preview": "package com.werb.moretype.click\n\n/**\n * Created by wanbo on 2017/7/15.\n */\ndata class ItemClick(val title: String, val u"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/click/ItemClickActivity.kt",
    "chars": 3852,
    "preview": "package com.werb.moretype.click\n\nimport android.app.Activity\nimport android.content.DialogInterface\nimport android.conte"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/click/ItemClickOneViewHolder.kt",
    "chars": 896,
    "preview": "package com.werb.moretype.click\n\nimport android.view.View\nimport android.widget.Toast\nimport com.werb.library.MoreViewHo"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/click/ItemClickTwoViewHolder.kt",
    "chars": 794,
    "preview": "package com.werb.moretype.click\n\nimport android.view.View\nimport android.widget.Toast\nimport com.werb.library.MoreViewHo"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/complete/Complete.kt",
    "chars": 385,
    "preview": "package com.werb.moretype.complete\n\n/**\n * Created by wanbo on 2017/7/15.\n */\ndata class Complete(val name: String,\n    "
  },
  {
    "path": "app/src/main/java/com/werb/moretype/complete/CompleteActivity.kt",
    "chars": 3182,
    "preview": "package com.werb.moretype.complete\n\nimport android.app.Activity\nimport android.content.Intent\nimport android.os.Bundle\ni"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/complete/CompleteViewHolder.kt",
    "chars": 2535,
    "preview": "package com.werb.moretype.complete\n\nimport android.text.TextUtils\nimport android.view.LayoutInflater\nimport android.view"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/complete/FootViewHolder.kt",
    "chars": 367,
    "preview": "package com.werb.moretype.complete\n\nimport android.view.View\nimport com.werb.library.MoreViewHolder\nimport com.werb.more"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/complete/Footer.kt",
    "chars": 94,
    "preview": "package com.werb.moretype.complete\n\n/**\n * Created by wanbo on 2017/7/15.\n */\nclass Footer {\n}"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/complete/HorizontalData.kt",
    "chars": 211,
    "preview": "package com.werb.moretype.complete\n\nimport com.werb.moretype.single.SingleText\n\n/**\n * Created by wanbo on 2017/7/15.\n *"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/complete/HorizontalItemViewHolder.kt",
    "chars": 597,
    "preview": "package com.werb.moretype.complete\n\nimport android.view.View\nimport com.werb.library.MoreViewHolder\nimport com.werb.more"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/complete/HorizontalViewHolder.kt",
    "chars": 1451,
    "preview": "package com.werb.moretype.complete\n\nimport android.view.View\nimport android.widget.Toast\nimport com.werb.library.MoreAda"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/complete/OnLoadMoreListener.kt",
    "chars": 2068,
    "preview": "package com.werb.moretype.complete\n\nimport android.util.Log\nimport android.view.View\nimport androidx.recyclerview.widget"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/data/DataServer.kt",
    "chars": 38493,
    "preview": "package com.werb.moretype.data\n\nimport com.werb.moretype.MyApp\nimport com.werb.moretype.R\nimport com.werb.moretype.anim."
  },
  {
    "path": "app/src/main/java/com/werb/moretype/diff/DiffDataActivity.kt",
    "chars": 3114,
    "preview": "package com.werb.moretype.diff\n\nimport android.app.Activity\nimport android.content.Intent\nimport android.os.Bundle\nimpor"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/diff/DiffDataCallback.kt",
    "chars": 1469,
    "preview": "package com.werb.moretype.diff\n\nimport com.werb.library.link.XDiffCallback\nimport com.werb.moretype.anim.AnimType\nimport"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/main/MainActivity.kt",
    "chars": 1346,
    "preview": "package com.werb.moretype.main\n\nimport android.os.Bundle\nimport android.view.View\nimport androidx.appcompat.app.AppCompa"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/main/MainCard.kt",
    "chars": 138,
    "preview": "package com.werb.moretype.main\n\n/**\n * Created by wanbo on 2017/7/14.\n */\ndata class MainCard(val cardTitle: String, val"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/main/MainCardViewHolder.kt",
    "chars": 2972,
    "preview": "package com.werb.moretype.main\n\nimport android.app.Activity\nimport android.view.View\nimport com.werb.library.MoreViewHol"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/main/PayLoadOne.kt",
    "chars": 135,
    "preview": "package com.werb.moretype.main\n\n/** Created by wanbo <werbhelius@gmail.com> on 2017/10/15. */\n\ndata class PayLoadOne(val"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/me/AboutMeActivity.kt",
    "chars": 2155,
    "preview": "package com.werb.moretype.me\n\nimport android.app.Activity\nimport android.content.Intent\nimport android.os.Bundle\nimport "
  },
  {
    "path": "app/src/main/java/com/werb/moretype/me/MeInfo.kt",
    "chars": 291,
    "preview": "package com.werb.moretype.me\n\n/**\n * Created by wanbo on 2017/7/15.\n */\ndata class MeInfo(val name: String,\n            "
  },
  {
    "path": "app/src/main/java/com/werb/moretype/me/MeInfoViewHolder.kt",
    "chars": 1468,
    "preview": "package com.werb.moretype.me\n\nimport android.content.Intent\nimport android.net.Uri\nimport android.view.View\nimport com.w"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/me/MeMessage.kt",
    "chars": 113,
    "preview": "package com.werb.moretype.me\n\n/**\n * Created by wanbo on 2017/7/15.\n */\ndata class MeMessage(val message: String)"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/me/MeMessageViewHolder.kt",
    "chars": 447,
    "preview": "package com.werb.moretype.me\n\nimport android.view.View\nimport com.werb.library.MoreViewHolder\nimport kotlinx.android.syn"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/me/MeThanks.kt",
    "chars": 163,
    "preview": "package com.werb.moretype.me\n\n/**\n * Created by wanbo on 2017/7/15.\n */\ndata class MeThanks(val name: String, val desc: "
  },
  {
    "path": "app/src/main/java/com/werb/moretype/me/MeThanksViewHolder.kt",
    "chars": 791,
    "preview": "package com.werb.moretype.me\n\nimport android.content.Intent\nimport android.net.Uri\nimport android.view.View\nimport com.w"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/me/MeTitleViewType.kt",
    "chars": 425,
    "preview": "package com.werb.moretype.me\n\nimport android.view.View\nimport com.werb.library.MoreViewHolder\nimport kotlinx.android.syn"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/multi/ImageSize.kt",
    "chars": 128,
    "preview": "package com.werb.moretype.multi\n\n/**\n * Created by wanbo on 2017/7/14.\n */\ndata class ImageSize(val width: Int, val heig"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/multi/Message.kt",
    "chars": 415,
    "preview": "package com.werb.moretype.multi\n\n/**\n * Created by wanbo on 2017/7/14.\n */\nclass Message(var icon: String,\n             "
  },
  {
    "path": "app/src/main/java/com/werb/moretype/multi/MessageInViewHolder.kt",
    "chars": 2201,
    "preview": "package com.werb.moretype.multi\n\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.widget.Relat"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/multi/MessageOutViewHolder.kt",
    "chars": 2388,
    "preview": "package com.werb.moretype.multi\n\nimport android.net.Uri\nimport android.view.LayoutInflater\nimport android.view.View\nimpo"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/multi/MultiRegisterActivity.kt",
    "chars": 6420,
    "preview": "package com.werb.moretype.multi\n\nimport android.Manifest\nimport android.app.Activity\nimport android.content.Intent\nimpor"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/single/SingleImage.kt",
    "chars": 134,
    "preview": "package com.werb.moretype.single\n\n/**\n * Created by wanbo on 2017/7/14.\n */\ndata class SingleImage(val title: String, va"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/single/SingleItemDecoration.kt",
    "chars": 633,
    "preview": "package com.werb.moretype.single\n\nimport android.graphics.Rect\nimport android.view.View\n\n/**\n * Created by wanbo on 2017"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/single/SingleRegisterActivity.kt",
    "chars": 1997,
    "preview": "package com.werb.moretype.single\n\nimport android.app.Activity\nimport android.content.Intent\nimport android.os.Bundle\nimp"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/single/SingleText.kt",
    "chars": 151,
    "preview": "package com.werb.moretype.single\n\n/**\n * Created by wanbo on 2017/7/14.\n */\ndata class SingleText(val title: String, val"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/single/SingleTypeOneViewHolder.kt",
    "chars": 630,
    "preview": "package com.werb.moretype.single\n\nimport android.view.View\nimport com.werb.library.MoreViewHolder\nimport com.werb.librar"
  },
  {
    "path": "app/src/main/java/com/werb/moretype/single/SingleTypeTwoViewHolder.kt",
    "chars": 601,
    "preview": "package com.werb.moretype.single\n\nimport android.view.View\nimport com.werb.library.MoreViewHolder\nimport com.werb.librar"
  },
  {
    "path": "app/src/main/res/drawable/widget_button_bg.xml",
    "chars": 201,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <solid and"
  },
  {
    "path": "app/src/main/res/drawable/widget_input_bg.xml",
    "chars": 445,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item"
  },
  {
    "path": "app/src/main/res/drawable/widget_input_edit_bg.xml",
    "chars": 415,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <solid and"
  },
  {
    "path": "app/src/main/res/drawable/widget_message_in_text_bg.xml",
    "chars": 292,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:sha"
  },
  {
    "path": "app/src/main/res/drawable/widget_message_out_text_bg.xml",
    "chars": 203,
    "preview": "<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n\n    <solid android:col"
  },
  {
    "path": "app/src/main/res/drawable/widget_round_bg.xml",
    "chars": 182,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:sha"
  },
  {
    "path": "app/src/main/res/drawable/widget_spinner_bg.xml",
    "chars": 194,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:sha"
  },
  {
    "path": "app/src/main/res/layout/activity_anim.xml",
    "chars": 2293,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmln"
  },
  {
    "path": "app/src/main/res/layout/activity_complete.xml",
    "chars": 1403,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xm"
  },
  {
    "path": "app/src/main/res/layout/activity_diff.xml",
    "chars": 1901,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmln"
  },
  {
    "path": "app/src/main/res/layout/activity_item_click.xml",
    "chars": 1139,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xm"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "chars": 1962,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xm"
  },
  {
    "path": "app/src/main/res/layout/activity_me.xml",
    "chars": 1131,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xm"
  },
  {
    "path": "app/src/main/res/layout/activity_multi_register.xml",
    "chars": 1311,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xm"
  },
  {
    "path": "app/src/main/res/layout/activity_single_register.xml",
    "chars": 1046,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmln"
  },
  {
    "path": "app/src/main/res/layout/item_view_about_me_info.xml",
    "chars": 4816,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "app/src/main/res/layout/item_view_about_me_message.xml",
    "chars": 1035,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "app/src/main/res/layout/item_view_about_me_thx.xml",
    "chars": 2237,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "app/src/main/res/layout/item_view_about_me_title.xml",
    "chars": 676,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmln"
  },
  {
    "path": "app/src/main/res/layout/item_view_anim.xml",
    "chars": 2271,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "app/src/main/res/layout/item_view_click_one.xml",
    "chars": 2325,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "app/src/main/res/layout/item_view_click_two.xml",
    "chars": 2340,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "app/src/main/res/layout/item_view_complete.xml",
    "chars": 3198,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "app/src/main/res/layout/item_view_footer.xml",
    "chars": 492,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    an"
  },
  {
    "path": "app/src/main/res/layout/item_view_horizontal_item.xml",
    "chars": 2497,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "app/src/main/res/layout/item_view_horizontal_list.xml",
    "chars": 2335,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "app/src/main/res/layout/item_view_main.xml",
    "chars": 2743,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns"
  },
  {
    "path": "app/src/main/res/layout/item_view_multi_message_in.xml",
    "chars": 1807,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xm"
  },
  {
    "path": "app/src/main/res/layout/item_view_multi_message_out.xml",
    "chars": 1062,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xm"
  },
  {
    "path": "app/src/main/res/layout/item_view_single_type_one.xml",
    "chars": 2274,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "app/src/main/res/layout/item_view_single_type_two.xml",
    "chars": 1720,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "app/src/main/res/layout/item_view_title.xml",
    "chars": 1193,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    an"
  },
  {
    "path": "app/src/main/res/layout/widget_view_complete_text.xml",
    "chars": 822,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    an"
  },
  {
    "path": "app/src/main/res/layout/widget_view_message_in_image.xml",
    "chars": 898,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xm"
  },
  {
    "path": "app/src/main/res/layout/widget_view_message_in_text.xml",
    "chars": 949,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    an"
  },
  {
    "path": "app/src/main/res/layout/widget_view_message_input.xml",
    "chars": 2499,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    andr"
  },
  {
    "path": "app/src/main/res/layout/widget_view_message_out_image.xml",
    "chars": 920,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xm"
  },
  {
    "path": "app/src/main/res/layout/widget_view_message_out_text.xml",
    "chars": 950,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    an"
  },
  {
    "path": "app/src/main/res/values/arrays.xml",
    "chars": 418,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string-array name=\"Animation\">\n        <item>Alpha</item>\n      "
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "chars": 512,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#00AA8D</color>\n    <color name=\"color"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "chars": 2145,
    "preview": "<resources>\n    <string name=\"app_name\">MoreType</string>\n    <string name=\"app_desc\">new method to build data in Recycl"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "chars": 632,
    "preview": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">"
  },
  {
    "path": "app/src/main/res/xml/shortcuts.xml",
    "chars": 769,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shortcuts xmlns:tools=\"http://schemas.android.com/tools\"\n    xmlns:android=\"http"
  },
  {
    "path": "app/src/test/java/com/werb/moretype/ExampleUnitTest.kt",
    "chars": 342,
    "preview": "package com.werb.moretype\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, which will "
  },
  {
    "path": "build.gradle",
    "chars": 888,
    "preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    e"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "chars": 233,
    "preview": "#Mon Feb 11 10:38:49 CST 2019\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
  },
  {
    "path": "gradle.properties",
    "chars": 1206,
    "preview": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will o"
  },
  {
    "path": "gradlew",
    "chars": 4971,
    "preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start "
  },
  {
    "path": "gradlew.bat",
    "chars": 2314,
    "preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
  },
  {
    "path": "library/.gitignore",
    "chars": 6,
    "preview": "/build"
  },
  {
    "path": "library/bintray.gradle",
    "chars": 2558,
    "preview": "group = PROJ_GROUP\nversion = PROJ_VERSION\nproject.archivesBaseName = PROJ_ARTIFACTID\n\napply plugin: 'com.jfrog.bintray'\n"
  },
  {
    "path": "library/build.gradle",
    "chars": 1063,
    "preview": "apply plugin: 'com.android.library'\napply plugin: 'kotlin-android'\napply plugin: 'kotlin-android-extensions'\n\nandroid {\n"
  },
  {
    "path": "library/proguard-rules.pro",
    "chars": 930,
    "preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /U"
  },
  {
    "path": "library/src/main/AndroidManifest.xml",
    "chars": 103,
    "preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.werb.library\" />\n"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/MoreAdapter.kt",
    "chars": 10552,
    "preview": "package com.werb.library\n\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimpo"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/MoreType.kt",
    "chars": 415,
    "preview": "package com.werb.library\n\nimport com.werb.library.link.RegisterItem\nimport com.werb.library.link.SoleLinkManager\n\n/**\n *"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/MoreViewHolder.kt",
    "chars": 2146,
    "preview": "package com.werb.library\n\nimport android.view.View\nimport androidx.recyclerview.widget.RecyclerView.ViewHolder\nimport co"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/action/DataAction.kt",
    "chars": 1142,
    "preview": "package com.werb.library.action\n\nimport com.werb.library.link.XDiffCallback\n\n\n/**\n * Action of Data in Adapter\n * Create"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/action/MoreClickListener.kt",
    "chars": 405,
    "preview": "package com.werb.library.action\n\nimport android.view.MotionEvent\nimport android.view.View\n\n/**\n * Created by wanbo on 20"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/annotation/MoreInject.kt",
    "chars": 264,
    "preview": "package com.werb.library.annotation\n\n/**\n * Created by wanbo on 2018/11/16.\n */\n@Retention(AnnotationRetention.RUNTIME)\n"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/exception/ModelNotRegisterException.kt",
    "chars": 287,
    "preview": "package com.werb.library.exception\n\n\n/**\n * throw this Exception when not register viewType for data\n * Created by wanbo"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/exception/MultiModelNotRegisterException.kt",
    "chars": 332,
    "preview": "package com.werb.library.exception\n\n/**\n * throw this Exception when not register MultiViewType for data\n * Created by w"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/exception/ViewHolderInitErrorException.kt",
    "chars": 191,
    "preview": "package com.werb.library.exception\n\n/**\n * Created by wanbo on 2018/8/6.\n */\nclass ViewHolderInitErrorException(viewHold"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/extension/AlphaAnimation.kt",
    "chars": 503,
    "preview": "package com.werb.library.extension\n\nimport android.animation.Animator\nimport android.animation.ObjectAnimator\nimport and"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/extension/AnimExtension.kt",
    "chars": 513,
    "preview": "package com.werb.library.extension\n\nimport com.werb.library.MoreAdapter\nimport com.werb.library.MoreViewHolder\n\n/**\n * C"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/extension/MoreAnimation.kt",
    "chars": 332,
    "preview": "package com.werb.library.extension\n\nimport android.animation.Animator\nimport android.view.View\n\n/**\n *  support custom A"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/extension/ScaleInAnimation.kt",
    "chars": 576,
    "preview": "package com.werb.library.extension\n\nimport android.animation.Animator\nimport android.animation.ObjectAnimator\nimport and"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/extension/SlideInBottomAnimation.kt",
    "chars": 401,
    "preview": "package com.werb.library.extension\n\nimport android.animation.Animator\nimport android.animation.ObjectAnimator\nimport and"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/extension/SlideInLeftAnimation.kt",
    "chars": 401,
    "preview": "package com.werb.library.extension\n\nimport android.animation.Animator\nimport android.animation.ObjectAnimator\nimport and"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/extension/SlideInRightAnimation.kt",
    "chars": 401,
    "preview": "package com.werb.library.extension\n\nimport android.animation.Animator\nimport android.animation.ObjectAnimator\nimport and"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/link/LayoutID.kt",
    "chars": 292,
    "preview": "package com.werb.library.link\n\n/**\n * Register Layout with Annotation\n * Created by wanbo on 2018/1/8.\n */\n\n@Retention(A"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/link/MoreLink.kt",
    "chars": 1221,
    "preview": "package com.werb.library.link\n\nimport com.werb.library.MoreViewHolder\nimport com.werb.library.action.MoreClickListener\n\n"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/link/MoreLinkManager.kt",
    "chars": 6755,
    "preview": "package com.werb.library.link\n\nimport android.util.Log\nimport androidx.collection.SparseArrayCompat\nimport com.werb.libr"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/link/MultiLink.kt",
    "chars": 260,
    "preview": "package com.werb.library.link\n\n/**\n * [MultiLink] one2more case in model with ViewType\n * Created by wanbo on 2017/7/11."
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/link/RegisterItem.kt",
    "chars": 436,
    "preview": "package com.werb.library.link\n\nimport com.werb.library.MoreViewHolder\nimport com.werb.library.action.MoreClickListener\n\n"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/link/SoleLinkManager.kt",
    "chars": 368,
    "preview": "package com.werb.library.link\n\n/**\n * [SoleLinkManager] help to register global viewType\n * Created by wanbo on 2017/7/1"
  },
  {
    "path": "library/src/main/kotlin/com/werb/library/link/XDiffCallback.kt",
    "chars": 218,
    "preview": "package com.werb.library.link\n\nimport androidx.recyclerview.widget.DiffUtil\n\n/**\n * Created by wanbo on 2017/12/19.\n */\n"
  },
  {
    "path": "library/src/main/res/values/ids.xml",
    "chars": 115,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <item name=\"moretype_item_viewtype\" type=\"id\"/>\n</resources>"
  },
  {
    "path": "library/src/test/java/com/werb/library/ExampleUnitTest.java",
    "chars": 394,
    "preview": "package com.werb.library;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example local unit test, wh"
  },
  {
    "path": "settings.gradle",
    "chars": 27,
    "preview": "include ':app', ':library'\n"
  }
]

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

About this extraction

This page contains the full source code of the Werb/MoreType GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 137 files (227.3 KB), approximately 61.9k tokens, and a symbol index with 2 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!