Add show direction bottom sheet dialog

This commit is contained in:
PavelRatushny 2017-09-06 18:34:57 +03:00
parent f14f575ef1
commit 1097262dfe
23 changed files with 664 additions and 260 deletions

View file

@ -46,10 +46,10 @@
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_content_margin" android:layout_marginEnd="@dimen/bottom_sheet_content_margin"
android:layout_marginLeft="@dimen/measurement_tool_content_margin" android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
android:layout_marginRight="@dimen/measurement_tool_content_margin" android:layout_marginRight="@dimen/bottom_sheet_content_margin"
android:layout_marginStart="@dimen/measurement_tool_content_margin" android:layout_marginStart="@dimen/bottom_sheet_content_margin"
android:background="@null" android:background="@null"
tools:src="@drawable/ic_action_ruler"/> tools:src="@drawable/ic_action_ruler"/>
@ -60,10 +60,10 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_content_margin" android:layout_marginEnd="@dimen/bottom_sheet_content_margin"
android:layout_marginLeft="@dimen/measurement_tool_content_margin" android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
android:layout_marginRight="@dimen/measurement_tool_content_margin" android:layout_marginRight="@dimen/bottom_sheet_content_margin"
android:layout_marginStart="@dimen/measurement_tool_content_margin" android:layout_marginStart="@dimen/bottom_sheet_content_margin"
android:background="@null" android:background="@null"
tools:src="@drawable/ic_action_arrow_down"/> tools:src="@drawable/ic_action_arrow_down"/>

View file

@ -4,7 +4,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="@dimen/measurement_tool_content_padding"> android:padding="@dimen/bottom_sheet_content_padding">
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
@ -16,7 +16,7 @@
android:id="@+id/toggle_show_on_map" android:id="@+id/toggle_show_on_map"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/measurement_tool_content_margin" android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
android:layout_marginStart="@dimen/measurement_tool_content_margin"/> android:layout_marginStart="@dimen/bottom_sheet_content_margin"/>
</LinearLayout> </LinearLayout>

View file

@ -74,7 +74,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/bg_color" android:background="?attr/bg_color"
app:itemBackground="?attr/bg_color" app:itemBackground="?attr/bg_color"
app:itemIconTint="@color/bottom_navigation_color_selector" app:itemIconTint="@drawable/bottom_navigation_color_selector"
app:itemTextColor="@color/bottom_navigation_color_selector" app:itemTextColor="@drawable/bottom_navigation_color_selector"
app:menu="@menu/map_markers_bottom_navigation"/> app:menu="@menu/map_markers_bottom_navigation"/>
</LinearLayout> </LinearLayout>

View file

@ -21,12 +21,12 @@
<net.osmand.plus.widgets.TextViewEx <net.osmand.plus.widgets.TextViewEx
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_title_height" android:layout_height="@dimen/bottom_sheet_title_height"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding" android:paddingStart="@dimen/bottom_sheet_content_padding"
android:text="@string/marker_options" android:text="@string/marker_options"
android:textAppearance="@style/TextAppearance.ListItemTitle" android:textAppearance="@style/TextAppearance.ListItemTitle"
osmand:typeface="@string/font_roboto_medium"/> osmand:typeface="@string/font_roboto_medium"/>
@ -34,21 +34,21 @@
<LinearLayout <LinearLayout
android:id="@+id/sort_by_row" android:id="@+id/sort_by_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/sort_by_icon" android:id="@+id/sort_by_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_sort_waypoint_dark"/> tools:src="@drawable/ic_sort_waypoint_dark"/>
<TextView <TextView
@ -63,21 +63,21 @@
<LinearLayout <LinearLayout
android:id="@+id/show_direction_row" android:id="@+id/show_direction_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/show_direction_icon" android:id="@+id/show_direction_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_sort_waypoint_dark"/> tools:src="@drawable/ic_sort_waypoint_dark"/>
<TextView <TextView
@ -113,21 +113,21 @@
<LinearLayout <LinearLayout
android:id="@+id/build_route_row" android:id="@+id/build_route_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/build_route_icon" android:id="@+id/build_route_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/map_directions"/> tools:src="@drawable/map_directions"/>
<TextView <TextView
@ -142,21 +142,21 @@
<LinearLayout <LinearLayout
android:id="@+id/save_as_new_track_row" android:id="@+id/save_as_new_track_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/save_as_new_track_icon" android:id="@+id/save_as_new_track_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_polygom_dark"/> tools:src="@drawable/ic_action_polygom_dark"/>
<TextView <TextView
@ -180,21 +180,21 @@
<LinearLayout <LinearLayout
android:id="@+id/move_all_to_history_row" android:id="@+id/move_all_to_history_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/move_all_to_history_icon" android:id="@+id/move_all_to_history_icon"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_history2"/> tools:src="@drawable/ic_action_history2"/>
<TextView <TextView
@ -218,7 +218,7 @@
<FrameLayout <FrameLayout
android:id="@+id/cancel_row" android:id="@+id/cancel_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measure_distance_bottom_sheet_cancel_button_height" android:layout_height="@dimen/bottom_sheet_cancel_button_height"
android:background="?attr/selectableItemBackground"> android:background="?attr/selectableItemBackground">
<TextView <TextView

View file

