Android的按键我有以下布局有左,右页边距
<?xml version="1.0" encoding="utf-8"?>
<Button
android:id="@+id/sign_in"
style="@style/ButtonText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/custom_button_green"
android:text="@string/signin_via_email"
android:textSize="15sp"
android:typeface="sans" />
现在按钮我真的不想要适应整个宽度,而我需要的边距从左边10dp和右边10dp。我已经设置了填充和layout_marginLeft和右侧的属性,但他们不工作。任何帮助?
亲切的问候
你可以发布你的ButtonText样式代码吗? –
'android:layout_width =“wrap_content”'并相应地指定边距。 – neevek