Why does onResume() seem to be called twice?

后端 未结 2 659
暗喜
暗喜 2021-01-12 02:02

I have my Activity class here:

public class CameraActivity extends Activity {

private Camera mCamera;
private CameraPreview mPreview;

public void onCreate(         


        
2条回答
  •  佛祖请我去吃肉
    2021-01-12 02:39

    I have found out that this- Where is this toast coming from? causes the camera preview to refresh again.

    It is the ES File Explorer app that generates an "Internal Storage Space left" toast which, I guess pauses the Camera preview for a brief moment and the onResume() has to be called again. Disabling that toast message no longer causes the pause and refresh on the Preview.

    Thanks everyone for helping. :)

提交回复
热议问题