android 相机预览问题
PHPz
PHPz 2017-04-17 16:57:46
0
1
338

目前在做一个相机功能,现在有个问题就是按了拍照按钮,然后界面就会停止预览,然后按了Home键,再次启动应用程序时,相机会恢复预览界面,而不是定住,请问有什么方法可以解决么?

PHPz
PHPz

学习是最好的投资!

reply all (1)
阿神

Activity life cycle problem. After pressing the Home button, your photo interface will be destroyed. After reopening, the life cycle method will be repeated, which will cause the phenomenon you see that you return to the preview interface. I don’t know what your needs are that would make you want to freeze that interface, but since you have pressed the photo button, you will get the image at the moment when you took the photo. You can save the image, and you can check whether it was saved when you come back. If there is an image, the image will be displayed. If not, open the preview. I don’t know if this idea can meet your needs.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!