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;
|
package net.foucry.pilldroid;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.app.job.JobService;
|
||||||
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -12,6 +14,7 @@ import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import com.journeyapps.barcodescanner.CaptureManager;
|
import com.journeyapps.barcodescanner.CaptureManager;
|
||||||
import com.journeyapps.barcodescanner.DecoratedBarcodeView;
|
import com.journeyapps.barcodescanner.DecoratedBarcodeView;
|
||||||
|
import com.journeyapps.barcodescanner.ScanContract;
|
||||||
import com.journeyapps.barcodescanner.ViewfinderView;
|
import com.journeyapps.barcodescanner.ViewfinderView;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
@ -21,12 +24,14 @@ import java.util.Random;
|
||||||
*/
|
*/
|
||||||
public class CustomScannerActivity extends Activity implements
|
public class CustomScannerActivity extends Activity implements
|
||||||
DecoratedBarcodeView.TorchListener {
|
DecoratedBarcodeView.TorchListener {
|
||||||
|
private static final String TAG = CustomScannerActivity.class.getName();
|
||||||
|
|
||||||
private CaptureManager capture;
|
private CaptureManager capture;
|
||||||
private DecoratedBarcodeView barcodeScannerView;
|
private DecoratedBarcodeView barcodeScannerView;
|
||||||
private ImageButton switchFlashlightButton;
|
private ImageButton switchFlashlightButton;
|
||||||
private ViewfinderView viewfinderView;
|
private ViewfinderView viewfinderView;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -36,7 +41,6 @@ public class CustomScannerActivity extends Activity implements
|
||||||
barcodeScannerView.setTorchListener(this);
|
barcodeScannerView.setTorchListener(this);
|
||||||
|
|
||||||
switchFlashlightButton = findViewById(R.id.switch_flashlight);
|
switchFlashlightButton = findViewById(R.id.switch_flashlight);
|
||||||
|
|
||||||
viewfinderView = findViewById(R.id.zxing_viewfinder_view);
|
viewfinderView = findViewById(R.id.zxing_viewfinder_view);
|
||||||
|
|
||||||
// if the device does not have flashlight in its camera,
|
// if the device does not have flashlight in its camera,
|
||||||
|
@ -50,6 +54,7 @@ public class CustomScannerActivity extends Activity implements
|
||||||
capture.setShowMissingCameraPermissionDialog(false);
|
capture.setShowMissingCameraPermissionDialog(false);
|
||||||
capture.decode();
|
capture.decode();
|
||||||
|
|
||||||
|
|
||||||
changeMaskColor(null);
|
changeMaskColor(null);
|
||||||
changeLaserVisibility(true);
|
changeLaserVisibility(true);
|
||||||
}
|
}
|
||||||
|
@ -125,7 +130,6 @@ public class CustomScannerActivity extends Activity implements
|
||||||
capture.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
capture.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onKeyboard(View view) {
|
public void onKeyboard(View view) {
|
||||||
setResult(3);
|
setResult(3);
|
||||||
finish();
|
finish();
|
||||||
|
|
Loading…
Reference in a new issue