U
- the instance type of MarkerViewSymbolLayer
instead. An example of converting Android
SDK views to be used as a symbol see https://github.com/mapbox/mapbox-gl-native/blob/68f32bc104422207c64da8d90e8411b138d87f04/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolGeneratorActivity.java@Deprecated public abstract static class MapboxMap.MarkerViewAdapter<U extends MarkerView> extends Object
Constructor and Description |
---|
MarkerViewAdapter(Context context)
Deprecated.
Create an instance of MarkerViewAdapter.
|
Modifier and Type | Method and Description |
---|---|
Context |
getContext()
Deprecated.
Returns the context associated to the hosting MapView.
|
Class<U> |
getMarkerClass()
Deprecated.
Returns the generic type of the used MarkerView.
|
abstract View |
getView(U marker,
View convertView,
ViewGroup parent)
Deprecated.
Called when an MarkerView will be added to the MapView.
|
Pools.SimplePool<View> |
getViewReusePool()
Deprecated.
Returns the pool used to store reusable Views.
|
void |
onDeselect(U marker,
View convertView)
Deprecated.
Called when a MarkerView is deselected from the MapView.
|
boolean |
onSelect(U marker,
View convertView,
boolean reselectionFromRecycling)
Deprecated.
Called when a MarkerView is selected from the MapView.
|
boolean |
prepareViewForReuse(MarkerView marker,
View convertView)
Deprecated.
Called when an MarkerView is removed from the MapView or the View object is going to be reused.
|
void |
releaseView(View view)
Deprecated.
Release a View to the ViewPool.
|
public MarkerViewAdapter(Context context)
context
- the context associated to a MapView@Nullable public abstract View getView(@NonNull U marker, @Nullable View convertView, @NonNull ViewGroup parent)
marker
- the model representing the MarkerViewconvertView
- the reusable viewparent
- the parent ViewGroup of the convertviewpublic boolean prepareViewForReuse(@NonNull MarkerView marker, @NonNull View convertView)
This method should be used to reset an animated view back to it's original state for view reuse.
Returning true indicates you want to the view reuse to be handled automatically.
Returning false indicates you want to perform an animation and you are required calling
releaseView(View)
yourself.
marker
- the model representing the MarkerViewconvertView
- the reusable viewpublic boolean onSelect(@NonNull U marker, @NonNull View convertView, boolean reselectionFromRecycling)
Returning true from this method indicates you want to move the MarkerView to the selected state. Returning false indicates you want to animate the View first an manually select the MarkerView when appropriate.
marker
- the model representing the MarkerViewconvertView
- the reusable viewreselectionFromRecycling
- indicates if the onSelect callback is the initial selection
callback or that selection occurs due to recreation of selected markerpublic void onDeselect(@NonNull U marker, @NonNull View convertView)
marker
- the model representing the MarkerViewconvertView
- the reusable viewpublic final Class<U> getMarkerClass()
public final Pools.SimplePool<View> getViewReusePool()
public final Context getContext()
public final void releaseView(View view)
view
- the view to be released© 2015–2017 Mapbox. All rights reserved.