Add change directions button and change sizes

This commit is contained in:
PavelRatushny 2017-12-18 18:44:09 +02:00
parent 5b49e6992a
commit 70ac38f48d
7 changed files with 411 additions and 338 deletions

View file

@ -5,7 +5,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_transparent"
android:clickable="true">
android:clickable="true"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:id="@+id/main_view"
@ -24,7 +25,7 @@
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="@dimen/list_item_height"
android:layout_height="@dimen/route_info_modes_height"
android:orientation="horizontal">
<LinearLayout
@ -73,162 +74,188 @@
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="horizontal">
<ImageView
android:id="@+id/fromIcon"
android:layout_width="@dimen/standard_icon_size"
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"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/fromTitle"
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"
<LinearLayout
android:id="@+id/FromLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="-8dp"
android:background="@null"
android:textSize="@dimen/default_list_text_size"/>
android:layout_height="@dimen/list_item_height"
android:orientation="horizontal">
<ImageView
android:id="@+id/fromIcon"
android:layout_width="@dimen/standard_icon_size"
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/fromTitle"
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>
<View
android:layout_marginStart="@dimen/route_info_divider_margin"
android:layout_marginLeft="@dimen/route_info_divider_margin"
android:id="@+id/dividerFromDropDown"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dashboard_divider_dark"
android:focusable="false"/>
<LinearLayout
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="@dimen/standard_icon_size"
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:layout_marginStart="@dimen/route_info_divider_margin"
android:layout_marginLeft="@dimen/route_info_divider_margin"
android:id="@+id/viaLayoutDivider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dashboard_divider_dark"
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="@dimen/standard_icon_size"
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/toTitle"
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>
</LinearLayout>
<ImageView
android:id="@+id/fromDropDownIcon"
android:visibility="gone"
android:paddingRight="@dimen/route_info_icon_padding_right"
android:paddingLeft="@dimen/route_info_icon_padding_right"
android:layout_gravity="end"
tools:src="@drawable/ic_action_test_light"
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"/>
android:layout_height="match_parent"/>
</LinearLayout>
<View
android:id="@+id/dividerFromDropDown"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dashboard_divider_dark"
android:focusable="false"/>
<LinearLayout
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="@dimen/standard_icon_size"
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="@color/dashboard_divider_dark"
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="@dimen/standard_icon_size"
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/toTitle"
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>
</FrameLayout>
<View
android:id="@+id/dividerToDropDown"

View file

