5
我无法让按钮的高度变小。这里是我在我的XML中有:Android - 按钮高度不变
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/button_small_left"
style="?android:attr/buttonStyleSmall"
android:layout_height="10px"
android:height="10px"
android:minHeight="10px"
android:maxHeight="10px"
android:padding="0px"
android:textSize="6dip"
android:text="asd"
/>
在此之后,按钮仍然显示与一个大的顶部和底部填充。文字出现在中间。该按钮在相对布局中使用。
添加'android:layout_height =“10px”'应该在做这个工作。它在我身边工作得很好。你在做什么操作系统...? – SamSPICA
从你的XML代码,它的工作也适合我。你忘了layout_width:“”还是不需要你? – user370305
您是否尝试过使用不同背景颜色对您的元素进行着色,以确保它是导致故障而不是布局的按钮元素? – Drejc