【发布时间】:2020-11-23 03:05:49
【问题描述】:
我创建了BottomSheetDialogFragment 并访问了我的片段,但它没有完全打开,它只显示底部的小条,如下所示
我正在使用默认的BottomSheetDialogFragment 文件而不做任何更改。
xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingTop="@dimen/list_item_spacing_half"
android:paddingBottom="@dimen/list_item_spacing_half"
tools:context=".ui.SettingFragment"
tools:listitem="@layout/fragment_setting_list_dialog_item" />
显示调用函数
val addBottomDialogFragment: SettingFragment = SettingFragment.newInstance(10)
addBottomDialogFragment.show(supportFragmentManager, "tag")
【问题讨论】:
标签: android kotlin android-fragments android-dialogfragment