@ -0,0 +1,239 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:orientation="vertical">
<ScrollView
android:id="@+id/marker_show_direction_scroll_view"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="@dimen/bottom_sheet_content_padding_small">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/show_direction_title"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_title_height"
android:gravity="center_vertical"
android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/bottom_sheet_content_padding"
android:text="@string/show_direction"
android:textAppearance="@style/TextAppearance.ListItemTitle"
osmand:typeface="@string/font_roboto_medium"/>
<TextView
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_descr_height"
android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/bottom_sheet_content_padding"
android:text="@string/measurement_tool_save_as_new_track_descr"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"/>
<LinearLayout
android:id="@+id/images_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/bottom_sheet_content_margin"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/bottom_sheet_content_margin_small"
android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
android:layout_marginRight="@dimen/bottom_sheet_content_margin_small"
android:layout_marginStart="@dimen/bottom_sheet_content_margin"
android:layout_weight="1">
<ImageView
android:id="@+id/top_bar_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:foreground="?attr/selectableItemBackground"
tools:src="@drawable/img_help_trip_route_points_night"/>
<TextView
android:id="@+id/top_bar_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/top_bar_image"
android:layout_alignStart="@id/top_bar_image"
android:layout_marginLeft="@dimen/bottom_sheet_image_text_margin_start"
android:layout_marginStart="@dimen/bottom_sheet_image_text_margin_start"
android:layout_marginTop="@dimen/bottom_sheet_content_margin_small"
android:text="@string/top_bar"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_split_segments_sub"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/bottom_sheet_content_margin"
android:layout_marginLeft="@dimen/bottom_sheet_content_margin_small"
android:layout_marginRight="@dimen/bottom_sheet_content_margin"
android:layout_marginStart="@dimen/bottom_sheet_content_margin_small"
android:layout_weight="1">
<ImageView
android:id="@+id/widget_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:foreground="?attr/selectableItemBackground"
tools:src="@drawable/img_help_trip_track_night"/>
<TextView
android:id="@+id/widget_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/widget_image"
android:layout_alignStart="@id/widget_image"
android:layout_marginLeft="@dimen/bottom_sheet_image_text_margin_start"
android:layout_marginStart="@dimen/bottom_sheet_image_text_margin_start"
android:layout_marginTop="@dimen/bottom_sheet_content_margin_small"
android:text="@string/widget"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_split_segments_sub"/>
</RelativeLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/top_bar_row"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView
android:id="@+id/top_bar_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:background="@drawable/ic_action_device_top"
tools:src="@drawable/ic_action_device_topbar"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/top_bar_icon"
android:layout_toRightOf="@id/top_bar_icon"
android:maxLines="1"
android:text="@string/top_bar"
android:textAppearance="@style/TextAppearance.ListItemTitle"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/widget_row"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView
android:id="@+id/widget_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:background="@drawable/ic_action_device_top"
tools:src="@drawable/ic_action_device_widget"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/widget_icon"
android:layout_toRightOf="@id/widget_icon"
android:maxLines="1"
android:text="@string/widget"
android:textAppearance="@style/TextAppearance.ListItemTitle"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/none_row"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView
android:id="@+id/none_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:background="@drawable/ic_action_device_top"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/none_icon"
android:layout_toRightOf="@id/none_icon"
android:maxLines="1"
android:text="@string/shared_string_none"
android:textAppearance="@style/TextAppearance.ListItemTitle"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<FrameLayout
android:id="@+id/cancel_row"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_cancel_button_height"
android:background="?attr/selectableItemBackground">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/shared_string_cancel"
android:textAllCaps="true"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_desc_text_size"
android:textStyle="bold"/>
</FrameLayout>
</LinearLayout>

View file

@ -41,10 +41,10 @@
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_content_margin" android:layout_marginEnd="@dimen/bottom_sheet_content_margin"
android:layout_marginLeft="@dimen/measurement_tool_content_margin" android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
android:layout_marginRight="@dimen/measurement_tool_content_margin" android:layout_marginRight="@dimen/bottom_sheet_content_margin"
android:layout_marginStart="@dimen/measurement_tool_content_margin" android:layout_marginStart="@dimen/bottom_sheet_content_margin"
android:background="@null" android:background="@null"
tools:src="@drawable/ic_action_ruler"/> tools:src="@drawable/ic_action_ruler"/>
@ -55,10 +55,10 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_content_margin" android:layout_marginEnd="@dimen/bottom_sheet_content_margin"
android:layout_marginLeft="@dimen/measurement_tool_content_margin" android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
android:layout_marginRight="@dimen/measurement_tool_content_margin" android:layout_marginRight="@dimen/bottom_sheet_content_margin"
android:layout_marginStart="@dimen/measurement_tool_content_margin" android:layout_marginStart="@dimen/bottom_sheet_content_margin"
android:background="@null" android:background="@null"
tools:src="@drawable/ic_action_arrow_down"/> tools:src="@drawable/ic_action_arrow_down"/>

View file

@ -22,12 +22,12 @@
<net.osmand.plus.widgets.TextViewEx <net.osmand.plus.widgets.TextViewEx
android:id="@+id/options_title" android:id="@+id/options_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_title_height" android:layout_height="@dimen/bottom_sheet_title_height"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding" android:paddingStart="@dimen/bottom_sheet_content_padding"
android:text="@string/shared_string_options" android:text="@string/shared_string_options"
android:textAppearance="@style/TextAppearance.ListItemTitle" android:textAppearance="@style/TextAppearance.ListItemTitle"
osmand:typeface="@string/font_roboto_medium"/> osmand:typeface="@string/font_roboto_medium"/>
@ -35,21 +35,21 @@
<RelativeLayout <RelativeLayout
android:id="@+id/snap_to_road_row" android:id="@+id/snap_to_road_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/snap_to_road_icon" android:id="@+id/snap_to_road_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_snap_to_road"/> tools:src="@drawable/ic_action_snap_to_road"/>
<android.support.v7.widget.SwitchCompat <android.support.v7.widget.SwitchCompat
@ -59,8 +59,8 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/measurement_tool_content_margin" android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
android:layout_marginStart="@dimen/measurement_tool_content_margin" android:layout_marginStart="@dimen/bottom_sheet_content_margin"
android:background="@null" android:background="@null"
android:clickable="false" android:clickable="false"
android:focusable="false" android:focusable="false"
@ -108,13 +108,13 @@
<RelativeLayout <RelativeLayout
android:id="@+id/save_as_new_segment_row" android:id="@+id/save_as_new_segment_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding" android:paddingStart="@dimen/bottom_sheet_content_padding"
android:visibility="gone"> android:visibility="gone">
<ImageView <ImageView
@ -122,8 +122,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_polygom_dark"/> tools:src="@drawable/ic_action_polygom_dark"/>
<TextView <TextView
@ -140,21 +140,21 @@
<RelativeLayout <RelativeLayout
android:id="@+id/save_as_new_track_row" android:id="@+id/save_as_new_track_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/save_as_new_track_icon" android:id="@+id/save_as_new_track_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_polygom_dark"/> tools:src="@drawable/ic_action_polygom_dark"/>
<TextView <TextView
@ -171,21 +171,21 @@
<RelativeLayout <RelativeLayout
android:id="@+id/add_to_the_track_row" android:id="@+id/add_to_the_track_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/add_to_the_track_icon" android:id="@+id/add_to_the_track_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_split_interval"/> tools:src="@drawable/ic_action_split_interval"/>
<TextView <TextView
@ -211,21 +211,21 @@
<RelativeLayout <RelativeLayout
android:id="@+id/clear_all_row" android:id="@+id/clear_all_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/clear_all_icon" android:id="@+id/clear_all_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_reset_to_default_dark"/> tools:src="@drawable/ic_action_reset_to_default_dark"/>
<TextView <TextView
@ -251,7 +251,7 @@
<FrameLayout <FrameLayout
android:id="@+id/cancel_row" android:id="@+id/cancel_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measure_distance_bottom_sheet_cancel_button_height" android:layout_height="@dimen/bottom_sheet_cancel_button_height"
android:background="?attr/selectableItemBackground"> android:background="?attr/selectableItemBackground">
<TextView <TextView

