Package 

Class AnalysisFragmentCompat

  • All Implemented Interfaces:
    android.content.ComponentCallbacks , android.view.View.OnCreateContextMenuListener , androidx.activity.result.ActivityResultCaller , androidx.lifecycle.HasDefaultViewModelProviderFactory , androidx.lifecycle.LifecycleOwner , androidx.lifecycle.ViewModelStoreOwner , androidx.savedstate.SavedStateRegistryOwner , net.gini.android.capture.analysis.AnalysisFragmentInterface , net.gini.android.capture.internal.ui.FragmentImplCallback

    
    public class AnalysisFragmentCompat
    extends Fragment implements FragmentImplCallback, AnalysisFragmentInterface
                        

    When you use the Component API with the Android Support Library, the AnalyzeDocumentFragmentCompat displays the captured or imported document and an activity indicator while the document is being analyzed by the Gini API.

    Note: You can use the activity indicator message to display a message under the activity indicator by overriding the string resource named gc_analysis_activity_indicator_message. The message is displayed for images only.

    For PDF documents the first page is shown (only on Android 5.0 Lollipop and newer) along with the PDF's filename and number of pages above the page. On Android KitKat and older only the PDF's filename is shown with the preview area left empty.

    Note: Your Activity hosting this Fragment must extend the and use an AppCompat Theme.

    Include the AnalyzeDocumentFragmentCompat into your layout by using the createInstance factory method to create an instance and display it using the androidx.fragment.app.FragmentManager.

    An AnalysisFragmentListener instance must be available until the AnalysisFragmentCompat 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 AnalysisFragmentListener interface or explicitly by setting the listener using setListener.

    Your Activity is automatically set as the listener in onCreate.

    See the AnalysisActivity for details.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void hideError() Call this method to hide the error shown before with showError or showError.
      void onCreate(Bundle savedInstanceState) Internal use only.
      View onCreateView(LayoutInflater inflater, @Nullable() ViewGroup container, @Nullable() Bundle savedInstanceState) Internal use only.
      void onDestroy() Internal use only.
      void onStart() Internal use only.
      void onStop() Internal use only.
      void showError(@NonNull() String message, @NonNull() String buttonTitle, @NonNull() View.OnClickListener onClickListener) Call this method when you need to show an error message with an invokable action to the user in the Analysis Screen.
      void showError(@NonNull() String message, int duration) Call this method when you need to show an error message to the user in the Analysis Screen.
      void setListener(@NonNull() AnalysisFragmentListener listener) Set a listener for analysis events.
      static AnalysisFragmentCompat createInstance(@NonNull() Document document, @Nullable() String documentAnalysisErrorMessage) Factory method for creating a new instance of the Fragment using the provided document.
      void showAlertDialog(@NonNull() String message, @NonNull() String positiveButtonTitle, @NonNull() DialogInterface.OnClickListener positiveButtonClickListener, @Nullable() String negativeButtonTitle, @Nullable() DialogInterface.OnClickListener negativeButtonClickListener, @Nullable() DialogInterface.OnCancelListener cancelListener)
      • Methods inherited from class androidx.fragment.app.Fragment

        dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelCreationExtras, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hasOptionsMenu, hashCode, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDestroyView, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForActivityResult, registerForContextMenu, requestPermissions, requireActivity, requireArguments, requireContext, requireFragmentManager, requireHost, requireParentFragment, requireView, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
      • Methods inherited from class net.gini.android.capture.internal.ui.FragmentImplCallback

        getActivity, getView, startActivity, startActivityForResult
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait