Android 如何安排按钮之间没有空格?

Android 如何安排按钮之间没有空格?,android,Android,我有按钮,但它们之间有空间吗?有没有清理空间的办法?谢谢 为XML中的按钮添加样式 style="?android:attr/borderlessButtonStyle" 及 它需要API级别21或更高 例如 <Button android:id="@+id/btn_send" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Send" style="?andro

我有按钮,但它们之间有空间吗?有没有清理空间的办法?谢谢


为XML中的按钮添加样式

style="?android:attr/borderlessButtonStyle"

它需要API级别21或更高

例如

<Button
android:id="@+id/btn_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Send"
style="?android:attr/borderlessButtonStyle"
android:stateListAnimator="@null" />

您需要将边距和填充设置为0。 但是我们真的需要看看你的代码来帮助你

<Button
android:id="@+id/mybutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:padding="0dp" />


请发布您迄今为止尝试的内容请共享您的代码共享您的XML代码!谢谢您的回答,但此选项仅适用于TextView。谢谢!这不是一个明显的选择。并且不立即了解如何配置。在你的帮助下,一切顺利。
<Button
android:id="@+id/mybutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:padding="0dp" />