Ich erstelle einen benutzerdefinierten Dialog, aber nicht alle Schaltflächen passen gut. Ich weiß nicht, warum passiert, auf Vorschau in Android Studio ist gut aussehen, aber im Telefon ist nicht gut aussehen.Java android benutzerdefinierte Dialogfeld Schaltfläche passt nicht
Das ist mein Layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Wybierz grupę:"
android:textColor="#000000"
/>
<Spinner
android:id="@+id/fd_valSp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/text"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="20dp" />
<LinearLayout
android:layout_below="@+id/fd_valSp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button android:id="@+id/cancel_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cancel" />
<Button android:id="@+id/add_group_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/add_new_group"
/>
<Button android:id="@+id/add"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/add"
/>
</LinearLayout>
</RelativeLayout>