forked from organicmaps/organicmaps
[android] Added displaying the altitude chart on big tablet UI
This commit is contained in:
parent
ec8a319976
commit
590abc589c
12 changed files with 115 additions and 330 deletions
|
@ -1,171 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:wheel="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/planning_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
style="@style/MwmWidget.Floating.Panel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/routing_selector_size"
|
||||
android:elevation="3dp"
|
||||
tools:targetApi="lollipop">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/progress_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal"
|
||||
tools:background="#8000FF00">
|
||||
|
||||
<com.mapswithme.maps.widget.WheelProgressView
|
||||
android:id="@+id/progress_vehicle"
|
||||
style="@style/MwmWidget.ProgressWheel.RoutingPlan"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="@dimen/margin_double"
|
||||
android:layout_height="0dp"/>
|
||||
|
||||
<com.mapswithme.maps.widget.WheelProgressView
|
||||
android:id="@+id/progress_pedestrian"
|
||||
style="@style/MwmWidget.ProgressWheel.RoutingPlan"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="@dimen/margin_double"
|
||||
android:layout_height="0dp"/>
|
||||
|
||||
<com.mapswithme.maps.widget.WheelProgressView
|
||||
android:id="@+id/progress_bicycle"
|
||||
style="@style/MwmWidget.ProgressWheel.RoutingPlan"
|
||||
tools:visibility="visible"/>
|
||||
</LinearLayout>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/route_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/vehicle"
|
||||
android:layout_width="@dimen/routing_selector_size"
|
||||
android:layout_height="@dimen/routing_selector_size"
|
||||
android:layout_marginEnd="@dimen/margin_double"
|
||||
android:layout_marginRight="@dimen/margin_double"
|
||||
tools:button="@drawable/ic_drive"
|
||||
tools:buttonTint="?colorAccent"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/pedestrian"
|
||||
android:layout_width="@dimen/routing_selector_size"
|
||||
android:layout_height="@dimen/routing_selector_size"
|
||||
android:layout_marginEnd="@dimen/margin_double"
|
||||
android:layout_marginRight="@dimen/margin_double"
|
||||
tools:button="@drawable/ic_walk"
|
||||
tools:buttonTint="?colorAccent"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/bicycle"
|
||||
android:layout_width="@dimen/routing_selector_size"
|
||||
android:layout_height="@dimen/routing_selector_size"
|
||||
tools:button="@drawable/ic_bicycle"
|
||||
tools:buttonTint="?colorAccent"/>
|
||||
</RadioGroup>
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/details_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/shadow_top"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/details_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="?windowBackgroundForced"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?dividerHorizontal"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/numbers"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="@dimen/margin_base"
|
||||
tools:background="#4020202F">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number"
|
||||
tools:text="2d 23h 59m"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dot"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number.Secondary"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_toRightOf="@id/time"
|
||||
android:text="•"
|
||||
tools:ignore="HardcodedText"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/distance"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number.Secondary"
|
||||
android:layout_toRightOf="@id/dot"
|
||||
tools:text="1024 km"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/arrival"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number.Secondary"
|
||||
android:layout_below="@id/time"
|
||||
android:textSize="@dimen/text_size_routing_plan_detail_arrival"
|
||||
tools:text="Arrive at 12:34"/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/planning"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Status"
|
||||
android:layout_margin="16dp"
|
||||
android:text="@string/p2p_planning"
|
||||
android:textColor="?secondary"
|
||||
android:visibility="gone"
|
||||
tools:layout_gravity="right"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Status"
|
||||
android:layout_margin="@dimen/margin_base"
|
||||
android:text="@string/routing_planning_error"
|
||||
android:textColor="@color/base_red"
|
||||
android:visibility="gone"
|
||||
tools:layout_gravity="right|bottom"
|
||||
tools:layout_marginTop="14dp"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?dividerHorizontal"/>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
48
android/res/layout/altitude_chart_panel.xml
Normal file
48
android/res/layout/altitude_chart_panel.xml
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="@dimen/altitude_chart_margin_bottom"
|
||||
android:layout_marginTop="@dimen/altitude_chart_margin_top"
|
||||
android:paddingLeft="@dimen/altitude_chart_container_padding_left"
|
||||
android:paddingStart="@dimen/altitude_chart_container_padding_left"
|
||||
android:paddingRight="@dimen/altitude_chart_container_padding_left"
|
||||
android:paddingEnd="@dimen/altitude_chart_container_padding_left"
|
||||
android:orientation="vertical"
|
||||
tools:showIn="@layout/fragment_routing">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/numbers"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/altitude_chart_time_distance_height"
|
||||
android:layout_marginBottom="@dimen/altitude_chart_time_distance_margin_bottom">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number"
|
||||
android:textStyle="bold"
|
||||
tools:text="33 min" />
|
||||
|
||||
<TextView
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number.Secondary"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/distance"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number"
|
||||
tools:text="1024 km" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/altitude_chart"
|
||||
android:layout_width="@dimen/altitude_chart_image_width"
|
||||
android:layout_height="@dimen/altitude_chart_image_height"
|
||||
android:layout_marginBottom="8dp" />
|
||||
</LinearLayout>
|
|
@ -8,6 +8,11 @@
|
|||
android:clickable="true">
|
||||
<include layout="@layout/routing_plan"/>
|
||||
|
||||
<include
|
||||
layout="@layout/altitude_chart_panel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
@ -18,10 +23,7 @@
|
|||
android:layout_height="1dp"
|
||||
android:background="?dividerHorizontal"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?windowBackgroundForced">
|
||||
<include layout="@layout/menu_route_plan_line"/>
|
||||
</FrameLayout>
|
||||
<include layout="@layout/start_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"/>
|
||||
</LinearLayout>
|
|
@ -4,55 +4,9 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="visible"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/altitude_chart_container_padding_left">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="@dimen/altitude_chart_margin_bottom"
|
||||
android:layout_marginTop="@dimen/altitude_chart_margin_top"
|
||||
android:orientation="vertical">
|
||||
<include layout="@layout/altitude_chart_panel" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/numbers"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/altitude_chart_time_distance_height"
|
||||
android:layout_marginBottom="@dimen/altitude_chart_time_distance_margin_bottom">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number"
|
||||
android:textStyle="bold"
|
||||
tools:text="33 min" />
|
||||
|
||||
<TextView
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number.Secondary"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="•"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/distance"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number"
|
||||
tools:text="1024 km" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView android:id="@+id/altitude_chart"
|
||||
android:layout_width="@dimen/altitude_chart_image_width"
|
||||
android:layout_height="@dimen/altitude_chart_image_height"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/p2p_start"
|
||||
style="@style/MwmWidget.Button.Start"
|
||||
android:padding="8dp"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body1"/>
|
||||
<include layout="@layout/start_button" />
|
||||
</LinearLayout>
|
|
@ -1,75 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/planning_frame"
|
||||
style="@style/MwmWidget.Floating.Panel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/routing_selector_size"
|
||||
android:paddingLeft="@dimen/margin_half"
|
||||
android:paddingStart="@dimen/margin_half"
|
||||
android:paddingRight="@dimen/margin_half_plus"
|
||||
android:paddingEnd="@dimen/margin_half_plus"
|
||||
android:clickable="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/numbers"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical|end"
|
||||
android:layout_toRightOf="@id/progress_frame"
|
||||
android:layout_toEndOf="@id/progress_frame"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
tools:layout_gravity="bottom|right">
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number"
|
||||
tools:text="2d 23h 59m"/>
|
||||
|
||||
<TextView
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number.Secondary"
|
||||
android:text="•"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
tools:ignore="HardcodedText"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/distance"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Number.Secondary"
|
||||
tools:text="1024 km"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/planning"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Status"
|
||||
android:layout_toRightOf="@id/progress_frame"
|
||||
android:layout_toEndOf="@id/progress_frame"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:text="@string/p2p_planning"
|
||||
android:textColor="?secondary"
|
||||
android:gravity="end"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
tools:layout_centerVertical="false"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error"
|
||||
style="@style/MwmWidget.TextView.PlanDetail.Status"
|
||||
android:layout_toRightOf="@id/route_type"
|
||||
android:layout_toEndOf="@id/route_type"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:text="@string/routing_planning_error"
|
||||
android:textColor="@color/base_red"
|
||||
android:gravity="end"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
tools:layout_centerVertical="false"
|
||||
tools:layout_alignParentBottom="true"/>
|
||||
</RelativeLayout>
|
12
android/res/layout/start_button.xml
Normal file
12
android/res/layout/start_button.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Button xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/p2p_start"
|
||||
style="@style/MwmWidget.Button.Start"
|
||||
android:padding="8dp"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body1"
|
||||
tools:showIn="@layout/menu_route_plan_line" />
|
|
@ -5,4 +5,7 @@
|
|||
<dimen name="nav_menu_content_height">64dp</dimen>
|
||||
<dimen name="nav_progress">8dp</dimen>
|
||||
<dimen name="nav_numbers_margin">32dp</dimen>
|
||||
|
||||
<!-- Altitude chart -->
|
||||
<dimen name="altitude_chart_image_width">328dp</dimen>
|
||||
</resources>
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
<dimen name="editor_auth_btn_height">36dp</dimen>
|
||||
<dimen name="editor_margin_timetable_left">50dp</dimen>
|
||||
|
||||
<!-- Phone bottom panel -->
|
||||
<!-- Altitude chart -->
|
||||
<dimen name="altitude_chart_container_padding_left">16dp</dimen>
|
||||
<dimen name="altitude_chart_margin_bottom">4dp</dimen>
|
||||
<dimen name="altitude_chart_margin_top">14dp</dimen>
|
||||
|
|
|
@ -19,9 +19,6 @@ import android.view.View;
|
|||
import android.view.View.OnClickListener;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Stack;
|
||||
|
||||
import com.mapswithme.maps.Framework.MapObjectListener;
|
||||
import com.mapswithme.maps.activity.CustomNavigateUpListener;
|
||||
import com.mapswithme.maps.ads.LikesManager;
|
||||
|
@ -1331,7 +1328,13 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
@Override
|
||||
public void onRouteBuilt() {
|
||||
mLogger.d("onRouteBuilt");
|
||||
if (!mIsFragmentContainer)
|
||||
if (mIsFragmentContainer)
|
||||
{
|
||||
RoutingPlanFragment fragment = (RoutingPlanFragment) getFragment(RoutingPlanFragment.class);
|
||||
if (fragment != null)
|
||||
fragment.showRouteAltitudeChart();
|
||||
}
|
||||
else
|
||||
{
|
||||
mRoutingPlanInplaceController.showRouteAltitudeChart();
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.mapswithme.maps.routing;
|
|||
|
||||
import android.animation.ValueAnimator;
|
||||
import android.app.Activity;
|
||||
import android.os.Build;
|
||||
import android.graphics.Bitmap;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.IdRes;
|
||||
import android.view.View;
|
||||
|
@ -35,13 +35,10 @@ public class RoutingPlanController extends ToolbarController
|
|||
private final WheelProgressView mProgressVehicle;
|
||||
private final WheelProgressView mProgressPedestrian;
|
||||
private final WheelProgressView mProgressBicycle;
|
||||
//TODO: ask Igor about this label
|
||||
// private final View mPlanningLabel;
|
||||
// private final View mErrorLabel;
|
||||
private final View mNumbersFrame;
|
||||
private View mNumbersFrame;
|
||||
private final TextView mNumbersTime;
|
||||
private final TextView mNumbersDistance;
|
||||
private final TextView mNumbersArrival;
|
||||
// private final TextView mNumbersArrival;
|
||||
|
||||
private final RotateDrawable mToggleImage = new RotateDrawable(R.drawable.ic_down);
|
||||
private int mFrameHeight;
|
||||
|
@ -75,9 +72,6 @@ public class RoutingPlanController extends ToolbarController
|
|||
|
||||
mToggle = (ImageView) mToolbar.findViewById(R.id.toggle);
|
||||
mSlotFrame = (SlotFrame) root.findViewById(R.id.slots);
|
||||
|
||||
View planFrame = root.findViewById(R.id.planning_frame);
|
||||
|
||||
mRouterTypes = (RadioGroup) mToolbar.findViewById(R.id.route_type);
|
||||
|
||||
setupRouterButton(R.id.vehicle, R.drawable.ic_drive, new View.OnClickListener()
|
||||
|
@ -118,18 +112,15 @@ public class RoutingPlanController extends ToolbarController
|
|||
mProgressPedestrian = (WheelProgressView) progressFrame.findViewById(R.id.progress_pedestrian);
|
||||
mProgressBicycle = (WheelProgressView) progressFrame.findViewById(R.id.progress_bicycle);
|
||||
|
||||
// mErrorLabel = planFrame.findViewById(R.id.error);
|
||||
mNumbersFrame = mActivity.findViewById(R.id.numbers);
|
||||
mNumbersFrame = mFrame.findViewById(R.id.numbers);
|
||||
if (mNumbersFrame == null) //We are in Phone mode not tablet
|
||||
{
|
||||
mNumbersFrame = mActivity.findViewById(R.id.numbers);
|
||||
}
|
||||
mNumbersTime = (TextView) mNumbersFrame.findViewById(R.id.time);
|
||||
mNumbersDistance = (TextView) mNumbersFrame.findViewById(R.id.distance);
|
||||
mNumbersArrival = (TextView) mNumbersFrame.findViewById(R.id.arrival);
|
||||
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||
// {
|
||||
// View divider = planFrame.findViewById(R.id.details_divider);
|
||||
// if (divider != null)
|
||||
// UiUtils.invisible(divider);
|
||||
// }
|
||||
//TODO: restore this field later (from the removed routing_plan_details layout)
|
||||
// mNumbersArrival = (TextView) mNumbersFrame.findViewById(R.id.arrival);
|
||||
|
||||
mToggle.setImageDrawable(mToggleImage);
|
||||
mToggle.setOnClickListener(new View.OnClickListener()
|
||||
|
@ -178,8 +169,6 @@ public class RoutingPlanController extends ToolbarController
|
|||
|
||||
boolean ready = (buildState == RoutingController.BuildState.BUILT);
|
||||
UiUtils.showIf(ready, mNumbersFrame);
|
||||
// UiUtils.showIf(RoutingController.get().isBuilding(), mPlanningLabel);
|
||||
// UiUtils.showIf(buildState == RoutingController.BuildState.ERROR, mErrorLabel);
|
||||
|
||||
if (!ready)
|
||||
return;
|
||||
|
@ -188,9 +177,9 @@ public class RoutingPlanController extends ToolbarController
|
|||
mNumbersTime.setText(RoutingController.formatRoutingTime(mFrame.getContext(), rinfo.totalTimeInSeconds, R.dimen.text_size_routing_number));
|
||||
mNumbersDistance.setText(rinfo.distToTarget + " " + rinfo.targetUnits);
|
||||
|
||||
if (mNumbersArrival != null)
|
||||
mNumbersArrival.setText(MwmApplication.get().getString(R.string.routing_arrive,
|
||||
RoutingController.formatArrivalTime(rinfo.totalTimeInSeconds)));
|
||||
// if (mNumbersArrival != null)
|
||||
// mNumbersArrival.setText(MwmApplication.get().getString(R.string.routing_arrive,
|
||||
// RoutingController.formatArrivalTime(rinfo.totalTimeInSeconds)));
|
||||
}
|
||||
|
||||
public void updateBuildProgress(int progress, @Framework.RouterType int router)
|
||||
|
@ -283,4 +272,16 @@ public class RoutingPlanController extends ToolbarController
|
|||
{
|
||||
return mOpen;
|
||||
}
|
||||
|
||||
public void showRouteAltitudeChart()
|
||||
{
|
||||
ImageView altitudeChart = (ImageView) mFrame.findViewById(R.id.altitude_chart);
|
||||
int chartWidth = mActivity.getResources().getDimensionPixelSize(R.dimen.altitude_chart_image_width);
|
||||
int chartHeight = mActivity.getResources().getDimensionPixelSize(R.dimen.altitude_chart_image_height);
|
||||
Bitmap bm = Framework.GenerateRouteAltitudeChart(chartWidth, chartHeight);
|
||||
if (bm != null)
|
||||
{
|
||||
altitudeChart.setImageBitmap(bm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
package com.mapswithme.maps.routing;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.mapswithme.maps.Framework;
|
||||
import com.mapswithme.maps.R;
|
||||
|
@ -67,4 +69,9 @@ public class RoutingPlanFragment extends BaseMwmFragment
|
|||
{
|
||||
return RoutingController.get().cancelPlanning();
|
||||
}
|
||||
|
||||
public void showRouteAltitudeChart()
|
||||
{
|
||||
mPlanController.showRouteAltitudeChart();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,6 +91,7 @@ public class RoutingPlanInplaceController extends RoutingPlanController
|
|||
mSlotsRestoredState = state.getBoolean(STATE_OPEN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showRouteAltitudeChart()
|
||||
{
|
||||
ImageView altitudeChart = (ImageView) mActivity.findViewById(R.id.altitude_chart);
|
||||
|
|
Loading…
Add table
Reference in a new issue