From f93f87a3b0ac2e7c3104de4f826e74e0049b2be4 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Fri, 4 Sep 2015 19:29:28 +0300 Subject: [PATCH] Context menu in progress... --- OsmAnd/res/anim/slide_in_bottom.xml | 7 + OsmAnd/res/anim/slide_out_bottom.xml | 7 + OsmAnd/res/layout/editing_poi_filter_list.xml | 2 +- OsmAnd/res/layout/fragment_edit_poi.xml | 38 +-- .../res/layout/fragment_edit_poi_advanced.xml | 2 +- .../res/layout/fragment_edit_poi_normal.xml | 6 +- OsmAnd/res/layout/list_bigtextview.xml | 16 -- OsmAnd/res/layout/list_menu_item_native.xml | 2 +- .../res/layout/map_context_menu_fragment.xml | 156 +++++++++++ OsmAnd/res/layout/open_time_list_item.xml | 6 +- OsmAnd/res/layout/poi_tag_list_item.xml | 4 +- OsmAnd/res/layout/searchbyname_list.xml | 8 +- OsmAnd/res/layout/searchpoifolder_list.xml | 2 +- OsmAnd/res/layout/simple_list_menu_item.xml | 31 ++- OsmAnd/res/layout/tips_and_tricks.xml | 51 ---- OsmAnd/res/values-be/strings.xml | 5 + OsmAnd/res/values-ca/strings.xml | 13 +- OsmAnd/res/values-el/strings.xml | 3 +- OsmAnd/res/values-es-rAR/phrases.xml | 3 + OsmAnd/res/values-es-rAR/strings.xml | 2 + OsmAnd/res/values-es/phrases.xml | 2 + OsmAnd/res/values-es/strings.xml | 2 + OsmAnd/res/values-gl/strings.xml | 256 +++++++++++++++--- OsmAnd/res/values-hu/strings.xml | 16 +- OsmAnd/res/values-it/strings.xml | 19 +- OsmAnd/res/values-lt/strings.xml | 3 +- OsmAnd/res/values-ml/phrases.xml | 3 +- OsmAnd/res/values-pl/strings.xml | 89 +++--- OsmAnd/res/values-pt-rBR/strings.xml | 3 +- OsmAnd/res/values-ru/strings.xml | 5 +- OsmAnd/res/values-sc/strings.xml | 2 + OsmAnd/res/values-sk/phrases.xml | 51 ++++ OsmAnd/res/values-sk/strings.xml | 21 +- OsmAnd/res/values-sv/strings.xml | 3 +- OsmAnd/res/values-zh-rTW/phrases.xml | 34 ++- OsmAnd/res/values-zh-rTW/strings.xml | 1 + OsmAnd/res/values/attrs.xml | 3 + OsmAnd/res/values/styles.xml | 25 ++ .../src/net/osmand/data/PointDescription.java | 19 +- .../osmand/plus/activities/MapActivity.java | 106 ++++---- .../plus/activities/MapActivityActions.java | 84 +++++- .../activities/TipsAndTricksActivity.java | 196 -------------- .../osmand/plus/audionotes/NotesFragment.java | 5 +- .../osmand/plus/helpers/WaypointHelper.java | 6 +- .../plus/mapcontextmenu/MapContextMenu.java | 164 +++++++++++ .../MapContextMenuFragment.java | 231 ++++++++++++++++ .../plus/osmedit/AdvancedDataFragment.java | 6 +- .../plus/osmedit/BasicDataFragment.java | 4 +- .../osmand/plus/osmedit/EditPoiFragment.java | 120 +++++--- .../osmand/plus/osmedit/OsmEditingPlugin.java | 36 ++- .../osmand/plus/osmedit/OsmEditsFragment.java | 170 +++++++----- .../osmand/plus/render/RenderingIcons.java | 5 +- .../osmand/plus/routing/RoutingHelper.java | 14 +- .../net/osmand/plus/routing/VoiceRouter.java | 28 +- .../osmand/plus/views/ContextMenuLayer.java | 102 +++++-- 55 files changed, 1552 insertions(+), 646 deletions(-) create mode 100644 OsmAnd/res/anim/slide_in_bottom.xml create mode 100644 OsmAnd/res/anim/slide_out_bottom.xml delete mode 100644 OsmAnd/res/layout/list_bigtextview.xml create mode 100644 OsmAnd/res/layout/map_context_menu_fragment.xml delete mode 100644 OsmAnd/res/layout/tips_and_tricks.xml delete mode 100644 OsmAnd/src/net/osmand/plus/activities/TipsAndTricksActivity.java create mode 100644 OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java create mode 100644 OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java diff --git a/OsmAnd/res/anim/slide_in_bottom.xml b/OsmAnd/res/anim/slide_in_bottom.xml new file mode 100644 index 0000000000..4409549034 --- /dev/null +++ b/OsmAnd/res/anim/slide_in_bottom.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/anim/slide_out_bottom.xml b/OsmAnd/res/anim/slide_out_bottom.xml new file mode 100644 index 0000000000..6d20264129 --- /dev/null +++ b/OsmAnd/res/anim/slide_out_bottom.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/editing_poi_filter_list.xml b/OsmAnd/res/layout/editing_poi_filter_list.xml index 63f9fbf8d7..7faa136c75 100644 --- a/OsmAnd/res/layout/editing_poi_filter_list.xml +++ b/OsmAnd/res/layout/editing_poi_filter_list.xml @@ -16,7 +16,7 @@ + tools:context="net.osmand.plus.osmedit.EditPoiFragment"> + + app:contentInsetStart="72dp"/> + android:background="?attr/pstsTabBackground" + android:theme="?attr/appbar_layout_theme"> @@ -95,11 +97,11 @@ android:id="@+id/tab_layout" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/color_white" - app:tabIndicatorColor="@color/osmand_orange" - app:tabSelectedTextColor="@color/osmand_orange" - app:tabTextColor="@android:color/darker_gray" - app:layout_scrollFlags="scroll"/> + android:background="?attr/pstsTabBackground" + app:layout_scrollFlags="scroll" + app:tabIndicatorColor="?attr/pstsIndicatorColor" + app:tabSelectedTextColor="?attr/pstsIndicatorColor" + app:tabTextColor="@android:color/darker_gray"/> @@ -126,17 +128,19 @@ + android:textColor="@color/dashboard_general_button_text_light" + app:textAllCapsCompat="true" + tools:text="Save"/> diff --git a/OsmAnd/res/layout/fragment_edit_poi_advanced.xml b/OsmAnd/res/layout/fragment_edit_poi_advanced.xml index aff4691b92..359af7aa58 100644 --- a/OsmAnd/res/layout/fragment_edit_poi_advanced.xml +++ b/OsmAnd/res/layout/fragment_edit_poi_advanced.xml @@ -4,7 +4,7 @@ xmlns:osmand="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" - android:theme="@style/OsmandLightTheme.NewAppTheme"> + android:theme="?attr/new_app_theme"> + android:theme="@attr/new_app_theme"> - - - - - \ No newline at end of file diff --git a/OsmAnd/res/layout/list_menu_item_native.xml b/OsmAnd/res/layout/list_menu_item_native.xml index 2bbb08bbb6..bf6182eda2 100644 --- a/OsmAnd/res/layout/list_menu_item_native.xml +++ b/OsmAnd/res/layout/list_menu_item_native.xml @@ -25,7 +25,7 @@ android:layout_marginBottom="11dip" android:gravity="center_vertical" android:text="@string/layer_poi" - android:textSize="@dimen/default_list_text_size_large" + android:textSize="@dimen/default_list_text_size" android:layout_weight="1" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/open_time_list_item.xml b/OsmAnd/res/layout/open_time_list_item.xml index b8f9adc591..0e4745e30b 100644 --- a/OsmAnd/res/layout/open_time_list_item.xml +++ b/OsmAnd/res/layout/open_time_list_item.xml @@ -25,7 +25,7 @@ android:id="@+id/daysTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/dashboard_black" + android:textColor="?android:textColorPrimary" android:textSize="@dimen/default_list_text_size" tools:text="Mo-We"/> @@ -52,7 +52,7 @@ android:id="@+id/openingTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/dashboard_black" + android:textColor="?android:textColorPrimary" android:textSize="@dimen/default_list_text_size" tools:text="08:00"/> @@ -77,7 +77,7 @@ android:id="@+id/closingTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/dashboard_black" + android:textColor="?android:textColorPrimary" android:textSize="@dimen/default_list_text_size" tools:text="20:00"/> diff --git a/OsmAnd/res/layout/poi_tag_list_item.xml b/OsmAnd/res/layout/poi_tag_list_item.xml index 793ca7af43..2179ca7ebd 100644 --- a/OsmAnd/res/layout/poi_tag_list_item.xml +++ b/OsmAnd/res/layout/poi_tag_list_item.xml @@ -4,6 +4,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" + xmlns:tools="http://schemas.android.com/tools" android:orientation="horizontal" android:paddingTop="16dp"> @@ -18,7 +19,8 @@ android:id="@+id/tagEditText" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="Tag"/> + android:hint="Tag" + tools:text="asdf"/> diff --git a/OsmAnd/res/layout/searchbyname_list.xml b/OsmAnd/res/layout/searchbyname_list.xml index 7642e53a67..d691d2eda1 100644 --- a/OsmAnd/res/layout/searchbyname_list.xml +++ b/OsmAnd/res/layout/searchbyname_list.xml @@ -3,12 +3,14 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" - android:paddingBottom="3dp" - android:paddingTop="3dp"> + android:paddingTop="7dp" + android:paddingBottom="7dp" + android:paddingLeft="16dp" + android:paddingRight="16dp"> diff --git a/OsmAnd/res/layout/searchpoifolder_list.xml b/OsmAnd/res/layout/searchpoifolder_list.xml index 2b500a852a..ff5f69cdd0 100644 --- a/OsmAnd/res/layout/searchpoifolder_list.xml +++ b/OsmAnd/res/layout/searchpoifolder_list.xml @@ -17,7 +17,7 @@ - - + android:layout_height="@dimen/list_item_height" > + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/tips_and_tricks.xml b/OsmAnd/res/layout/tips_and_tricks.xml deleted file mode 100644 index c3222f2c40..0000000000 --- a/OsmAnd/res/layout/tips_and_tricks.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - -