1

I want to implement the below image in android ,

I have used Relative Layout to display content and Recycler view to display comments but I want both under one scroll while my problem is recycler view is creating another scroll.

I also thought to add a layout dynamically but in that every layout I have to implement click listener for every child , which is not good for performance

What could be the best way to implement it

Image for reference

Naga
  • 1,931
  • 4
  • 25
  • 42
  • 1
    You can make a `ListView` and add Image as a `header` or include it in a row – hrskrs May 12 '15 at 14:20
  • Will implement and will let you know , Your idea looks cool thanks for pointing me into right direction – Naga May 12 '15 at 14:27

2 Answers2

1

You can make a ListView where row contains Comments part and add Image as a Header of that ListView.

The other way is to create a Custom Adapter and include Image and Comments as a single row of a ListView

For implementing a click event on each item you can refer to this answer

Community
  • 1
  • 1
hrskrs
  • 4,447
  • 5
  • 38
  • 52
0

Why don't you use a ListView with custom elements in it (that look like the comments on the picture) instead of the RecyclerView

Gabriella Angelova
  • 2,985
  • 1
  • 17
  • 30