Skip to content

Commit

Permalink
Update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
lcodecorex committed Mar 10, 2017
1 parent 67c0e3f commit 81b38c4
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 18 deletions.
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ TwinklingRefreshLayout extended the thoughts of SwipeRefreshLayout,using a ViewG

![](art/gif_recyclerview.gif) ![](art/gif_listview.gif) ![](art/gif_gridview.gif) ![](art/gif_recyclerview2.gif) ![](art/gif_scrollview.gif) ![](art/gif_webview.gif)

You can download the Video for more details.
You can download these Videos for more details.

- [Music - ListView - FixedHeader](art/gif_listview.mp4)
- [Food - RecyclerView - PureScrollMode](art/gif_recyclerview.mp4)
Expand All @@ -30,7 +30,7 @@ You can download the Video for more details.
## Usage
#### 1.Add a gradle dependency.
```
compile 'com.lcodecorex:tkrefreshlayout:1.0.5'
compile 'com.lcodecorex:tkrefreshlayout:1.0.6'
```

#### 2.Add TwinklingRefreshLayout in the layout xml.
Expand Down Expand Up @@ -87,8 +87,9 @@ Use finishRefreshing() method to end refresh, finishLoadmore() method to end loa
And if you want you refresh automatically, call the method startRefresh().

##### setWaveHeight、setHeaderHeight、setBottomHeight、setOverScrollHeight
- setWaveHeight is used To set the maximum height of the head can be stretched.
- setMaxHeadHeight is used To set the maximum height of the head can be stretched.
- setHeaderHeight is used to set the standard head height.
- setMaxBottomHeight.
- setBottomHeight is used to set the Bottom height.
- setOverScrollHeight is used to set the max height of overscroll.

Expand Down Expand Up @@ -119,9 +120,13 @@ Allow you to add a view fixed on the top.
##### setFloatRefresh(boolean)
Make refresh-animation like SwipeRefreshLayout.

##### setTargetView(View view)
Set the target view that you can scroll.

