android - 如何在Android中实现屏幕底部的自定义对话框

标签 android android-alertdialog android-dialogfragment android-popupwindow

如下图所示,我选择哪个组件来实现底部的自定义对话框?我应该选择 alertdialogpopupwindow 还是 fragmentdialog

dialogAtBottom

最佳答案

试试这个

BottomSheetDialog dialog = new BottomSheetDialog(YourActivity.this);
dialog.setContentView(YourView);

dialog.show();

关于android - 如何在Android中实现屏幕底部的自定义对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42315136/

相关文章:

android - EditTextPreference 单行

Android - 无法使用 traceview

android - 如何在不从 FragmentManager 中删除 DialogFragment 的情况下关闭它

android - 如何将数组列表数据从一个对话框 fragment 传递到另一个对话框 fragment ?

Android - getActivity() 从 dialogFragment 返回 null

android - 多个dex文件定义Landroid/support/design/widget/CoordinatorLayout$1;

android - 如何在 Kotlin 的抽屉导航 Activity 中添加 OnFragmentInteractionListener?

android - 如何在 Android 上获得多行警报标题

java - listView setItemChecked 不工作

android - 具有返回值的函数中的 AlertDialog