Created a list view for channel group.
This commit is contained in:
parent
29e56b9f2d
commit
78547b4fa4
4 changed files with 46 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue