Lint fixes

This commit is contained in:
Sylvia van Os
2020-12-01 19:54:28 +01:00
parent 4366eab380
commit 13ea10d0b0
3 changed files with 5 additions and 15 deletions

View File

@@ -191,14 +191,7 @@ public class BarcodeSelectorActivity extends AppCompatActivity
public void onGlobalLayout()
{
Log.d(TAG, "Global layout finished, type: + " + formatType + ", width: " + image.getWidth());
if (Build.VERSION.SDK_INT < 16)
{
image.getViewTreeObserver().removeGlobalOnLayoutListener(this);
}
else
{
image.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
image.getViewTreeObserver().removeOnGlobalLayoutListener(this);
Log.d(TAG, "Generating barcode for type " + formatType);
BarcodeImageWriterTask task = new BarcodeImageWriterTask(image, cardId, format, text);

View File

@@ -590,11 +590,7 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
if (Build.VERSION.SDK_INT < 16) {
barcodeImage.getViewTreeObserver().removeGlobalOnLayoutListener(this);
} else {
barcodeImage.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
barcodeImage.getViewTreeObserver().removeOnGlobalLayoutListener(this);
Log.d(TAG, "ImageView size now known");
new BarcodeImageWriterTask(barcodeImage, cardId, barcodeFormat).execute();

View File

@@ -1,5 +1,6 @@
<resources
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"
xmlns:tools="http://schemas.android.com/tools">
<string name="app_name" translatable="false">Catima</string>
<string name="action_search">Search</string>
@@ -69,7 +70,7 @@
<string name="importOptionApplicationButton">Use external app</string>
<string name="about">About</string>
<string name="app_copyright_fmt" translatable="false">Copyright 2019<xliff:g>%d</xliff:g> Sylvia van Os.</string>
<string name="app_copyright_fmt" translatable="false" tools:ignore="PluralsCandidate">Copyright 2019<xliff:g>%d</xliff:g> Sylvia van Os.</string>
<string name="app_copyright_old">Based on Loyalty Card Keychain, copyright 20162020 Branden Archer.</string>
<string name="app_license">Copylefted libre software, licensed GPLv3+.</string>
<string name="about_title_fmt">About <xliff:g id="app_name">%s</xliff:g></string>