File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
ui/src/main/java/io/snabble/sdk/ui/scanner Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -384,14 +384,19 @@ private void chooseFocusMode(Camera.Parameters parameters) {
384384 }
385385 }
386386
387- private void showError (boolean show ) {
388- if (show ) {
389- cameraUnavailableView .setVisibility (View .VISIBLE );
390- scanIndicatorView .setVisibility (View .GONE );
391- } else {
392- cameraUnavailableView .setVisibility (View .GONE );
393- scanIndicatorView .setVisibility (View .VISIBLE );
394- }
387+ private void showError (final boolean show ) {
388+ mainThreadHandler .post (new Runnable () {
389+ @ Override
390+ public void run () {
391+ if (show ) {
392+ cameraUnavailableView .setVisibility (View .VISIBLE );
393+ scanIndicatorView .setVisibility (View .GONE );
394+ } else {
395+ cameraUnavailableView .setVisibility (View .GONE );
396+ scanIndicatorView .setVisibility (View .VISIBLE );
397+ }
398+ }
399+ });
395400 }
396401
397402 /**
You can’t perform that action at this time.
0 commit comments