Show DialogFragment from onActivityResult

前端 未结 17 1243
傲寒
傲寒 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 06:57

    As you all know this problem is because of on onActivityResult() is calling before onstart(),so just call onstart() at start in onActivityResult() like i have done in this code

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          onStart();
          //write you code here
    }
    

提交回复
热议问题