Я разработал макет диалога настроек здесь:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" android:padding="10dip"
android:weightSum="1" android:gravity="center">
<LinearLayout android:id="@+id/linearLayout1"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_weight="1">
<TextView android:text="Sound Options:"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="wrap_content" android:id="@+id/textView1"
android:layout_height="wrap_content"></TextView>
<LinearLayout android:id="@+id/linearLayout2"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:gravity="center_vertical" android:paddingLeft="5dip">
<TextView android:text="Background Sounds:"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content" android:id="@+id/textView2"
android:layout_height="wrap_content"></TextView>
<ToggleButton android:text="ToggleButton" android:id="@+id/butBackgroundSound"
android:layout_height="wrap_content" android:layout_width="wrap_content"></ToggleButton>
</LinearLayout>
<LinearLayout android:id="@+id/linearLayout3"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:gravity="center_vertical" android:paddingLeft="5dip">
<TextView android:text="Effect Sounds:"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content" android:id="@+id/textView2"
android:layout_height="wrap_content"></TextView>
<ToggleButton android:text="ToggleButton" android:id="@+id/butEffectSound"
android:layout_width="wrap_content" android:layout_height="wrap_content"></ToggleButton>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Это предварительный просмотр этого макета (и он правильный):
![enter image description here](https://i.stack.imgur.com/a53rG.png)
Однако, когда внутри Dialog, это выглядит так:
![enter image description here](https://i.stack.imgur.com/Leqhc.png)
Я не знаю, почему сверху всегда есть пустое место, это происходит во всех моих проектах, тогда диалог полностью разрушен в этом проекте. Пожалуйста, помогите мне.