Effects of Negative padding

我与影子孤独终老i 提交于 2019-12-12 08:23:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!