@@ -16,11 +16,12 @@ fun RecyclerView.setRecyclerAdapter(adapter: RecyclerView.Adapter<*>) {
16
16
}
17
17
18
18
19
- @BindingAdapter(value = [" lifecycleOwner" , " data" , " item_layout" , " loading_layout" , " error_layout" , " load_more_layout" , " no_data_layout" , " item_listener" , " error_listener" , " no_data_listener" ], requireAll = false )
19
+ @BindingAdapter(value = [" lifecycleOwner" , " data" , " item_layout" , " loading_layout_count " , " loading_layout" , " error_layout" , " load_more_layout" , " no_data_layout" , " item_listener" , " error_listener" , " no_data_listener" ], requireAll = false )
20
20
fun <T > RecyclerView.setRecyclerAdapter (
21
21
lifecycleOwner : LifecycleOwner ? ,
22
22
data : Resource <List <T >>? ,
23
23
@LayoutRes itemLayout : Int? ,
24
+ loadingLayoutCount : Int? ,
24
25
@LayoutRes loadingLayout : Int? ,
25
26
@LayoutRes errorLayout : Int? ,
26
27
@LayoutRes loadMoreLayout : Int? ,
@@ -33,11 +34,11 @@ fun <T> RecyclerView.setRecyclerAdapter(
33
34
val tempAdapter = UniversalRecyclerAdapter .Builder (
34
35
lifecycleOwner = lifecycleOwner, data = data,
35
36
content = UniversalAdapterViewType .Content (itemLayout, itemListener),
36
- loading = UniversalAdapterViewType .Loading (loadingLayout),
37
+ loading = UniversalAdapterViewType .Loading (loadingLayout,loadingLayoutCount ),
37
38
loadingFooter = UniversalAdapterViewType .LoadingFooter (loadMoreLayout),
38
39
error = UniversalAdapterViewType .Error (errorLayout, errorListener),
39
40
noData = UniversalAdapterViewType .NoData (noDataLayout, noDataListener)
40
41
).build()
41
42
adapter = tempAdapter.getAdapter()
42
43
}
43
- }
44
+ }
0 commit comments