public class SimpleTransportModePanelAdapter extends TransportModePanelAdapter
TransportModePanel
to show a TabLayout
structure displaying
all possible transport modes with icons.Constructor and Description |
---|
SimpleTransportModePanelAdapter(android.content.Context context)
Constructs a new instance using all supported
RouteOptions.TransportMode elements. |
SimpleTransportModePanelAdapter(android.content.Context context,
java.util.List<com.here.android.mpa.routing.RouteOptions.TransportMode> transportModes)
Constructs a new instance using the given list of
RouteOptions.TransportMode elements. |
Modifier and Type | Method and Description |
---|---|
androidx.fragment.app.Fragment |
getContent(com.here.android.mpa.routing.RouteOptions.TransportMode mode)
Gets the fragment of
TransportModePanel . |
TabView |
getCustomTabView(com.here.android.mpa.routing.RouteOptions.TransportMode mode)
Gets a custom
TabView with drawable icons which can be used to add labels
by calling TabView.setLabel(String) in the respective switch statements. |
TabView |
getTabCustomView(com.here.android.mpa.routing.RouteOptions.TransportMode mode)
Deprecated.
Please use
getCustomTabView(com.here.android.mpa.routing.RouteOptions.TransportMode) instead. |
boolean |
isContentVisible()
Indicates whether the content is visible.
|
getCount, getItem, getItemPosition, getPageTitle, getTabView, getTransportModes, setTransportModes
destroyItem, finishUpdate, instantiateItem, isViewFromObject, restoreState, saveState, setPrimaryItem, startUpdate
public SimpleTransportModePanelAdapter(android.content.Context context)
RouteOptions.TransportMode
elements.context
- the required Context
.public SimpleTransportModePanelAdapter(android.content.Context context, java.util.List<com.here.android.mpa.routing.RouteOptions.TransportMode> transportModes)
RouteOptions.TransportMode
elements.context
- the required Context
.transportModes
- a list of RouteOptions.TransportMode
elements.public androidx.fragment.app.Fragment getContent(com.here.android.mpa.routing.RouteOptions.TransportMode mode)
TransportModePanelAdapter
TransportModePanel
.
If you don't want to display the content and only want to have a TabView
in TransportModePanel
,
please return null and return false from TransportModePanelAdapter.isContentVisible()
method.
getContent
in class TransportModePanelAdapter
mode
- the RouteOptions.TransportMode
.@Deprecated public TabView getTabCustomView(com.here.android.mpa.routing.RouteOptions.TransportMode mode)
getCustomTabView(com.here.android.mpa.routing.RouteOptions.TransportMode)
instead.TabView
with drawable icons which can be used to add labels
by calling TabView.setLabel(String)
in the respective switch statements.getTabCustomView
in class TransportModePanelAdapter
mode
- the RouteOptions.TransportMode
.TabView
that is used to represent the given transport mode.public TabView getCustomTabView(com.here.android.mpa.routing.RouteOptions.TransportMode mode)
TabView
with drawable icons which can be used to add labels
by calling TabView.setLabel(String)
in the respective switch statements.getCustomTabView
in class TransportModePanelAdapter
mode
- the RouteOptions.TransportMode
.TabView
that is used to represent the given transport mode.public boolean isContentVisible()
TransportModePanelAdapter
RouteOptions.TransportMode
in the TransportModePanel
. If the method returns false, the method
TransportModePanelAdapter.getItem(int)
will be ignored.isContentVisible
in class TransportModePanelAdapter