View file

@ -16,28 +16,28 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="@dimen/measurement_tool_content_padding_small"> android:paddingBottom="@dimen/bottom_sheet_content_padding_small">
<net.osmand.plus.widgets.TextViewEx <net.osmand.plus.widgets.TextViewEx
android:id="@+id/save_as_new_track_title" android:id="@+id/save_as_new_track_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_title_height" android:layout_height="@dimen/bottom_sheet_title_height"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding" android:paddingStart="@dimen/bottom_sheet_content_padding"
android:text="@string/shared_string_save_as_gpx" android:text="@string/shared_string_save_as_gpx"
android:textAppearance="@style/TextAppearance.ListItemTitle" android:textAppearance="@style/TextAppearance.ListItemTitle"
osmand:typeface="@string/font_roboto_medium"/> osmand:typeface="@string/font_roboto_medium"/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_descr_height" android:layout_height="@dimen/bottom_sheet_descr_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding" android:paddingStart="@dimen/bottom_sheet_content_padding"
android:text="@string/measurement_tool_save_as_new_track_descr" android:text="@string/measurement_tool_save_as_new_track_descr"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"/> android:textSize="@dimen/default_desc_text_size"/>
@ -46,16 +46,16 @@
android:id="@+id/images_row" android:id="@+id/images_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="16dp" android:layout_marginBottom="@dimen/bottom_sheet_content_margin"
android:orientation="horizontal"> android:orientation="horizontal">
<RelativeLayout <RelativeLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/measurement_tool_content_margin_small" android:layout_marginEnd="@dimen/bottom_sheet_content_margin_small"
android:layout_marginLeft="@dimen/measurement_tool_content_margin" android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
android:layout_marginRight="@dimen/measurement_tool_content_margin_small" android:layout_marginRight="@dimen/bottom_sheet_content_margin_small"
android:layout_marginStart="@dimen/measurement_tool_content_margin" android:layout_marginStart="@dimen/bottom_sheet_content_margin"
android:layout_weight="1"> android:layout_weight="1">
<ImageView <ImageView
@ -73,9 +73,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignLeft="@id/route_point_image" android:layout_alignLeft="@id/route_point_image"
android:layout_alignStart="@id/route_point_image" android:layout_alignStart="@id/route_point_image"
android:layout_marginLeft="@dimen/measurement_tool_bottom_image_text_margin_start" android:layout_marginLeft="@dimen/bottom_sheet_image_text_margin_start"
android:layout_marginStart="@dimen/measurement_tool_bottom_image_text_margin_start" android:layout_marginStart="@dimen/bottom_sheet_image_text_margin_start"
android:layout_marginTop="@dimen/measurement_tool_content_margin_small" android:layout_marginTop="@dimen/bottom_sheet_content_margin_small"
android:text="@string/route_point" android:text="@string/route_point"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_split_segments_sub"/> android:textSize="@dimen/default_split_segments_sub"/>
@ -84,10 +84,10 @@
<RelativeLayout <RelativeLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/measurement_tool_content_margin" android:layout_marginEnd="@dimen/bottom_sheet_content_margin"
android:layout_marginLeft="@dimen/measurement_tool_content_margin_small" android:layout_marginLeft="@dimen/bottom_sheet_content_margin_small"
android:layout_marginRight="@dimen/measurement_tool_content_margin" android:layout_marginRight="@dimen/bottom_sheet_content_margin"
android:layout_marginStart="@dimen/measurement_tool_content_margin_small" android:layout_marginStart="@dimen/bottom_sheet_content_margin_small"
android:layout_weight="1"> android:layout_weight="1">
<ImageView <ImageView
@ -105,9 +105,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignLeft="@id/line_image" android:layout_alignLeft="@id/line_image"
android:layout_alignStart="@id/line_image" android:layout_alignStart="@id/line_image"
android:layout_marginLeft="@dimen/measurement_tool_bottom_image_text_margin_start" android:layout_marginLeft="@dimen/bottom_sheet_image_text_margin_start"
android:layout_marginStart="@dimen/measurement_tool_bottom_image_text_margin_start" android:layout_marginStart="@dimen/bottom_sheet_image_text_margin_start"
android:layout_marginTop="@dimen/measurement_tool_content_margin_small" android:layout_marginTop="@dimen/bottom_sheet_content_margin_small"
android:text="@string/line" android:text="@string/line"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_split_segments_sub"/> android:textSize="@dimen/default_split_segments_sub"/>
@ -118,21 +118,21 @@
<RelativeLayout <RelativeLayout
android:id="@+id/save_as_route_point_row" android:id="@+id/save_as_route_point_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/route_point_icon" android:id="@+id/route_point_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_route_points"/> tools:src="@drawable/ic_action_route_points"/>
<TextView <TextView
@ -149,21 +149,21 @@
<RelativeLayout <RelativeLayout
android:id="@+id/save_as_line_row" android:id="@+id/save_as_line_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/line_icon" android:id="@+id/line_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_split_interval"/> tools:src="@drawable/ic_action_split_interval"/>
<TextView <TextView
@ -189,7 +189,7 @@
<FrameLayout <FrameLayout
android:id="@+id/cancel_row" android:id="@+id/cancel_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measure_distance_bottom_sheet_cancel_button_height" android:layout_height="@dimen/bottom_sheet_cancel_button_height"
android:background="?attr/selectableItemBackground"> android:background="?attr/selectableItemBackground">
<TextView <TextView

