|
|
@ -21,7 +21,7 @@ class TextureCameraPreview extends CameraPreview<TextureView, SurfaceTexture> { |
|
|
|
@NonNull |
|
|
|
@NonNull |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected TextureView onCreateView(Context context, ViewGroup parent) { |
|
|
|
protected TextureView onCreateView(Context context, ViewGroup parent) { |
|
|
|
View root = LayoutInflater.from(context).inflate(R.layout.texture_view, parent, false); |
|
|
|
View root = LayoutInflater.from(context).inflate(R.layout.cameraview_texture_view, parent, false); |
|
|
|
parent.addView(root, 0); |
|
|
|
parent.addView(root, 0); |
|
|
|
TextureView texture = root.findViewById(R.id.texture_view); |
|
|
|
TextureView texture = root.findViewById(R.id.texture_view); |
|
|
|
texture.setSurfaceTextureListener(new TextureView.SurfaceTextureListener() { |
|
|
|
texture.setSurfaceTextureListener(new TextureView.SurfaceTextureListener() { |
|
|
|