mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
処理実装 WIP
This commit is contained in:
parent
5bf55ada0e
commit
334d1ccba2
|
@ -8,13 +8,46 @@ import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
/**
|
import com.websitebeaver.documentscanner.DocumentScanner;
|
||||||
* A simple {@link Fragment} subclass.
|
|
||||||
* Use the {@link ScannerManagerFragment#newInstance} factory method to
|
import javax.inject.Inject;
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
import dagger.hilt.android.AndroidEntryPoint;
|
||||||
|
import one.nem.lacerta.utils.LacertaLogger;
|
||||||
|
import one.nem.lacerta.vcs.LacertaVcs;
|
||||||
|
import one.nem.lacerta.vcs.factory.LacertaVcsFactory;
|
||||||
|
|
||||||
|
|
||||||
|
@AndroidEntryPoint
|
||||||
public class ScannerManagerFragment extends Fragment {
|
public class ScannerManagerFragment extends Fragment {
|
||||||
|
|
||||||
|
String TAG = getClass().getSimpleName();
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
LacertaLogger logger;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
LacertaVcsFactory vcsFactory;
|
||||||
|
|
||||||
|
DocumentScanner documentScanner = new DocumentScanner(
|
||||||
|
getActivity(),
|
||||||
|
(croppedImage) -> {
|
||||||
|
// TODO-rca: 画像を保存する
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
(error) -> {
|
||||||
|
// TODO-rca: エラー処理
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
() -> {
|
||||||
|
// TODO-rca: キャンセル処理
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
);
|
||||||
|
|
||||||
private static final boolean DEFAULT_SINGLE_PAGE = false;
|
private static final boolean DEFAULT_SINGLE_PAGE = false;
|
||||||
private boolean singlePage;
|
private boolean singlePage;
|
||||||
|
|
||||||
|
@ -49,8 +82,11 @@ public class ScannerManagerFragment extends Fragment {
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
|
||||||
view.findViewById(R.id.button_start_scan).setOnClickListener(v -> {
|
// Init
|
||||||
|
logger.debug(TAG, "called");
|
||||||
|
|
||||||
|
view.findViewById(R.id.button_start_scan).setOnClickListener(v -> {
|
||||||
|
documentScanner.startScan();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user