负填充的影响 [英] Effects of Negative padding

查看:75
本文介绍了负填充的影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始学习android,我对负填充有疑问.负填充如何精确地影响视图?

I'm just starting to learn android and i had a question regarding negative padding. How exactly does negative padding affect the view ?

此外,假设我引入了bottomPadding的"-5dp".这是否会将填充的边界扩展5dp?

Also, say I introduce a bottomPadding of "-5dp". Does this extend of the boundary of the padding by 5dp ?

感谢所有帮助! :)

推荐答案

LinearLayoutRelativeLayout中设置负填充后,您会注意到内容向相反方向移动-例如,如果将paddingLeft设置为- 5dp,它将向左移动5dp,而将其设置为5dp将导致内容移动到右侧位置.

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.

这篇关于负填充的影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