Class PlacesListFragment<A extends PlacesAdapter,V extends PlacesListView,P extends PlacesListPresenter<V>>
- java.lang.Object
- 
- androidx.fragment.app.Fragment
- 
- com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V,P>
- 
- com.cheetahdigital.uikit.architecture.lce.LceFragmentView<V,P>
- 
- com.cheetahdigital.uikit.architecture.refreshable.RefreshableFragmentView<V,P>
- 
- com.cheetahdigital.uikit.widget.list.ListFragmentView<V,P>
- 
- com.cheetahdigital.uikit.widget.list.EndlessListFragmentView<A,V,P>
- 
- com.cheetahdigital.locations.ui.places.list.PlacesListFragment<A,V,P>
 
 
 
 
 
 
 
- 
- All Implemented Interfaces:
- android.content.ComponentCallbacks,- android.view.View.OnCreateContextMenuListener,- androidx.lifecycle.LifecycleOwner,- androidx.lifecycle.ViewModelStoreOwner,- androidx.savedstate.SavedStateRegistryOwner,- androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener,- AnalyticsManager.AnalyticsScreen,- PlacesListView,- LceView,- MvpLceView,- MvpView,- RefreshableView,- EndlessListView,- ListView
 - Direct Known Subclasses:
- NearbyPlacesFragment
 
 public class PlacesListFragment<A extends PlacesAdapter,V extends PlacesListView,P extends PlacesListPresenter<V>> extends EndlessListFragmentView<A,V,P> implements PlacesListView The fragment class for the list ofPlace- IntentKey.PRIMARY_PARAMS-- PlacesParamsto use
- PLACES_USE_DEFAULT_SERVER- return true if program settings search radius and search radius unit will be used. Otherwise, false. Default is true.
- PLACES_CUSTOM_DISTANCE- distance in- intto search on the area. This will only take effect when- PLACES_USE_DEFAULT_SERVERis false
- PLACES_CUSTOM_UNIT- unit to be used to search the area.This will only take effect when *- PLACES_USE_DEFAULT_SERVERis false. Please see the list of available custom unit in- CustomUnit
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringPLACES_CUSTOM_DISTANCEstatic java.lang.StringPLACES_CUSTOM_UNITstatic java.lang.StringPLACES_USE_DEFAULT_SERVERstatic java.lang.StringTAG- 
Fields inherited from class com.cheetahdigital.uikit.widget.list.EndlessListFragmentViewmEndlessRecyclerOnScrollListener
 - 
Fields inherited from class com.cheetahdigital.uikit.widget.list.ListFragmentViewmLinearLayoutManager, mListView, mSelectedPosition
 - 
Fields inherited from class com.cheetahdigital.uikit.architecture.refreshable.RefreshableFragmentViewmSwipeRefreshLayout
 - 
Fields inherited from class com.cheetahdigital.uikit.architecture.lce.LceFragmentViewmContentView, mErrorView, mInitialLoad, mLoadingView
 
- 
 - 
Constructor SummaryConstructors Constructor Description PlacesListFragment()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendPlacesList(java.util.List<Place> places, int totalEntries)This notifies the view to append the list ofPlaceto the existing listvoidattach(PlacesMapFragment mapFragment)voidclear()This notifies the view to clear the adapter inPlacesListFragmentvoidclearData()Clears the places listprotected androidx.recyclerview.widget.RecyclerView.ItemDecorationcreateItemDecoration()Create theRecyclerView.ItemDecorationused in the RecyclerView.protected PlacesAdaptercreatePlacesAdapter()Create an instance ofPlacesAdapter.protected PcreatePresenter()InstantiateMvpFragmentView.mPresenterto be used for thisMvpActivityViewprotected intgetContentLayoutId()Provide the Content Layout ID which is of a Layout Resource Reference of AndroidPlacesMapFragmentgetMap()intgetScreenName()android.view.ViewonCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)voidsearch(double latitude, double longitude)Search for nearby placesvoidsearch(double latitude, double longitude, java.lang.Double radius)Search for nearby places with specified radiusvoidshowPlacesList(java.util.List<Place> places, int totalEntries)This notifies the view to show the list ofPlace- 
Methods inherited from class com.cheetahdigital.uikit.widget.list.EndlessListFragmentViewonFinishLoadMore, onFinishRefresh, onLoadMoreFailed, setListTotalEntries
 - 
Methods inherited from class com.cheetahdigital.uikit.widget.list.ListFragmentViewgetLayoutManager, isListAnimationEnabled, onAttach, setExitTransition, showContent, startActivity, startActivityForResult
 - 
Methods inherited from class com.cheetahdigital.uikit.architecture.refreshable.RefreshableFragmentViewonRefresh, onRefreshFailed, reloadData, showError, showLoading, startRefresh
 - 
