Fix ruler, plan route AppBar and bottom buttons

This commit is contained in:
Dima-1 2020-08-31 18:31:08 +03:00
parent dcb09ce475
commit 26071cf468
10 changed files with 213 additions and 266 deletions

View file

@ -1,20 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout 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="match_parent"
android:background="@color/color_transparent"
android:clickable="true">
android:clickable="true"
android:focusable="true">
<LinearLayout
android:id="@+id/main_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:clickable="true"
android:focusable="true"
android:orientation="vertical"
android:clickable="true"
tools:background="@drawable/bg_bottom_menu_dark">
<ProgressBar
@ -33,7 +34,7 @@
<RelativeLayout
android:id="@+id/up_down_row"
android:layout_width="0dp"
android:layout_height="@dimen/measurement_tool_controls_height"
android:layout_height="@dimen/measurement_tool_controls_height_land"
android:layout_weight="0.45"
android:background="?attr/selectableItemBackground">
@ -69,11 +70,11 @@
android:id="@+id/measurement_distance_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_text_margin"
android:layout_marginLeft="@dimen/measurement_tool_text_margin"
android:layout_marginRight="@dimen/measurement_tool_text_margin"
android:layout_marginStart="@dimen/measurement_tool_text_margin"
android:layout_marginStart="@dimen/measurement_tool_text_button_padding"
android:layout_marginLeft="@dimen/measurement_tool_text_button_padding"
android:layout_marginTop="@dimen/measurement_tool_button_padding"
android:layout_marginEnd="@dimen/text_margin_small"
android:layout_marginRight="@dimen/text_margin_small"
android:layout_toEndOf="@id/main_icon"
android:layout_toRightOf="@id/main_icon"
android:textAppearance="@style/TextAppearance.ListItemTitle"
@ -83,28 +84,24 @@
android:id="@+id/measurement_points_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignEnd="@id/up_down_button"
android:layout_toEndOf="@id/measurement_distance_text_view"
android:layout_toRightOf="@id/measurement_distance_text_view"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_list_text_size"
android:layout_alignRight="@id/up_down_button"
android:layout_marginTop="@dimen/measurement_tool_button_padding"
android:textAppearance="@style/TextAppearance.ListItemCategoryTitle"
tools:text="points: 3" />
<TextView
android:id="@+id/distance_to_center_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/measurement_points_text_view"
android:layout_toLeftOf="@id/up_down_button"
android:layout_toRightOf="@id/measurement_points_text_view"
android:layout_toStartOf="@id/up_down_button"
android:layout_marginEnd="@dimen/measurement_tool_text_margin"
android:layout_marginLeft="@dimen/measurement_tool_text_margin"
android:layout_marginRight="@dimen/measurement_tool_text_margin"
android:layout_marginStart="@dimen/measurement_tool_text_margin"
android:textColor="@color/color_distance"
android:textSize="@dimen/default_list_text_size"
android:layout_below="@id/measurement_points_text_view"
android:layout_alignStart="@+id/measurement_distance_text_view"
android:layout_alignLeft="@+id/measurement_distance_text_view"
android:maxLines="1"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
tools:text=" 700 m" />
<TextView
@ -143,41 +140,37 @@
android:layout_height="match_parent"
android:background="?attr/dashboard_divider"/>
<LinearLayout
<RelativeLayout
android:id="@+id/measure_mode_controls"
android:layout_width="0dp"
android:layout_height="@dimen/measurement_tool_controls_height"
android:layout_weight="0.55">
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
android:layout_height="@dimen/measurement_tool_controls_height_land"
android:layout_weight="0.55"
android:padding="@dimen/content_padding_half">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/options_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/measurement_tool_button_padding"
android:layout_marginBottom="@dimen/measurement_tool_button_padding"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_centerVertical="true"
android:background="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:maxLines="1"
android:paddingEnd="@dimen/measurement_tool_text_button_padding_small"
android:paddingRight="@dimen/measurement_tool_text_button_padding_small"
android:paddingStart="@dimen/measurement_tool_text_button_padding"
android:paddingLeft="@dimen/measurement_tool_text_button_padding"
android:padding="@dimen/measurement_tool_text_button_padding_small"
android:text="@string/shared_string_options"
android:textColor="?attr/color_dialog_buttons"
osmand:typeface="@string/font_roboto_medium" />
</FrameLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true">
<ImageButton
android:id="@+id/undo_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_centerVertical="true"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/shared_string_undo"
android:padding="@dimen/measurement_tool_undo_redo_padding_small"
tools:src="@drawable/ic_action_undo_dark" />
@ -185,90 +178,69 @@
android:id="@+id/redo_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/measurement_tool_button_padding"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/measurement_tool_button_padding"
android:layout_marginLeft="@dimen/measurement_tool_button_padding"
android:layout_toRightOf="@id/undo_point_button"
android:layout_toEndOf="@id/undo_point_button"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/shared_string_redo"
android:padding="@dimen/measurement_tool_undo_redo_padding_small"
tools:src="@drawable/ic_action_redo_dark" />
</RelativeLayout>
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<Button
<include
android:id="@+id/add_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round"
android:maxLines="1"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_add"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
</FrameLayout>
</LinearLayout>
layout="@layout/bottom_sheet_dialog_button"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/move_point_controls"
android:layout_width="0dp"
android:layout_height="@dimen/measurement_tool_controls_height"
android:layout_weight="0.6"
android:layout_height="@dimen/measurement_tool_controls_height_land"
android:layout_weight="0.55"
android:visibility="gone">
<Button
<include
android:id="@+id/apply_move_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_apply"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
layout="@layout/bottom_sheet_dialog_button" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/cancel_move_point_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="@dimen/measurement_tool_button_height"
android:background="?attr/selectableItemBackground"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/content_padding_small"
android:layout_marginLeft="@dimen/content_padding_small"
android:gravity="center_vertical"
android:paddingEnd="@dimen/measurement_tool_text_button_padding_small"
android:paddingLeft="@dimen/measurement_tool_text_button_padding"
android:paddingLeft="@dimen/measurement_tool_text_button_padding_small"
android:paddingRight="@dimen/measurement_tool_text_button_padding_small"
android:paddingStart="@dimen/measurement_tool_text_button_padding"
android:paddingStart="@dimen/measurement_tool_text_button_padding_small"
android:text="@string/shared_string_cancel"
android:textColor="?attr/color_dialog_buttons"
osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium" />
</RelativeLayout>
<LinearLayout
<RelativeLayout
android:id="@+id/add_point_before_after_controls"
android:layout_width="0dp"
android:layout_height="@dimen/measurement_tool_controls_height"
android:layout_weight="0.6"
android:layout_height="@dimen/measurement_tool_controls_height_land"
android:layout_weight="0.55"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone">
@ -276,59 +248,48 @@
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/cancel_point_before_after_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="@dimen/measurement_tool_button_height"
android:background="?attr/selectableItemBackground"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/content_padding_small"
android:layout_marginLeft="@dimen/content_padding_small"
android:gravity="center_vertical"
android:paddingEnd="@dimen/measurement_tool_text_button_padding_small"
android:paddingLeft="@dimen/measurement_tool_text_button_padding"
android:paddingLeft="@dimen/measurement_tool_text_button_padding_small"
android:paddingRight="@dimen/measurement_tool_text_button_padding_small"
android:paddingStart="@dimen/measurement_tool_text_button_padding"
android:paddingStart="@dimen/measurement_tool_text_button_padding_small"
android:text="@string/shared_string_cancel"
android:textColor="?attr/color_dialog_buttons"
osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
android:layout_height="match_parent" />
<Button
<include
android:id="@+id/apply_point_before_after_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round_border"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_apply"
android:textColor="?attr/color_dialog_buttons"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
android:layout_toStartOf="@id/add_point_before_after_button"
android:layout_toLeftOf="@id/add_point_before_after_button"
android:layout_centerVertical="true"
layout="@layout/bottom_sheet_dialog_button" />
<Button
<include
android:id="@+id/add_point_before_after_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_add"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingStart="@dimen/measurement_tool_button_padding"
android:paddingEnd="@dimen/measurement_tool_button_padding" />
</LinearLayout>
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
layout="@layout/bottom_sheet_dialog_button" />
</RelativeLayout>
</LinearLayout>

