JessYanCoding / InsGallery

📸 Instagram-like image picker for Android (一款 UI 炫酷高仿 Instagram 的图片、视频选择器)
Apache License 2.0
664 stars 126 forks source link

Updated camerax #20

Closed tallot13 closed 4 years ago

tallot13 commented 4 years ago

fixed https://github.com/JessYanCoding/InsGallery/issues/15 fixed without access in black layout in cameraview

There is no need to explicitly call CameraX.unbindAll() , since the UseCase is bound to a lifecycle and resources will be automatically freed when the lifecycle reaches the destroyed state. Also, Activity has no onDestroyView method, which is instead owned by Fragments. By the way, for Fragments the proper lifecycle to bind the UseCases to would be the viewLifecycleOwner ‘s lifecycle.

osama-alshanti commented 3 years ago

same issue,, not getting clear solution

osama-alshanti commented 3 years ago

After changing camerax_version & camerax_view like this it's working ..

        camerax_view                  : "1.0.0-alpha10",
        camerax_version               : "1.0.0-beta03",
HaXxanParhar commented 3 years ago

After changing the camerax_version & camerax_view to @osama-alshanti mentioned versions, I'm having the following errors: output_camerax

The @osama-alshanti mentioned versions take the File but the original library's versions take ImageCapture.OutputFileOptions. As for the library, I cloned it 2 days ago and using it directly in my existing app. I also added the 'ucrop' & 'picture_library' as modules. I'm updating the versions in the module gradle of 'picture_library'.

osama-alshanti commented 3 years ago

try @HaXxanParhar use like this mCameraView.takePicture(imageOutFile, ContextCompat.getMainExecutor(getContext()),