View file

@ -16,24 +16,24 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="@dimen/measurement_tool_content_padding_small"> android:paddingBottom="@dimen/bottom_sheet_content_padding_small">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_selected_point_title_height" android:layout_height="@dimen/measurement_tool_selected_point_title_height"
android:minHeight="@dimen/measurement_tool_selected_point_title_height" android:minHeight="@dimen/measurement_tool_selected_point_title_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/selected_point_icon" android:id="@+id/selected_point_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_measure_point"/> tools:src="@drawable/ic_action_measure_point"/>
<LinearLayout <LinearLayout
@ -74,8 +74,8 @@
android:textAppearance="@style/TextAppearance.ListItemTitle" android:textAppearance="@style/TextAppearance.ListItemTitle"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_list_text_size" android:textSize="@dimen/default_list_text_size"
android:layout_marginLeft="@dimen/measurement_tool_content_margin_small" android:layout_marginLeft="@dimen/bottom_sheet_content_margin_small"
android:layout_marginRight="@dimen/measurement_tool_content_margin_small" android:layout_marginRight="@dimen/bottom_sheet_content_margin_small"
tools:text="A: 345 m"/> tools:text="A: 345 m"/>
<android.support.v7.widget.AppCompatTextView <android.support.v7.widget.AppCompatTextView
@ -101,21 +101,21 @@
<RelativeLayout <RelativeLayout
android:id="@+id/move_point_row" android:id="@+id/move_point_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/move_point_icon" android:id="@+id/move_point_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_move_point"/> tools:src="@drawable/ic_action_move_point"/>
<TextView <TextView
@ -132,21 +132,21 @@
<RelativeLayout <RelativeLayout
android:id="@+id/delete_point_row" android:id="@+id/delete_point_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/delete_point_icon" android:id="@+id/delete_point_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_remove_dark"/> tools:src="@drawable/ic_action_remove_dark"/>
<TextView <TextView
@ -172,21 +172,21 @@
<RelativeLayout <RelativeLayout
android:id="@+id/add_point_after_row" android:id="@+id/add_point_after_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/add_point_after_icon" android:id="@+id/add_point_after_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_addpoint_above"/> tools:src="@drawable/ic_action_addpoint_above"/>
<TextView <TextView
@ -203,21 +203,21 @@
<RelativeLayout <RelativeLayout
android:id="@+id/add_point_before_row" android:id="@+id/add_point_before_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/add_point_before_icon" android:id="@+id/add_point_before_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_addpoint_below"/> tools:src="@drawable/ic_action_addpoint_below"/>
<TextView <TextView
@ -243,7 +243,7 @@
<FrameLayout <FrameLayout
android:id="@+id/cancel_row" android:id="@+id/cancel_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measure_distance_bottom_sheet_cancel_button_height" android:layout_height="@dimen/bottom_sheet_cancel_button_height"
android:background="?attr/selectableItemBackground"> android:background="?attr/selectableItemBackground">
<TextView <TextView

View file

@ -16,27 +16,27 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="@dimen/measurement_tool_content_padding_small"> android:paddingBottom="@dimen/bottom_sheet_content_padding_small">
<TextView <TextView
android:id="@+id/choose_navigation_title" android:id="@+id/choose_navigation_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_title_height" android:layout_height="@dimen/bottom_sheet_title_height"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding" android:paddingStart="@dimen/bottom_sheet_content_padding"
android:text="@string/choose_navigation_type" android:text="@string/choose_navigation_type"
android:textAppearance="@style/TextAppearance.ListItemTitle"/> android:textAppearance="@style/TextAppearance.ListItemTitle"/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_descr_height" android:layout_height="@dimen/bottom_sheet_descr_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding" android:paddingStart="@dimen/bottom_sheet_content_padding"
android:text="@string/measurement_tool_snap_to_road_descr" android:text="@string/measurement_tool_snap_to_road_descr"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"/> android:textSize="@dimen/default_desc_text_size"/>
@ -50,7 +50,7 @@
<FrameLayout <FrameLayout
android:id="@+id/cancel_row" android:id="@+id/cancel_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measure_distance_bottom_sheet_cancel_button_height" android:layout_height="@dimen/bottom_sheet_cancel_button_height"
android:background="?attr/selectableItemBackground"> android:background="?attr/selectableItemBackground">
<TextView <TextView

View file

@ -3,21 +3,21 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_bottom_list_item_height" android:layout_height="@dimen/bottom_sheet_list_item_height"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/measurement_tool_bottom_list_item_height" android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingEnd="@dimen/measurement_tool_content_padding" android:paddingEnd="@dimen/bottom_sheet_content_padding"
android:paddingLeft="@dimen/measurement_tool_content_padding" android:paddingLeft="@dimen/bottom_sheet_content_padding"
android:paddingRight="@dimen/measurement_tool_content_padding" android:paddingRight="@dimen/bottom_sheet_content_padding"
android:paddingStart="@dimen/measurement_tool_content_padding"> android:paddingStart="@dimen/bottom_sheet_content_padding">
<ImageView <ImageView
android:id="@+id/icon" android:id="@+id/icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
android:layout_marginRight="@dimen/measurement_tool_bottom_icon_margin" android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
tools:src="@drawable/ic_action_car_dark"/> tools:src="@drawable/ic_action_car_dark"/>
<TextView <TextView