View file

@ -536,8 +536,8 @@
<ImageButton
android:id="@+id/widget_top_bar_back_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_width="@dimen/toolbar_height"
android:layout_height="@dimen/toolbar_height"
android:layout_gravity="top"
android:contentDescription="@string/back_to_search"
osmand:srcCompat="@drawable/ic_arrow_back" />
@ -549,8 +549,8 @@
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingTop="10dp">
android:paddingBottom="@dimen/toolbar_title_padding_bottom"
android:paddingTop="@dimen/toolbar_title_padding_top">
<TextView
android:id="@+id/widget_top_bar_title"
@ -598,7 +598,7 @@
android:id="@+id/widget_top_bar_refresh_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="48dp"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:layout_gravity="top"
android:contentDescription="@string/shared_string_refresh"
osmand:srcCompat="@drawable/ic_action_refresh_dark"
@ -608,7 +608,7 @@
android:id="@+id/widget_top_bar_close_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="48dp"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:layout_gravity="top"
android:contentDescription="@string/shared_string_close"
osmand:srcCompat="@drawable/ic_action_remove_dark"/>
@ -616,7 +616,7 @@
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/widget_top_bar_save"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:background="@null"
android:ellipsize="end"
android:gravity="center_vertical"
@ -636,7 +636,7 @@
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/widget_top_bar_switch"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:paddingEnd="16dp"
android:paddingRight="16dp"
android:visibility="gone"

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout 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="match_parent"
android:background="@color/color_transparent"
android:clickable="true">
android:clickable="true"
android:focusable="true">
<LinearLayout
android:id="@+id/main_view"
@ -14,8 +14,9 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/bg_bottom_menu_dark"
android:orientation="vertical"
android:clickable="true"
android:orientation="vertical">
android:focusable="true">
<ProgressBar
android:id="@+id/snap_to_road_progress_bar"
@ -81,6 +82,8 @@
android:layout_marginTop="@dimen/measurement_tool_button_padding"
android:layout_toEndOf="@id/measurement_distance_text_view"
android:layout_toRightOf="@id/measurement_distance_text_view"
android:layout_alignEnd="@id/up_down_button"
android:layout_alignRight="@id/up_down_button"
android:textAppearance="@style/TextAppearance.ListItemCategoryTitle"
tools:text="points: 3" />
@ -159,8 +162,8 @@
android:id="@+id/measure_mode_controls"
android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_controls_height"
android:paddingTop="@dimen/measurement_tool_button_padding_top"
android:paddingBottom="@dimen/measurement_tool_button_padding_top"
android:paddingTop="@dimen/measurement_tool_button_margin"
android:paddingBottom="@dimen/measurement_tool_button_margin"
android:paddingLeft="@dimen/measurement_tool_button_margin"
android:paddingRight="@dimen/measurement_tool_button_margin">
@ -189,6 +192,7 @@
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/measurement_tool_undo_redo_padding_small"
android:contentDescription="@string/shared_string_undo"
tools:src="@drawable/ic_action_undo_dark"/>
<ImageButton
@ -199,6 +203,7 @@
android:layout_marginStart="@dimen/measurement_tool_button_padding"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/measurement_tool_undo_redo_padding_small"
android:contentDescription="@string/shared_string_redo"
tools:src="@drawable/ic_action_redo_dark"/>
<FrameLayout
@ -206,22 +211,12 @@
android:layout_height="match_parent"
android:layout_weight="1">
<Button
<include
android:id="@+id/add_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_gravity="end"
android:background="?attr/btn_round"
android:ellipsize="end"
android:maxLines="1"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_add"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
layout="@layout/bottom_sheet_dialog_button" />
</FrameLayout>
</LinearLayout>
@ -232,26 +227,16 @@
android:layout_height="@dimen/measurement_tool_controls_height"
android:visibility="gone">
<Button
<include
android:id="@+id/apply_move_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_apply"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
layout="@layout/bottom_sheet_dialog_button" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/cancel_move_point_button"
@ -269,7 +254,7 @@
<LinearLayout
android:id="@+id/add_point_before_after_controls"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_height="@dimen/measurement_tool_controls_height"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone">
@ -291,41 +276,24 @@
android:layout_height="match_parent"
android:layout_weight="1"/>
<Button
<include
android:id="@+id/apply_point_before_after_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_gravity="center_vertical"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round_border"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_apply"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
layout="@layout/bottom_sheet_dialog_button" />
<Button
<include
android:id="@+id/add_point_before_after_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_gravity="center_vertical"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_add"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
layout="@layout/bottom_sheet_dialog_button" />
</LinearLayout>
</LinearLayout>

