Android: how to make it no space between 2 button in a horizontal linearlayout

前端 未结 6 1147
情书的邮戳
情书的邮戳 2021-01-01 16:32

I just found I cannot remove the space between 2 buttons even if I set the layout_marginRight and layout_marginLeft as below. But it make sense if

6条回答
  •  [愿得一人]
    2021-01-01 16:55

    You will have to set android:layout_marginRight="0dip" and you will have to remove the padding with android:paddingRight="0dip" for the other button this has to be changed to the left values. I guess you forgot that every android element has generally a padding added to it by default. This is generally a good idea, but if you want to remove it, this is the way.

提交回复
热议问题