View file

@ -9,21 +9,21 @@
android:id="@+id/gpx_name_et" android:id="@+id/gpx_name_et"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/measurement_tool_content_margin" android:layout_marginEnd="@dimen/bottom_sheet_content_margin"
android:layout_marginLeft="@dimen/measurement_tool_content_margin" android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
android:layout_marginRight="@dimen/measurement_tool_content_margin" android:layout_marginRight="@dimen/bottom_sheet_content_margin"
android:layout_marginStart="@dimen/measurement_tool_content_margin" android:layout_marginStart="@dimen/bottom_sheet_content_margin"
android:layout_marginTop="@dimen/measurement_tool_content_margin" android:layout_marginTop="@dimen/bottom_sheet_content_margin"
android:inputType="text"/> android:inputType="text"/>
<TextView <TextView
android:id="@+id/file_exists_text_view" android:id="@+id/file_exists_text_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/measurement_tool_content_margin" android:layout_marginEnd="@dimen/bottom_sheet_content_margin"
android:layout_marginLeft="@dimen/measurement_tool_content_margin" android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
android:layout_marginRight="@dimen/measurement_tool_content_margin" android:layout_marginRight="@dimen/bottom_sheet_content_margin"
android:layout_marginStart="@dimen/measurement_tool_content_margin" android:layout_marginStart="@dimen/bottom_sheet_content_margin"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="@string/file_with_name_already_exists" android:text="@string/file_with_name_already_exists"
android:textColor="@color/marker_red" android:textColor="@color/marker_red"
@ -38,7 +38,7 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/measurement_tool_content_padding"> android:padding="@dimen/bottom_sheet_content_padding">
<android.support.v7.widget.SwitchCompat <android.support.v7.widget.SwitchCompat
android:id="@+id/toggle_show_on_map" android:id="@+id/toggle_show_on_map"
@ -47,8 +47,8 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/measurement_tool_content_margin" android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
android:layout_marginStart="@dimen/measurement_tool_content_margin"/> android:layout_marginStart="@dimen/bottom_sheet_content_margin"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -91,14 +91,14 @@
<dimen name="my_places_empty_state_text_button_padding_right">90dp</dimen> <dimen name="my_places_empty_state_text_button_padding_right">90dp</dimen>
<dimen name="my_places_empty_state_text_button_padding_top">96dp</dimen> <dimen name="my_places_empty_state_text_button_padding_top">96dp</dimen>
<dimen name="measure_distance_bottom_sheet_cancel_button_height">72dp</dimen> <dimen name="bottom_sheet_cancel_button_height">72dp</dimen>
<dimen name="landscape_bottom_sheet_dialog_fragment_width">540dp</dimen> <dimen name="landscape_bottom_sheet_dialog_fragment_width">540dp</dimen>
<dimen name="measurement_tool_select_radius">30dp</dimen> <dimen name="measurement_tool_select_radius">30dp</dimen>
<dimen name="measurement_tool_content_margin">24dp</dimen> <dimen name="bottom_sheet_content_margin">24dp</dimen>
<dimen name="measurement_tool_content_margin_small">12dp</dimen> <dimen name="bottom_sheet_content_margin_small">12dp</dimen>
<dimen name="measurement_tool_content_padding">24dp</dimen> <dimen name="bottom_sheet_content_padding">24dp</dimen>
<dimen name="measurement_tool_content_padding_small">12dp</dimen> <dimen name="bottom_sheet_content_padding_small">12dp</dimen>
<dimen name="measurement_tool_divider_margin">12dp</dimen> <dimen name="measurement_tool_divider_margin">12dp</dimen>
<dimen name="measurement_tool_content_padding_medium">18dp</dimen> <dimen name="measurement_tool_content_padding_medium">18dp</dimen>
<dimen name="measurement_tool_text_margin_small">6dp</dimen> <dimen name="measurement_tool_text_margin_small">6dp</dimen>
@ -113,14 +113,14 @@
<dimen name="measurement_tool_button_margin">12dp</dimen> <dimen name="measurement_tool_button_margin">12dp</dimen>
<dimen name="measurement_tool_button_padding">12dp</dimen> <dimen name="measurement_tool_button_padding">12dp</dimen>
<dimen name="measurement_tool_button_height">54dp</dimen> <dimen name="measurement_tool_button_height">54dp</dimen>
<dimen name="measurement_tool_bottom_title_height">78dp</dimen> <dimen name="bottom_sheet_title_height">78dp</dimen>
<dimen name="measurement_tool_bottom_descr_height">66dp</dimen> <dimen name="bottom_sheet_descr_height">66dp</dimen>
<dimen name="measurement_tool_bottom_list_item_height">72dp</dimen> <dimen name="bottom_sheet_list_item_height">72dp</dimen>
<dimen name="measurement_tool_bottom_icon_margin">36dp</dimen> <dimen name="bottom_sheet_icon_margin">36dp</dimen>
<dimen name="measurement_tool_bottom_divider_margin_top">11dp</dimen> <dimen name="measurement_tool_bottom_divider_margin_top">11dp</dimen>
<dimen name="measurement_tool_bottom_divider_margin_bottom">12dp</dimen> <dimen name="measurement_tool_bottom_divider_margin_bottom">12dp</dimen>
<dimen name="measurement_tool_bottom_divider_margin_start">96dp</dimen> <dimen name="measurement_tool_bottom_divider_margin_start">96dp</dimen>
<dimen name="measurement_tool_bottom_image_text_margin_start">15dp</dimen> <dimen name="bottom_sheet_image_text_margin_start">15dp</dimen>
<dimen name="measurement_tool_selected_point_title_height">84dp</dimen> <dimen name="measurement_tool_selected_point_title_height">84dp</dimen>
</resources> </resources>

