Alfonso Briceño
Alfonso Briceño

Reputation: 119

Align item outside of List with items inside the List

Image example

I got the following recycler view, on the view item there are 5 checkboxes. How could I align the checkboxes inside the recycler view items with the TextView dates on the fragment..?

I tried using the same padding, but different dates got different sizes, as well as phones, so it doesnt display a correct alignment on all instances.. Is there a better way? I would appreciate any kind of indication, this is the last problem so I can publish the application.

Upvotes: 0

Views: 73

Answers (1)

Hasanuzzaman Mamun
Hasanuzzaman Mamun

Reputation: 166

You can achieve this in a simple way. Take all the textViews of your fragment inside a linear layout group. And keep the layout_weight similar. Thus the textViews will be equidistant.

Similarly, take the checkboxes in a LinearLayout view group. And keep the layout_weight similar. Thus the textViews will be equidistant.

Ps- check the padding and margin of the items, and adjust accordingly.

Upvotes: 1

Related Questions