Trip
@CarProtocol
public final class Trip
Represents information about a trip including destinations, steps, and travel estimates.
This information data may be displayed in different places in the car such as the instrument cluster screens, heads-up display and floating navigation bar.
Floating navigation bar can show current navigating info in three templates including MapTemplate, RoutePreviewNavigationTemplate and PlaceListNavigationTemplate. The navigating steps can be added with the use of addStep. There are three navigation info showing in the floating nav bar including:
- The current road description get from
getCueof the currentStep, which gets from the first element ofgetSteps - The remaining distance of the current road get from
getRemainingDistanceof the first element ofgetStepTravelEstimates - The turn icon get from
getIconfrom theManeuverof the currentStep
Summary
Nested types |
|---|
public final class Trip.BuilderA builder of |
Public methods |
|
|---|---|
boolean |
|
@Nullable CarText |
Returns the text that describes the current road. |
@NonNull List<TravelEstimate> |
Returns the list of |
@NonNull List<Destination> |
Returns the list of destinations for this trip. |
@NonNull List<TravelEstimate> |
Returns the list of |
@NonNull List<Step> |
getSteps()Returns the list of steps for the trip. |
int |
hashCode() |
boolean |
Returns whether the trip is in a loading state. |
@NonNull String |
toString() |
Public methods
getCurrentRoad
public @Nullable CarText getCurrentRoad()
Returns the text that describes the current road.
| See also | |
|---|---|
setCurrentRoad |
getDestinationTravelEstimates
public @NonNull List<TravelEstimate> getDestinationTravelEstimates()
Returns the list of TravelEstimates for the Destinations in the trip.
| See also | |
|---|---|
addDestination |
getDestinations
public @NonNull List<Destination> getDestinations()
Returns the list of destinations for this trip.
| See also | |
|---|---|
addDestination |
getStepTravelEstimates
public @NonNull List<TravelEstimate> getStepTravelEstimates()
Returns the list of TravelEstimates for the Steps in the trip.
| See also | |
|---|---|
addDestination |
getSteps
public @NonNull List<Step> getSteps()
Returns the list of steps for the trip.
| See also | |
|---|---|
addStep |
isLoading
public boolean isLoading()
Returns whether the trip is in a loading state.
| See also | |
|---|---|
setLoading |