tripkit-android / com.skedgo.tripkit.ui.search / LocationSearchFragment
LocationSearchFragment
class LocationSearchFragment :
AbstractTripKitFragment
This is a self-contained location search component which merges search results from both SkedGo's search results as well as Google Places.
Use it with its Builder:
LocationSearchFragment.Builder()
.withBounds(mMap.projection.visibleRegion.latLngBounds)
.near(mMap.cameraPosition.target)
.withHint(getString(R.string.search))
.allowCurrentLocation(true)
.allowDropPin()
.build()
Types
Name | Summary |
---|---|
Builder | Used to create a new instance of the fragment.class Builder |
OnCurrentLocationSelectedListener | This callback will be invoked when the user chooses "Current Location"interface OnCurrentLocationSelectedListener |
OnDropPinSelectedListener | This callback will be invoked when the user chooses "Choose on Map"interface OnDropPinSelectedListener |
OnLocationSelectedListener | This callback will be invoked when a search result is clicked.interface OnLocationSelectedListener |
Constructors
Name | Summary |
---|---|
<init> | This is a self-contained location search component which merges search results from both SkedGo's search results as well as Google Places.LocationSearchFragment() |
Functions
Name | Summary |
---|---|
setOnCurrentLocationSelectedListener | fun setOnCurrentLocationSelectedListener(callback: OnCurrentLocationSelectedListener): Unit fun setOnCurrentLocationSelectedListener(listener: () -> Unit ): Unit |
setOnDropPinSelectedListener | fun setOnDropPinSelectedListener(callback: OnDropPinSelectedListener): Unit fun setOnDropPinSelectedListener(listener: () -> Unit ): Unit |
setOnLocationSelectedListener | fun setOnLocationSelectedListener(callback: OnLocationSelectedListener): Unit fun setOnLocationSelectedListener(listener: ( Location ) -> Unit ): Unit |