Skip to content

Commit

Permalink
[版本更新] 更新到1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangning17 committed Mar 22, 2021
1 parent 9ffc834 commit 065d375
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A adapter for android recyclerview which could make a complex type view page eas

```groovy
dependencies {
implementation 'com.xiangning:sectionadapter:1.0.4'
implementation 'com.xiangning:sectionadapter:1.0.5'
}
```

Expand Down Expand Up @@ -100,7 +100,16 @@ class MainActivity : AppCompatActivity() {
}

// 测试删除复用的Section
// adapter.unregister(borrow)
// adapter.unregister(borrow)

// 在某个类型上进行迭代
// content.foreachOnType<String> { i, item ->
// // 如果item是引用类型,可以修改其内容
// // 但这里是String不可变类型,所以用了[](set操作符)进行内容更新
// content[i] = "修改内容$1"
// // 返回true代表有改动,需要notify刷新
// true
}
}

}
Expand Down
6 changes: 3 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
versionCode 25
versionName "1.0.4"
versionCode 26
versionName "1.0.5"

consumerProguardFiles 'consumer-rules.pro'
}
Expand Down Expand Up @@ -40,7 +40,7 @@ publish {
userOrg = 'xiangning17'//bintray.com用户名
groupId = 'com.xiangning'//jcenter上的路径
artifactId = 'sectionadapter'//项目名称
publishVersion = '1.0.4'//版本号
publishVersion = '1.0.5'//版本号
desc = 'A adapter for android recyclerview which could make a complex type view page easily.'//描述,不重要
website = 'https://github.com/xiangning17/sectionadapter'//网站,不重要;尽量模拟github上的地址,例如我这样的;当然你有地址最好了
licences = ['Apache-2.0']
Expand Down
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ dependencies {

// implementation(name: 'section-adapter_1.0.2', ext: 'aar')
// implementation project(':library')
implementation 'com.xiangning:sectionadapter:1.0.4'
implementation 'com.xiangning:sectionadapter:1.0.5'
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,24 @@ class MainActivity : AppCompatActivity() {
// 根据标志测试动态register和unregister一个分组的情况
var attached = true
footer.view.setOnClickListener {
if (attached.also { attached = !it }) {
// unregister后,分组还可用于下次register
adapter.unregister(header)
} else {
adapter.register(0, header)
}
// if (attached.also { attached = !it }) {
// // unregister后,分组还可用于下次register
// adapter.unregister(header)
// } else {
// adapter.register(0, header)
// }

// 测试删除复用的Section
// adapter.unregister(borrow)

// 在某个类型上进行迭代
content.foreachOnType<String> { i, item ->
// 如果item是引用类型,可以修改其内容
// 但这里是String不可变类型,所以用了[](set操作符)进行内容更新
content[i] = "修改内容$1"
// 返回true代表有改动,需要notify刷新
true
}
}

}
Expand Down

0 comments on commit 065d375

Please sign in to comment.