public class MultiPageReviewFragment extends Fragment implements MultiPageReviewFragmentInterface
When you use the Compontent API and have enabled the multi-page feature, the MultiPageReviewFragment
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.
Important:
GiniVision
instance is required to use the MultiPageReviewFragment
android.support.v7.app.AppCompatActivity
and use an AppCompat Theme.
Include the MultiPageReviewFragment
into your layout by using the MultiPageReviewFragment.createInstance()
factory method to create an instance and display it
using the android.support.v4.app.FragmentManager
.
A MultiPageReviewFragmentListener
instance must be available until the MultiPageReviewFragment
is attached to an activity. Failing to do so will throw an exception.
The listener instance can be provided either implicitly by making the hosting Activity implement
the MultiPageReviewFragmentListener
interface or explicitly by setting the listener using
MultiPageReviewFragment.setListener(MultiPageReviewFragmentListener)
.
Your Activity is automatically set as the listener in MultiPageReviewFragment.onCreate(Bundle)
.
MultiPageReviewActivity
for details.Constructor and Description |
---|
MultiPageReviewFragment() |
Modifier and Type | Method and Description |
---|---|
static MultiPageReviewFragment |
createInstance() |
View |
onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState) |
void |
onDeleteDocument(ImageDocument document) |
void |
onDestroy() |
void |
onPause() |
void |
onRetryUpload(ImageDocument document) |
void |
onStart() |
void |
setListener(MultiPageReviewFragmentListener listener)
Set a listener for multi-page review events.
|
void |
showAlertDialog(java.lang.String message,
java.lang.String positiveButtonTitle,
DialogInterface.OnClickListener positiveButtonClickListener,
java.lang.String negativeButtonTitle,
DialogInterface.OnClickListener negativeButtonClickListener,
DialogInterface.OnCancelListener cancelListener) |
public static MultiPageReviewFragment createInstance()
public void showAlertDialog(java.lang.String message, java.lang.String positiveButtonTitle, DialogInterface.OnClickListener positiveButtonClickListener, java.lang.String negativeButtonTitle, DialogInterface.OnClickListener negativeButtonClickListener, DialogInterface.OnCancelListener cancelListener)
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
public void onStart()
public void onPause()
public void onDestroy()
public void onRetryUpload(ImageDocument document)
public void onDeleteDocument(ImageDocument document)
public void setListener(MultiPageReviewFragmentListener listener)
MultiPageReviewFragmentInterface
By default the hosting Activity is expected to implement the MultiPageReviewFragmentListener
. In case that is not feasible you may set the listener using
this method.
Note: the listener is expected to be available until the fragment is attached to an activity. Make sure to set the listener before that.
setListener
in interface MultiPageReviewFragmentInterface
listener
- MultiPageReviewFragmentListener
instance