@ -13,10 +13,10 @@
android:contentDescription="@string/cancel_route"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/map_route_buttons_padding_top_bottom"
android:paddingBottom="@dimen/map_route_buttons_padding_top_bottom"
android:paddingLeft="@dimen/map_route_buttons_padding_left_right"
android:paddingRight="@dimen/map_route_buttons_padding_left_right"
android:paddingTop="@dimen/route_info_buttons_padding_top_bottom"
android:paddingBottom="@dimen/route_info_buttons_padding_top_bottom"
android:paddingLeft="@dimen/route_info_buttons_padding_left_right"
android:paddingRight="@dimen/route_info_buttons_padding_left_right"
android:layout_gravity="center_vertical"
android:background="?attr/dashboard_button"
android:src="@drawable/ic_action_test_light" />
@ -25,8 +25,8 @@
android:id="@+id/dividerBtn1"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/map_route_buttons_padding_top_bottom"
android:layout_marginBottom="@dimen/map_route_buttons_padding_top_bottom"
android:layout_marginTop="@dimen/route_info_buttons_padding_top_bottom"
android:layout_marginBottom="@dimen/route_info_buttons_padding_top_bottom"
android:layout_gravity="center"
tools:background="@color/route_info_divider_dark"/>
@ -35,10 +35,10 @@
android:contentDescription="@string/waypoints"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/map_route_buttons_padding_top_bottom"
android:paddingBottom="@dimen/map_route_buttons_padding_top_bottom"
android:paddingLeft="@dimen/map_route_buttons_padding_left_right"
android:paddingRight="@dimen/map_route_buttons_padding_left_right"
android:paddingTop="@dimen/route_info_buttons_padding_top_bottom"
android:paddingBottom="@dimen/route_info_buttons_padding_top_bottom"
android:paddingLeft="@dimen/route_info_buttons_padding_left_right"
android:paddingRight="@dimen/route_info_buttons_padding_left_right"
android:layout_gravity="center_vertical"
android:background="?attr/dashboard_button"
android:src="@drawable/ic_action_test_light" />
@ -47,8 +47,8 @@
android:id="@+id/dividerBtn2"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/map_route_buttons_padding_top_bottom"
android:layout_marginBottom="@dimen/map_route_buttons_padding_top_bottom"
android:layout_marginTop="@dimen/route_info_buttons_padding_top_bottom"
android:layout_marginBottom="@dimen/route_info_buttons_padding_top_bottom"
android:layout_gravity="center"
tools:background="@color/route_info_divider_dark"/>
@ -57,10 +57,10 @@
android:contentDescription="@string/shared_string_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/map_route_buttons_padding_top_bottom"
android:paddingBottom="@dimen/map_route_buttons_padding_top_bottom"
android:paddingLeft="@dimen/map_route_buttons_padding_left_right"
android:paddingRight="@dimen/map_route_buttons_padding_left_right"
android:paddingTop="@dimen/route_info_buttons_padding_top_bottom"
android:paddingBottom="@dimen/route_info_buttons_padding_top_bottom"
android:paddingLeft="@dimen/route_info_buttons_padding_left_right"
android:paddingRight="@dimen/route_info_buttons_padding_left_right"
android:layout_gravity="center_vertical"
android:background="?attr/dashboard_button"
android:src="@drawable/ic_action_test_light" />
@ -73,13 +73,13 @@
android:layout_gravity="center_vertical"
tools:drawableLeft="@drawable/ic_action_test_light"
android:gravity="center_vertical"
android:drawablePadding="@dimen/map_route_button_go_drawable_padding"
android:paddingLeft="@dimen/map_route_button_go_drawable_padding"
android:paddingStart="@dimen/map_route_button_go_drawable_padding"
android:layout_marginTop="@dimen/map_route_button_go_margin"
android:layout_marginBottom="@dimen/map_route_button_go_margin"
android:layout_marginRight="@dimen/map_route_button_go_margin"
android:layout_marginEnd="@dimen/map_route_button_go_margin"
android:drawablePadding="@dimen/route_info_button_go_drawable_padding"
android:paddingLeft="@dimen/route_info_button_go_drawable_padding"
android:paddingStart="@dimen/route_info_button_go_drawable_padding"
android:layout_marginTop="@dimen/route_info_button_go_margin"
android:layout_marginBottom="@dimen/route_info_button_go_margin"
android:layout_marginRight="@dimen/route_info_button_go_margin"
android:layout_marginEnd="@dimen/route_info_button_go_margin"
android:textSize="@dimen/default_list_text_size"
android:textStyle="bold"
tools:background="@drawable/route_info_go_btn_bg_dark"/>

View file

@ -1,17 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="48dp"
android:layout_height="48dp" >
android:layout_width="@dimen/route_info_modes_height"
android:layout_height="@dimen/route_info_modes_height"
xmlns:tools="http://schemas.android.com/tools">
<ImageView
android:id="@+id/app_mode_icon"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:gravity="center"
android:src="@drawable/ic_dashboard_dark"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:src="@drawable/ic_dashboard_dark"
android:background="?attr/dashboard_button"
android:scaleType="center" />
android:scaleType="center"/>
<View

View file

@ -5,7 +5,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_transparent"
android:clickable="true">
android:clickable="true"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:id="@+id/main_view"
@ -24,7 +25,7 @@
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="@dimen/list_item_height"
android:layout_height="@dimen/route_info_modes_height"
android:orientation="horizontal">
<LinearLayout
@ -72,162 +73,194 @@
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="horizontal">
<ImageView
android:id="@+id/fromIcon"
android:layout_width="@dimen/standard_icon_size"
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"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/fromTitle"
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"
<LinearLayout
android:id="@+id/FromLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="-8dp"
android:background="@null"
android:textSize="@dimen/default_list_text_size"/>
android:layout_height="@dimen/list_item_height"
android:orientation="horizontal">
<ImageView
android:id="@+id/fromIcon"
android:layout_width="@dimen/standard_icon_size"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/route_info_icon_padding_left"
android:layout_marginLeft="@dimen/route_info_icon_padding_left"
android:layout_marginRight="@dimen/route_info_icon_padding_right"
android:layout_marginEnd="@dimen/route_info_icon_padding_right"
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/fromTitle"
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>
<View
android:layout_marginStart="@dimen/route_info_divider_margin"
android:layout_marginLeft="@dimen/route_info_divider_margin"
android:id="@+id/dividerFromDropDown"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dashboard_divider_dark"
android:focusable="false"/>
<LinearLayout
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="@dimen/standard_icon_size"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/route_info_icon_padding_left"
android:layout_marginLeft="@dimen/route_info_icon_padding_left"
android:layout_marginRight="@dimen/route_info_icon_padding_right"
android:layout_marginEnd="@dimen/route_info_icon_padding_right"
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:layout_marginStart="@dimen/route_info_divider_margin"
android:layout_marginLeft="@dimen/route_info_divider_margin"
android:id="@+id/viaLayoutDivider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dashboard_divider_dark"
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="@dimen/standard_icon_size"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/route_info_icon_padding_left"
android:layout_marginLeft="@dimen/route_info_icon_padding_left"
android:layout_marginRight="@dimen/route_info_icon_padding_right"
android:layout_marginEnd="@dimen/route_info_icon_padding_right"
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/toTitle"
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>
</LinearLayout>
<ImageView
android:id="@+id/fromDropDownIcon"
android:visibility="gone"
android:paddingRight="@dimen/route_info_icon_padding_right"
android:paddingLeft="@dimen/route_info_icon_padding_right"
android:layout_gravity="end"
tools:src="@drawable/ic_action_test_light"
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"/>
android:layout_height="match_parent"/>
</LinearLayout>
<View
android:id="@+id/dividerFromDropDown"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dashboard_divider_dark"
android:focusable="false"/>
<LinearLayout
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="@dimen/standard_icon_size"
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="@color/dashboard_divider_dark"
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="@dimen/standard_icon_size"
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/toTitle"
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>
</FrameLayout>
<View
android:id="@+id/dividerToDropDown"