View file

@ -120,6 +120,7 @@
layout="@layout/map_ruler"
android:layout_width="@dimen/map_ruler_width"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginStart="@dimen/map_button_margin"
android:layout_marginLeft="@dimen/map_button_margin" />

View file

@ -322,8 +322,8 @@
<ImageButton
android:id="@+id/widget_top_bar_back_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_width="@dimen/toolbar_height"
android:layout_height="@dimen/toolbar_height"
android:layout_gravity="top"
android:contentDescription="@string/back_to_search"
osmand:srcCompat="@drawable/ic_arrow_back"/>
@ -335,8 +335,8 @@
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingTop="10dp">
android:paddingBottom="@dimen/toolbar_title_padding_bottom"
android:paddingTop="@dimen/toolbar_title_padding_top">
<TextView
android:id="@+id/widget_top_bar_title"
@ -370,7 +370,7 @@
android:background="?attr/selectableItemBackground"
android:ellipsize="end"
android:maxLines="1"
android:layout_marginTop="8dp"
android:layout_marginTop="@dimen/content_padding_half"
android:textColor="?attr/wikivoyage_active_color"
android:textSize="@dimen/default_list_text_size"
android:visibility="gone"
@ -384,7 +384,7 @@
android:id="@+id/widget_top_bar_refresh_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="48dp"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:layout_gravity="top"
android:contentDescription="@string/shared_string_refresh"
osmand:srcCompat="@drawable/ic_action_refresh_dark"
@ -394,7 +394,7 @@
android:id="@+id/widget_top_bar_close_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="48dp"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:layout_gravity="top"
android:contentDescription="@string/shared_string_close"
osmand:srcCompat="@drawable/ic_action_remove_dark"/>
@ -402,13 +402,13 @@
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/widget_top_bar_save"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:background="@null"
android:ellipsize="end"
android:gravity="center_vertical"
android:lines="1"
android:paddingRight="16dp"
android:paddingEnd="16dp"
android:paddingRight="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:textAllCaps="true"
android:singleLine="true"
android:textColor="?android:textColorPrimary"
@ -422,9 +422,9 @@
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/widget_top_bar_switch"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:paddingEnd="16dp"
android:paddingRight="16dp"
android:layout_height="@dimen/toolbar_height"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:visibility="gone"
tools:visibility="visible"/>