View file

@ -156,14 +156,14 @@
<dimen name="my_places_empty_state_text_button_padding_right">60dp</dimen> <dimen name="my_places_empty_state_text_button_padding_right">60dp</dimen>
<dimen name="my_places_empty_state_text_button_padding_top">64dp</dimen> <dimen name="my_places_empty_state_text_button_padding_top">64dp</dimen>
<dimen name="measure_distance_bottom_sheet_cancel_button_height">48dp</dimen> <dimen name="bottom_sheet_cancel_button_height">48dp</dimen>
<dimen name="landscape_bottom_sheet_dialog_fragment_width">360dp</dimen> <dimen name="landscape_bottom_sheet_dialog_fragment_width">360dp</dimen>
<dimen name="measurement_tool_select_radius">20dp</dimen> <dimen name="measurement_tool_select_radius">20dp</dimen>
<dimen name="measurement_tool_content_margin">16dp</dimen> <dimen name="bottom_sheet_content_margin">16dp</dimen>
<dimen name="measurement_tool_content_margin_small">8dp</dimen> <dimen name="bottom_sheet_content_margin_small">8dp</dimen>
<dimen name="measurement_tool_content_padding">16dp</dimen> <dimen name="bottom_sheet_content_padding">16dp</dimen>
<dimen name="measurement_tool_content_padding_small">8dp</dimen> <dimen name="bottom_sheet_content_padding_small">8dp</dimen>
<dimen name="measurement_tool_divider_margin">8dp</dimen> <dimen name="measurement_tool_divider_margin">8dp</dimen>
<dimen name="measurement_tool_content_padding_medium">12dp</dimen> <dimen name="measurement_tool_content_padding_medium">12dp</dimen>
<dimen name="measurement_tool_text_margin_small">4dp</dimen> <dimen name="measurement_tool_text_margin_small">4dp</dimen>
@ -178,13 +178,13 @@
<dimen name="measurement_tool_button_margin">8dp</dimen> <dimen name="measurement_tool_button_margin">8dp</dimen>
<dimen name="measurement_tool_button_padding">8dp</dimen> <dimen name="measurement_tool_button_padding">8dp</dimen>
<dimen name="measurement_tool_button_height">36dp</dimen> <dimen name="measurement_tool_button_height">36dp</dimen>
<dimen name="measurement_tool_bottom_title_height">52dp</dimen> <dimen name="bottom_sheet_title_height">52dp</dimen>
<dimen name="measurement_tool_bottom_descr_height">44dp</dimen> <dimen name="bottom_sheet_descr_height">44dp</dimen>
<dimen name="measurement_tool_bottom_list_item_height">48dp</dimen> <dimen name="bottom_sheet_list_item_height">48dp</dimen>
<dimen name="measurement_tool_bottom_icon_margin">24dp</dimen> <dimen name="bottom_sheet_icon_margin">24dp</dimen>
<dimen name="measurement_tool_bottom_divider_margin_top">7dp</dimen> <dimen name="measurement_tool_bottom_divider_margin_top">7dp</dimen>
<dimen name="measurement_tool_bottom_divider_margin_bottom">8dp</dimen> <dimen name="measurement_tool_bottom_divider_margin_bottom">8dp</dimen>
<dimen name="measurement_tool_bottom_divider_margin_start">64dp</dimen> <dimen name="measurement_tool_bottom_divider_margin_start">64dp</dimen>
<dimen name="measurement_tool_bottom_image_text_margin_start">10dp</dimen> <dimen name="bottom_sheet_image_text_margin_start">10dp</dimen>
<dimen name="measurement_tool_selected_point_title_height">56dp</dimen> <dimen name="measurement_tool_selected_point_title_height">56dp</dimen>
</resources> </resources>

View file

@ -9,6 +9,8 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
--> -->
<string name="widget">Widget</string>
<string name="top_bar">Top bar</string>
<string name="move_all_to_history">Move all to history</string> <string name="move_all_to_history">Move all to history</string>
<string name="build_route">Build route</string> <string name="build_route">Build route</string>
<string name="show_direction">Show direction</string> <string name="show_direction">Show direction</string>

View file

@ -141,7 +141,7 @@ public class MapMarkersActiveFragment extends Fragment implements OsmAndCompassL
adapter.setUseCenter(useCenter); adapter.setUseCenter(useCenter);
adapter.setLocation(useCenter ? mapActivity.getMapLocation() : new LatLon(location.getLatitude(), location.getLongitude())); adapter.setLocation(useCenter ? mapActivity.getMapLocation() : new LatLon(location.getLatitude(), location.getLongitude()));
adapter.setHeading(useCenter ? -mapActivity.getMapRotate() : heading); adapter.setHeading(useCenter ? -mapActivity.getMapRotate() : heading != null ? heading : 99);
adapter.notifyDataSetChanged(); adapter.notifyDataSetChanged();
} }
}); });

View file

