File tree Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 1
- ### [ Unreleased ]
1
+ ### [ 4.0.0 ]
2
2
- Not having an itemBinding in xml will cause the adapter to be cleared instead of throwing an
3
3
exception (#179 )
4
4
- Added convenience constructors to ` BindingListViewAdapter ` , ` BindingViewPagerAdapter ` , and
5
5
` BindingRecyclerViewAdapter ` which takes the itemBinding.
6
+ - Bumped android gradle plugin to 3.5.2
7
+ - Allow itemBindings to be contravariant in adapters. This should not break any use-sites, but may
8
+ be a source-breaking change if you have overriden ` setItemBinding ` or ` getItemBinding ` in your
9
+ custom adapter. If so, you can change ` T ` to ` ? super T ` (or ` in T ` in kotlin) to fix it.
6
10
7
11
### 3.2.0
8
12
- Add viewpager2 support with bindingcollectionadapter-viewpager2
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ Easy way to bind collections to listviews and recyclerviews with the new [Androi
5
5
6
6
## Download
7
7
8
- If you are using androidx use version ` 3.2 .0` , this also uses databinding v2
8
+ If you are using androidx use version ` 4.0 .0` , this also uses databinding v2
9
9
10
10
``` groovy
11
- implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:3.2 .0'
12
- implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:3.2 .0'
13
- implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-viewpager2:3.2 .0'
11
+ implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:4.0 .0'
12
+ implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:4.0 .0'
13
+ implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-viewpager2:4.0 .0'
14
14
```
15
15
16
16
or use the previous stable version
@@ -91,6 +91,10 @@ name you passed into the `ItemBinding`.
91
91
</layout >
92
92
```
93
93
94
+ Note: if ` app:itemBinding ` is null, then the adapter will be set to null. This is useful if you
95
+ don't have an ` itemBinding ` right away (ex: need to wait till you load data). If you aren't seeing
96
+ any views, make sure you have ` itemBinding ` defined!
97
+
94
98
## Multiple View Types
95
99
96
100
You can use multiple view types by using ` OnItemBind ` instead. You can still bind
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ buildscript {
8
8
jcenter()
9
9
}
10
10
dependencies {
11
- classpath " com.android.tools.build:gradle:$agp_version "
11
+ classpath " com.android.tools.build:gradle:${ agp_version} "
12
12
classpath ' digital.wup:android-maven-publish:3.6.2'
13
13
classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
14
14
}
Original file line number Diff line number Diff line change 18
18
# org.gradle.parallel=true
19
19
20
20
group =me.tatarka.bindingcollectionadapter2
21
- version =4.0.0-SNAPSHOT
21
+ version =4.0.0
22
22
android.useAndroidX =true
23
23
android.enableJetifier =true
Original file line number Diff line number Diff line change 1
1
distributionBase =GRADLE_USER_HOME
2
2
distributionPath =wrapper/dists
3
- distributionUrl =https\://services.gradle.org/distributions/gradle-5.4 .1-bin.zip
3
+ distributionUrl =https\://services.gradle.org/distributions/gradle-6.2 .1-bin.zip
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
You can’t perform that action at this time.
0 commit comments