View file

@ -80,7 +80,6 @@
<dimen name="measurement_tool_text_margin">12dp</dimen>
<dimen name="measurement_tool_points_list_container_height">330dp</dimen>
<dimen name="measurement_tool_up_down_row_height">48dp</dimen>
<dimen name="measurement_tool_controls_height">84dp</dimen>
<dimen name="measurement_tool_text_button_padding_small">18dp</dimen>
<dimen name="measurement_tool_text_button_padding">24dp</dimen>
<dimen name="measurement_tool_undo_redo_padding_small">18dp</dimen>

View file

@ -256,7 +256,8 @@
<dimen name="measurement_tool_text_margin">8dp</dimen>
<dimen name="measurement_tool_points_list_container_height">220dp</dimen>
<dimen name="measurement_tool_up_down_row_height">60dp</dimen>
<dimen name="measurement_tool_controls_height">56dp</dimen>
<dimen name="measurement_tool_controls_height">52dp</dimen>
<dimen name="measurement_tool_controls_height_land">56dp</dimen>
<dimen name="measurement_tool_text_button_padding_small">8dp</dimen>
<dimen name="measurement_tool_text_button_padding">16dp</dimen>
<dimen name="measurement_tool_undo_redo_padding_small">6dp</dimen>
@ -268,6 +269,7 @@
<dimen name="measurement_tool_button_padding">8dp</dimen>
<dimen name="measurement_tool_button_padding_top">10dp</dimen>
<dimen name="measurement_tool_button_height">36dp</dimen>
<dimen name="measurement_tool_button_width">98dp</dimen>
<dimen name="measurement_tool_options_divider_margin_start">72dp</dimen>
<dimen name="bottom_sheet_title_height">52dp</dimen>
<dimen name="bottom_sheet_descr_height">44dp</dimen>
@ -352,6 +354,8 @@
<dimen name="toolbar_height_expanded">96dp</dimen>
<dimen name="toolbar_inset_start_with_navigation">72dp</dimen>
<dimen name="toolbar_inset_start">54dp</dimen>
<dimen name="toolbar_title_padding_top">7dp</dimen>
<dimen name="toolbar_title_padding_bottom">6dp</dimen>
<dimen name="wikivoyage_search_list_header_height">36dp</dimen>
<dimen name="wikivoyage_article_card_icon_size">80dp</dimen>