@ -106,6 +106,9 @@ public class MapMarkersDialogFragment extends android.support.v4.app.DialogFragm
private MarkerOptionsFragmentListener createMarkerOptionsFragmentListener() { private MarkerOptionsFragmentListener createMarkerOptionsFragmentListener() {
return new MarkerOptionsFragmentListener() { return new MarkerOptionsFragmentListener() {
final MapActivity mapActivity = getMapActivity();
@Override @Override
public void sortByOnClick() { public void sortByOnClick() {
Toast.makeText(getContext(), "Sort by", Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), "Sort by", Toast.LENGTH_SHORT).show();
@ -113,7 +116,7 @@ public class MapMarkersDialogFragment extends android.support.v4.app.DialogFragm
@Override @Override
public void showDirectionOnClick() { public void showDirectionOnClick() {
Toast.makeText(getContext(), "Show direction", Toast.LENGTH_SHORT).show(); openShowDirectionMenu(mapActivity);
} }
@Override @Override
@ -133,6 +136,14 @@ public class MapMarkersDialogFragment extends android.support.v4.app.DialogFragm
}; };
} }
private void openShowDirectionMenu(MapActivity mapActivity) {
ShowDirectionBottomSheetDialogFragment fragment = new ShowDirectionBottomSheetDialogFragment();
fragment.show(mapActivity.getSupportFragmentManager(), ShowDirectionBottomSheetDialogFragment.TAG);
}
private MapActivity getMapActivity() {
return (MapActivity) getActivity();
}
public static boolean showInstance(@NonNull MapActivity mapActivity) { public static boolean showInstance(@NonNull MapActivity mapActivity) {
try { try {

View file

@ -3,6 +3,7 @@ package net.osmand.plus.mapmarkers;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -32,10 +33,12 @@ public class MarkerOptionsBottomSheetDialogFragment extends BottomSheetDialogFra
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
portrait = AndroidUiHelper.isOrientationPortrait(getActivity()); portrait = AndroidUiHelper.isOrientationPortrait(getActivity());
boolean nightMode = getMyApplication().getDaynightHelper().isNightModeForMapControls();
final int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
final View mainView = inflater.inflate(R.layout.fragment_marker_options_bottom_sheet_dialog, container); final View mainView = View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.fragment_marker_options_bottom_sheet_dialog, container);
if (portrait) { if (portrait) {
AndroidUtils.setBackground(getActivity(), mainView, false, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark); AndroidUtils.setBackground(getActivity(), mainView, nightMode, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark);
} }
((ImageView) mainView.findViewById(R.id.sort_by_icon)) ((ImageView) mainView.findViewById(R.id.sort_by_icon))
@ -113,7 +116,7 @@ public class MarkerOptionsBottomSheetDialogFragment extends BottomSheetDialogFra
final View scrollView = mainView.findViewById(R.id.marker_options_scroll_view); final View scrollView = mainView.findViewById(R.id.marker_options_scroll_view);
int scrollViewHeight = scrollView.getHeight(); int scrollViewHeight = scrollView.getHeight();
int dividerHeight = AndroidUtils.dpToPx(getContext(), 1); int dividerHeight = AndroidUtils.dpToPx(getContext(), 1);
int cancelButtonHeight = getContext().getResources().getDimensionPixelSize(R.dimen.measure_distance_bottom_sheet_cancel_button_height); int cancelButtonHeight = getContext().getResources().getDimensionPixelSize(R.dimen.bottom_sheet_cancel_button_height);
int spaceForScrollView = screenHeight - statusBarHeight - navBarHeight - dividerHeight - cancelButtonHeight; int spaceForScrollView = screenHeight - statusBarHeight - navBarHeight - dividerHeight - cancelButtonHeight;
if (scrollViewHeight > spaceForScrollView) { if (scrollViewHeight > spaceForScrollView) {
scrollView.getLayoutParams().height = spaceForScrollView; scrollView.getLayoutParams().height = spaceForScrollView;

View file

@ -0,0 +1,149 @@
package net.osmand.plus.mapmarkers;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;
import net.osmand.AndroidUtils;
import net.osmand.plus.R;
import net.osmand.plus.base.BottomSheetDialogFragment;
import net.osmand.plus.helpers.AndroidUiHelper;
public class ShowDirectionBottomSheetDialogFragment extends BottomSheetDialogFragment {
public final static String TAG = "ShowDirectionBottomSheetDialogFragment";
private ShowDirectionFragmentListener listener;
private boolean portrait;
public void setListener(ShowDirectionFragmentListener listener) {
this.listener = listener;
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
portrait = AndroidUiHelper.isOrientationPortrait(getActivity());
boolean nightMode = getMyApplication().getDaynightHelper().isNightModeForMapControls();
final int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
final View mainView = View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.fragment_marker_show_direction_bottom_sheet_dialog, container);
if (portrait) {
AndroidUtils.setBackground(getActivity(), mainView, nightMode, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark);
}
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
mainView.findViewById(R.id.images_row).setVisibility(View.GONE);
} else {
ImageView topBarImage = (ImageView) mainView.findViewById(R.id.top_bar_image);
ImageView widgetImage = (ImageView) mainView.findViewById(R.id.widget_image);
if (nightMode) {
topBarImage.setImageResource(R.drawable.img_help_markers_topbar_night);
widgetImage.setImageResource(R.drawable.img_help_markers_widgets_night);
} else {
topBarImage.setImageResource(R.drawable.img_help_markers_topbar_day);
widgetImage.setImageResource(R.drawable.img_help_markers_widgets_day);
}
mainView.findViewById(R.id.top_bar_text).setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
return false;
}
});
mainView.findViewById(R.id.widget_text).setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
return false;
}
});
}
if (nightMode) {
((TextView) mainView.findViewById(R.id.show_direction_title)).setTextColor(getResources().getColor(R.color.ctx_menu_info_text_dark));
}
ImageView topBarIcon = (ImageView) mainView.findViewById(R.id.top_bar_icon);
topBarIcon.setBackgroundDrawable(getIcon(R.drawable.ic_action_device_top, R.color.on_map_icon_color));
topBarIcon.setImageDrawable(getIcon(R.drawable.ic_action_device_topbar, R.color.dashboard_blue));
ImageView widgetIcon = (ImageView) mainView.findViewById(R.id.widget_icon);
widgetIcon.setBackgroundDrawable(getIcon(R.drawable.ic_action_device_top, R.color.on_map_icon_color));
widgetIcon.setImageDrawable(getIcon(R.drawable.ic_action_device_widget, R.color.dashboard_blue));
ImageView noneIcon = (ImageView) mainView.findViewById(R.id.none_icon);
noneIcon.setBackgroundDrawable(getIcon(R.drawable.ic_action_device_top, R.color.on_map_icon_color));
mainView.findViewById(R.id.cancel_row).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dismiss();
}
});
final int screenHeight = AndroidUtils.getScreenHeight(getActivity());
final int statusBarHeight = AndroidUtils.getStatusBarHeight(getActivity());
final int navBarHeight = AndroidUtils.getNavBarHeight(getActivity());
mainView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
final View scrollView = mainView.findViewById(R.id.marker_show_direction_scroll_view);
int scrollViewHeight = scrollView.getHeight();
int dividerHeight = AndroidUtils.dpToPx(getContext(), 1);
int cancelButtonHeight = getContext().getResources().getDimensionPixelSize(R.dimen.bottom_sheet_cancel_button_height);
int spaceForScrollView = screenHeight - statusBarHeight - navBarHeight - dividerHeight - cancelButtonHeight;
if (scrollViewHeight > spaceForScrollView) {
scrollView.getLayoutParams().height = spaceForScrollView;
scrollView.requestLayout();
}
if (!portrait) {
if (screenHeight - statusBarHeight - mainView.getHeight()
>= AndroidUtils.dpToPx(getActivity(), 8)) {
AndroidUtils.setBackground(getActivity(), mainView, false,
R.drawable.bg_bottom_sheet_topsides_landscape_light, R.drawable.bg_bottom_sheet_topsides_landscape_dark);
} else {
AndroidUtils.setBackground(getActivity(), mainView, false,
R.drawable.bg_bottom_sheet_sides_landscape_light, R.drawable.bg_bottom_sheet_sides_landscape_dark);
}
}
ViewTreeObserver obs = mainView.getViewTreeObserver();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
obs.removeOnGlobalLayoutListener(this);
} else {
obs.removeGlobalOnLayoutListener(this);
}
}
});
return mainView;
}
@Override
public void onStart() {
super.onStart();
if (!portrait) {
final Window window = getDialog().getWindow();
WindowManager.LayoutParams params = window.getAttributes();
params.width = getActivity().getResources().getDimensionPixelSize(R.dimen.landscape_bottom_sheet_dialog_fragment_width);
window.setAttributes(params);
}
}
interface ShowDirectionFragmentListener {
}
}

