-1

I want to add custom grid divider to RecyclerView , I have no idea please suggest some idea. For first row divider should start from beginning and for others it should be centered.

enter image description here

Gowtham Subramaniam
  • 3,358
  • 2
  • 19
  • 31
Shanmugam
  • 301
  • 1
  • 10

1 Answers1

0

For your solution we need to access middle column sequence 1,4,7,10... to get that

if (i % 3 == 1) {
  System.out.print(i);
} 

from this you'll get position and by that change/ add padding to line

Hemanth S
  • 669
  • 6
  • 16