View file

@ -11,6 +11,7 @@
Thx - Hardy
-->
<string name="shared_string_redo">Redo</string>
<string name="shared_string_is_saved">is saved</string>
<string name="open_saved_track">Open saved track</string>
<string name="all_previous_segments_will_be_recalc">All previous segments will be recalculated using the selected profile.</string>

View file

@ -274,21 +274,31 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
}
});
mainView.findViewById(R.id.apply_move_point_button).setOnClickListener(new OnClickListener() {
View applyMovePointButton = mainView.findViewById(R.id.apply_move_point_button);
UiUtilities.setupDialogButton(nightMode, applyMovePointButton, UiUtilities.DialogButtonType.PRIMARY,
R.string.shared_string_apply);
applyMovePointButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
applyMovePointMode();
}
});
mainView.findViewById(R.id.apply_point_before_after_point_button).setOnClickListener(new OnClickListener() {
View applyPointBeforeAfterButton = mainView.findViewById(R.id.apply_point_before_after_point_button);
UiUtilities.setupDialogButton(nightMode, applyPointBeforeAfterButton, UiUtilities.DialogButtonType.PRIMARY,
R.string.shared_string_apply);
applyPointBeforeAfterButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
applyAddPointBeforeAfterMode();
}
});
mainView.findViewById(R.id.add_point_before_after_button).setOnClickListener(new OnClickListener() {
View addPointBeforeAfterButton = mainView.findViewById(R.id.add_point_before_after_button);
UiUtilities.setupDialogButton(nightMode, addPointBeforeAfterButton, UiUtilities.DialogButtonType.PRIMARY,
R.string.shared_string_add);
addPointBeforeAfterButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
addPointBeforeAfter();
@ -333,7 +343,10 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
}
});
mainView.findViewById(R.id.add_point_button).setOnClickListener(new OnClickListener() {
View addPointButton = mainView.findViewById(R.id.add_point_button);
UiUtilities.setupDialogButton(nightMode, addPointButton, UiUtilities.DialogButtonType.PRIMARY,
R.string.shared_string_add);
addPointButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
addCenterPoint();

View file

@ -121,7 +121,7 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm
BaseBottomSheetItem directions = new SimpleBottomSheetItem.Builder()
.setIcon(getContentIcon(R.drawable.ic_action_gdirections_dark))
.setTitle(getString(R.string.get_directions))
.setLayoutId(R.layout.bottom_sheet_item_simple)
.setLayoutId(R.layout.bottom_sheet_item_simple_pad_32dp)
.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {