mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-01-29 01:01:50 -05:00
Check for empty cardId in BarcodeSelectorActivity instead
This commit is contained in:
@@ -90,11 +90,6 @@ class BarcodeImageWriterTask extends AsyncTask<Void, Void, Bitmap>
|
||||
|
||||
public Bitmap doInBackground(Void... params)
|
||||
{
|
||||
if (cardId.isEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
MultiFormatWriter writer = new MultiFormatWriter();
|
||||
BitMatrix bitMatrix;
|
||||
try
|
||||
|
||||
@@ -177,6 +177,12 @@ public class BarcodeSelectorActivity extends AppCompatActivity
|
||||
}
|
||||
});
|
||||
|
||||
if (cardId.isEmpty())
|
||||
{
|
||||
image.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
|
||||
if(image.getHeight() == 0)
|
||||
{
|
||||
// The size of the ImageView is not yet available as it has not
|
||||
|
||||
Reference in New Issue
Block a user