У меня проблема с макетом android. Для AlerDialog я построил пользовательский вид: Android - макет вес заполняет весь экран
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="20dp"
android:text="@string/new_game"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/random"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchColumns="1">
<TableRow>
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/players2"
android:textColor="@color/secondary_text" />
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/players4"
android:textColor="@color/secondary_text" />
</TableRow>
<TableRow>
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/players6"
android:textColor="@color/secondary_text" />
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/players8"
android:textColor="@color/secondary_text" />
</TableRow>
</TableLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/friends"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchColumns="1">
<TableRow>
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/players2"
android:textColor="@color/secondary_text" />
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/players4"
android:textColor="@color/secondary_text" />
</TableRow>
<TableRow>
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/players6"
android:textColor="@color/secondary_text" />
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/players8"
android:textColor="@color/secondary_text" />
</TableRow>
</TableLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/more"
android:textAppearance="?android:attr/textAppearanceMedium" />
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/computer"
android:textColor="@color/secondary_text" />
К сожалению, результаты TableLayout в диалоге, который заполняет весь экран. Поэтому я не хочу использовать неиспользуемое пространство. Вот пример: http://i.stack.imgur.com/unc9g.png
У вас есть идея, что мне нужно изменить, чтобы получить неиспользуемое пространство?
Благодаря