Skip to content

Commit

Permalink
change provideronViewHolderCreated()
Browse files Browse the repository at this point in the history
  • Loading branch information
limuyang committed Jan 7, 2020
1 parent c23d347 commit 29ca621
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ abstract class BaseProviderMultiAdapter<T>(data: MutableList<T>? = null) :
checkNotNull(provider) { "ViewType: $viewType no such provider found,please use addItemProvider() first!" }
provider.context = parent.context
return provider.onCreateViewHolder(parent, viewType).apply {
provider.onViewHolderCreated(this)
provider.onViewHolderCreated(this, viewType)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ abstract class BaseItemProvider<T> {
* (可选重写)ViewHolder创建完毕以后的回掉方法。
* @param viewHolder VH
*/
open fun onViewHolderCreated(viewHolder: BaseViewHolder) {}
open fun onViewHolderCreated(viewHolder: BaseViewHolder, viewType: Int) {}

/**
* item 若想实现条目点击事件则重写该方法
Expand Down

0 comments on commit 29ca621

Please sign in to comment.