File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
universal_adapter/src/main/java/com/yogeshpaliyal/universal_adapter/extensions Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ import java.util.*
12
12
13
13
@BindingAdapter(" recycler_adapter" )
14
14
fun RecyclerView.setRecyclerAdapter (adapter : RecyclerView .Adapter <* >) {
15
- this .adapter = adapter
15
+ if (this .adapter != adapter)
16
+ this .adapter = adapter
16
17
}
17
18
18
19
@@ -34,7 +35,7 @@ fun <T> RecyclerView.setRecyclerAdapter(
34
35
val tempAdapter = UniversalRecyclerAdapter .Builder (
35
36
lifecycleOwner = lifecycleOwner, data = data,
36
37
content = UniversalAdapterViewType .Content (itemLayout, itemListener),
37
- loading = UniversalAdapterViewType .Loading (loadingLayout,loadingLayoutCount),
38
+ loading = UniversalAdapterViewType .Loading (loadingLayout,loadingLayoutCount? : 5 ),
38
39
loadingFooter = UniversalAdapterViewType .LoadingFooter (loadMoreLayout),
39
40
error = UniversalAdapterViewType .Error (errorLayout, errorListener),
40
41
noData = UniversalAdapterViewType .NoData (noDataLayout, noDataListener)
You can’t perform that action at this time.
0 commit comments