删除按钮填充

时间:2017-11-04 16:20:07

标签: android android-layout user-interface android-studio button

我想设计以下内容:

https://i.stack.imgur.com/DIo1U.png

所以基本上我想要一个带有非常小填充的方形按钮。但是,我得到的是:

https://i.stack.imgur.com/16bib.png

' +'标志不再居中,我发现如果我增加高度或减少字体大小,' +'再次签署中心。但这并不是我所寻找的,我正在寻找一种方法来减少该按钮的填充,以使“' +'标志更大。

源代码:

<Button
    android:id="@+id/eenCentMin"
    android:layout_width="30dp"
    android:layout_height="30dp"
    android:layout_gravity="center_vertical"
    android:layout_marginRight="5dp"
    android:background="@drawable/button_geld_tellen"
    android:onClick="onButtonGeldTellenClick"
    android:text="+"
    android:textColor="@color/geldTellenTextColor"
    android:textSize="30sp"
    android:textStyle="bold"/>

有关如何实现这一目标的任何建议?

1 个答案:

答案 0 :(得分:0)

请尝试这个ans ..............     使用文本对齐将文本设为中心

DayForecast
相关问题