Add onBackPressed method to do not generate crash (#29)

This commit is contained in:
Jean-Baptiste 2024-03-29 16:04:37 +01:00 committed by GitHub
parent 51c0bad937
commit 004c28737b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -88,6 +88,11 @@ public class CustomScannerActivity extends Activity implements DecoratedBarcodeV
capture.onDestroy();
}
@Override
public void onBackPressed(){
onCancel(this.getCurrentFocus());
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);