public class MultiPageReviewActivity extends AppCompatActivity implements MultiPageReviewFragmentListener
MultiPageReviewActivity
displays the photographed or imported images and allows the user to
review them by checking the order, sharpness, quality and orientation of the images. The user can
correct the order by dragging the thumbnails of the images and can also correct the orientation
by rotating the images.
If multi-page has been enabled then the MultiPageReviewActivity
is started by the
CameraActivity
after the user has taken the first photo or imported the first image of a
document. For subsequent images the user has to tap on the image stack in the Camera Screen to
launch it.
Important: A GiniVision
instance is required to use the MultiPageReviewActivity
The following items are customizable:
GiniVisionTheme.Review.MultiPage.PageIndicator.TextStyle
GiniVisionTheme.Review.MultiPage.PageIndicator.TextStyle
and setting an item named gvCustomFont
with the path to the font file in your assets
folder
gv_multi_page_review_page_indicator_background
gv_review_fab_checkmark.png
gv_review_fab
and gv_review_fab_pressed
gv_multi_page_review_thumbnails_panel_background
gv_multi_page_review_thumbnail_card_background
GiniVisionTheme.Review.MultiPage.ThumbnailBadge.TextStyle
GiniVisionTheme.Review.MultiPage.ThumbnailBadge.TextStyle
and setting an item named gvCustomFont
with the path to the font file in your assets
folder
gv_multi_page_thumbnail_badge_background_border
gv_bumps_icon.png
gv_multi_page_thumbnail_highlight_strip
gv_analysis_activity_indicator
gv_multi_page_thumbnail_upload_success_icon_background
gv_multi_page_thumbnail_upload_success_icon_foreground
gv_multi_page_thumbnail_upload_failure_icon_background
gv_multi_page_thumbnail_upload_failure_icon_foreground
gv_multi_page_add_page_icon.png
gv_multi_page_review_add_pages_subtitle
GiniVisionTheme.Review.MultiPage.AddPagesSubtitle.TextStyle
GiniVisionTheme.Review.MultiPage.AddPagesSubtitle.TextStyle
and setting an item named gvCustomFont
with the path to the font file in your assets
folder
gv_multi_page_review_reorder_pages_tip
GiniVisionTheme.Review.MultiPage.ReorderPagesTip.TextStyle
GiniVisionTheme.Review.MultiPage.ReorderPagesTip.TextStyle
and setting an item named gvCustomFont
with the path to the font file in your assets
folder
gv_rotate_icon.png
gv_delete_icon.png
GiniVisionTheme.Snackbar.Error.TextStyle
and setting an item named android:textStyle
to
normal
, bold
or italic
GiniVisionTheme.Snackbar.Error.TextStyle
and setting an item named gvCustomFont
with the
path to the font file in your assets
folder
GiniVisionTheme.Snackbar.Error.Button.TextStyle
and setting an item named android:textStyle
to normal
, bold
or italic
GiniVisionTheme.Snackbar.Error.Button.TextStyle
and setting an item named gvCustomFont
with the path to the font file in your assets
folder
gv_snackbar_error_background
gv_document_analysis_error_retry
gv_multi_page_review_delete_invalid_document
gv_multi_page_review_file_import_delete_last_page_dialog_message
gv_multi_page_review_file_import_delete_last_page_dialog_positive_button
gv_multi_page_review_file_import_delete_last_page_dialog_negative_button
gv_accent
Important: All overridden styles must have their respective Root.
prefixed
style as their parent. Ex.: the parent of GiniVisionTheme.Review.BottomPanel.TextStyle
must be Root.GiniVisionTheme.Review.BottomPanel.TextStyle
.
CameraActivity
, OnboardingActivity
, ReviewActivity
, MultiPageReviewActivity
, AnalysisActivity
).
The following items are customizable:
gv_action_bar
(highly
recommended for Android 5+: customize the status bar color via gv_status_bar
)
gv_title_multi_page_review
gv_action_bar_title
ReviewActivity
, MultiPageReviewActivity
and AnalysisActivity
): via images for mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi named gv_action_bar_back
Constructor and Description |
---|
MultiPageReviewActivity() |
Modifier and Type | Method and Description |
---|---|
static Intent |
createIntent(Context context) |
void |
onBackPressed() |
void |
onImportedDocumentReviewCancelled()
Called when the user deleted all the pages of a document received from another app.
|
boolean |
onOptionsItemSelected(MenuItem item) |
void |
onProceedToAnalysisScreen(GiniVisionMultiPageDocument multiPageDocument)
Called when all pages were uploaded successfully and the user tapped on the "next" button.
|
void |
onReturnToCameraScreen()
Called when the user wants to add a picture of another page.
|
public static Intent createIntent(Context context)
public boolean onOptionsItemSelected(MenuItem item)
public void onBackPressed()
public void onProceedToAnalysisScreen(GiniVisionMultiPageDocument multiPageDocument)
MultiPageReviewFragmentListener
If you use the Screen API you should start the AnalysisActivity
and set the
document as the AnalysisActivity.EXTRA_IN_DOCUMENT
extra.
If you use the Component API you should start the AnalysisFragmentCompat
(or the
AnalysisFragmentStandard
) and pass the document when creating it with AnalysisFragmentCompat.createInstance(Document, String)
(or AnalysisFragmentStandard.createInstance(Document, String)
).
onProceedToAnalysisScreen
in interface MultiPageReviewFragmentListener
multiPageDocument
- contains the reviewed image (can be the original one or a modified image)public void onReturnToCameraScreen()
MultiPageReviewFragmentListener
If you host the MultiPageReviewFragment
in its own Activity, then you should
simply finish the Activity.
If you use one Activity to host all the GVL fragments, then you should display the
CameraFragmentCompat
(or the CameraFragmentStandard
) again.
onReturnToCameraScreen
in interface MultiPageReviewFragmentListener
public void onImportedDocumentReviewCancelled()
MultiPageReviewFragmentListener
MultiPageReviewFragment
was launched after a document had been created
using GiniVision.createDocumentForImportedFiles(Intent, Context, AsyncCallback)
.
At this point you should finish GVL by closing the MultiPageReviewFragment
and
cleaning up using GiniVision.cleanup(Context)
.
onImportedDocumentReviewCancelled
in interface MultiPageReviewFragmentListener