Toolbar
- Change the size of the toolbar (the area where the buttons are located):
DocumentReader.Instance().customization().edit().setToolbarSize(46.0F).apply();
DocumentReader.Instance().customization().edit().setToolbarSize(46.0F).apply()
Torch
- Show/hide the Torch icon:
DocumentReader.Instance().functionality().edit().setShowTorchButton(true).apply();
DocumentReader.Instance().functionality().edit().setShowTorchButton(true).apply()
- Change the Torch icon for both ON and OFF states:
// For the ON state
DocumentReader.Instance().customization().edit().setTorchImageOn(getResources().getDrawable(R.drawable.icon)).apply();
// For the OFF state
DocumentReader.Instance().customization().edit().setTorchImageOff(getResources().getDrawable(R.drawable.icon)).apply();
// For the ON state
DocumentReader.Instance().customization().edit().setTorchImageOn(getDrawable(R.drawable.icon)).apply()
// For the OFF state
DocumentReader.Instance().customization().edit().setTorchImageOff(getDrawable(R.drawable.icon)).apply()
- Allows you to disable all validations of having a torch in case Android returns that it's not available, but it can be used when checks are skipped:
Danger
Please use this setting at your own risk as the end app may crash.
DocumentReader.Instance().functionality().edit().setIsCameraTorchCheckDisabled(true).apply();
DocumentReader.Instance().functionality().edit().setIsCameraTorchCheckDisabled(true).apply()
Close
- Show/hide the Close icon:
DocumentReader.Instance().functionality().edit().setShowCloseButton(true).apply();
DocumentReader.Instance().functionality().edit().setShowCloseButton(true).apply()
Info
You can close the camera view manually by using the DocumentReader.Instance().stopScanner() function.
- Change the Close icon:
DocumentReader.Instance().customization().edit().setCloseButtonImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.Instance().customization().edit().setCloseButtonImage(getDrawable(R.drawable.icon)).apply()
Capture
Tapping the Capture button enables taking a picture and processing it as a single frame.
- Show/hide the Capture button:
DocumentReader.Instance().functionality().edit().setShowCaptureButton(true).apply();
DocumentReader.Instance().functionality().edit().setShowCaptureButton(true).apply()
- Set a time interval between the document detection moment and the Capture button appearance. By default, it is 5 seconds:
DocumentReader.Instance().functionality().edit().setShowCaptureButtonDelayFromDetect(5).apply();
DocumentReader.Instance().functionality().edit().setShowCaptureButtonDelayFromDetect(5).apply()
- Set a time interval between the scanning process start and the Capture button appearance. By default, it is 10 seconds:
DocumentReader.Instance().functionality().edit().setShowCaptureButtonDelayFromStart(10).apply();
DocumentReader.Instance().functionality().edit().setShowCaptureButtonDelayFromStart(10).apply()
- Change the Capture icon:
DocumentReader.Instance().customization().edit().setCaptureButtonImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.Instance().customization().edit().setCaptureButtonImage(getDrawable(R.drawable.icon)).apply()
Camera Frame Switch
- Show/hide the Change Frame icon:
DocumentReader.Instance().functionality().edit().setShowChangeFrameButton(true).apply();
DocumentReader.Instance().functionality().edit().setShowChangeFrameButton(true).apply()
- Change the Change Frame icon for both ON and OFF states:
// For the ON state
DocumentReader.Instance().customization().edit().setChangeFrameExpandButtonImage(getResources().getDrawable(R.drawable.icon)).apply();
// For the OFF state
DocumentReader.Instance().customization().edit().setChangeFrameCollapseButtonImage(getResources().getDrawable(R.drawable.icon)).apply();
// For the ON state
DocumentReader.Instance().customization().edit().setChangeFrameExpandButtonImage(getDrawable(R.drawable.icon)).apply()
// For the OFF state
DocumentReader.Instance().customization().edit().setChangeFrameCollapseButtonImage(getDrawable(R.drawable.icon)).apply()
Camera Switch
- Show/hide the Switch Camera button:
DocumentReader.Instance().functionality().edit().setShowCameraSwitchButton(true).apply();
DocumentReader.Instance().functionality().edit().setShowCameraSwitchButton(true).apply()
- Change the Camera Switch icon:
DocumentReader.Instance().customization().edit().setCameraSwitchButtonImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.Instance().customization().edit().setCameraSwitchButtonImage(getDrawable(R.drawable.icon)).apply()