如何從我的按鈕中刪除這些邊距?Android/Java - Margin on left/right/bottom
https://i.stack.imgur.com/UBPhR.png
我希望能有100%的寬度按鈕:/
我的活動的xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="0dp"
tools:context="${relativePackage}.${activityClass}" >
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="34dp"
android:backgroundTint="#1379ff" />
<Button
android:id="@+id/Button01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:backgroundTint="#313131" />
android:layout_alignParentLeft="true"
android:layout_weight="1"
android:text="Button" />
發佈您的代碼? – Keerthivasan
在您的佈局中,您可能指定了默認邊距刪除它們 – sumit
您可以請張貼您的xml也 –