问题
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! :)
回答1:
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.
来源:https://stackoverflow.com/questions/17312875/effects-of-negative-padding