cameraview
cameraview copied to clipboard
Why TextureView is created as preview view when api level >= 24 ?
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 |
same problem here, crash on 8.0 android because of using TexttureView
TextureView doesn't support displaying a background drawable
any answer to this yet?