From 60ee95d93cb9745bfe3c9c5c60c4a06da1a46107 Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Tue, 10 Mar 2020 12:03:41 +0200 Subject: [PATCH] Merge 'r3.6' to 'master' --- OsmAnd/res/layout/dashboard_toolbar.xml | 175 ++++++++++-------- .../layout/expandable_list_item_category.xml | 6 +- OsmAnd/res/layout/fragment_import.xml | 6 +- OsmAnd/res/layout/fragment_search_list.xml | 6 +- OsmAnd/res/layout/gpx_track_item.xml | 50 ++--- OsmAnd/res/layout/list_menu_item_native.xml | 79 +++++--- OsmAnd/res/layout/local_index_list_item.xml | 20 +- ...main_menu_drawer_btn_configure_profile.xml | 4 +- .../main_menu_drawer_btn_switch_profile.xml | 6 +- .../res/layout/map_context_menu_fragment.xml | 46 ++--- OsmAnd/res/layout/order_poi_list_item.xml | 1 - .../res/layout/preference_dropdown_list.xml | 4 +- .../layout/quick_action_add_dialog_item.xml | 6 +- .../quick_action_deletable_list_item.xml | 4 +- OsmAnd/res/layout/route_info_card.xml | 2 +- OsmAnd/res/layout/search_fav_list_item.xml | 8 +- OsmAnd/res/layout/search_list_item.xml | 6 +- .../layout/select_gpx_appearance_title.xml | 30 +-- .../layout/two_line_with_images_list_item.xml | 4 +- OsmAnd/res/values/strings.xml | 1 + OsmAnd/res/values/styles.xml | 2 + OsmAnd/src/net/osmand/AndroidUtils.java | 39 ++++ .../net/osmand/plus/ContextMenuAdapter.java | 4 +- .../osmand/plus/DialogListItemAdapter.java | 1 - OsmAnd/src/net/osmand/plus/UiUtilities.java | 5 - .../activities/FavoritesTreeFragment.java | 3 +- .../osmand/plus/dashboard/DashboardOnMap.java | 2 + .../download/ui/DownloadGroupViewHolder.java | 21 ++- .../ui/DownloadResourceGroupFragment.java | 20 +- .../net/osmand/plus/helpers/GpxUiHelper.java | 2 +- .../MapContextMenuFragment.java | 5 +- .../plus/mapcontextmenu/MenuBuilder.java | 37 ++-- .../builders/AmenityMenuBuilder.java | 12 +- .../builders/GpxItemMenuBuilder.java | 5 +- .../SaveAsTrackBottomSheetDialogFragment.java | 3 - .../OnSaveCurrentTrackFragment.java | 1 - .../plus/profiles/EditProfilesFragment.java | 15 +- .../MapRouteInfoMenu.java | 1 - .../plus/search/QuickSearchListAdapter.java | 2 +- .../EditTextPreferenceBottomSheet.java | 8 +- .../plus/widgets/OsmandTextFieldBoxes.java | 88 --------- 41 files changed, 374 insertions(+), 366 deletions(-) diff --git a/OsmAnd/res/layout/dashboard_toolbar.xml b/OsmAnd/res/layout/dashboard_toolbar.xml index 0739bdae83..dd5538fc7f 100644 --- a/OsmAnd/res/layout/dashboard_toolbar.xml +++ b/OsmAnd/res/layout/dashboard_toolbar.xml @@ -10,90 +10,107 @@ app:contentInsetLeft="4dp" app:contentInsetStart="4dp"> - - - - - - - + android:gravity="center_vertical" + android:orientation="horizontal"> - + - + + - + - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/expandable_list_item_category.xml b/OsmAnd/res/layout/expandable_list_item_category.xml index 4343a05ea3..bbec3110fe 100644 --- a/OsmAnd/res/layout/expandable_list_item_category.xml +++ b/OsmAnd/res/layout/expandable_list_item_category.xml @@ -19,9 +19,11 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/list_content_padding" + android:paddingStart="@dimen/list_content_padding" + android:paddingRight="0dp" + android:paddingEnd="0dp" android:minHeight="@dimen/list_item_height" - android:background="?attr/expandable_list_item_background" - android:paddingStart="@dimen/list_content_padding"> + android:background="?attr/expandable_list_item_background"> + tools:text="Search request" /> + android:paddingStart="@dimen/dialog_content_margin" + android:paddingRight="0dp" + android:paddingEnd="0dp" + android:gravity="center_vertical"> + android:focusableInTouchMode="false" /> + android:orientation="vertical"> @@ -77,8 +83,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/gpx_small_icon_margin" - android:src="@drawable/ic_small_distance" - android:layout_marginEnd="@dimen/gpx_small_icon_margin" /> + android:layout_marginEnd="@dimen/gpx_small_icon_margin" + android:src="@drawable/ic_small_distance" /> + android:layout_marginEnd="@dimen/gpx_small_icon_margin" + android:src="@drawable/ic_small_point" /> + android:layout_marginEnd="@dimen/gpx_small_icon_margin" + android:src="@drawable/ic_small_time" /> + android:visibility="gone" /> + android:layout_marginRight="@dimen/list_content_padding" + android:layout_marginEnd="@dimen/list_content_padding" + android:gravity="center_vertical" /> + android:visibility="gone" /> diff --git a/OsmAnd/res/layout/list_menu_item_native.xml b/OsmAnd/res/layout/list_menu_item_native.xml index 3562ed1021..96d3969ee2 100644 --- a/OsmAnd/res/layout/list_menu_item_native.xml +++ b/OsmAnd/res/layout/list_menu_item_native.xml @@ -13,43 +13,62 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginLeft="24dp" + android:layout_marginStart="24dp" android:gravity="center" android:visibility="gone" - tools:visibility="visible" - android:layout_marginStart="24dp" /> + tools:visibility="visible" /> - + android:layout_marginTop="@dimen/content_padding_small" + android:layout_marginBottom="@dimen/content_padding_small" + android:layout_weight="1"> - + - - + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/local_index_list_item.xml b/OsmAnd/res/layout/local_index_list_item.xml index ab39d8fb66..7395c791c0 100644 --- a/OsmAnd/res/layout/local_index_list_item.xml +++ b/OsmAnd/res/layout/local_index_list_item.xml @@ -1,14 +1,16 @@ + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingLeft="@dimen/list_content_padding" + android:paddingStart="@dimen/list_content_padding" + android:paddingRight="0dp" + android:paddingEnd="0dp" + android:background="?attr/expandable_list_item_background" + android:descendantFocusability="blocksDescendants" + android:minHeight="@dimen/list_item_height" + android:orientation="horizontal"> + android:paddingStart="@dimen/context_menu_padding_margin_default" + android:paddingEnd="@dimen/context_menu_padding_margin_default" + android:paddingTop="3dp"> + tools:src="@drawable/ic_action_opening_hour_16" /> + tools:visibility="visible"> + tools:visibility="visible"> + tools:visibility="visible"> + android:orientation="vertical"> + tools:textColor="?attr/contextMenuButtonColor" /> + tools:textColor="?attr/contextMenuButtonColor" /> diff --git a/OsmAnd/res/layout/order_poi_list_item.xml b/OsmAnd/res/layout/order_poi_list_item.xml index c3a56f7a2f..1fe14f3a31 100644 --- a/OsmAnd/res/layout/order_poi_list_item.xml +++ b/OsmAnd/res/layout/order_poi_list_item.xml @@ -51,7 +51,6 @@ android:paddingRight="@dimen/content_padding" android:paddingTop="@dimen/content_padding_half" android:paddingBottom="@dimen/content_padding_half" - android:singleLine="true" android:textColor="?android:textColorPrimary" android:textSize="@dimen/default_list_text_size" osmand:typeface="@string/font_roboto_regular" diff --git a/OsmAnd/res/layout/preference_dropdown_list.xml b/OsmAnd/res/layout/preference_dropdown_list.xml index 58d5baedba..78e57317f9 100644 --- a/OsmAnd/res/layout/preference_dropdown_list.xml +++ b/OsmAnd/res/layout/preference_dropdown_list.xml @@ -14,7 +14,7 @@ android:layout_marginTop="@dimen/list_header_top_margin" android:layout_marginEnd="@dimen/list_content_padding" android:layout_marginRight="@dimen/list_content_padding" - android:layout_marginBottom="8dp"> + android:layout_marginBottom="@dimen/content_padding_half"> diff --git a/OsmAnd/res/layout/quick_action_add_dialog_item.xml b/OsmAnd/res/layout/quick_action_add_dialog_item.xml index 342f650b19..901a43ab45 100644 --- a/OsmAnd/res/layout/quick_action_add_dialog_item.xml +++ b/OsmAnd/res/layout/quick_action_add_dialog_item.xml @@ -8,10 +8,10 @@ android:minHeight="48dp" android:paddingRight="24dp" android:paddingLeft="24dp" - android:background="?attr/selectableItemBackground" - android:orientation="horizontal" android:paddingStart="24dp" - android:paddingEnd="24dp"> + android:paddingEnd="24dp" + android:background="?attr/selectableItemBackground" + android:orientation="horizontal"> + tools:text="Add marker" /> diff --git a/OsmAnd/res/layout/search_list_item.xml b/OsmAnd/res/layout/search_list_item.xml index f823df926c..cd0d0d6e87 100644 --- a/OsmAnd/res/layout/search_list_item.xml +++ b/OsmAnd/res/layout/search_list_item.xml @@ -58,11 +58,11 @@ android:layout_weight="1" android:ellipsize="end" android:maxLines="2" - android:paddingRight="16dp" + android:layout_marginRight="@dimen/content_padding" + android:layout_marginEnd="@dimen/content_padding" android:textColor="?android:textColorPrimary" android:textSize="@dimen/default_list_text_size" - tools:text="Amsterdam" - android:paddingEnd="16dp" /> + tools:text="Amsterdam" /> + android:paddingStart="24dp" + android:paddingRight="0dp" + android:paddingEnd="0dp" + android:orientation="vertical"> + android:layout_marginTop="@dimen/content_padding_half" + android:layout_marginRight="@dimen/content_padding_half" + android:layout_marginEnd="@dimen/content_padding_half" + android:orientation="horizontal"> + android:orientation="horizontal"> + android:layout_marginRight="@dimen/content_padding_half" + android:layout_marginEnd="@dimen/content_padding_half" + android:textAppearance="@style/TextAppearance.ListItemTitle" /> + android:paddingStart="@dimen/list_content_padding" + android:paddingRight="0dp" + android:paddingEnd="0dp"> + Are you sure you want to clear recorded data? All profile settings will be restored to their original state after creating/importing this profile. Restore all profile settings? Saving new profile diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index 4e221e33f8..c1e7e91369 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -102,6 +102,7 @@