Class SearchFlowFragment

java.lang.Object
androidx.fragment.app.Fragment
com.trimblemaps.mapsdk.plugins.places.searchflow.ui.SearchFlowFragment
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, PlaceAutocompleteFragment.PoiCategorySelectedListener, PoisResponseListener, DwellTimeListener, FacilityDetailsListener, FacilityDetailsPhoneCallListener

  • Field Details

    • TAG

      public static final String TAG
      See Also:
    • POIS_SOURCE_ID

      public static final String POIS_SOURCE_ID
      See Also:
    • placeSelectionListener

      protected PlaceSelectionListener placeSelectionListener
    • placeDetailsListener

      protected PlaceDetailsListener placeDetailsListener
    • onStyleLoadedListener

      protected com.trimblemaps.mapsdk.maps.Style.OnStyleLoaded onStyleLoadedListener
    • rootView

      protected android.view.View rootView
    • mapView

      protected com.trimblemaps.mapsdk.maps.MapView mapView
    • fragment

      protected PlaceAutocompleteFragment fragment
    • bottomSheet

      protected CurrentPlaceSelectionBottomSheet bottomSheet
    • trimbleMap

      protected com.trimblemaps.mapsdk.maps.TrimbleMapsMap trimbleMap
    • selectedLocation

      protected com.trimblemaps.api.geocoding.v1.models.TrimbleMapsLocation selectedLocation
    • selectedLocationPoints

      protected List<com.trimblemaps.geojson.Point> selectedLocationPoints
    • trimblePlacesPlugin

      protected TrimblePlacesPlugin trimblePlacesPlugin
    • poisSource

      protected com.trimblemaps.mapsdk.style.sources.GeoJsonSource poisSource
    • bottomSheetShowing

      protected boolean bottomSheetShowing
    • shouldShowBottomSheet

      protected boolean shouldShowBottomSheet
    • onMapReadyCallback

      protected com.trimblemaps.mapsdk.maps.OnMapReadyCallback onMapReadyCallback
    • onMapMoveListener

      protected com.trimblemaps.mapsdk.maps.TrimbleMapsMap.OnMoveListener onMapMoveListener
    • internalPlaceSelectionListener

      protected PlaceSelectionListener internalPlaceSelectionListener
    • internalPlaceDetailsListener

      protected PlaceDetailsListener internalPlaceDetailsListener
    • addStopOnClickListener

    • recenterClickListener

    • featureCollection

      protected com.trimblemaps.geojson.FeatureCollection featureCollection
    • featureCollectionDrawable

      protected android.graphics.drawable.Drawable featureCollectionDrawable
    • onMapClickListener

      protected com.trimblemaps.mapsdk.maps.TrimbleMapsMap.OnMapClickListener onMapClickListener
    • imagesMap

      protected HashMap<String,android.graphics.Bitmap> imagesMap
    • CALLOUT_LAYER_ID

      protected static final String CALLOUT_LAYER_ID
      Setup a layer with Android SDK call-outs

      name of the feature is used as key for the iconImage

      See Also:
    • CLUSTER_LAYER_ID

      protected static final String CLUSTER_LAYER_ID
      See Also:
    • CLUSTER_LAYER_CIRCLE_ID

      protected static final String CLUSTER_LAYER_CIRCLE_ID
      See Also:
    • CLUSTER_ICON_ID

      protected static final String CLUSTER_ICON_ID
      See Also:
    • CLUSTER_ICON_NUMBER_ID

      protected static final String CLUSTER_ICON_NUMBER_ID
      See Also:
  • Constructor Details

    • SearchFlowFragment

      public SearchFlowFragment()
  • Method Details

    • newInstance

      public static SearchFlowFragment newInstance()
    • newInstance

      public static SearchFlowFragment newInstance(@Nullable SearchFlowOptions options)
    • onCreateView

      @Nullable public android.view.View onCreateView(android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, @Nullable android.os.Bundle savedInstanceState)
      Overrides:
      onCreateView in class androidx.fragment.app.Fragment
    • onViewCreated

      public void onViewCreated(android.view.View view, @Nullable android.os.Bundle savedInstanceState)
      Overrides:
      onViewCreated in class androidx.fragment.app.Fragment
    • onActivityCreated

      public void onActivityCreated(@Nullable android.os.Bundle savedInstanceState)
      Overrides:
      onActivityCreated in class androidx.fragment.app.Fragment
    • onDestroyView

      public void onDestroyView()
      Overrides:
      onDestroyView in class androidx.fragment.app.Fragment
    • onStart

      public void onStart()
      Overrides:
      onStart in class androidx.fragment.app.Fragment
    • onPause

      public void onPause()
      Overrides:
      onPause in class androidx.fragment.app.Fragment
    • onResume

      public void onResume()
      Overrides:
      onResume in class androidx.fragment.app.Fragment
    • onStop

      public void onStop()
      Overrides:
      onStop in class androidx.fragment.app.Fragment
    • onDestroy

      public void onDestroy()
      Overrides:
      onDestroy in class androidx.fragment.app.Fragment
    • onSaveInstanceState

      public void onSaveInstanceState(@NonNull android.os.Bundle outState)
      Overrides:
      onSaveInstanceState in class androidx.fragment.app.Fragment
    • onLowMemory

      public void onLowMemory()
      Specified by:
      onLowMemory in interface android.content.ComponentCallbacks
      Overrides:
      onLowMemory in class androidx.fragment.app.Fragment
    • setOnSettingsClickListener

      public void setOnSettingsClickListener(SettingsClickListener listener)
    • setOnPlaceSelectedListener

      public void setOnPlaceSelectedListener(PlaceSelectionListener listener)
    • setOnPlaceDetailsFetchedListener

      public void setOnPlaceDetailsFetchedListener(PlaceDetailsListener listener)
    • setOnStyleLoadedListener

      public void setOnStyleLoadedListener(com.trimblemaps.mapsdk.maps.Style.OnStyleLoaded listener)
    • setOnLoadedListenerListener

      public void setOnLoadedListenerListener(SearchFlowFragment.OnLoadedListener listener)
    • setPlaceChosenButtonText

      public void setPlaceChosenButtonText(String placeChosenButtonText)
      Override the default text on the "choose place" button in the bottom sheet
      Parameters:
      placeChosenButtonText -
    • setPlaceOptions

      public void setPlaceOptions(PlaceOptions placeOptions)
    • setCenter

      public void setCenter(com.trimblemaps.geojson.Point center)
    • getMap

      public com.trimblemaps.mapsdk.maps.TrimbleMapsMap getMap()
    • bindListeners

      protected void bindListeners()
    • bindViews

      protected void bindViews()
    • bindFragment

      protected void bindFragment(@Nullable android.os.Bundle savedInstanceState)
    • zoomOutCameraOnCategorySelected

      public void zoomOutCameraOnCategorySelected()
      Specified by:
      zoomOutCameraOnCategorySelected in interface PlaceAutocompleteFragment.PoiCategorySelectedListener
    • onStyleLoaded

      protected void onStyleLoaded(@NonNull com.trimblemaps.mapsdk.maps.Style style)
    • handleBackPressed

      public boolean handleBackPressed()
    • removeOnBackPressedCallback

      public void removeOnBackPressedCallback()
    • setUpData

      public void setUpData(com.trimblemaps.geojson.FeatureCollection collection, android.graphics.drawable.Drawable drawable)
      Sets up all of the sources and layers needed for this example
      Specified by:
      setUpData in interface PoisResponseListener
      Parameters:
      collection - the FeatureCollection to set equal to the globally-declared FeatureCollection
    • removePoiBubbles

      public void removePoiBubbles()
      Specified by:
      removePoiBubbles in interface PoisResponseListener
    • handleClickIcon

      protected boolean handleClickIcon(android.graphics.PointF screenPoint)
    • getClusterChildren

      public List<com.trimblemaps.geojson.Feature> getClusterChildren(com.trimblemaps.geojson.Feature feature)
    • getClusterChildren

      public List<com.trimblemaps.geojson.Feature> getClusterChildren(List<com.trimblemaps.geojson.Feature> features)
    • addCustomDataToBubble

      protected void addCustomDataToBubble(com.trimblemaps.geojson.Feature feature, com.trimblemaps.mapsdk.annotations.BubbleLayout bubbleLayout)
    • refreshSource

      protected void refreshSource()
      Updates the display of data on the map after the FeatureCollection has been modified
    • setUpInfoWindowLayer

      protected void setUpInfoWindowLayer(@NonNull com.trimblemaps.mapsdk.maps.Style loadedStyle)
    • onFacilityDetailsFetched

      public void onFacilityDetailsFetched(FacilityDetails facilityDetails)
      Specified by:
      onFacilityDetailsFetched in interface FacilityDetailsListener
    • callPhoneNumber

      public void callPhoneNumber(String phoneNumber)
      Specified by:
      callPhoneNumber in interface FacilityDetailsPhoneCallListener
    • onDwellTimesFetched

      public void onDwellTimesFetched(com.trimblemaps.api.dwelltime.v1.models.DwellTimeResponse dwellTimes)
      Specified by:
      onDwellTimesFetched in interface DwellTimeListener