Show DialogFragment from another DialogFragment

前端 未结 9 722
春和景丽
春和景丽 2021-02-05 10:33

I have a DialogFragment that displays a list of options to the user, one of these options is \"Delete\" option, when the user presses the delete option I want to sh

9条回答
  •  醉梦人生
    2021-02-05 11:03

    If you want the kotlin version use this:

    val newDialogFragment = NewDialogFragment()
    val transaction: FragmentTransaction = 
    requireActivity().supportFragmentManager.beginTransaction()
    newDialogFragment.show(transaction, "New_Dialog_Fragment")
    

提交回复
热议问题