Просмотр содержимого AlertDialog в полноэкранном режиме не по центру - PullRequest
0 голосов
/ 22 апреля 2020

Я использую пользовательский стиль, чтобы сделать мой AlertDialog полноэкранный режим следующим образом:

<style name="myFullscreenAlertDialogStyle" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
    <item name="colorAccent">@color/colorAccent</item>

</style>

И вот мое диалоговое окно:

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:orientation="vertical"
    android:padding="16dp">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/cart_dining_table_dialog_recyclerView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

</LinearLayout>

Однако, это выглядит как содержание внутри AlertDialog не заполняется пробелом:

enter image description here

Моя цель - сделать RecyclerView центрированным в диалоге. Буду очень признателен за любую помощь.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...