mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
Optimize import
This commit is contained in:
parent
cc3eb801f1
commit
e11e1c1b4a
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
|||
package net.foucry.pilldroid;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.job.JobService;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
|
@ -12,6 +14,7 @@ import androidx.annotation.NonNull;
|
|||
|
||||
import com.journeyapps.barcodescanner.CaptureManager;
|
||||
import com.journeyapps.barcodescanner.DecoratedBarcodeView;
|
||||
import com.journeyapps.barcodescanner.ScanContract;
|
||||
import com.journeyapps.barcodescanner.ViewfinderView;
|
||||
|
||||
import java.util.Random;
|
||||
|
@ -21,12 +24,14 @@ import java.util.Random;
|
|||
*/
|
||||
public class CustomScannerActivity extends Activity implements
|
||||
DecoratedBarcodeView.TorchListener {
|
||||
private static final String TAG = CustomScannerActivity.class.getName();
|
||||
|
||||
private CaptureManager capture;
|
||||
private DecoratedBarcodeView barcodeScannerView;
|
||||
private ImageButton switchFlashlightButton;
|
||||
private ViewfinderView viewfinderView;
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -36,7 +41,6 @@ public class CustomScannerActivity extends Activity implements
|
|||
barcodeScannerView.setTorchListener(this);
|
||||
|
||||
switchFlashlightButton = findViewById(R.id.switch_flashlight);
|
||||
|
||||
viewfinderView = findViewById(R.id.zxing_viewfinder_view);
|
||||
|
||||
// if the device does not have flashlight in its camera,
|
||||
|
@ -50,6 +54,7 @@ public class CustomScannerActivity extends Activity implements
|
|||
capture.setShowMissingCameraPermissionDialog(false);
|
||||
capture.decode();
|
||||
|
||||
|
||||
changeMaskColor(null);
|
||||
changeLaserVisibility(true);
|
||||
}
|
||||
|
@ -125,7 +130,6 @@ public class CustomScannerActivity extends Activity implements
|
|||
capture.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
}
|
||||
|
||||
|
||||
public void onKeyboard(View view) {
|
||||
setResult(3);
|
||||
finish();
|
||||
|
|
Loading…
Reference in a new issue