Class LocationPhotoFragment

  • All Implemented Interfaces:
    android.content.ComponentCallbacks, android.content.DialogInterface.OnCancelListener, android.content.DialogInterface.OnDismissListener, android.view.View.OnCreateContextMenuListener, androidx.activity.result.ActivityResultCaller, androidx.lifecycle.HasDefaultViewModelProviderFactory, androidx.lifecycle.LifecycleOwner, androidx.lifecycle.ViewModelStoreOwner, androidx.savedstate.SavedStateRegistryOwner

    public class LocationPhotoFragment
    extends androidx.fragment.app.DialogFragment
    The fragment that lets a user take a "location photo" to assist other users in locating the QR Code
    • Nested Class Summary

      • Nested classes/interfaces inherited from class androidx.fragment.app.Fragment

        androidx.fragment.app.Fragment.InstantiationException, androidx.fragment.app.Fragment.SavedState
    • Field Summary

      • Fields inherited from class androidx.fragment.app.DialogFragment

        STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
      • Fields inherited from class androidx.fragment.app.Fragment

        mPreviousWho
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AddQRCodeFragment getAddQRCodeFragment()  
      static LocationPhotoFragment newInstance​(QRCode qrCode, AddQRCodeFragment qrCodeFragment, Player activePlayer)
      Create a LocationPhotoFragment that lets the user snap a location photo for the given QR code
      android.app.Dialog onCreateDialog​(android.os.Bundle savedInstanceState)
      Creates the Dialog that shows the camera's preview and shutter button
      • Methods inherited from class androidx.fragment.app.DialogFragment

        dismiss, dismissAllowingStateLoss, dismissNow, getDialog, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onCancel, onCreate, onDestroyView, onDetach, onDismiss, onGetLayoutInflater, onSaveInstanceState, onStart, onStop, onViewStateRestored, requireDialog, setCancelable, setShowsDialog, setStyle, setupDialog, show, show, showNow
      • Methods inherited from class androidx.fragment.app.Fragment

        dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelCreationExtras, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onViewCreated, postponeEnterTransition, postponeEnterTransition, registerForActivityResult, 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, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LocationPhotoFragment

        public LocationPhotoFragment()
    • Method Detail

      • newInstance

        public static LocationPhotoFragment newInstance​(QRCode qrCode,
                                                        AddQRCodeFragment qrCodeFragment,
                                                        Player activePlayer)
        Create a LocationPhotoFragment that lets the user snap a location photo for the given QR code
        Parameters:
        qrCode - The QRCode to add the location photo to
        qrCodeFragment - The QRCodeFragment to update once the location photo has been taken
        activePlayer - The current logged in player
        Returns:
        The LocationPhotoFragment to display
        See Also:
        AddQRCodeFragment
      • onCreateDialog

        @NonNull
        public android.app.Dialog onCreateDialog​(@Nullable
                                                 android.os.Bundle savedInstanceState)
        Creates the Dialog that shows the camera's preview and shutter button
        Overrides:
        onCreateDialog in class androidx.fragment.app.DialogFragment
        Parameters:
        savedInstanceState - The last saved instance state of the Fragment, or null if this is a freshly created Fragment
        Returns:
        The Dialog that the user will use to take a location photo