Show DialogFragment from onActivityResult

前端 未结 17 1244
傲寒
傲寒 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:07

    It's an old question but I've solved by the simplest way, I think:

    getActivity().runOnUiThread(new Runnable() {
        @Override
            public void run() {
                MsgUtils.toast(getString(R.string.msg_img_saved),
                        getActivity().getApplicationContext());
            }
        });
    

提交回复
热议问题