Skip to content

Commit a925c85

Browse files
committed
fix camera error not showing
1 parent 9b30b8b commit a925c85

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

ui/src/main/java/io/snabble/sdk/ui/scanner/BarcodeScannerView.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ private void init() {
130130
ViewGroup.LayoutParams.MATCH_PARENT));
131131
addView(scanIndicatorView);
132132

133+
splashView = new FrameLayout(getContext());
134+
splashView.setLayoutParams(new ViewGroup.LayoutParams(
135+
ViewGroup.LayoutParams.MATCH_PARENT,
136+
ViewGroup.LayoutParams.MATCH_PARENT));
137+
splashView.setBackgroundColor(ResourcesCompat.getColor(getResources(),
138+
R.color.snabble_backgroundColorDark, null));
139+
addView(splashView);
140+
133141
cameraUnavailableView = new TextView(getContext());
134142
cameraUnavailableView.setLayoutParams(new ViewGroup.LayoutParams(
135143
ViewGroup.LayoutParams.MATCH_PARENT,
@@ -141,14 +149,6 @@ private void init() {
141149
cameraUnavailableView.setVisibility(View.GONE);
142150
addView(cameraUnavailableView);
143151

144-
splashView = new FrameLayout(getContext());
145-
splashView.setLayoutParams(new ViewGroup.LayoutParams(
146-
ViewGroup.LayoutParams.MATCH_PARENT,
147-
ViewGroup.LayoutParams.MATCH_PARENT));
148-
splashView.setBackgroundColor(ResourcesCompat.getColor(getResources(),
149-
R.color.snabble_backgroundColorDark, null));
150-
addView(splashView);
151-
152152
textureView.setSurfaceTextureListener(this);
153153
}
154154

0 commit comments

Comments
 (0)