<commit_before># GestureRefreshLayout
[![Release](https://jitpack.io/v/Bvin/gesture-refresh-layout.svg)]
(https://jitpack.io/#Bvin/gesture-refresh-layout)

Android gesture refresh layout.

## Installation
First, in your project's build.gradle add the jitpack.io repository like this:
```
allprojects {
 repositories {
    ...
    jcenter()
    maven { url "https://jitpack.io" }
 }
}
```
*Note: do not add the jitpack.io repository under buildscript.*


Then, add the following dependency to your module's build.gradle file:
```
dependencies {
    ...
    compile 'com.google.android:flexbox:0.2.5'
}
```

## Usage
```xml
<GestureRefreshLayout>
    <ContentView />
    <RefreshView />
</GestureRefreshLayout>
```

## Swipe Gesture
1. Both Translate, content and refresh view both translate, refresh view is next to content view transition.
2. Content Translate, just translate content view.
3. Refresher Translate, just translate refresh view.
4. Both Fixed, content and refresh view both are fixed.

---
中文版

Android手势刷新布局

## 安装
首先，在项目根目录的build.gradle中添加JitPack远程仓库如下：
```
allprojects {
 repositories {
    ...
    jcenter()
    maven { url "https://jitpack.io" }
 }
}
```
注意：不要把JitPack的仓库地址放在buildscript里面，否则会出现无法解析远程依赖的错误。

然后，再你需要使用的Module中的build.gradle添加以下依赖：
```
dependencies {
    ...
    compile 'com.google.android:flexbox:0.2.5'
}
```

## 用法
通常可以在GestureRefreshLayout布局里面添加子视图来实现刷新功能，第一个应为内容视图，第二个应为刷新视图，
不接受大于2个的子视图。

原生SwipeRefreshLayout的ChildView的宽高会强制match_parent，而我们的GestureRefreshLayout可以支持Child
View为wrap_content。<commit_msg>add build explain<commit_after># GestureRefreshLayout
[![Release](https://jitpack.io/v/Bvin/gesture-refresh-layout.svg)]
(https://jitpack.io/#Bvin/gesture-refresh-layout)

Android gesture refresh layout.

## Installation
First, in your project's build.gradle add the jitpack.io repository like this:
```
allprojects {
 repositories {
    ...
    jcenter()
    maven { url "https://jitpack.io" }
 }
}
```
*Note: do not add the jitpack.io repository under buildscript.*


Then, add the following dependency to your module's build.gradle file:
```
dependencies {
    ...
    compile 'com.github.bvin:gesture-refresh-layout:0.1.1'
}
```
If you want to get the latest feature, you can find that release the end with letter "d"(the code on
 dev branch), example "com.github.bvin:gesture-refresh-layout:0.1.4d".The stable version is no end w
 ith letter "d".
 
If in your module already has support-v4 dependency, you should exclude the inner support module, li
ke this:
```
compile ('com.github.bvin:gesture-refresh-layout:0.1.4d') {
        exclude group: 'com.android.support', module: 'support-compat'
    }
```

## Usage
```xml
<GestureRefreshLayout>
    <ContentView />
    <RefreshView />
</GestureRefreshLayout>
```

## Swipe Gesture
1. Both Translate, content and refresh view both translate, refresh view is next to content view transition.
2. Content Translate, just translate content view.
3. Refresher Translate, just translate refresh view.
4. Both Fixed, content and refresh view both are fixed.

---
中文版

Android手势刷新布局

## 安装
首先，在项目根目录的build.gradle中添加JitPack远程仓库如下：
```
allprojects {
 repositories {
    ...
    jcenter()
    maven { url "https://jitpack.io" }
 }
}
```
注意：不要把JitPack的仓库地址放在buildscript里面，否则会出现无法解析远程依赖的错误。

然后，再你需要使用的Module中的build.gradle添加以下依赖：
```
dependencies {
    ...
    compile 'com.github.bvin:gesture-refresh-layout:0.1.1'
}
```
如果需要最新的功能，可以依赖以d结尾的在dev分支上发布的Tag，"com.github.bvin:gesture-refresh-layout:0.
1.4d"，如稳定版是不以字母d结尾的。

如果你的module中已经有support-v4依赖，应该去除内部的module，如下：
```
compile ('com.github.bvin:gesture-refresh-layout:0.1.4d') {
        exclude group: 'com.android.support', module: 'support-compat'
    }
```

## 用法
通常可以在GestureRefreshLayout布局里面添加子视图来实现刷新功能，第一个应为内容视图，第二个应为刷新视图，
不接受大于2个的子视图。

原生SwipeRefreshLayout的ChildView的宽高会强制match_parent，而我们的GestureRefreshLayout可以支持Child
View为wrap_content。
{'fraction_non_alphanumeric': 0.12480660134089737, 'fraction_numerical': 0.009283135636926251, 'mean_word_length': 4.478813559322034, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6008639', 'n_tokens_mistral': 1556, 'n_tokens_neox': 1565, 'n_words': 303}