Route planning menu in progress. Revert fav icon.
This commit is contained in:
parent
2e1f895804
commit
2ca9484cd6
13 changed files with 869 additions and 604 deletions
|
@ -1,242 +1,306 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/plan_route_info"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="?attr/left_menu_view_bg"
|
||||
android:orientation="vertical" >
|
||||
<FrameLayout android:id="@+id/plan_route_info"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:background="@color/color_transparent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ModesLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:id="@+id/main_view"
|
||||
android:layout_width="@dimen/map_route_planning_land_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/left_menu_view_bg"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:id="@+id/ModesLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false"/>
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/app_modes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left"
|
||||
android:orientation="horizontal"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/waypoints"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/map_action_waypoints"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/app_modes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left"
|
||||
android:orientation="horizontal"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/FromLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/waypoints"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/map_action_waypoints"/>
|
||||
android:id="@+id/fromIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:src="@drawable/map_default_location"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="@string/route_from"
|
||||
android:textSize="@dimen/default_sub_text_size"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/FromSpinner"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="-8dp"
|
||||
android:background="@null"
|
||||
android:textSize="@dimen/default_list_text_size"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fromDropDownIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="@dimen/list_header_text_left_margin"
|
||||
android:src="@drawable/ic_action_arrow_drop_down"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/FromLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/route_from"
|
||||
android:textSize="@dimen/default_sub_text_size" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/FromSpinner"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_weight="1"
|
||||
android:textSize="@dimen/default_list_text_size" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ViaLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ViaSubView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="left"
|
||||
android:text="@string/route_via"
|
||||
android:textSize="@dimen/default_sub_text_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ViaView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="left"
|
||||
android:textSize="@dimen/default_desc_text_size" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ToLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/route_to"
|
||||
android:textSize="@dimen/default_sub_text_size" >
|
||||
</TextView>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/ToSpinner"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_weight="1"
|
||||
android:textSize="@dimen/default_list_text_size" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/RouteInfoControls"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
android:focusable="false"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/Info"
|
||||
android:id="@+id/ViaLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/viaIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:src="@drawable/map_default_location"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ViaSubView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="left"
|
||||
android:text="@string/route_via"
|
||||
android:textSize="@dimen/default_sub_text_size"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ViaView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:gravity="left"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/viaLayoutDivider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ToLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Prev"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:contentDescription="@string/shared_string_previous"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_prev" />
|
||||
android:id="@+id/toIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:src="@drawable/map_default_location"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/InfoIcon"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:contentDescription="@string/info_button"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_action_info_dark" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/InfoTextView"
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|left"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textSize="@dimen/default_desc_text_size" />
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="@string/route_to"
|
||||
android:textSize="@dimen/default_sub_text_size">
|
||||
</TextView>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/ToSpinner"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="-8dp"
|
||||
android:background="@null"
|
||||
android:textSize="@dimen/default_list_text_size"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Next"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:contentDescription="@string/shared_string_next"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_next" />
|
||||
android:id="@+id/toDropDownIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="@dimen/list_header_text_left_margin"
|
||||
android:src="@drawable/ic_action_arrow_drop_down"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false" />
|
||||
android:focusable="false"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/RouteInfoControls"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/Info"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Prev"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:contentDescription="@string/shared_string_previous"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_prev"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/InfoIcon"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:contentDescription="@string/info_button"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_action_info_dark"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/InfoTextView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|left"
|
||||
android:layout_weight="1"
|
||||
android:textSize="@dimen/default_desc_text_size"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Next"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:contentDescription="@string/shared_string_next"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_next"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</ScrollView>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false"/>
|
||||
|
||||
<include layout="@layout/map_route_prepare_bottom" />
|
||||
<include layout="@layout/map_route_prepare_bottom"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
|
@ -48,15 +48,23 @@
|
|||
|
||||
<include layout="@layout/map_hud_bottom"/>
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/routeMenuContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<include
|
||||
layout="@layout/dashboard_over_map"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -66,9 +74,11 @@
|
|||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ListView
|
||||
|
|
|
@ -1,236 +1,306 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/plan_route_info"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="?attr/bottom_menu_view_bg"
|
||||
android:orientation="vertical" >
|
||||
<FrameLayout android:id="@+id/plan_route_info"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:background="@color/color_transparent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ModesLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:id="@+id/main_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/bottom_menu_view_bg"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:id="@+id/ModesLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false"/>
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/app_modes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left"
|
||||
android:orientation="horizontal"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/waypoints"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/map_action_waypoints"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/app_modes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left"
|
||||
android:orientation="horizontal"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/FromLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/waypoints"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/map_action_waypoints"/>
|
||||
android:id="@+id/fromIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:src="@drawable/map_default_location"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="@string/route_from"
|
||||
android:textSize="@dimen/default_sub_text_size"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/FromSpinner"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="-8dp"
|
||||
android:background="@null"
|
||||
android:textSize="@dimen/default_list_text_size"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fromDropDownIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="@dimen/list_header_text_left_margin"
|
||||
android:src="@drawable/ic_action_arrow_drop_down"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/FromLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/route_from"
|
||||
android:textSize="@dimen/default_sub_text_size" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/FromSpinner"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_weight="1"
|
||||
android:textSize="@dimen/default_list_text_size" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ViaLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ViaSubView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="left"
|
||||
android:text="@string/route_via"
|
||||
android:textSize="@dimen/default_sub_text_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ViaView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="left"
|
||||
android:textSize="@dimen/default_desc_text_size" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ToLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/route_to"
|
||||
android:textSize="@dimen/default_sub_text_size" >
|
||||
</TextView>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/ToSpinner"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_weight="1"
|
||||
android:textSize="@dimen/default_list_text_size" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/RouteInfoControls"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
android:focusable="false"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/Info"
|
||||
android:layout_width="fill_parent"
|
||||
android:id="@+id/ViaLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Prev"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:contentDescription="@string/shared_string_previous"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_prev" />
|
||||
android:id="@+id/viaIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:src="@drawable/map_default_location"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/InfoIcon"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:contentDescription="@string/info_button"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_action_info_dark" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/InfoTextView"
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|left"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textSize="@dimen/default_desc_text_size" />
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ViaSubView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="left"
|
||||
android:text="@string/route_via"
|
||||
android:textSize="@dimen/default_sub_text_size"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ViaView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:gravity="left"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Next"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:contentDescription="@string/shared_string_next"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_next" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/viaLayoutDivider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ToLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:src="@drawable/map_default_location"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="@string/route_to"
|
||||
android:textSize="@dimen/default_sub_text_size">
|
||||
</TextView>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/ToSpinner"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="-8dp"
|
||||
android:background="@null"
|
||||
android:textSize="@dimen/default_list_text_size"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toDropDownIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="@dimen/list_header_text_left_margin"
|
||||
android:src="@drawable/ic_action_arrow_drop_down"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/RouteInfoControls"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/Info"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Prev"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:contentDescription="@string/shared_string_previous"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_prev"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/InfoIcon"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:contentDescription="@string/info_button"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_action_info_dark"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/InfoTextView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|left"
|
||||
android:layout_weight="1"
|
||||
android:textSize="@dimen/default_desc_text_size"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Next"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:contentDescription="@string/shared_string_next"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_next"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false"/>
|
||||
</ScrollView>
|
||||
|
||||
<include layout="@layout/map_route_prepare_bottom" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false"/>
|
||||
|
||||
</LinearLayout>
|
||||
<include layout="@layout/map_route_prepare_bottom"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
|
@ -7,7 +7,7 @@
|
|||
<dimen name="map_route_buttons_width">90dp</dimen>
|
||||
<dimen name="map_route_buttons_height">81dp</dimen>
|
||||
<dimen name="map_route_buttons_height_land">72dp</dimen>
|
||||
<dimen name="map_route_planning_max_height">400dp</dimen>
|
||||
<dimen name="map_route_planning_max_height">450dp</dimen>
|
||||
<dimen name="map_minwidth_widget">160dp</dimen>
|
||||
<dimen name="map_route_planning_land_width">510dp</dimen>
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<dimen name="map_button_stroke">1dp</dimen>
|
||||
<dimen name="map_button_stroke_dark">1dp</dimen>
|
||||
<dimen name="map_route_planning_land_width">320dp</dimen>
|
||||
<dimen name="map_route_planning_max_height">280dp</dimen>
|
||||
<dimen name="map_route_planning_max_height">330dp</dimen>
|
||||
<dimen name="map_minwidth_widget">100dp</dimen>
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import net.osmand.plus.R;
|
|||
import net.osmand.plus.routing.RouteDirectionInfo;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
import net.osmand.plus.views.TurnPathHelper;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoControl;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
|
@ -144,7 +144,7 @@ public class ShowRouteInfoActivity extends OsmandListActivity {
|
|||
RouteDirectionInfo item = ((RouteInfoAdapter)getListAdapter()).getItem(position - 1);
|
||||
Location loc = helper.getLocationFromRouteDirection(item);
|
||||
if(loc != null){
|
||||
MapRouteInfoControl.directionInfo = position - 1;
|
||||
MapRouteInfoMenu.directionInfo = position - 1;
|
||||
OsmandSettings settings = ((OsmandApplication) getApplication()).getSettings();
|
||||
settings.setMapLocationToShow(loc.getLatitude(),loc.getLongitude(),
|
||||
Math.max(13, settings.getLastKnownMapZoom()),
|
||||
|
|
|
@ -13,7 +13,6 @@ import android.graphics.PorterDuff;
|
|||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.DisplayMetrics;
|
||||
|
||||
import net.osmand.plus.R;
|
||||
|
||||
|
@ -36,30 +35,22 @@ public class FavoriteImageDrawable extends Drawable {
|
|||
this.withShadow = withShadow;
|
||||
this.resources = ctx.getResources();
|
||||
this.color = color;
|
||||
paintIcon = new Paint();
|
||||
int col = color == 0 || color == Color.BLACK ? getResources().getColor(R.color.color_favorite) : color;
|
||||
paintIcon.setColorFilter(new PorterDuffColorFilter(col, PorterDuff.Mode.SRC_IN));
|
||||
paintBackground = new Paint();
|
||||
int col = color == 0 || color == Color.BLACK ? getResources().getColor(R.color.color_favorite) : color;
|
||||
paintBackground.setColorFilter(new PorterDuffColorFilter(col, PorterDuff.Mode.MULTIPLY));
|
||||
paintIcon = new Paint();
|
||||
favIcon = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.map_favorite);
|
||||
favBackground = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.map_white_favorite_shield);
|
||||
|
||||
|
||||
listDrawable = getResources().getDrawable(R.drawable.ic_action_fav_dark).mutate();
|
||||
listDrawable.setColorFilter(new PorterDuffColorFilter(col, PorterDuff.Mode.SRC_IN));
|
||||
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
||||
|
||||
paintOuter = new Paint();
|
||||
paintOuter.setAntiAlias(true);
|
||||
paintOuter.setStyle(Style.FILL_AND_STROKE);
|
||||
paintInnerCircle = new Paint();
|
||||
paintInnerCircle.setStyle(Style.FILL_AND_STROKE);
|
||||
if(metrics != null && metrics.density > 0) {
|
||||
paintOuter.setStrokeWidth(metrics.density * 1);
|
||||
} else {
|
||||
paintOuter.setStrokeWidth(1);
|
||||
}
|
||||
// paintOuter.setColor(color == 0 || color == Color.BLACK ? 0x88555555 : color);
|
||||
paintOuter.setColor(0xffbbbbbb);
|
||||
paintInnerCircle.setColor(Color.WHITE);
|
||||
paintOuter.setColor(color == 0 || color == Color.BLACK ? 0x88555555 : color);
|
||||
paintInnerCircle.setColor(color == 0 || color == Color.BLACK ? getResources().getColor(R.color.color_favorite)
|
||||
: color);
|
||||
paintInnerCircle.setAntiAlias(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,12 +5,13 @@ import android.content.DialogInterface;
|
|||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.content.Intent;
|
||||
import android.graphics.PointF;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
|
@ -21,10 +22,9 @@ import net.osmand.data.LatLon;
|
|||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.data.RotatedTileBox;
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
import net.osmand.plus.IconsCache;
|
||||
import net.osmand.plus.OsmAndFormatter;
|
||||
import net.osmand.plus.OsmAndLocationProvider;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.TargetPointsHelper;
|
||||
|
@ -34,7 +34,6 @@ import net.osmand.plus.activities.MapActivity;
|
|||
import net.osmand.plus.activities.ShowRouteInfoActivity;
|
||||
import net.osmand.plus.activities.actions.AppModeDialog;
|
||||
import net.osmand.plus.activities.search.SearchAddressActivity;
|
||||
import net.osmand.plus.development.OsmandDevelopmentPlugin;
|
||||
import net.osmand.plus.dialogs.FavoriteDialogs;
|
||||
import net.osmand.plus.mapcontextmenu.MapContextMenu;
|
||||
import net.osmand.plus.routing.RouteDirectionInfo;
|
||||
|
@ -43,27 +42,27 @@ import net.osmand.plus.routing.RoutingHelper.IRouteInformationListener;
|
|||
import net.osmand.plus.views.MapControlsLayer;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class MapRouteInfoControl implements IRouteInformationListener {
|
||||
public class MapRouteInfoMenu implements IRouteInformationListener {
|
||||
public static int directionInfo = -1;
|
||||
public static boolean controlVisible = false;
|
||||
private final MapContextMenu contextMenu;
|
||||
private final RoutingHelper routingHelper;
|
||||
private OsmandMapTileView mapView;
|
||||
private Dialog dialog;
|
||||
private boolean selectFromMapTouch;
|
||||
private boolean selectFromMapTouch;
|
||||
private boolean selectFromMapForTarget;
|
||||
|
||||
private boolean showDialog = false;
|
||||
private boolean showMenu = false;
|
||||
private MapActivity mapActivity;
|
||||
private MapControlsLayer mapControlsLayer;
|
||||
public static final String TARGET_SELECT = "TARGET_SELECT";
|
||||
|
||||
public MapRouteInfoControl(MapActivity mapActivity, MapControlsLayer mapControlsLayer) {
|
||||
public MapRouteInfoMenu(MapActivity mapActivity, MapControlsLayer mapControlsLayer) {
|
||||
this.mapActivity = mapActivity;
|
||||
this.mapControlsLayer = mapControlsLayer;
|
||||
contextMenu = mapActivity.getContextMenu();
|
||||
|
@ -71,61 +70,59 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
mapView = mapActivity.getMapView();
|
||||
routingHelper.addListener(this);
|
||||
}
|
||||
|
||||
|
||||
public boolean onSingleTap(PointF point, RotatedTileBox tileBox) {
|
||||
if(selectFromMapTouch) {
|
||||
if (selectFromMapTouch) {
|
||||
LatLon latlon = tileBox.getLatLonFromPixel(point.x, point.y);
|
||||
selectFromMapTouch = false;
|
||||
if(selectFromMapForTarget) {
|
||||
if (selectFromMapForTarget) {
|
||||
getTargets().navigateToPoint(latlon, true, -1);
|
||||
} else {
|
||||
getTargets().setStartPoint(latlon, true, null);
|
||||
}
|
||||
contextMenu.showMinimized(latlon, null, null);
|
||||
showDialog();
|
||||
show();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void setVisible(boolean visible) {
|
||||
if(visible) {
|
||||
if (showDialog){
|
||||
//if (getTargets().getPointToNavigate() == null){
|
||||
showDialog();
|
||||
//}
|
||||
showDialog = false;
|
||||
if (visible) {
|
||||
if (showMenu) {
|
||||
show();
|
||||
showMenu = false;
|
||||
}
|
||||
controlVisible = true;
|
||||
} else {
|
||||
hideDialog();
|
||||
hide();
|
||||
controlVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void showHideDialog() {
|
||||
if(dialog != null) {
|
||||
hideDialog();
|
||||
|
||||
|
||||
public void showHideMenu() {
|
||||
if (isVisible()) {
|
||||
hide();
|
||||
} else {
|
||||
showDialog();
|
||||
show();
|
||||
}
|
||||
}
|
||||
|
||||
public void updateDialog() {
|
||||
if(dialog != null) {
|
||||
updateInfo(dialog.findViewById(R.id.plan_route_info));
|
||||
}
|
||||
|
||||
public void updateMenu() {
|
||||
WeakReference<MapRouteInfoMenuFragment> fragmentRef = findMenuFragment();
|
||||
if (fragmentRef != null)
|
||||
fragmentRef.get().updateInfo();
|
||||
}
|
||||
|
||||
private void updateInfo(final View main) {
|
||||
|
||||
public void updateInfo(final View main) {
|
||||
updateViaView(main);
|
||||
updateFromSpinner(main);
|
||||
updateToSpinner(main);
|
||||
updateApplicationModes(main);
|
||||
mapControlsLayer.updateRouteButtons(main, true);
|
||||
boolean addButtons = routingHelper.isRouteCalculated();
|
||||
if(addButtons) {
|
||||
if (addButtons) {
|
||||
updateRouteButtons(main);
|
||||
} else {
|
||||
updateRouteCalcProgress(main);
|
||||
|
@ -134,7 +131,7 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
|
||||
private void updateRouteCalcProgress(final View main) {
|
||||
TargetPointsHelper targets = getTargets();
|
||||
if(targets.hasTooLongDistanceToNavigate()) {
|
||||
if (targets.hasTooLongDistanceToNavigate()) {
|
||||
main.findViewById(R.id.RouteInfoControls).setVisibility(View.VISIBLE);
|
||||
TextView textView = (TextView) main.findViewById(R.id.InfoTextView);
|
||||
ImageView iconView = (ImageView) main.findViewById(R.id.InfoIcon);
|
||||
|
@ -143,7 +140,7 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
textView.setText(R.string.route_is_too_long);
|
||||
textView.setVisibility(View.VISIBLE);
|
||||
iconView.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_warning));
|
||||
} else{
|
||||
} else {
|
||||
main.findViewById(R.id.RouteInfoControls).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
@ -151,7 +148,7 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
private void updateApplicationModes(final View parentView) {
|
||||
final OsmandSettings settings = mapActivity.getMyApplication().getSettings();
|
||||
ApplicationMode am = settings.APPLICATION_MODE.get();
|
||||
final Set<ApplicationMode> selected = new HashSet<ApplicationMode>();
|
||||
final Set<ApplicationMode> selected = new HashSet<>();
|
||||
selected.add(am);
|
||||
ViewGroup vg = (ViewGroup) parentView.findViewById(R.id.app_modes);
|
||||
vg.removeAllViews();
|
||||
|
@ -165,17 +162,26 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
mapActivity.getRoutingHelper().recalculateRouteDueToSettingsChange();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private void updateViaView(final View parentView) {
|
||||
String via = generateViaDescription();
|
||||
if(via.length() == 0){
|
||||
if (via.length() == 0) {
|
||||
parentView.findViewById(R.id.ViaLayout).setVisibility(View.GONE);
|
||||
parentView.findViewById(R.id.viaLayoutDivider).setVisibility(View.GONE);
|
||||
} else {
|
||||
parentView.findViewById(R.id.ViaLayout).setVisibility(View.VISIBLE);
|
||||
parentView.findViewById(R.id.viaLayoutDivider).setVisibility(View.VISIBLE);
|
||||
((TextView) parentView.findViewById(R.id.ViaView)).setText(via);
|
||||
}
|
||||
|
||||
ImageView viaIcon = (ImageView) parentView.findViewById(R.id.viaIcon);
|
||||
if (isLight()) {
|
||||
viaIcon.setImageDrawable(getIconOrig(R.drawable.widget_intermediate_day));
|
||||
} else {
|
||||
viaIcon.setImageDrawable(getIconOrig(R.drawable.widget_intermediate_night));
|
||||
}
|
||||
}
|
||||
|
||||
private void updateToSpinner(final View parentView) {
|
||||
|
@ -183,24 +189,41 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
toSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
if(position == 1) {
|
||||
if (position == 1) {
|
||||
selectFavorite(parentView, true);
|
||||
} else if(position == 2) {
|
||||
selectOnScreen(parentView, true);
|
||||
} else if(position == 3) {
|
||||
} else if (position == 2) {
|
||||
selectOnScreen(true);
|
||||
} else if (position == 3) {
|
||||
Intent intent = new Intent(mapActivity, SearchAddressActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
intent.putExtra(TARGET_SELECT, true);
|
||||
mapActivity.startActivityForResult(intent, MapControlsLayer.REQUEST_ADDRESS_SELECT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
}
|
||||
});
|
||||
|
||||
ImageView toIcon = (ImageView) parentView.findViewById(R.id.toIcon);
|
||||
if (isLight()) {
|
||||
toIcon.setImageDrawable(getIconOrig(R.drawable.widget_target_day));
|
||||
} else {
|
||||
toIcon.setImageDrawable(getIconOrig(R.drawable.widget_target_night));
|
||||
}
|
||||
|
||||
ImageView toDropDownIcon = (ImageView) parentView.findViewById(R.id.toDropDownIcon);
|
||||
toDropDownIcon.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_arrow_drop_down));
|
||||
toDropDownIcon.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
toSpinner.performClick();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void updateFromSpinner(final View parentView) {
|
||||
final TargetPointsHelper targets = getTargets();
|
||||
final Spinner fromSpinner = setupFromSpinner(parentView);
|
||||
|
@ -208,43 +231,56 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
if(position == 0) {
|
||||
if(targets.getPointToStart() != null) {
|
||||
if (position == 0) {
|
||||
if (targets.getPointToStart() != null) {
|
||||
targets.clearStartPoint(true);
|
||||
}
|
||||
} else if(position == 1) {
|
||||
} else if (position == 1) {
|
||||
selectFavorite(parentView, false);
|
||||
} else if(position == 2) {
|
||||
selectOnScreen(parentView, false);
|
||||
} else if(position == 3) {
|
||||
} else if (position == 2) {
|
||||
selectOnScreen(false);
|
||||
} else if (position == 3) {
|
||||
Intent intent = new Intent(mapActivity, SearchAddressActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
intent.putExtra(TARGET_SELECT, false);
|
||||
mapActivity.startActivityForResult(intent, MapControlsLayer.REQUEST_ADDRESS_SELECT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
}
|
||||
});
|
||||
|
||||
ImageView fromIcon = (ImageView) parentView.findViewById(R.id.fromIcon);
|
||||
ApplicationMode appMode = mapActivity.getMyApplication().getSettings().getApplicationMode();
|
||||
fromIcon.setImageDrawable(mapActivity.getResources().getDrawable(appMode.getResourceLocationDay()));
|
||||
|
||||
ImageView fromDropDownIcon = (ImageView) parentView.findViewById(R.id.fromDropDownIcon);
|
||||
fromDropDownIcon.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_arrow_drop_down));
|
||||
fromDropDownIcon.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
fromSpinner.performClick();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void selectOnScreen(View parentView, boolean target) {
|
||||
protected void selectOnScreen(boolean target) {
|
||||
selectFromMapTouch = true;
|
||||
selectFromMapForTarget = target;
|
||||
hideDialog();
|
||||
selectFromMapForTarget = target;
|
||||
hide();
|
||||
}
|
||||
|
||||
|
||||
public void selectAddress(String name, LatLon l, final boolean target) {
|
||||
PointDescription pd = new PointDescription(PointDescription.POINT_TYPE_ADDRESS, name);
|
||||
if(target) {
|
||||
if (target) {
|
||||
getTargets().navigateToPoint(l, true, -1, pd);
|
||||
} else {
|
||||
getTargets().setStartPoint(l, true, pd);
|
||||
}
|
||||
hideDialog();
|
||||
showDialog();
|
||||
hide();
|
||||
show();
|
||||
}
|
||||
|
||||
protected void selectFavorite(final View parentView, final boolean target) {
|
||||
|
@ -267,26 +303,34 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
FavoriteDialogs.showFavoritesDialog(mapActivity, favouritesAdapter, click, dismissListener, dlgHolder, true);
|
||||
}
|
||||
|
||||
private boolean isLight() {
|
||||
return mapActivity.getMyApplication().getSettings().isLightContent();
|
||||
}
|
||||
|
||||
private Drawable getIconOrig(int iconId) {
|
||||
IconsCache iconsCache = mapActivity.getMyApplication().getIconsCache();
|
||||
return iconsCache.getIcon(iconId, 0, 0f);
|
||||
}
|
||||
|
||||
private OnItemClickListener getOnClickListener(final boolean target, final FavouritesAdapter favouritesAdapter,
|
||||
final Dialog[] dlg) {
|
||||
final Dialog[] dlg) {
|
||||
return new AdapterView.OnItemClickListener() {
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
FavouritePoint fp = favouritesAdapter.getItem(position);
|
||||
LatLon point = new LatLon(fp.getLatitude(), fp.getLongitude());
|
||||
if(target) {
|
||||
if (target) {
|
||||
getTargets().navigateToPoint(point, true, -1, fp.getPointDescription());
|
||||
} else {
|
||||
getTargets().setStartPoint(point, true, fp.getPointDescription());
|
||||
}
|
||||
if(dlg != null && dlg.length > 0 && dlg[0] != null) {
|
||||
if (dlg != null && dlg.length > 0 && dlg[0] != null) {
|
||||
dlg[0].dismiss();
|
||||
}
|
||||
//Next 2 lines ensure Dialog is shown in the right correct position after a selection been made
|
||||
hideDialog();
|
||||
showDialog();
|
||||
hide();
|
||||
show();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -294,15 +338,24 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
public static int getDirectionInfo() {
|
||||
return directionInfo;
|
||||
}
|
||||
|
||||
public boolean isDialogVisible() {
|
||||
return dialog != null && dialog.isShowing();
|
||||
|
||||
public boolean isVisible() {
|
||||
return findMenuFragment() != null;
|
||||
}
|
||||
|
||||
public WeakReference<MapRouteInfoMenuFragment> findMenuFragment() {
|
||||
Fragment fragment = mapActivity.getSupportFragmentManager().findFragmentByTag(MapRouteInfoMenuFragment.TAG);
|
||||
if (fragment != null && !fragment.isDetached()) {
|
||||
return new WeakReference<>((MapRouteInfoMenuFragment) fragment);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isControlVisible() {
|
||||
return controlVisible;
|
||||
}
|
||||
|
||||
|
||||
private void updateRouteButtons(final View mainView) {
|
||||
mainView.findViewById(R.id.RouteInfoControls).setVisibility(View.VISIBLE);
|
||||
final OsmandApplication ctx = mapActivity.getMyApplication();
|
||||
|
@ -337,10 +390,10 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
ImageView next = (ImageView) mainView.findViewById(R.id.Next);
|
||||
next.setVisibility(View.VISIBLE);
|
||||
next.setImageDrawable(ctx.getIconsCache().getContentIcon(R.drawable.ic_next));
|
||||
next.setOnClickListener(new View.OnClickListener(){
|
||||
next.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(routingHelper.getRouteDirections() != null && directionInfo < routingHelper.getRouteDirections().size() - 1){
|
||||
if (routingHelper.getRouteDirections() != null && directionInfo < routingHelper.getRouteDirections().size() - 1) {
|
||||
directionInfo++;
|
||||
RouteDirectionInfo info = routingHelper.getRouteDirections().get(directionInfo);
|
||||
net.osmand.Location l = routingHelper.getLocationFromRouteDirection(info);
|
||||
|
@ -350,10 +403,10 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
mapView.refreshMap();
|
||||
updateInfo(mainView);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
View info = mainView.findViewById(R.id.Info);
|
||||
info.setOnClickListener(new View.OnClickListener(){
|
||||
info.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(mapView.getContext(), ShowRouteInfoActivity.class);
|
||||
|
@ -361,10 +414,10 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
mapView.getContext().startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
TextView textView = (TextView) mainView.findViewById(R.id.InfoTextView);
|
||||
ImageView iconView = (ImageView) mainView.findViewById(R.id.InfoIcon);
|
||||
if(directionInfo >= 0) {
|
||||
if (directionInfo >= 0) {
|
||||
iconView.setVisibility(View.GONE);
|
||||
} else {
|
||||
iconView.setImageDrawable(ctx.getIconsCache().getContentIcon(R.drawable.ic_action_info_dark));
|
||||
|
@ -379,81 +432,52 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
}
|
||||
}
|
||||
|
||||
private Button attachSimulateRoute(final View mainView, final OsmandApplication ctx) {
|
||||
final Button simulateRoute = null;//(Button) mainView.findViewById(R.id.SimulateRoute);
|
||||
final OsmAndLocationProvider loc = ctx.getLocationProvider();
|
||||
if(mapActivity.getRoutingHelper().isFollowingMode()) {
|
||||
simulateRoute.setVisibility(View.GONE);
|
||||
}
|
||||
if (OsmandPlugin.getEnabledPlugin(OsmandDevelopmentPlugin.class) == null) {
|
||||
simulateRoute.setVisibility(View.GONE);
|
||||
}
|
||||
simulateRoute.setText(loc.getLocationSimulation().isRouteAnimating() ? R.string.animate_route_off : R.string.animate_route);
|
||||
simulateRoute.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mainView.findViewById(R.id.RouteInfoControls).setVisibility(View.GONE);
|
||||
if(loc.getLocationSimulation().isRouteAnimating()) {
|
||||
loc.getLocationSimulation().startStopRouteAnimation(mapActivity);
|
||||
hideDialog();
|
||||
} else {
|
||||
simulateRoute.setText(R.string.animate_route_off);
|
||||
loc.getLocationSimulation().startStopRouteAnimation(mapActivity);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
return simulateRoute;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void newRouteIsCalculated(boolean newRoute, ValueHolder<Boolean> showToast) {
|
||||
directionInfo = -1;
|
||||
updateDialog();
|
||||
if(isDialogVisible()) {
|
||||
updateMenu();
|
||||
if (isVisible()) {
|
||||
showToast.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String generateViaDescription() {
|
||||
TargetPointsHelper targets = getTargets();
|
||||
String via = "";
|
||||
List<TargetPoint> points = targets.getIntermediatePointsNavigation();
|
||||
if (points.size() == 0) {
|
||||
return via;
|
||||
return "";
|
||||
}
|
||||
StringBuilder via = new StringBuilder();
|
||||
for (int i = 0; i < points.size(); i++) {
|
||||
if (i > 0) {
|
||||
via += "\n";
|
||||
via.append(" ");
|
||||
}
|
||||
via += " " + getRoutePointDescription(points.get(i).point, points.get(i).getOnlyName());
|
||||
via.append(getRoutePointDescription(points.get(i).point, points.get(i).getOnlyName()));
|
||||
}
|
||||
return via;
|
||||
return via.toString();
|
||||
}
|
||||
|
||||
|
||||
public String getRoutePointDescription(double lat, double lon) {
|
||||
return mapActivity.getString(R.string.route_descr_lat_lon, lat, lon);
|
||||
}
|
||||
|
||||
|
||||
public String getRoutePointDescription(LatLon l, String d) {
|
||||
if(d != null && d.length() > 0) {
|
||||
if (d != null && d.length() > 0) {
|
||||
return d.replace(':', ' ');
|
||||
}
|
||||
if(l != null) {
|
||||
if (l != null) {
|
||||
return mapActivity.getString(R.string.route_descr_lat_lon, l.getLatitude(), l.getLongitude());
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private Spinner setupFromSpinner( View view) {
|
||||
ArrayList<String> fromActions = new ArrayList<String>();
|
||||
|
||||
private Spinner setupFromSpinner(View view) {
|
||||
ArrayList<String> fromActions = new ArrayList<>();
|
||||
fromActions.add(mapActivity.getString(R.string.route_descr_current_location));
|
||||
fromActions.add(mapActivity.getString(R.string.shared_string_favorite) + mapActivity.getString(R.string.shared_string_ellipsis));
|
||||
fromActions.add(mapActivity.getString(R.string.shared_string_select_on_map));
|
||||
fromActions.add(mapActivity.getString(R.string.shared_string_address) + mapActivity.getString(R.string.shared_string_ellipsis));
|
||||
|
||||
|
||||
TargetPoint start = getTargets().getPointToStart();
|
||||
if (start != null) {
|
||||
String oname = start.getOnlyName().length() > 0 ? start.getOnlyName()
|
||||
|
@ -461,43 +485,43 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
fromActions.add(oname);
|
||||
}
|
||||
final Spinner fromSpinner = ((Spinner) view.findViewById(R.id.FromSpinner));
|
||||
ArrayAdapter<String> fromAdapter = new ArrayAdapter<String>(view.getContext(),
|
||||
android.R.layout.simple_spinner_item,
|
||||
ArrayAdapter<String> fromAdapter = new ArrayAdapter<>(view.getContext(),
|
||||
android.R.layout.simple_spinner_item,
|
||||
fromActions
|
||||
);
|
||||
);
|
||||
fromAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
fromSpinner.setAdapter(fromAdapter);
|
||||
if(start != null) {
|
||||
if (start != null) {
|
||||
fromSpinner.setSelection(fromActions.size() - 1);
|
||||
} else {
|
||||
if(mapActivity.getMyApplication().getLocationProvider().getLastKnownLocation() == null) {
|
||||
if (mapActivity.getMyApplication().getLocationProvider().getLastKnownLocation() == null) {
|
||||
fromSpinner.setPromptId(R.string.search_poi_location);
|
||||
}
|
||||
//fromSpinner.setSelection(0);
|
||||
}
|
||||
return fromSpinner;
|
||||
}
|
||||
|
||||
|
||||
private Spinner setupToSpinner(View view) {
|
||||
final Spinner toSpinner = ((Spinner) view.findViewById(R.id.ToSpinner));
|
||||
final TargetPointsHelper targets = getTargets();
|
||||
ArrayList<String> toActions = new ArrayList<String>();
|
||||
ArrayList<String> toActions = new ArrayList<>();
|
||||
if (targets.getPointToNavigate() != null) {
|
||||
toActions.add(mapActivity.getString(R.string.route_descr_destination) + " "
|
||||
+ getRoutePointDescription(targets.getPointToNavigate().point,
|
||||
targets.getPointToNavigate().getOnlyName()));
|
||||
+ getRoutePointDescription(targets.getPointToNavigate().point,
|
||||
targets.getPointToNavigate().getOnlyName()));
|
||||
} else {
|
||||
toSpinner.setPromptId(R.string.route_descr_select_destination);
|
||||
toActions.add(mapActivity.getString(R.string.route_descr_select_destination));
|
||||
toActions.add(mapActivity.getString(R.string.route_descr_select_destination));
|
||||
}
|
||||
toActions.add(mapActivity.getString(R.string.shared_string_favorite) + mapActivity.getString(R.string.shared_string_ellipsis));
|
||||
toActions.add(mapActivity.getString(R.string.shared_string_select_on_map));
|
||||
toActions.add(mapActivity.getString(R.string.shared_string_address) + mapActivity.getString(R.string.shared_string_ellipsis));
|
||||
|
||||
ArrayAdapter<String> toAdapter = new ArrayAdapter<String>(view.getContext(),
|
||||
android.R.layout.simple_spinner_item,
|
||||
|
||||
ArrayAdapter<String> toAdapter = new ArrayAdapter<>(view.getContext(),
|
||||
android.R.layout.simple_spinner_item,
|
||||
toActions
|
||||
);
|
||||
);
|
||||
toAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
toSpinner.setAdapter(toAdapter);
|
||||
return toSpinner;
|
||||
|
@ -510,36 +534,22 @@ public class MapRouteInfoControl implements IRouteInformationListener {
|
|||
@Override
|
||||
public void routeWasCancelled() {
|
||||
directionInfo = -1;
|
||||
// do not hide dialog (needed for use case entering Planning mode without destination)
|
||||
// do not hide fragment (needed for use case entering Planning mode without destination)
|
||||
}
|
||||
|
||||
|
||||
public void showDialog() {
|
||||
final View ll = mapActivity.getLayoutInflater().inflate(R.layout.plan_route_info, null);
|
||||
updateInfo(ll);
|
||||
dialog = MapRoutePreferencesControl.showDialog(mapControlsLayer, mapActivity, ll, new OnDismissListener() {
|
||||
|
||||
@Override
|
||||
public void onDismiss(DialogInterface d) {
|
||||
dialog = null;
|
||||
}
|
||||
});
|
||||
|
||||
public void show() {
|
||||
MapRouteInfoMenuFragment.showInstance(mapActivity);
|
||||
}
|
||||
|
||||
public void hideDialog() {
|
||||
Dialog dialog = this.dialog;
|
||||
if (dialog != null) {
|
||||
if(dialog instanceof MapRoutePreferencesControl.RoutePrepareDialog &&
|
||||
((MapRoutePreferencesControl.RoutePrepareDialog) dialog).getListener() != null) {
|
||||
((MapRoutePreferencesControl.RoutePrepareDialog) dialog).getListener().onDismiss(dialog);
|
||||
((MapRoutePreferencesControl.RoutePrepareDialog) dialog).cancelDismissListener();
|
||||
}
|
||||
dialog.dismiss();
|
||||
this.dialog = null;
|
||||
|
||||
public void hide() {
|
||||
WeakReference<MapRouteInfoMenuFragment> fragmentRef = findMenuFragment();
|
||||
if (fragmentRef != null) {
|
||||
fragmentRef.get().dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
public void setShowDialog() {
|
||||
showDialog = true;
|
||||
public void setShowMenu() {
|
||||
showMenu = true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
package net.osmand.plus.mapcontextmenu.other;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||
|
||||
public class MapRouteInfoMenuFragment extends Fragment {
|
||||
public static final String TAG = "MapRouteInfoMenuFragment";
|
||||
|
||||
private MapRouteInfoMenu menu;
|
||||
private View mainView;
|
||||
|
||||
private MapActivity getMapActivity() {
|
||||
return (MapActivity) getActivity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
|
||||
menu = mapActivity.getMapLayers().getMapControlsLayer().getMapRouteInfoMenu();
|
||||
View view = inflater.inflate(R.layout.plan_route_info, container, false);
|
||||
if (menu == null) {
|
||||
return view;
|
||||
}
|
||||
|
||||
view.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
mainView = view.findViewById(R.id.main_view);
|
||||
updateInfo();
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (menu == null) {
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
public void updateInfo() {
|
||||
menu.updateInfo(mainView);
|
||||
}
|
||||
|
||||
public void show(MapActivity mapActivity) {
|
||||
int slideInAnim = R.anim.slide_in_bottom;
|
||||
int slideOutAnim = R.anim.slide_out_bottom;
|
||||
|
||||
mapActivity.getSupportFragmentManager().beginTransaction()
|
||||
.setCustomAnimations(slideInAnim, slideOutAnim, slideInAnim, slideOutAnim)
|
||||
.add(R.id.routeMenuContainer, this, TAG)
|
||||
.addToBackStack(TAG)
|
||||
.commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
public void dismiss() {
|
||||
FragmentActivity activity = getActivity();
|
||||
if (activity != null) {
|
||||
try {
|
||||
activity.getSupportFragmentManager().popBackStack(TAG,
|
||||
FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
} catch (Exception e) {
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean showInstance(final MapActivity mapActivity) {
|
||||
try {
|
||||
boolean portrait = AndroidUiHelper.isOrientationPortrait(mapActivity);
|
||||
int slideInAnim;
|
||||
int slideOutAnim;
|
||||
if (portrait) {
|
||||
slideInAnim = R.anim.slide_in_bottom;
|
||||
slideOutAnim = R.anim.slide_out_bottom;
|
||||
} else {
|
||||
slideInAnim = R.anim.slide_in_left;
|
||||
slideOutAnim = R.anim.slide_out_left;
|
||||
}
|
||||
|
||||
MapRouteInfoMenuFragment fragment = new MapRouteInfoMenuFragment();
|
||||
mapActivity.getSupportFragmentManager().beginTransaction()
|
||||
.setCustomAnimations(slideInAnim, slideOutAnim, slideInAnim, slideOutAnim)
|
||||
.add(R.id.routeMenuContainer, fragment, TAG)
|
||||
.addToBackStack(TAG).commitAllowingStateLoss();
|
||||
|
||||
return true;
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,8 +3,11 @@ package net.osmand.plus.views;
|
|||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PointF;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
|
||||
import net.osmand.data.FavouritePoint;
|
||||
import net.osmand.data.LatLon;
|
||||
|
@ -33,6 +36,7 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer.
|
|||
private MapTextLayer textLayer;
|
||||
private Paint paintIcon;
|
||||
private Bitmap pointSmall;
|
||||
private int defaultColor;
|
||||
|
||||
private OsmandSettings settings;
|
||||
|
||||
|
@ -60,6 +64,7 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer.
|
|||
textLayer = view.getLayerByClass(MapTextLayer.class);
|
||||
paintIcon = new Paint();
|
||||
pointSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_white_shield_small);
|
||||
defaultColor = view.getResources().getColor(R.color.color_favorite);
|
||||
}
|
||||
|
||||
private boolean calculateBelongs(int ex, int ey, int objx, int objy, int radius) {
|
||||
|
@ -101,6 +106,8 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer.
|
|||
float y = tileBox.getPixYFromLatLon(o.getLatitude(), o.getLongitude());
|
||||
|
||||
if (intersects(boundIntersections, x, y, iconSize, iconSize)) {
|
||||
int col = o.getColor() == 0 || o.getColor() == Color.BLACK ? defaultColor : o.getColor();
|
||||
paintIcon.setColorFilter(new PorterDuffColorFilter(col, PorterDuff.Mode.MULTIPLY));
|
||||
canvas.drawBitmap(pointSmall, x - pointSmall.getWidth() / 2, y - pointSmall.getHeight() / 2, paintIcon);
|
||||
} else {
|
||||
fullObjects.add(o);
|
||||
|
|
|
@ -41,7 +41,7 @@ import net.osmand.plus.activities.MapActivity;
|
|||
import net.osmand.plus.activities.search.SearchAddressFragment;
|
||||
import net.osmand.plus.dashboard.DashboardOnMap.DashboardType;
|
||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoControl;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapRoutePreferencesControl;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
import net.osmand.plus.views.corenative.NativeCoreContext;
|
||||
|
@ -76,7 +76,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
private OsmandSettings settings;
|
||||
|
||||
private MapRoutePreferencesControl optionsRouteControlDialog;
|
||||
private MapRouteInfoControl mapRouteInfoControlDialog;
|
||||
private MapRouteInfoMenu mapRouteInfoMenu;
|
||||
private MapHudButton backToLocationControl;
|
||||
private MapHudButton menuControl;
|
||||
private MapHudButton compassHud;
|
||||
|
@ -103,6 +103,10 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
mapView = mapActivity.getMapView();
|
||||
}
|
||||
|
||||
public MapRouteInfoMenu getMapRouteInfoMenu() {
|
||||
return mapRouteInfoMenu;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean drawInScreenPixels() {
|
||||
return true;
|
||||
|
@ -217,7 +221,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
}
|
||||
|
||||
private void initRouteControls() {
|
||||
mapRouteInfoControlDialog = new MapRouteInfoControl(mapActivity, this);
|
||||
mapRouteInfoMenu = new MapRouteInfoMenu(mapActivity, this);
|
||||
optionsRouteControlDialog = new MapRoutePreferencesControl(mapActivity, this);
|
||||
}
|
||||
|
||||
|
@ -252,8 +256,8 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
|
||||
TextView routeGoButton = (TextView) main.findViewById(R.id.map_go_route_button);
|
||||
routeGoButton.setCompoundDrawablesWithIntrinsicBounds(app.getIconsCache().getIcon(R.drawable.map_start_navigation, R.color.color_myloc_distance), null, null, null);
|
||||
routeGoButton.setText(AndroidUiHelper.isOrientationPortrait(mapActivity) ?
|
||||
mapActivity.getString(R.string.shared_string_go) : "");
|
||||
routeGoButton.setText(/*AndroidUiHelper.isOrientationPortrait(mapActivity) ?*/
|
||||
mapActivity.getString(R.string.shared_string_go) /*: ""*/);
|
||||
routeGoButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -274,25 +278,25 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
|
||||
protected void clickRouteParams() {
|
||||
notifyClicked();
|
||||
mapRouteInfoControlDialog.hideDialog();
|
||||
optionsRouteControlDialog.showAndHideDialog();
|
||||
if (optionsRouteControlDialog.isDialogVisible()) {
|
||||
optionsRouteControlDialog.hideDialog();
|
||||
mapRouteInfoMenu.showHideMenu();
|
||||
} else {
|
||||
mapRouteInfoMenu.hide();
|
||||
optionsRouteControlDialog.showAndHideDialog();
|
||||
}
|
||||
}
|
||||
|
||||
protected void clickRouteWaypoints() {
|
||||
if (getTargets().checkPointToNavigateShort()) {
|
||||
notifyClicked();
|
||||
if (optionsRouteControlDialog.isDialogVisible()) {
|
||||
optionsRouteControlDialog.hideDialog();
|
||||
} else if (mapRouteInfoControlDialog.isDialogVisible()) {
|
||||
mapRouteInfoControlDialog.hideDialog();
|
||||
}
|
||||
mapActivity.getMapActions().openIntermediatePointsDialog();
|
||||
}
|
||||
}
|
||||
|
||||
protected void clickRouteCancel() {
|
||||
notifyClicked();
|
||||
mapRouteInfoControlDialog.hideDialog();
|
||||
mapRouteInfoMenu.hide();
|
||||
optionsRouteControlDialog.hideDialog();
|
||||
if (mapActivity.getRoutingHelper().isFollowingMode()) {
|
||||
mapActivity.getMapActions().stopNavigationActionConfirm();
|
||||
|
@ -303,7 +307,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
|
||||
protected void clickRouteGo() {
|
||||
notifyClicked();
|
||||
mapRouteInfoControlDialog.hideDialog();
|
||||
mapRouteInfoMenu.hide();
|
||||
optionsRouteControlDialog.hideDialog();
|
||||
// RoutingHelper routingHelper = mapActivity.getMyApplication().getRoutingHelper();
|
||||
// if (!routingHelper.isFollowingMode() && !routingHelper.isRoutePlanningMode()) {
|
||||
|
@ -315,11 +319,11 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
}
|
||||
|
||||
public void showRouteInfoControlDialog() {
|
||||
mapRouteInfoControlDialog.showHideDialog();
|
||||
mapRouteInfoMenu.showHideMenu();
|
||||
}
|
||||
|
||||
public void showDialog() {
|
||||
mapRouteInfoControlDialog.setShowDialog();
|
||||
mapRouteInfoMenu.setShowMenu();
|
||||
}
|
||||
|
||||
private void initControls() {
|
||||
|
@ -462,7 +466,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
switchToRouteFollowingLayout();
|
||||
} else {
|
||||
if (!app.getTargetPointsHelper().checkPointToNavigateShort()) {
|
||||
mapRouteInfoControlDialog.showDialog();
|
||||
mapRouteInfoMenu.show();
|
||||
} else {
|
||||
touchEvent = 0;
|
||||
mapActivity.getMapViewTrackingUtilities().backToLocationImpl();
|
||||
|
@ -531,7 +535,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
int textColor = isNight ? mapActivity.getResources().getColor(R.color.widgettext_night) : Color.BLACK;
|
||||
if (shadowColor != shadw) {
|
||||
shadowColor = shadw;
|
||||
// TODO
|
||||
// TODOnightMode
|
||||
// updatextColor(textColor, shadw, rulerControl, zoomControls, mapMenuControls);
|
||||
}
|
||||
boolean portrait = AndroidUiHelper.isOrientationPortrait(mapActivity);
|
||||
|
@ -544,7 +548,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
routePlanningMode = true;
|
||||
}
|
||||
boolean routeFollowingMode = !routePlanningMode && rh.isFollowingMode();
|
||||
boolean dialogOpened = optionsRouteControlDialog.isDialogVisible() || mapRouteInfoControlDialog.isDialogVisible();
|
||||
boolean dialogOpened = optionsRouteControlDialog.isDialogVisible() || mapRouteInfoMenu.isVisible();
|
||||
boolean showRouteCalculationControls = routePlanningMode ||
|
||||
((System.currentTimeMillis() - touchEvent < TIMEOUT_TO_SHOW_BUTTONS) && routeFollowingMode);
|
||||
updateMyLocation(rh, dialogOpened);
|
||||
|
@ -581,7 +585,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
}
|
||||
}
|
||||
|
||||
mapRouteInfoControlDialog.setVisible(showRouteCalculationControls);
|
||||
mapRouteInfoMenu.setVisible(showRouteCalculationControls);
|
||||
if (showRouteCalculationControls) {
|
||||
if (!mapActivity.getRoutingHelper().isFollowingMode()
|
||||
&& !mapActivity.getRoutingHelper().isPauseNavigation()) {
|
||||
|
@ -634,7 +638,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
|
||||
|
||||
public boolean onSingleTap(PointF point, RotatedTileBox tileBox) {
|
||||
if (mapRouteInfoControlDialog.onSingleTap(point, tileBox)) {
|
||||
if (mapRouteInfoMenu.onSingleTap(point, tileBox)) {
|
||||
return true;
|
||||
}
|
||||
stopCounter();
|
||||
|
@ -933,14 +937,14 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == REQUEST_ADDRESS_SELECT && resultCode == SearchAddressFragment.SELECT_ADDRESS_POINT_RESULT_OK) {
|
||||
String name = data.getStringExtra(SearchAddressFragment.SELECT_ADDRESS_POINT_INTENT_KEY);
|
||||
boolean target = data.getBooleanExtra(MapRouteInfoControl.TARGET_SELECT, true);
|
||||
boolean target = data.getBooleanExtra(MapRouteInfoMenu.TARGET_SELECT, true);
|
||||
LatLon latLon = new LatLon(
|
||||
data.getDoubleExtra(SearchAddressFragment.SELECT_ADDRESS_POINT_LAT, 0),
|
||||
data.getDoubleExtra(SearchAddressFragment.SELECT_ADDRESS_POINT_LON, 0));
|
||||
if (name != null) {
|
||||
mapRouteInfoControlDialog.selectAddress(name, latLon, target);
|
||||
mapRouteInfoMenu.selectAddress(name, latLon, target);
|
||||
} else {
|
||||
mapRouteInfoControlDialog.selectAddress("", latLon, target);
|
||||
mapRouteInfoMenu.selectAddress("", latLon, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
|
|||
import net.osmand.plus.routing.RouteDirectionInfo;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoControl;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
|
||||
import net.osmand.plus.views.mapwidgets.NextTurnInfoWidget.TurnDrawable;
|
||||
import net.osmand.router.TurnType;
|
||||
|
||||
|
@ -237,8 +237,8 @@ public class MapInfoWidgetsFactory {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
int di = MapRouteInfoControl.getDirectionInfo();
|
||||
if (di >= 0 && MapRouteInfoControl.isControlVisible() &&
|
||||
int di = MapRouteInfoMenu.getDirectionInfo();
|
||||
if (di >= 0 && MapRouteInfoMenu.isControlVisible() &&
|
||||
di < routingHelper.getRouteDirections().size()) {
|
||||
showNextTurn = true;
|
||||
RouteDirectionInfo next = routingHelper.getRouteDirections().get(di);
|
||||
|
|
|
@ -30,7 +30,7 @@ import net.osmand.plus.views.AnimateDraggingMapThread;
|
|||
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.plus.views.TurnPathHelper;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoControl;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
|
||||
import net.osmand.router.RouteResultPreparation;
|
||||
import net.osmand.router.TurnType;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
@ -583,8 +583,8 @@ public class RouteInfoWidgetsFactory {
|
|||
dist = r.distanceTo;
|
||||
}
|
||||
} else {
|
||||
int di = MapRouteInfoControl.getDirectionInfo();
|
||||
if (di >= 0 && MapRouteInfoControl.isControlVisible()
|
||||
int di = MapRouteInfoMenu.getDirectionInfo();
|
||||
if (di >= 0 && MapRouteInfoMenu.isControlVisible()
|
||||
&& di < rh.getRouteDirections().size()) {
|
||||
RouteDirectionInfo next = rh.getRouteDirections().get(di);
|
||||
if (next != null) {
|
||||
|
|
Loading…
Reference in a new issue