Show DialogFragment from onActivityResult

前端 未结 17 1230
傲寒
傲寒 2020-12-04 06:47

I have the following code in my onActivityResult for a fragment of mine:

onActivityResult(int requestCode, int resultCode, Intent data){
   //other code
   P         


        
17条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 07:14

    I got this error while doing .show(getSupportFragmentManager(), "MyDialog"); in activity.

    Try .show(getSupportFragmentManager().beginTransaction(), "MyDialog"); first.

    If still not working, this post (Show DialogFragment from onActivityResult) helps me to solve the issue.

提交回复
热议问题