mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-10-15 12:11:49 +00:00
Created a list view for channel group.
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ class FeedGroupCarouselDecoration(context: Context) : RecyclerView.ItemDecoratio
|
||||
|
||||
outRect.set(marginBetweenItems, marginTopBottom, 0, marginTopBottom)
|
||||
|
||||
if (childAdapterPosition == 0) {
|
||||
if (childAdapterPosition >= 0) {
|
||||
outRect.left = marginStartEnd
|
||||
} else if (childAdapterPosition == childAdapterCount - 1) {
|
||||
outRect.right = marginStartEnd
|
||||
|
||||
@@ -21,7 +21,7 @@ data class FeedGroupCardItem(
|
||||
}
|
||||
}
|
||||
|
||||
override fun getLayout(): Int = R.layout.feed_group_card_item
|
||||
override fun getLayout(): Int = R.layout.feed_group_list_item
|
||||
|
||||
override fun bind(viewBinding: FeedGroupCardItemBinding, position: Int) {
|
||||
viewBinding.title.text = name
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ class FeedGroupCarouselItem(
|
||||
override fun initializeViewBinding(view: View): FeedItemCarouselBinding {
|
||||
val viewHolder = FeedItemCarouselBinding.bind(view)
|
||||
|
||||
linearLayoutManager = LinearLayoutManager(view.context, RecyclerView.HORIZONTAL, false)
|
||||
linearLayoutManager = LinearLayoutManager(view.context, RecyclerView.VERTICAL, false)
|
||||
|
||||
viewHolder.recyclerView.apply {
|
||||
layoutManager = linearLayoutManager
|
||||
|
||||
Reference in New Issue
Block a user