Skip to content

Commit

Permalink
Fix blurry barcode in edit view
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastProject committed Jan 18, 2021
1 parent 184af4d commit c11e995
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ android {
applicationId "me.hackerchick.catima"
minSdkVersion 19
targetSdkVersion 29
versionCode 54
versionName "1.6.2"
versionCode 55
versionName "1.7.0"

vectorDrawables.useSupportLibrary true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -766,9 +766,15 @@ private void showPart(String part) {
if (getString(R.string.card).equals(part)) {
cardPart.setVisibility(View.VISIBLE);
barcodePart.setVisibility(View.GONE);

// Explicitly hide barcode (fixes blurriness on redraw)
hideBarcode();
} else if (getString(R.string.barcode).equals(part)) {
cardPart.setVisibility(View.GONE);
barcodePart.setVisibility(View.VISIBLE);

// Redraw barcode due to size change (Visibility.GONE sets it to 0)
generateBarcode(cardIdFieldView.getText().toString(), BarcodeFormat.valueOf(barcodeTypeField.getText().toString()));
} else {
throw new UnsupportedOperationException();
}
Expand Down

0 comments on commit c11e995

Please sign in to comment.