mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
引数で最大撮影枚数を指定できるように
This commit is contained in:
parent
0a0a4b56b9
commit
3c75a04a5f
|
@ -2,6 +2,7 @@ package one.nem.lacerta.component.scanner;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
|
@ -56,6 +57,9 @@ public class ScannerManagerActivity extends AppCompatActivity {
|
||||||
// Variables
|
// Variables
|
||||||
private ArrayList<Bitmap> croppedImages = new ArrayList<>();
|
private ArrayList<Bitmap> croppedImages = new ArrayList<>();
|
||||||
|
|
||||||
|
private int maxPage = 0;
|
||||||
|
private boolean singlePage = false;
|
||||||
|
|
||||||
View view;
|
View view;
|
||||||
|
|
||||||
DocumentScanner documentScanner = new DocumentScanner(
|
DocumentScanner documentScanner = new DocumentScanner(
|
||||||
|
@ -82,7 +86,7 @@ public class ScannerManagerActivity extends AppCompatActivity {
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null
|
singlePage ? 1 : maxPage
|
||||||
);
|
);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -113,6 +117,12 @@ public class ScannerManagerActivity extends AppCompatActivity {
|
||||||
|
|
||||||
this.view = findViewById(R.id.main); // TODO-rca:なんとかする
|
this.view = findViewById(R.id.main); // TODO-rca:なんとかする
|
||||||
|
|
||||||
|
Intent intent = getIntent();
|
||||||
|
Bundle bundle = intent.getExtras();
|
||||||
|
if (bundle != null) {
|
||||||
|
this.maxPage = bundle.getInt("maxPage", 0);
|
||||||
|
this.singlePage = bundle.getBoolean("singlePage", false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user