es.gob.fnmt.gui.fragment

## Class NFCCommunicationFragment

- java.lang.Object
- - android.app.Fragment
  - - es.gob.fnmt.nfc.NFCCommReaderFragment
    - - es.gob.fnmt.gui.fragment.NFCCommunicationFragment

- All Implemented Interfaces:
    android.content.ComponentCallbacks, android.content.ComponentCallbacks2, android.nfc.NfcAdapter.ReaderCallback, android.view.View.OnCreateContextMenuListener, SignatureNotification

      public final class NFCCommunicationFragment
      extends NFCCommReaderFragment
      implements SignatureNotification

  Default implementation of a Fragment to handle graphical interface for NFC communications.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class es.gob.fnmt.nfc.NFCCommReaderFragment

      `NFCCommReaderFragment.FinalTaskListener, NFCCommReaderFragment.NFCCommReaderFragmentListener`

    - ### Nested classes/interfaces inherited from class android.app.Fragment

      `android.app.Fragment.InstantiationException, android.app.Fragment.SavedState`

    - ### Nested classes/interfaces inherited from interface es.gob.fnmt.gui.SignatureNotification

      `SignatureNotification.sign_callback_notify`

  - ### Field Summary

    - ### Fields inherited from class es.gob.fnmt.nfc.NFCCommReaderFragment

      `CAN_ARGUMENT_KEY_STRING, ERROR_PIN_LOCKED, KEYSTORETYPE_ARGUMENT_KEY_STRING, PRELOADKEYSTORE_ARGUMENT_KEY_STRING`

    - ### Fields inherited from interface android.content.ComponentCallbacks2

      `TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NFCCommunicationFragment()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `doNotify(SignatureNotification.sign_callback_notify notify, java.lang.String msg)` Notification callback about the signature process
    `void` | `HandleError(java.lang.String title, java.lang.String msg)` Show error in the graphic interface.
    `android.view.View` | `onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)`
    `void` | `onDetach()`
    `void` | `setDialog(ProgressDialogUI progressDialog, boolean defaultMessages)` Custom progress dialog and disables internal progress bar.
    `void` | `setDialog(ProgressDialogUI progressDialog, boolean defaultMessages, boolean internalMessages)` Custom progress dialog and disables internal progress bar.
    `void` | `setProgressBarEnabled(boolean enabled)` Enable or disable internal progress bar.
    `void` | `setTextColor(int color)` Set text color for internal interface.
    `void` | `setTextColor(java.lang.String color)` Set text color for internal interface.
    `void` | `setTextTypeFace(android.graphics.Typeface typeFace)` Set resource TypeFace for text components.
    `void` | `showTextMessages(boolean enabled)` Enable or disable showing default messages.
    `void` | `updateInfo(NFCCommReaderFragment.NFCCommReaderFragmentListener.NFC_callback_notify notify)` Function that handle all the events included in NFCCommunicationFragmentWUI.NFCCommFragmentNotifyListener interface, to manage the graphical interface of the fragment.
    `void` | `updateInfo(NFCCommReaderFragment.NFCCommReaderFragmentListener.NFC_callback_notify notify, java.lang.String msg)` Function that handle all the events included in NFCCommunicationFragmentWUI.NFCCommFragmentNotifyListener interface, to manage the graphical interface of the fragment.
    `void` | `updateInfo(NFCCommReaderFragment.NFCCommReaderFragmentListener.NFC_callback_notify notify, java.lang.String title, java.lang.String msg)` Function that handle all the events included in NFCCommunicationFragmentWUI.NFCCommFragmentNotifyListener interface, to manage the graphical interface of the fragment.

    - ### Methods inherited from class es.gob.fnmt.nfc.NFCCommReaderFragment

      `getKeyStore, onCreate, onDestroy, onResume, onTagDiscovered, setFinalTask, setSignatureNotification`

    - ### Methods inherited from class android.app.Fragment

      `dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDestroyView, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onSaveInstanceState, onStart, onStop, onTrimMemory, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### NFCCommunicationFragment

          public NFCCommunicationFragment()

  - ### Method Detail

    - #### doNotify

          public void doNotify(SignatureNotification.sign_callback_notify notify,
                               java.lang.String msg)

      Description copied from interface: `SignatureNotification`
      Notification callback about the signature process
      Specified by:
        `doNotify` in interface `SignatureNotification`
      Parameters:
        `notify` - type of event notification
        `msg` - additional information of the event (may be null)

    - #### HandleError

          public void HandleError(java.lang.String title,
                                  java.lang.String msg)

      Show error in the graphic interface.
      Parameters:
        `title` - title to show.
        `msg` - error description to show.

    - #### onCreateView

          public android.view.View onCreateView(android.view.LayoutInflater inflater,
                                                android.view.ViewGroup container,
                                                android.os.Bundle savedInstanceState)

      Overrides:
        `onCreateView` in class `android.app.Fragment`

    - #### onDetach

          public void onDetach()

      Overrides:
        `onDetach` in class `NFCCommReaderFragment`

    - #### setDialog

          public void setDialog(ProgressDialogUI progressDialog,
                                boolean defaultMessages)

      Custom progress dialog and disables internal progress bar.
      Parameters:
        `progressDialog` - instance of progress dialog.
        `defaultMessages` - if internal messages must be shown in the progress dialog.

    - #### setDialog

          public void setDialog(ProgressDialogUI progressDialog,
                                boolean defaultMessages,
                                boolean internalMessages)

      Custom progress dialog and disables internal progress bar.
      Parameters:
        `progressDialog` - instance of progress dialog.
        `defaultMessages` - if internal messages must be shown in the progress dialog.

    - #### setProgressBarEnabled

          public void setProgressBarEnabled(boolean enabled)

      Enable or disable internal progress bar.
      Parameters:
        `enabled` - enable or disable.

    - #### setTextColor

          public void setTextColor(int color)

      Set text color for internal interface.
      Parameters:
        `color` - int value in the form 0xAARRGGBB.

    - #### setTextColor

          public void setTextColor(java.lang.String color)

      Set text color for internal interface.
      Parameters:
        `color` - string name of the color.

    - #### setTextTypeFace

          public void setTextTypeFace(android.graphics.Typeface typeFace)

      Set resource TypeFace for text components.
      Parameters:
        `typeFace` - typeFace instance.

    - #### showTextMessages

          public void showTextMessages(boolean enabled)

      Enable or disable showing default messages.
      Parameters:
        `enabled` - enable or disable.

    - #### updateInfo

          public void updateInfo(NFCCommReaderFragment.NFCCommReaderFragmentListener.NFC_callback_notify notify)

      Function that handle all the events included in NFCCommunicationFragmentWUI.NFCCommFragmentNotifyListener interface, to manage the graphical interface of the fragment. No information will be updated in the fragment.
      Parameters:
        `notify` - type of event.

    - #### updateInfo

          public void updateInfo(NFCCommReaderFragment.NFCCommReaderFragmentListener.NFC_callback_notify notify,
                                 java.lang.String msg)

      Function that handle all the events included in NFCCommunicationFragmentWUI.NFCCommFragmentNotifyListener interface, to manage the graphical interface of the fragment. Only the message information passed will be updated in the fragment.
      Parameters:
        `notify` - type of event.
        `msg` - information received.

    - #### updateInfo

          public void updateInfo(NFCCommReaderFragment.NFCCommReaderFragmentListener.NFC_callback_notify notify,
                                 java.lang.String title,
                                 java.lang.String msg)

      Function that handle all the events included in NFCCommunicationFragmentWUI.NFCCommFragmentNotifyListener interface, to manage the graphical interface of the fragment. Title and message information passed will be updated in the fragment.
      Parameters:
        `notify` - type of event.
        `title` - information received.
        `msg` - information received.