0

I want to show the date dynamically in the header of the RecyclerView and group the items of that date inside it.

My data class looks something like this


data class Feed(
    val id: String = "",
    val title: String = "",
    val createdAt: Long = 0L,
) 

And I have to create a view something like this

enter image description here

Will any of you please help me with this? I'm trying to solve it for the last 2 days. But not able to figure out how exactly I get this one?

Thanks in Advance!!

5
  • You can handle with view type Commented Jul 21, 2022 at 17:43
  • Are you using room data base just want more context Commented Jul 21, 2022 at 17:44
  • I dont understand the question... do you need to know how to create a recycler view with differents viewholders? Commented Jul 21, 2022 at 20:33
  • Yes, I'm using room db Commented Jul 22, 2022 at 1:37
  • I know I have to use with ViewType but how to group and positioning will be done Commented Jul 22, 2022 at 1:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.