mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 15:23:00 +00:00 
			
		
		
		
	Use BindableItem in EmptyPlaceholderItem.
This commit is contained in:
		| @@ -1,11 +1,13 @@ | |||||||
| package org.schabi.newpipe.local.subscription.item | package org.schabi.newpipe.local.subscription.item | ||||||
|  |  | ||||||
| import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder | import android.view.View | ||||||
| import com.xwray.groupie.kotlinandroidextensions.Item | import com.xwray.groupie.viewbinding.BindableItem | ||||||
| import org.schabi.newpipe.R | import org.schabi.newpipe.R | ||||||
|  | import org.schabi.newpipe.databinding.ListEmptyViewBinding | ||||||
|  |  | ||||||
| class EmptyPlaceholderItem : Item() { | class EmptyPlaceholderItem : BindableItem<ListEmptyViewBinding>() { | ||||||
|     override fun getLayout(): Int = R.layout.list_empty_view |     override fun getLayout(): Int = R.layout.list_empty_view | ||||||
|     override fun bind(viewHolder: GroupieViewHolder, position: Int) {} |     override fun bind(viewBinding: ListEmptyViewBinding, position: Int) {} | ||||||
|     override fun getSpanSize(spanCount: Int, position: Int): Int = spanCount |     override fun getSpanSize(spanCount: Int, position: Int): Int = spanCount | ||||||
|  |     override fun initializeViewBinding(view: View) = ListEmptyViewBinding.bind(view) | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Isira Seneviratne
					Isira Seneviratne