jjzjj

BottomSheetDialogFragment

全部标签

android - BottomSheetDialogFragment 内部的 RecyclerView (wrap_content)

我在这里遇到了一个棘手的情况,我不知道如何解决这个问题。在我的项目中,我有一个自定义的BottomSheetDialogFragment,在布局中有一个FrameLayout来添加或替换Fragment。现在我有一个Fragment并且在里面我有一个RecyclerView和height:="wrap_content"因为我想要BottomSheetDialogFragment只使用必要的空间。一切看起来都很好,当我将另一个View放入同一布局并将RecyclerView设置在该View的下方或上方时,问题就出现了。RecyclerView会忽略其他View(或多个View)的大小,并

android - 键盘隐藏 BottomSheetDialogFragment

键盘下方还有更多字段。这发生在我更新支持库时。我知道它是Kotlin,但它看起来和java几乎一样。我该如何解决这个问题?这就是它的样子:我的代码:classProjectsEditBottomSheetFragment(valprivateID:String,valpublicID:String):BottomSheetDialogFragment(){privatevalmBottomSheetBehaviorCallback=object:BottomSheetBehavior.BottomSheetCallback(){overridefunonStateChanged(bot

android - 键盘隐藏 BottomSheetDialogFragment

键盘下方还有更多字段。这发生在我更新支持库时。我知道它是Kotlin,但它看起来和java几乎一样。我该如何解决这个问题?这就是它的样子:我的代码:classProjectsEditBottomSheetFragment(valprivateID:String,valpublicID:String):BottomSheetDialogFragment(){privatevalmBottomSheetBehaviorCallback=object:BottomSheetBehavior.BottomSheetCallback(){overridefunonStateChanged(bot

android - 将 BottomSheetDialogFragment 的状态设置为展开

如何使用Android支持设计库(v23.2.1)使用BottomSheetBehavior#setState(STATE_EXPANDED)将扩展BottomSheetDialogFragment的fragment的状态设置为展开?https://code.google.com/p/android/issues/detail?id=202396说:BottomsheetsaresettoSTATE_COLLAPSEDatfirst.CallBottomSheetBehavior#setState(STATE_EXPANDED)ifyouwanttoexpandit.Notethaty

android - 将 BottomSheetDialogFragment 的状态设置为展开

如何使用Android支持设计库(v23.2.1)使用BottomSheetBehavior#setState(STATE_EXPANDED)将扩展BottomSheetDialogFragment的fragment的状态设置为展开?https://code.google.com/p/android/issues/detail?id=202396说:BottomsheetsaresettoSTATE_COLLAPSEDatfirst.CallBottomSheetBehavior#setState(STATE_EXPANDED)ifyouwanttoexpandit.Notethaty

android - BottomSheetDialogFragment - 听用户事件解除

如何收听BottomSheetDialogFragment的最终解除?我只想在最终解雇时保存用户更改...我尝试了以下操作:方法一只有在通过向下滑动对话框(不是在后按或触摸外部)关闭对话框时才会触发@OverridepublicDialogonCreateDialog(BundlesavedInstanceState){Dialogd=super.onCreateDialog(savedInstanceState);d.setOnShowListener(newDialogInterface.OnShowListener(){@OverridepublicvoidonShow(Dial

java - Android BottomSheetDialogFragment 没有完全展开

我有以下测试BottomSheet实现。当我将peekHeight设置为小于500的值时,它可以工作。在某个值之后,窥视高度的任何增加都不会改变BottomSheet的扩展方式。它只是保留在那里仅手动拖动。我们如何以编程方式设置peekHeight以确保BottomSheet自动展开到peek高度。bottom_sheet_dialog_mainJava代码publicclassMyBottomSheetDialogFragmentextendsBottomSheetDialogFragment{privatestaticBottomSheetBehaviorbottomSheetBe

android - 防止在外部触摸时解除 BottomSheetDialogFragment

我已经实现了一个BottomSheet对话框,并且我想防止当用户在查看时(未完全展开状态)触摸BottomSheet之外时关闭BottomSheet。我在代码中设置了dialog.setCanceledOnTouchOutside(false);但似乎没有任何影响。这是我的BottomSheetDialogFragment类:publicclassShoppingCartBottomSheetFragmentextendsBottomSheetDialogFragment{privateBottomSheetBehavior.BottomSheetCallbackmBottomShee

android - 防止 BottomSheetDialogFragment 覆盖导航栏

我正在使用非常幼稚的代码来显示BottomSheet对话框fragment:classLogoutBottomSheetFragment:BottomSheetDialogFragment(){overridefunonCreateView(inflater:LayoutInflater,container:ViewGroup?,savedInstanceState:Bundle?):View?{valview=inflater.inflate(R.layout.view_image_source_chooser,container,false)returnview}}这就是我调用这个

android - BottomSheetDialogFragment 的圆角

我有一个自定义BttomSheetDialogFragment,我想在底部View顶部有圆角这是我的自定义类,它扩展了我想从底部显示的布局ViewmView;@OverridepublicViewonCreateView(LayoutInflaterinflater,ViewGroupcontainer,BundlesavedInstanceState){mView=inflater.inflate(R.layout.charge_layout,container,false);initChargeLayoutViews();returnmView;}我还有这个XML资源文件作为背景: