android - view设置了gone,但是他的margin还在,应该怎么设置才能让他的margin的效果也消失?
大家讲道理
大家讲道理 2017-04-17 15:35:49
0
4
707

view设置了gone,但是他的margin还在,应该怎么设置才能让他的margin的效果也消失?padding不考虑,大神们教教我

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(4)
小葫芦

I don’t know how to write your layout, but if it doesn’t work, you can consider wrapping it with a viewgroup, and just set attributes to the viewgroup

洪涛

What the original poster means is to set the margin of the second view to disappear. I also want to know. Can anyone give an answer?

伊谢尔伦

I think the questioner must have made a mistake, the view is gone and the margin is not there

These are two views, both with 100dp margin

After I set the first one as gone

Obviously the margin of the first view is also gone.

The margin you are talking about is definitely not the margin of the view set to gone

左手右手慢动作

How is your layout file written? After the view is gone, no margin or padding will remain.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template