Class CheckInFragment<V extends CheckInView,P extends CheckInPresenter<V>>
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V,P>
-
- com.cheetahdigital.challenges.ui.responses.base.ChallengeResponseFragment<V,P>
-
- com.cheetahdigital.challenges.ui.responses.checkin.CheckInFragment<V,P>
-
- All Implemented Interfaces:
android.content.ComponentCallbacks
,android.view.View.OnClickListener
,android.view.View.OnCreateContextMenuListener
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
,ChallengeResponseView
,CheckInView
,AnalyticsManager.AnalyticsScreen
,MvpView
,LocationPermissionHelper.LocationPermissionCallback
public class CheckInFragment<V extends CheckInView,P extends CheckInPresenter<V>> extends ChallengeResponseFragment<V,P> implements LocationPermissionHelper.LocationPermissionCallback, CheckInView
Class that gets the current location of the user and use received coordinates for checkin challenge
-
-
Field Summary
-
Fields inherited from class com.cheetahdigital.challenges.ui.responses.base.ChallengeResponseFragment
CHALLENGE_ENABLE_RATING, CHALLENGE_FROM_DIALOG, CHALLENGE_ID_KEY, CHALLENGE_KEY, mProgressDialog, mShowAsAlert, mSubmitButton, RESPONDABLE_KEY, RESPONSE_ID_KEY, TAG
-
-
Constructor Summary
Constructors Constructor Description CheckInFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected P
createPresenter()
InstantiateMvpFragmentView.mPresenter
to be used for thisMvpActivityView
protected int
getContentLayoutId()
Provide the Content Layout ID which is of a Layout Resource Reference of Androidvoid
onActivityResult(int requestCode, int resultCode, android.content.Intent data)
void
onClick(android.view.View view)
void
onCreate(android.os.Bundle savedInstanceState)
void
onLocationPermissionDenied()
void
onLocationPermissionGranted()
void
onStart()
void
onStop()
void
onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)
void
showCheckInConfirmation(int points)
Notifies the view to that check-in is successfulvoid
showCheckInDetails(Place place, int points)
Notifies the view to show check-in detailsvoid
showCheckInNotAvailable()
Notifies the view to that check-in is not available at current locationvoid
submitChallenge()
Submit challenge response-
Methods inherited from class com.cheetahdigital.challenges.ui.responses.base.ChallengeResponseFragment
getChallenge, getChallengeIdentifier, getResponseIdentifier, getRewardString, isAlert, onChallengeRespondSuccess, sendRespondSuccessFragmentResult, showErrorMessage, showLoading, showReward
-
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
captureSharedElementValues, getPresenter, getScreenName, getSharedElementViews, initSharedElementValues, isSharedAnimationEnabled, onAttach, onCreateView, onDestroyView, startActivity, startActivityForResult
-
Methods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, 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, onActivityCreated, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, onViewStateRestored, postponeEnterTransition, postponeEnterTransition, 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 java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.cheetahdigital.challenges.ui.responses.base.ChallengeResponseView
onChallengeRespondSuccess, showErrorMessage, showLoading, showReward
-
-
-
-
Method Detail
-
getContentLayoutId
protected int getContentLayoutId()
Description copied from class:MvpFragmentView
Provide the Content Layout ID which is of a Layout Resource Reference of Android- Specified by:
getContentLayoutId
in classMvpFragmentView<V extends CheckInView,P extends CheckInPresenter<V>>
- Returns:
- id of the content layout
-
createPresenter
protected P createPresenter()
Description copied from class:MvpFragmentView
InstantiateMvpFragmentView.mPresenter
to be used for thisMvpActivityView
- Specified by:
createPresenter
in classMvpFragmentView<V extends CheckInView,P extends CheckInPresenter<V>>
- Returns:
- return the
MvpBasePresenter
-
onCreate
public void onCreate(@Nullable android.os.Bundle savedInstanceState)
- Overrides:
onCreate
in classChallengeResponseFragment<V extends CheckInView,P extends CheckInPresenter<V>>
-
onViewCreated
public void onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)
- Overrides:
onViewCreated
in classChallengeResponseFragment<V extends CheckInView,P extends CheckInPresenter<V>>
-
showCheckInDetails
public void showCheckInDetails(Place place, int points)
Description copied from interface:CheckInView
Notifies the view to show check-in details- Specified by:
showCheckInDetails
in interfaceCheckInView
- Parameters:
place
- thePlace
modelpoints
- the check-in reward
-
showCheckInNotAvailable
public void showCheckInNotAvailable()
Description copied from interface:CheckInView
Notifies the view to that check-in is not available at current location- Specified by:
showCheckInNotAvailable
in interfaceCheckInView
-
showCheckInConfirmation
public void showCheckInConfirmation(int points)
Description copied from interface:CheckInView
Notifies the view to that check-in is successful- Specified by:
showCheckInConfirmation
in interfaceCheckInView
- Parameters:
points
- the check-in reward
-
submitChallenge
public void submitChallenge()
Description copied from class:ChallengeResponseFragment
Submit challenge response- Specified by:
submitChallenge
in classChallengeResponseFragment<V extends CheckInView,P extends CheckInPresenter<V>>
-
onClick
public void onClick(android.view.View view)
- Specified by:
onClick
in interfaceandroid.view.View.OnClickListener
- Overrides:
onClick
in classChallengeResponseFragment<V extends CheckInView,P extends CheckInPresenter<V>>
-
onActivityResult
public void onActivityResult(int requestCode, int resultCode, @Nullable android.content.Intent data)
- Overrides:
onActivityResult
in classandroidx.fragment.app.Fragment
-
onLocationPermissionGranted
public void onLocationPermissionGranted()
- Specified by:
onLocationPermissionGranted
in interfaceLocationPermissionHelper.LocationPermissionCallback
-
onLocationPermissionDenied
public void onLocationPermissionDenied()
- Specified by:
onLocationPermissionDenied
in interfaceLocationPermissionHelper.LocationPermissionCallback
-
onStart
public void onStart()
- Overrides:
onStart
in classandroidx.fragment.app.Fragment
-
onStop
public void onStop()
- Overrides:
onStop
in classandroidx.fragment.app.Fragment
-
-