17

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! :)

4

1 回答 1

19

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

于 2013-06-26T06:25:40.100 回答