Messages
Status Message
- Set a status message next to the frame:
DocumentReader.Instance().customization().edit().setStatus("Hello").apply();
DocumentReader.Instance().customization().edit().setStatus("Hello").apply()
- Turn on/off the status message:
DocumentReader.Instance().customization().edit().setShowStatusMessages(true).apply();
DocumentReader.Instance().customization().edit().setShowStatusMessages(true).apply()
- Set the text font for the status message:
DocumentReader.Instance().customization().edit().setStatusTextFont(Typeface.SERIF).apply();
DocumentReader.Instance().customization().edit().setStatusTextFont(Typeface.SERIF).apply()
- Set the size of the main text status (sp):
DocumentReader.Instance().customization().edit().setStatusTextSize(14).apply();
DocumentReader.Instance().customization().edit().setStatusTextSize(14).apply()
- Set the hex color code for the main text status:
DocumentReader.Instance().customization().edit().setStatusTextColor("#ff0000").apply();
DocumentReader.Instance().customization().edit().setStatusTextColor("#ff0000").apply()
- Set the hex color code for the current text status background:
DocumentReader.Instance().customization().edit().setStatusBackgroundColor("#32a852").apply();
DocumentReader.Instance().customization().edit().setStatusBackgroundColor("#32a852").apply()
- You can change the location of the status message. For example, if you set the multiplier to 0.5 and the number of pixels by vertical is equal to 800, your message will be centralized and located at 200 px from top, that is (800 / 2) * 0.5 = 200 px. If the multiplier is equal to 1, the message will be centered. If the multiplier is equal to zero, the default location will be used:
DocumentReader.Instance().customization().edit().setStatusPositionMultiplier(0.5F).apply();
DocumentReader.Instance().customization().edit().setStatusPositionMultiplier(0.5F).apply()
Result Status Message
- Set a result status message next to the frame:
DocumentReader.Instance().customization().edit().setResultStatus("Hello").apply();
DocumentReader.Instance().customization().edit().setResultStatus("Hello").apply()
- Turn the result status message on/off:
DocumentReader.Instance().customization().edit().setShowResultStatusMessages(true).apply();
DocumentReader.Instance().customization().edit().setShowResultStatusMessages(true).apply()
- Set the text font for the current status:
DocumentReader.Instance().customization().edit().setResultStatusTextFont(Typeface.SERIF).apply();
DocumentReader.Instance().customization().edit().setResultStatusTextFont(Typeface.SERIF).apply()
- Set the size of the current text status (sp):
DocumentReader.Instance().customization().edit().setResultStatusTextSize(14).apply();
DocumentReader.Instance().customization().edit().setResultStatusTextSize(14).apply()
- Set the hex color code for the current text status:
DocumentReader.Instance().customization().edit().setResultStatusTextColor("#ff0000").apply();
DocumentReader.Instance().customization().edit().setResultStatusTextColor("#ff0000").apply()
- Set the hex color code for the current text status background:
DocumentReader.Instance().customization().edit().setResultStatusBackgroundColor("#ff0000").apply();
DocumentReader.Instance().customization().edit().setResultStatusBackgroundColor("#ff0000").apply()
- You can change the location of the result status message. For example, if you set the multiplier to 0.5 and the number of pixels by vertical is equal to 800, your message will be centralized and located at 200 px from top, that is (800 / 2) * 0.5 = 200 px. If the multiplier is equal to 1, the message will be centered. If the multiplier is equal to zero, the default location will be used:
DocumentReader.Instance().customization().edit().setResultStatusPositionMultiplier(0.5F).apply();
DocumentReader.Instance().customization().edit().setResultStatusPositionMultiplier(0.5F).apply()
Custom Status Message
- Create a custom status as
SpannableString
:
SpannableString str = new SpannableString("Hello, world!");
str.setSpan(new ForegroundColorSpan(Color.RED), 0, str.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
DocumentReader.Instance().customization().edit().setCustomLabelStatus(str).apply();
val str = SpannableString("Hello, world!")
str.setSpan(ForegroundColorSpan(Color.RED), 0, str.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
DocumentReader.Instance().customization().edit().setCustomLabelStatus(str).apply()
- You can change the location of the custom status message. For example, if you set the multiplier to 0.5 and the number of pixels by vertical is equal to 800, your message will be centralized and located at 200 px from top, that is (800 / 2) * 0.5 = 200 px. If the multiplier is equal to 1, the message will be centered. If the multiplier is equal to zero, the default location will be used:
DocumentReader.Instance().customization().edit().setCustomStatusPositionMultiplier(1.0F).apply();
DocumentReader.Instance().customization().edit().setCustomStatusPositionMultiplier(1.0F).apply()