Skip to content

Commit

Permalink
fix:GridLayoutManager刷新后数据混乱问题
Browse files Browse the repository at this point in the history
  • Loading branch information
gavin-zyx2 committed Jun 17, 2019
1 parent 214801c commit ed709cb
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -17,7 +17,7 @@ repositories {
jcenter()// If not already there
}
dependencies {
compile 'com.gavin.com.library:stickyDecoration:1.4.13'
compile 'com.gavin.com.library:stickyDecoration:1.5.0'
}
```

Expand Down Expand Up @@ -154,6 +154,10 @@ decoration.notifyRedraw(mRv, view, position);

# 更新日志

----------------------------- 1.5.0 (2019-6-17)----------------------------

- fix:GridLayoutManager刷新后数据混乱问题

----------------------------- 1.4.12 (2019-5-8)----------------------------

- fix:setDivideColor不生效问题
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Expand Up @@ -9,7 +9,7 @@ android {
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName

multiDexEnabled true
}
buildTypes {
release {
Expand Down
8 changes: 8 additions & 0 deletions build.gradle
Expand Up @@ -3,6 +3,10 @@ apply from: "dependencies.gradle"

buildscript {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
jcenter()
}
dependencies {
Expand All @@ -17,6 +21,10 @@ buildscript {

allprojects {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
jcenter()
}
}
Expand Down
2 changes: 1 addition & 1 deletion stickyDecoration/build.gradle
Expand Up @@ -28,7 +28,7 @@ dependencies {
//gradle install
//gradle bintrayUpload

version = "1.4.13" //这个是版本号,必须填写
version = "1.5.0" //这个是版本号,必须填写
def siteUrl = 'https://github.com/Gavin-ZYX/StickyDecoration' // 项目的主页
def gitUrl = 'https://github.com/Gavin-ZYX/StickyDecoration' // Git仓库的
group = "com.gavin.com.library" // 这里是groupId ,必须填写 一般填你唯一的包名
Expand Down
Expand Up @@ -276,14 +276,13 @@ public boolean onEventUp(MotionEvent event) {
* @param position position
*/
protected int getFirstInGroupWithCash(int position) {
if (firstInGroupCash.get(position) == 0) {
int firstPosition = getFirstInGroup(position);
return getFirstInGroup(position);
/*if (firstInGroupCash.get(position) == 0) {
firstPosition = firstPosition > 0 ? firstPosition - mHeaderCount : firstPosition;
firstInGroupCash.put(position, firstPosition);
return firstPosition;
} else {
return firstInGroupCash.get(position);
}
}*/
}

/**
Expand Down Expand Up @@ -475,7 +474,7 @@ protected void drawDivide(Canvas c, RecyclerView parent, View childView, int pos
}

protected void log(String content) {
if (BuildConfig.DEBUG) {
if (false) {
Log.i("StickDecoration", content);
}
}
Expand Down

0 comments on commit ed709cb

Please sign in to comment.