Methods inherited from class com.cheetahdigital.uikit.architecture.lce.LceFragmentViewonLoadFailed, onLoadSuccess, onViewCreated, setErrorViewClickListener
 - 
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentViewcaptureSharedElementValues, getPresenter, getSharedElementViews, initSharedElementValues, isSharedAnimationEnabled, onDestroyView
 - 
Methods inherited from class androidx.fragment.app.Fragmentdump, 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, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, 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.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface com.cheetahdigital.uikit.widget.list.EndlessListViewonFinishLoadMore, onLoadMoreFailed
 - 
Methods inherited from interface com.cheetahdigital.uikit.architecture.lce.LceViewonLoadFailed, onLoadSuccess, setErrorViewClickListener
 - 
Methods inherited from interface com.cheetahdigital.uikit.architecture.lce.MvpLceViewshowContent, showError, showLoading
 - 
Methods inherited from interface com.cheetahdigital.uikit.architecture.refreshable.RefreshableViewonFinishRefresh, onRefreshFailed
 
- 
 
- 
- 
- 
Field Detail- 
TAGpublic static final java.lang.String TAG - See Also:
- Constant Field Values
 
 - 
PLACES_USE_DEFAULT_SERVERpublic static final java.lang.String PLACES_USE_DEFAULT_SERVER - See Also:
- Constant Field Values
 
 - 
PLACES_CUSTOM_DISTANCEpublic static final java.lang.String PLACES_CUSTOM_DISTANCE - See Also:
- Constant Field Values
 
 - 
PLACES_CUSTOM_UNITpublic static final java.lang.String PLACES_CUSTOM_UNIT - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
onCreateView@Nullable public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)- Overrides:
- onCreateViewin class- EndlessListFragmentView<A extends PlacesAdapter,V extends PlacesListView,P extends PlacesListPresenter<V>>
 
 - 
getScreenNamepublic int getScreenName() - Specified by:
- getScreenNamein interface- AnalyticsManager.AnalyticsScreen
- Overrides:
- getScreenNamein class- MvpFragmentView<V extends PlacesListView,P extends PlacesListPresenter<V>>
 
 - 
getContentLayoutIdprotected int getContentLayoutId() Description copied from class:MvpFragmentViewProvide the Content Layout ID which is of a Layout Resource Reference of Android- Specified by:
- getContentLayoutIdin class- MvpFragmentView<V extends PlacesListView,P extends PlacesListPresenter<V>>
- Returns:
- id of the content layout
 
 - 
createPresenterprotected P createPresenter() Description copied from class:MvpFragmentViewInstantiateMvpFragmentView.mPresenterto be used for thisMvpActivityView- Specified by:
- createPresenterin class- MvpFragmentView<V extends PlacesListView,P extends PlacesListPresenter<V>>
- Returns:
- return the MvpBasePresenter
 
 - 
clearDatapublic void clearData() Clears the places list
 - 
showPlacesListpublic void showPlacesList(java.util.List<Place> places, int totalEntries) Description copied from interface:PlacesListViewThis notifies the view to show the list ofPlace- Specified by:
- showPlacesListin interface- PlacesListView
- Parameters:
- places- list of- Place
- totalEntries- total number of entries
 
 - 
appendPlacesListpublic void appendPlacesList(java.util.List<Place> places, int totalEntries) Description copied from interface:PlacesListViewThis notifies the view to append the list ofPlaceto the existing list- Specified by:
- appendPlacesListin interface- PlacesListView
- Parameters:
- places- list of- Placefrom a certain page
- totalEntries- total number of entries
 
 - 
clearpublic void clear() Description copied from interface:PlacesListViewThis notifies the view to clear the adapter inPlacesListFragment- Specified by:
- clearin interface- PlacesListView
 
 - 
searchpublic void search(double latitude, double longitude)Search for nearby places- Parameters:
- latitude- current location latitude value
- longitude- current location longitude value
 
 - 
searchpublic void search(double latitude, double longitude, java.lang.Double radius)Search for nearby places with specified radius- Parameters:
- latitude- place latitude value
- longitude- place longitude value
- radius- search radius distance
 
 - 
createPlacesAdapterprotected PlacesAdapter createPlacesAdapter() Create an instance ofPlacesAdapter. Usually used ifPlacesAdapterwas subclassed.- Returns:
- instance of PlacesAdapter
 
 - 
createItemDecorationprotected androidx.recyclerview.widget.RecyclerView.ItemDecoration createItemDecoration() Create theRecyclerView.ItemDecorationused in the RecyclerView. This will be invoked when initializing the list for the first time.- Returns:
- instance of RecyclerView.ItemDecorationfor the RecyclerView
 
 - 
attachpublic void attach(PlacesMapFragment mapFragment) 
 - 
getMappublic PlacesMapFragment getMap() 
 
- 
 
-