google / cameraview

[DEPRECATED] Easily integrate Camera features into your Android app
Apache License 2.0
4.74k stars 1.03k forks source link

Why TextureView is created as preview view when api level >= 24 ? #233

Open Sejen27 opened 6 years ago

Sejen27 commented 6 years ago
    private PreviewImpl createPreviewImpl(Context context) {
        PreviewImpl preview;
        if (Build.VERSION.SDK_INT < 14) {
            preview = new SurfaceViewPreview(context, this);
        } else {
            preview = new TextureViewPreview(context, this);
        }
        return preview;
    }
API Level Camera API Preview View
9-13 Camera1 SurfaceView
14-20 Camera1 TextureView
21-23 Camera2 TextureView
24 Camera2 SurfaceView
DiFilosofa commented 6 years ago

same problem here, crash on 8.0 android because of using TexttureView TextureView doesn't support displaying a background drawable

gigadeplex commented 6 years ago

any answer to this yet?