Reputation: 2710
I'm just starting to learn android and i had a question regarding negative padding. How exactly does negative padding affect the view ?
Also, say I introduce a bottomPadding
of "-5dp". Does this extend of the boundary of the padding by 5dp ?
All help appreciated! :)
Upvotes: 17
Views: 12906
Reputation: 6867
In LinearLayout
and RelativeLayout
after setting negative padding you will notice movement of the content into opposite direction - for example if you set paddingLeft
to -5dp, it will be moved to the left side by 5dp, whereas setting it to 5dp would cause content to be moved into right position.
Upvotes: 19