#### 4.Attributes
- tr_wave_height - Flexible head height
- tr_max_head_height - Flexible head height
- tr_head_height - Head height
- tr_max_bottom_height
- tr_bottom_height - Bottom height
- tr_overscroll_height - OverScroll Height
- tr_enable_loadmore - default is true
Expand Down Expand Up @@ -160,7 +165,7 @@ fraction = currentMoveHeight/headHeight OR (fraction = currentMoveHeight/bottomH
- setColorSchemeResources(@ColorRes int... colorResIds)

####Footer
##### BottomProgressView(pic 2)
##### BallPulseView(pic 2)
- setNormalColor(@ColorInt int color)
- setAnimatingColor(@ColorInt int color)

Expand Down Expand Up @@ -280,6 +285,13 @@ startAnim - be called automatically after the method onRefresh/onLoadMore is cal
Congratulations! Simple to use and simple to Personalise.(To see a more simple example. **TextHeaderView(pic 4)**)。

## Update Logs
#### v1.06
- Repair memory leaks of customized Views.
- remove the dependence of AVLoadingIndicatorView.
- Fix bugs of OverScroll when TargetView scrolls at the top/bottom.
- Repair bugs of touching,scroll-event listeners.
- Optimization of interface flicker problems after load-more.

#### v1.05 Emergency Fix
- Fix the bug of setAutoLoadMore().
- Fix the bug that FixedHeader covered the first item of listview.
Expand Down
19 changes: 12 additions & 7 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TwinklingRefreshLayout延伸了Google的SwipeRefreshLayout的思想,不在列表

![](art/gif_recyclerview.gif) ![](art/gif_listview.gif) ![](art/gif_gridview.gif) ![](art/gif_recyclerview2.gif) ![](art/gif_scrollview.gif) ![](art/gif_webview.gif)

You can download the Video for more details.
You can download these Videos for more details.

- [Music - ListView - FixedHeader](art/gif_listview.mp4)
- [Food - RecyclerView - PureScrollMode](art/gif_recyclerview.mp4)
Expand All @@ -28,7 +28,7 @@ You can download the Video for more details.
#### 1.添加gradle依赖
将libray模块复制到项目中,或者直接在build.gradle中依赖:
```
compile 'com.lcodecorex:tkrefreshlayout:1.0.5'
compile 'com.lcodecorex:tkrefreshlayout:1.0.6'
```

#### 2.在xml中添加TwinklingRefreshLayout
Expand Down Expand Up @@ -84,8 +84,9 @@ refreshLayout.setOnRefreshListener(new RefreshListenerAdapter(){
如果你想进入到界面的时候主动调用下刷新,可以调用startRefresh()/startLoadmore()方法。

##### setWaveHeight、setHeaderHeight、setBottomHeight、setOverScrollHeight
- setWaveHeight 设置头部可拉伸的最大高度。
- setMaxHeadHeight 设置头部可拉伸的最大高度。
- setHeaderHeight 头部固定高度(在此高度上显示刷新状态)
- setMaxBottomHeight
- setBottomHeight 底部高度
- setOverScrollHeight 设置最大的越界高度

Expand Down Expand Up @@ -115,9 +116,13 @@ refreshLayout.setOnRefreshListener(new RefreshListenerAdapter(){
##### setFloatRefresh(boolean)
支持切换到像SwipeRefreshLayout一样的悬浮刷新模式了。

##### setTargetView(View view)
设置滚动事件的作用对象。

#### 4.扩展属性
- tr_wave_height 头部拉伸允许的最大高度
- tr_max_head_height 头部拉伸允许的最大高度
- tr_head_height 头部高度
- tr_max_bottom_height
- tr_bottom_height 底部高度
- tr_overscroll_height 允许越界的最大高度
- tr_enable_loadmore 是否允许加载更多,默认为true
Expand Down Expand Up @@ -160,7 +165,7 @@ refreshLayout.setOnRefreshListener(new RefreshListenerAdapter(){
- setColorSchemeResources(@ColorRes int... colorResIds)

####Footer
##### BottomProgressView(pic 2)
##### BallPulseView(pic 2)
- setNormalColor(@ColorInt int color)
- setAnimatingColor(@ColorInt int color)

Expand Down Expand Up @@ -295,9 +300,9 @@ startAnim则是在onRefresh/onLoadMore之后才会回调的过程(此处是显
- 理论上解决了触摸、点击以及滚动监听失效等问题
- 新增setTargetView()方法,可设置滚动事件的作用对象
- 添加了CoordinateLayout demo(暂未在RefreshLayout中添加相关逻辑)
- 修复三星、酷派手机出现的兼容问题 TODO
- 修复三星、酷派手机出现的兼容问题
- 修复禁用refresh、loadmore后overscroll不可用的问题
- 修复在顶部、顶部fling时页面闪烁问题
- 修复在顶部、底部fling时页面闪烁问题
- 修复IBottomView中的参数错误,新增max_head_height,max_bottom_height属性,setWaveHeight方法为setMaxHeadHeight

#### v1.05紧急修复版
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import android.widget.AdapterView;
import android.widget.GridView;

import com.lcodecore.tkrefreshlayout.Footer.LoadingView;
import com.lcodecore.tkrefreshlayout.footer.LoadingView;
import com.lcodecore.tkrefreshlayout.RefreshListenerAdapter;
import com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout;
import com.lcodecore.tkrefreshlayout.header.SinaRefreshView;
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ allprojects {
repositories {
jcenter()
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
}
}

task clean(type: Delete) {
Expand Down
6 changes: 3 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ publish{
userOrg = 'lcodecorex'
groupId = 'com.lcodecorex'
artifactId = 'tkrefreshlayout'
publishVersion = '1.0.5'
publishVersion = '1.0.6'
website = 'https://github.com/lcodecorex/TwinklingRefreshLayout/'
}

Expand All @@ -16,8 +16,8 @@ android {
defaultConfig {
minSdkVersion 12
targetSdkVersion 25
versionCode 5
versionName "1.05"
versionCode 6
versionName "1.06"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
import android.widget.FrameLayout;
import android.widget.RelativeLayout;

import com.lcodecore.tkrefreshlayout.Footer.BallPulseView;
import com.lcodecore.tkrefreshlayout.footer.BallPulseView;
import com.lcodecore.tkrefreshlayout.header.GoogleDotView;
import com.lcodecore.tkrefreshlayout.processor.AnimProcessor;
import com.lcodecore.tkrefreshlayout.processor.IDecorator;
import com.lcodecore.tkrefreshlayout.processor.OverScrollDecorator;
import com.lcodecore.tkrefreshlayout.processor.RefreshProcessor;
import com.lcodecore.tkrefreshlayout.utils.DensityUtil;
import com.lcodecore.tkrefreshlayout.utils.ScrollingUtil;

/**
* Created by lcodecore on 16/3/2.
Expand Down

0 comments on commit 81b38c4

Please sign in to comment.