mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-01-11 21:48:17 -05:00
Fix IllegalStateException in ViewKeyShareFragment
This commit is contained in:
parent
a125b51b1c
commit
6da367e469
@ -408,17 +408,20 @@ public class ViewKeyShareFragment extends LoaderFragment implements
|
||||
}
|
||||
|
||||
protected void onPostExecute(Bitmap qrCode) {
|
||||
mFingerprintQrCode.setImageBitmap(qrCode);
|
||||
// only change view, if fragment is attached to activity
|
||||
if (ViewKeyShareFragment.this.isAdded()) {
|
||||
mFingerprintQrCode.setImageBitmap(qrCode);
|
||||
|
||||
// Transition drawable with a transparent drawable and the final bitmap
|
||||
final TransitionDrawable td =
|
||||
new TransitionDrawable(new Drawable[]{
|
||||
new ColorDrawable(Color.TRANSPARENT),
|
||||
new BitmapDrawable(getResources(), qrCode)
|
||||
});
|
||||
// Transition drawable with a transparent drawable and the final bitmap
|
||||
final TransitionDrawable td =
|
||||
new TransitionDrawable(new Drawable[]{
|
||||
new ColorDrawable(Color.TRANSPARENT),
|
||||
new BitmapDrawable(getResources(), qrCode)
|
||||
});
|
||||
|
||||
mFingerprintQrCode.setImageDrawable(td);
|
||||
td.startTransition(200);
|
||||
mFingerprintQrCode.setImageDrawable(td);
|
||||
td.startTransition(200);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user