view设置了gone,但是他的margin还在,应该怎么设置才能让他的margin的效果也消失?padding不考虑,大神们教教我
光阴似箭催人老,日月如移越少年。
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.
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.