//Rebinds the adapter of the recyler view to one suitable for navigation public static RecyclerView configureRecyclerViewForNavigation(Itinerary itinerary, RecyclerView recyclerView) { //Creates a new adapter with for the steps, allows the layout in the recycler view to be changed from the one used in route selection StepRowAdapter adapter = new StepRowAdapter(itinerary.Legs); recyclerView.SetAdapter(adapter); return(recyclerView); }
private void updateNavigationUiTripInformationWindows(int currentStep, StepRowAdapter adapter) { //Gets the iconId, instruction, and distance from the adapter int iconId = adapter.IconId(currentStep); String instruction = adapter.InstructionText(currentStep); String distance = adapter.DistanceText(currentStep); //Sets the top bar instruction, distance, and icon to the same values FindViewById <TextView>(Resource.Id.turnInstruction).Text = instruction; FindViewById <TextView>(Resource.Id.stepDistanceText).Text = distance; FindViewById <ImageView>(Resource.Id.navigationUiImage).SetImageResource(iconId); }