From d0bb8cd31cf4fe263be8c95dec314fbdf8a9994c Mon Sep 17 00:00:00 2001 From: Keyrillanskiy Date: Wed, 24 Oct 2018 22:33:25 +0300 Subject: [PATCH] Fixed TextureView crash with setBackgroundDrawable (#297) solution from here - https://stackoverflow.com/a/47796036 --- cameraview/src/main/res/layout/cameraview_texture_view.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cameraview/src/main/res/layout/cameraview_texture_view.xml b/cameraview/src/main/res/layout/cameraview_texture_view.xml index a5c15ff2c..00b72f540 100644 --- a/cameraview/src/main/res/layout/cameraview_texture_view.xml +++ b/cameraview/src/main/res/layout/cameraview_texture_view.xml @@ -4,5 +4,6 @@ android:id="@+id/texture_view" android:layout_width="match_parent" android:layout_height="match_parent" - android:gravity="center" - android:layout_gravity="center" /> \ No newline at end of file + android:layout_gravity="center" + android:background="@null" + android:gravity="center" /> \ No newline at end of file