Coming back from Camera Intent crashes Activity

后端 未结 3 1107
广开言路
广开言路 2021-01-25 06:54

I have an Activity that launches a Camera Intent like this (nothing special):

    Intent intent = new Intent(\"android.media.action.IMAGE_CAPTURE\");
    File ph         


        
3条回答
  •  既然无缘
    2021-01-25 07:26

    You need to override the onSaveInstanceState method to persist the settings of your activity before fit rotates. Then, in the onCreate method, you can check to see if the Bundle argument is null. If not, then you are recreating your activity and should load the saved settings from it.

提交回复
热议问题