Skip to content

Commit

Permalink
change provideronCreateViewHolder()
Browse files Browse the repository at this point in the history
  • Loading branch information
limuyang committed Jan 7, 2020
1 parent 860ff5a commit c23d347
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 @@ -44,7 +44,7 @@ abstract class BaseProviderMultiAdapter<T>(data: MutableList<T>? = null) :
val provider = getItemProvider(viewType)
checkNotNull(provider) { "ViewType: $viewType no such provider found,please use addItemProvider() first!" }
provider.context = parent.context
return provider.onCreateViewHolder(parent).apply {
return provider.onCreateViewHolder(parent, viewType).apply {
provider.onViewHolderCreated(this)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ abstract class BaseItemProvider<T> {
*
* @param parent
*/
open fun onCreateViewHolder(parent: ViewGroup): BaseViewHolder {
open fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
return BaseViewHolder(parent.getItemView(layoutId))
}

Expand Down

0 comments on commit c23d347

Please sign in to comment.