View file

@ -7,10 +7,6 @@
<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_buttons_padding_top_bottom">24dp</dimen>
<dimen name="map_route_buttons_padding_left_right">33dp</dimen>
<dimen name="map_route_button_go_margin">5dp</dimen>
<dimen name="map_route_button_go_drawable_padding">21dp</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>
@ -164,5 +160,16 @@
<dimen name="shadow_height">8dp</dimen>
<dimen name="map_marker_title_height">42dp</dimen>
<!--Route info-->
<dimen name="route_info_buttons_padding_top_bottom">24dp</dimen>
<dimen name="route_info_buttons_padding_left_right">33dp</dimen>
<dimen name="route_info_button_go_margin">5dp</dimen>
<dimen name="route_info_button_go_drawable_padding">21dp</dimen>
<dimen name="route_info_directions_margin">72dp</dimen>
<dimen name="route_info_icon_padding_left">18dp</dimen>
<dimen name="route_info_icon_padding_right">24dp</dimen>
<dimen name="route_info_divider_margin">66dp</dimen>
<dimen name="route_info_modes_height">72dp</dimen>
</resources>

View file

@ -66,10 +66,6 @@
<dimen name="map_route_buttons_width">60dp</dimen>
<dimen name="map_route_buttons_height">54dp</dimen>
<dimen name="map_route_buttons_height_land">48dp</dimen>
<dimen name="map_route_buttons_padding_top_bottom">16dp</dimen>
<dimen name="map_route_buttons_padding_left_right">22dp</dimen>
<dimen name="map_route_button_go_margin">3dp</dimen>
<dimen name="map_route_button_go_drawable_padding">14dp</dimen>
<dimen name="map_mode_button_width">56dp</dimen>
<dimen name="map_address_height">40dp</dimen>
@ -237,4 +233,15 @@
<dimen name="map_marker_title_height">28dp</dimen>
<dimen name="fab_recycler_view_padding_bottom">88dp</dimen>
<!--Route info-->
<dimen name="route_info_buttons_padding_top_bottom">16dp</dimen>
<dimen name="route_info_buttons_padding_left_right">22dp</dimen>
<dimen name="route_info_button_go_margin">3dp</dimen>
<dimen name="route_info_button_go_drawable_padding">14dp</dimen>
<dimen name="route_info_directions_margin">56dp</dimen>
<dimen name="route_info_icon_padding_left">12dp</dimen>
<dimen name="route_info_icon_padding_right">16dp</dimen>
<dimen name="route_info_divider_margin">52dp</dimen>
<dimen name="route_info_modes_height">48dp</dimen>
</resources>

View file

@ -119,8 +119,8 @@ public class AppModeDialog {
static private View createToggle(LayoutInflater layoutInflater, OsmandApplication ctx, LinearLayout layout, ApplicationMode mode){
int metricsX = (int) ctx.getResources().getDimension(R.dimen.map_mode_button_width);
int metricsY = (int) ctx.getResources().getDimension(R.dimen.map_mode_button_width);
int metricsX = (int) ctx.getResources().getDimension(R.dimen.route_info_modes_height);
int metricsY = (int) ctx.getResources().getDimension(R.dimen.route_info_modes_height);
View tb = layoutInflater.inflate(R.layout.mode_view, null);
ImageView iv = (ImageView) tb.findViewById(R.id.app_mode_icon);
iv.setImageDrawable(ctx.getIconsCache().getIcon(mode.getSmallIconDark(), R.color.osmand_orange));