mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 08:23:15 +00:00
parent
6d0173039f
commit
6622bd2fc0
|
@ -1,6 +1,5 @@
|
||||||
package one.nem.lacerta.component.scanner;
|
package one.nem.lacerta.component.scanner;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -15,8 +14,6 @@ import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple {@link Fragment} subclass.
|
* A simple {@link Fragment} subclass.
|
||||||
* Use the {@link ScannerDatabaManagerStubFragment#newInstance} factory method to
|
* Use the {@link ScannerDatabaManagerStubFragment#newInstance} factory method to
|
||||||
|
@ -25,18 +22,7 @@ import java.util.ArrayList;
|
||||||
public class ScannerDatabaManagerStubFragment extends Fragment {
|
public class ScannerDatabaManagerStubFragment extends Fragment {
|
||||||
|
|
||||||
// Results
|
// Results
|
||||||
private ArrayList<Bitmap> results = new ArrayList<>();
|
private Bitmap[] imageBitmaps;
|
||||||
private final ActivityResultLauncher<Intent> cameraLauncher = registerForActivityResult(
|
|
||||||
new ActivityResultContracts.StartActivityForResult(),
|
|
||||||
result -> {
|
|
||||||
if (result.getResultCode() == Activity.RESULT_OK) {
|
|
||||||
Intent data = result.getData();
|
|
||||||
Bundle extras = data.getExtras();
|
|
||||||
Bitmap imageBitmap = (Bitmap) extras.get("data");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
public ScannerDatabaManagerStubFragment() {
|
public ScannerDatabaManagerStubFragment() {
|
||||||
// Required empty public constructor
|
// Required empty public constructor
|
||||||
|
|
Loading…
Reference in New Issue
Block a user