View file

@ -141,7 +141,7 @@ public class OptionsBottomSheetDialogFragment extends BottomSheetDialogFragment
final View scrollView = mainView.findViewById(R.id.measure_options_scroll_view); final View scrollView = mainView.findViewById(R.id.measure_options_scroll_view);
int scrollViewHeight = scrollView.getHeight(); int scrollViewHeight = scrollView.getHeight();
int dividerHeight = AndroidUtils.dpToPx(getContext(), 1); int dividerHeight = AndroidUtils.dpToPx(getContext(), 1);
int cancelButtonHeight = getContext().getResources().getDimensionPixelSize(R.dimen.measure_distance_bottom_sheet_cancel_button_height); int cancelButtonHeight = getContext().getResources().getDimensionPixelSize(R.dimen.bottom_sheet_cancel_button_height);
int spaceForScrollView = screenHeight - statusBarHeight - navBarHeight - dividerHeight - cancelButtonHeight; int spaceForScrollView = screenHeight - statusBarHeight - navBarHeight - dividerHeight - cancelButtonHeight;
if (scrollViewHeight > spaceForScrollView) { if (scrollViewHeight > spaceForScrollView) {
scrollView.getLayoutParams().height = spaceForScrollView; scrollView.getLayoutParams().height = spaceForScrollView;

View file

@ -102,7 +102,7 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends BottomSheetDialogFr
final View scrollView = mainView.findViewById(R.id.save_as_new_track_scroll_view); final View scrollView = mainView.findViewById(R.id.save_as_new_track_scroll_view);
int scrollViewHeight = scrollView.getHeight(); int scrollViewHeight = scrollView.getHeight();
int dividerHeight = AndroidUtils.dpToPx(getContext(), 1); int dividerHeight = AndroidUtils.dpToPx(getContext(), 1);
int cancelButtonHeight = getContext().getResources().getDimensionPixelSize(R.dimen.measure_distance_bottom_sheet_cancel_button_height); int cancelButtonHeight = getContext().getResources().getDimensionPixelSize(R.dimen.bottom_sheet_cancel_button_height);
int spaceForScrollView = screenHeight - statusBarHeight - navBarHeight - dividerHeight - cancelButtonHeight; int spaceForScrollView = screenHeight - statusBarHeight - navBarHeight - dividerHeight - cancelButtonHeight;
if (scrollViewHeight > spaceForScrollView) { if (scrollViewHeight > spaceForScrollView) {
scrollView.getLayoutParams().height = spaceForScrollView; scrollView.getLayoutParams().height = spaceForScrollView;

View file

@ -167,7 +167,7 @@ public class SelectedPointBottomSheetDialogFragment extends BottomSheetDialogFra
final View scrollView = mainView.findViewById(R.id.selected_point_options_scroll_view); final View scrollView = mainView.findViewById(R.id.selected_point_options_scroll_view);
int scrollViewHeight = scrollView.getHeight(); int scrollViewHeight = scrollView.getHeight();
int dividerHeight = AndroidUtils.dpToPx(getContext(), 1); int dividerHeight = AndroidUtils.dpToPx(getContext(), 1);
int cancelButtonHeight = getContext().getResources().getDimensionPixelSize(R.dimen.measure_distance_bottom_sheet_cancel_button_height); int cancelButtonHeight = getContext().getResources().getDimensionPixelSize(R.dimen.bottom_sheet_cancel_button_height);
int spaceForScrollView = screenHeight - statusBarHeight - navBarHeight - dividerHeight - cancelButtonHeight; int spaceForScrollView = screenHeight - statusBarHeight - navBarHeight - dividerHeight - cancelButtonHeight;
if (scrollViewHeight > spaceForScrollView) { if (scrollViewHeight > spaceForScrollView) {
scrollView.getLayoutParams().height = spaceForScrollView; scrollView.getLayoutParams().height = spaceForScrollView;