Reset state on paused to prevent layout glitches

This commit is contained in:
Sylvia van Os
2020-01-19 19:07:06 +01:00
parent 2c12c312e3
commit 4a7e8b6eba
2 changed files with 21 additions and 0 deletions

View File

@@ -145,6 +145,12 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
Log.i(TAG, "To view card: " + loyaltyCardId);
if(barcodeIsFullscreen)
{
// Properly reset state to prevent any issues
recreate();
}
// The brightness value is on a scale from [0, ..., 1], where
// '1' is the brightest. We attempt to maximize the brightness
// to help barcode readers scan the barcode.