You cannot mirror a
TextureView with my mirroring code.
I do not have idea how to send preview from Activity to PresentationFragment
Do not have a preview in the activity. Have a preview in the
PresentationFragment, by putting the
TextureView there, and having the Camera2 API send its preview frames there.
If you want the preview in both the activity and the
PresentationFragment… it might be possible to have the Camera2 API send preview frames to two surfaces, though that may get tricky if the aspect ratios are not the same.
If you want the preview in either the activity or the
PresentationFragment, but not both at once, then have a surface in each, and tell the Camera2 API which to use, when you want to switch from one surface to the other.