diff --git a/OsmAnd/res/drawable-hdpi/ic_back_drawer_dark.png b/OsmAnd/res/drawable-hdpi/ic_back_drawer_dark.png
new file mode 100644
index 0000000000..bc26173a81
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/ic_back_drawer_dark.png differ
diff --git a/OsmAnd/res/drawable-hdpi/ic_back_drawer_white.png b/OsmAnd/res/drawable-hdpi/ic_back_drawer_white.png
new file mode 100644
index 0000000000..109ecad942
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/ic_back_drawer_white.png differ
diff --git a/OsmAnd/res/drawable-hdpi/ic_sort_waypoint_dark.png b/OsmAnd/res/drawable-hdpi/ic_sort_waypoint_dark.png
new file mode 100644
index 0000000000..b4b0f6f746
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/ic_sort_waypoint_dark.png differ
diff --git a/OsmAnd/res/drawable-hdpi/ic_sort_waypoint_white.png b/OsmAnd/res/drawable-hdpi/ic_sort_waypoint_white.png
new file mode 100644
index 0000000000..d255baea1c
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/ic_sort_waypoint_white.png differ
diff --git a/OsmAnd/res/drawable-mdpi/ic_back_drawer_dark.png b/OsmAnd/res/drawable-mdpi/ic_back_drawer_dark.png
new file mode 100644
index 0000000000..19a15264e6
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/ic_back_drawer_dark.png differ
diff --git a/OsmAnd/res/drawable-mdpi/ic_back_drawer_white.png b/OsmAnd/res/drawable-mdpi/ic_back_drawer_white.png
new file mode 100644
index 0000000000..0ea5a84f6c
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/ic_back_drawer_white.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_back_drawer_dark.png b/OsmAnd/res/drawable-xhdpi/ic_back_drawer_dark.png
new file mode 100644
index 0000000000..17ca3bb76b
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/ic_back_drawer_dark.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_back_drawer_white.png b/OsmAnd/res/drawable-xhdpi/ic_back_drawer_white.png
new file mode 100644
index 0000000000..e70772a78d
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/ic_back_drawer_white.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_sort_waypoint_dark.png b/OsmAnd/res/drawable-xhdpi/ic_sort_waypoint_dark.png
new file mode 100644
index 0000000000..19e922e930
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/ic_sort_waypoint_dark.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_sort_waypoint_white.png b/OsmAnd/res/drawable-xhdpi/ic_sort_waypoint_white.png
new file mode 100644
index 0000000000..1a83dced10
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/ic_sort_waypoint_white.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_back_drawer_dark.png b/OsmAnd/res/drawable-xxhdpi/ic_back_drawer_dark.png
new file mode 100644
index 0000000000..4022c1b422
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/ic_back_drawer_dark.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_back_drawer_white.png b/OsmAnd/res/drawable-xxhdpi/ic_back_drawer_white.png
new file mode 100644
index 0000000000..cab4e58f7a
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/ic_back_drawer_white.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_sort_waypoint_dark.png b/OsmAnd/res/drawable-xxhdpi/ic_sort_waypoint_dark.png
new file mode 100644
index 0000000000..4de1c9e4e3
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/ic_sort_waypoint_dark.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_sort_waypoint_white.png b/OsmAnd/res/drawable-xxhdpi/ic_sort_waypoint_white.png
new file mode 100644
index 0000000000..2ab38b4b05
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/ic_sort_waypoint_white.png differ
diff --git a/OsmAnd/res/layout/map_settings_item.xml b/OsmAnd/res/layout/map_settings_item.xml
new file mode 100644
index 0000000000..17b2a553f5
--- /dev/null
+++ b/OsmAnd/res/layout/map_settings_item.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/radius_search_list_element.xml b/OsmAnd/res/layout/radius_search_list_element.xml
new file mode 100644
index 0000000000..51e1700893
--- /dev/null
+++ b/OsmAnd/res/layout/radius_search_list_element.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/waypoint_header.xml b/OsmAnd/res/layout/waypoint_header.xml
index 534d0e80cc..79e153e8fd 100644
--- a/OsmAnd/res/layout/waypoint_header.xml
+++ b/OsmAnd/res/layout/waypoint_header.xml
@@ -4,15 +4,15 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="match_parent"
- android:layout_marginTop="3dp"
- android:layout_marginBottom="3dp"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
android:layout_marginRight="3dp">
-
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 06257f9037..bfa78e99ac 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -9,6 +9,8 @@
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
-->
+ Configure map
+ In proximity of
Device not found
OsMo service is not available:\n- check the connection;\n- check the settings;\n- check out our Twitter: https://twitter.com/OsMomobi
An anonymous user can not:\n- create groups;\n- synchronize groups and devices with the server;\n- manage groups and devices in a private office.
diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
index 6fad1a3191..ff1d4aa75b 100644
--- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
@@ -17,8 +17,8 @@ import android.widget.TextView;
public class ContextMenuAdapter {
public interface OnContextMenuClick {
-
- public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog);
+ //boolean return type needed to desribe if drawer needed to be close or not
+ public boolean onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog);
}
private final Context ctx;
diff --git a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java
index 228d02be00..e9e3d31d6b 100644
--- a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java
+++ b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java
@@ -159,7 +159,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
optionsMenuAdapter = new ContextMenuAdapter(getActivity());
OnContextMenuClick listener = new OnContextMenuClick() {
@Override
- public void onContextMenuClick(final int itemId, int pos, boolean isChecked, DialogInterface dialog) {
+ public boolean onContextMenuClick(final int itemId, int pos, boolean isChecked, DialogInterface dialog) {
if (itemId == R.string.local_index_mi_reload) {
asyncLoader = new LoadGpxTask();
asyncLoader.execute(getActivity());
@@ -175,6 +175,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
});
}
+ return true;
}
};
optionsMenuAdapter.item(R.string.show_gpx_route)
@@ -395,7 +396,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
private void basicFileOperation(final GpxInfo info, ContextMenuAdapter adapter) {
OnContextMenuClick listener = new OnContextMenuClick() {
@Override
- public void onContextMenuClick(int resId, int pos, boolean isChecked, DialogInterface dialog) {
+ public boolean onContextMenuClick(int resId, int pos, boolean isChecked, DialogInterface dialog) {
if (resId == R.string.local_index_mi_rename) {
renameFile(info);
} else if (resId == R.string.local_index_unselect_gpx_file ||
@@ -441,6 +442,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
AccessibleToast.makeText(getActivity(), R.string.gpx_file_is_empty, Toast.LENGTH_LONG).show();
}
}
+ return true;
}
};
if (info.gpx != null && info.file == null) {
diff --git a/OsmAnd/src/net/osmand/plus/activities/FavouritesTreeFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavouritesTreeFragment.java
index 15fd1714ba..d1524170d2 100644
--- a/OsmAnd/src/net/osmand/plus/activities/FavouritesTreeFragment.java
+++ b/OsmAnd/src/net/osmand/plus/activities/FavouritesTreeFragment.java
@@ -176,8 +176,9 @@ public class FavouritesTreeFragment extends OsmandExpandableListFragment {
new OnContextMenuClick() {
@Override
- public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
+ public boolean onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
editPoint(point);
+ return true;
}
}).reg();
Item delete = qa.item(R.string.favourites_context_menu_delete).icons(
@@ -186,8 +187,9 @@ public class FavouritesTreeFragment extends OsmandExpandableListFragment {
new OnContextMenuClick() {
@Override
- public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
+ public boolean onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
deletePoint(point);
+ return true;
}
}).reg();
MapActivityActions.showObjectContextMenu(qa, getActivity(), onshow);
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
index 022555b70e..6365f5c629 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
@@ -124,11 +124,12 @@ public class MapActivity extends AccessibleActivity {
settings = app.getSettings();
app.applyTheme(this);
super.onCreate(savedInstanceState);
+ requestWindowFeature(Window.FEATURE_NO_TITLE);
+
+
-
mapActions = new MapActivityActions(this);
mapLayers = new MapActivityLayers(this);
- requestWindowFeature(Window.FEATURE_NO_TITLE);
// Full screen is not used here
//getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
@@ -274,7 +275,7 @@ public class MapActivity extends AccessibleActivity {
@Override
public void onBackPressed() {
- if (!mapActions.onBackPressed()){
+ if (!mapActions.onBackPressed()) {
super.onBackPressed();
}
}
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
index bb5acdbcee..6cee4bac21 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
@@ -47,9 +47,11 @@ import net.osmand.plus.activities.actions.ShareLocation;
import net.osmand.plus.activities.actions.StartGPSStatus;
import net.osmand.plus.activities.search.SearchActivity;
import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.configuremap.ConfigureSettingsMenu;
import net.osmand.plus.development.OsmandDevelopmentPlugin;
import net.osmand.plus.helpers.WaypointDialogHelper;
import net.osmand.plus.osmo.OsMoPositionLayer;
+import net.osmand.plus.helpers.WaypointHelper;
import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.views.BaseMapLayer;
@@ -95,17 +97,22 @@ public class MapActivityActions implements DialogProvider {
DrawerLayout mDrawerLayout;
ListView mDrawerList;
+ private WaypointDialogHelper waypointDialogHelper;
+ private ConfigureSettingsMenu configureSettingsMenu;
public MapActivityActions(MapActivity mapActivity){
this.mapActivity = mapActivity;
settings = mapActivity.getMyApplication().getSettings();
routingHelper = mapActivity.getMyApplication().getRoutingHelper();
+ waypointDialogHelper = new WaypointDialogHelper(mapActivity);
+ configureSettingsMenu = new ConfigureSettingsMenu(mapActivity.getMyApplication());
+ waypointDialogHelper.init();
}
protected void addFavouritePoint(final double latitude, final double longitude){
String name = mapActivity.getMapLayers().getContextMenuLayer().getSelectedObjectName();
- enhance(dialogBundle,latitude,longitude, name);
+ enhance(dialogBundle, latitude, longitude, name);
mapActivity.showDialog(DIALOG_ADD_FAVORITE);
}
@@ -202,11 +209,11 @@ public class MapActivityActions implements DialogProvider {
@Override
public int compare(FavouritePoint o1, FavouritePoint o2) {
- if(distance && activity instanceof MapActivity) {
- float f1 = (float) MapUtils.getDistance(((MapActivity) activity).getMapLocation(), o1.getLatitude(),
+ if (distance && activity instanceof MapActivity) {
+ float f1 = (float) MapUtils.getDistance(((MapActivity) activity).getMapLocation(), o1.getLatitude(),
o1.getLongitude());
- float f2 = (float) MapUtils.getDistance(((MapActivity) activity).getMapLocation(), o2.getLatitude(),
- o2.getLongitude());
+ float f2 = (float) MapUtils.getDistance(((MapActivity) activity).getMapLocation(), o2.getLatitude(),
+ o2.getLongitude());
return Float.compare(f1, f2);
}
return ci.compare(o1.getCategory() + " " + o1.getName(), o2.getCategory() + " " + o2.getName());
@@ -433,8 +440,7 @@ public class MapActivityActions implements DialogProvider {
return dlg;
}
-
-
+
private static class SaveDirectionsAsyncTask extends AsyncTask {
private final OsmandApplication app;
@@ -746,9 +752,11 @@ public class MapActivityActions implements DialogProvider {
public void createOptionsMenuAsDrawer(boolean show){
final ContextMenuAdapter cm = createOptionsMenu();
- mDrawerLayout = (DrawerLayout) mapActivity.findViewById(R.id.drawer_layout);
+ if (mDrawerLayout == null){
+ mDrawerLayout = (DrawerLayout) mapActivity.findViewById(R.id.drawer_layout);
mDrawerList = (ListView) mapActivity.findViewById(R.id.left_drawer);
- mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
+ mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
+ }
ListAdapter listAdapter;
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB){
listAdapter =
@@ -770,9 +778,12 @@ public class MapActivityActions implements DialogProvider {
public void onItemClick(AdapterView> parent, View view, int which, long id) {
OnContextMenuClick click = cm.getClickAdapter(which);
if (click != null) {
- click.onContextMenuClick(cm.getItemId(which), which, false, null);
+ if (click.onContextMenuClick(cm.getItemId(which), which, false, null)){
+ mDrawerLayout.closeDrawer(mDrawerList);
+ }
+ } else {
+ mDrawerLayout.closeDrawer(mDrawerList);
}
- mDrawerLayout.closeDrawer(mDrawerList);
}
});
@@ -819,12 +830,13 @@ public class MapActivityActions implements DialogProvider {
icons(R.drawable.ic_action_gloc_dark, R.drawable.ic_action_gloc_light)
.listen(new OnContextMenuClick() {
@Override
- public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
+ public boolean onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
if (getMyApplication().accessibilityEnabled()) {
whereAmIDialog();
} else {
mapActivity.getMapViewTrackingUtilities().backToLocationImpl();
}
+ return true;
}
}).reg();
@@ -845,8 +857,9 @@ public class MapActivityActions implements DialogProvider {
optionsMenuHelper.item(t).icons(icon, iconLight)
.listen(new OnContextMenuClick() {
@Override
- public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
+ public boolean onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
routingHelper.getVoiceRouter().setMute(!routingHelper.getVoiceRouter().isMute());
+ return true;
}
}).reg();
}
@@ -855,8 +868,9 @@ public class MapActivityActions implements DialogProvider {
.icons(R.drawable.ic_action_gdirections_dark, R.drawable.ic_action_gdirections_light)
.listen(new OnContextMenuClick() {
@Override
- public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
+ public boolean onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
enterRoutePlanningMode(null, null, false);
+ return true;
}
}).reg();
} else if(routingHelper.isRouteCalculated()) {
@@ -866,7 +880,7 @@ public class MapActivityActions implements DialogProvider {
.icons(R.drawable.ic_action_gdirections_dark, R.drawable.ic_action_gdirections_light)
.listen(new OnContextMenuClick() {
@Override
- public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
+ public boolean onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
if(routingHelper.isRoutePlanningMode()) {
routingHelper.setRoutePlanningMode(false);
routingHelper.setFollowingMode(true);
@@ -877,6 +891,7 @@ public class MapActivityActions implements DialogProvider {
}
mapActivity.getMapViewTrackingUtilities().switchToRoutePlanningMode();
mapActivity.refreshMap();
+ return true;
}
}).reg();
}
@@ -892,12 +907,13 @@ public class MapActivityActions implements DialogProvider {
optionsMenuHelper.item(nav).icons(R.drawable.ic_action_remove_dark, R.drawable.ic_action_remove_light)
.listen(new OnContextMenuClick() {
@Override
- public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
+ public boolean onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
stopNavigationActionConfirm(mapView);
OsMoPositionLayer osMoPositionLayer = mapActivity.getMapView().getLayerByClass(OsMoPositionLayer.class);
if (osMoPositionLayer != null) {
OsMoPositionLayer.setFollowDestination(null);
}
+ return true;
}
}).reg();
}
@@ -905,46 +921,56 @@ public class MapActivityActions implements DialogProvider {
optionsMenuHelper.item(R.string.target_points).icons(R.drawable.ic_action_flage_dark, R.drawable.ic_action_flage_light)
.listen(new OnContextMenuClick() {
@Override
- public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
+ public boolean onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
if (getMyApplication().getWaypointHelper().isRouteCalculated()) {
- WaypointDialogHelper.showWaypointsDialog(mapActivity);
+
+ final List deletedPoints = new ArrayList();
+ ArrayAdapter