-1

Hello Can i make like this image with recycle-view layout manger? and this image show what i want to do thank in advance.

Ramesh sambu
  • 3,577
  • 2
  • 24
  • 39

3 Answers3

0

Yes u can ...in recycler_adapter check if position == 0 then make the two cardsview visible and set them... and in else {cardview4 ,cardview5,cardview6 visible and set them and make cardview1 and cardview2 Gone the inflate layout will contain a relative lat yout with two horizontal linearlayouts just hide make the layouts gone and visible at proper position in onBind()

Santanu Sur
  • 10,997
  • 7
  • 33
  • 52
0

Use ReycyleView using GridLayoutManager

manager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
    if (position == 0) {
        return 2; //  Splitting into 2 columns
    } else {
        return 3; // Splitting into 3 columns
    }
}

});

Ramesh sambu
  • 3,577
  • 2
  • 24
  • 39
0

for achieving this view i think GridLayoutManager with it's setSpanSizeLookup() method is the best choice. you can find complete explanation in this answer. In case you face any problem while implementing you can ask.

Raghav Sharma
  • 324
  • 1
  • 7