diff --git a/app/src/main/java/net/foucry/pilldroid/CustomScannerActivity.java b/app/src/main/java/net/foucry/pilldroid/CustomScannerActivity.java index 1a0a0c6..5acf261 100644 --- a/app/src/main/java/net/foucry/pilldroid/CustomScannerActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/CustomScannerActivity.java @@ -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);