diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java index f5ac92efed..60d11a24f5 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java @@ -23,8 +23,12 @@ import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; +import org.apache.commons.logging.Log; + public class ContextMenuAdapter { +// Log log = + public interface OnContextMenuClick { //boolean return type needed to desribe if drawer needed to be close or not public boolean onContextMenuClick(ArrayAdapter adapter, int itemId, int pos, boolean isChecked); @@ -345,7 +349,12 @@ public class ContextMenuAdapter { Drawable imageId = getImage(app, position, holoLight); if (imageId != null) { if (layoutId == R.layout.simple_list_menu_item) { - tv.setCompoundDrawablesWithIntrinsicBounds(imageId, null, null, null); + float density = activity.getResources().getDisplayMetrics().density; + int paddingInPixels = (int) (24 * density); + int drawableSizeInPixels = (int) (50 * density); // 32 + imageId.setBounds(0, 0, drawableSizeInPixels, drawableSizeInPixels); + tv.setCompoundDrawables(imageId, null, null, null); + tv.setCompoundDrawablePadding(paddingInPixels); } else { ((ImageView) convertView.findViewById(R.id.icon)).setImageDrawable(imageId); convertView.findViewById(R.id.icon).setVisibility(View.VISIBLE); diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 6e17b51a66..b5f8b31162 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -221,6 +221,7 @@ public class MapActivity extends AccessibleActivity { FirstUsageFragment.TAG).commit(); } ListView menuItemsListView = (ListView) findViewById(R.id.menuItems); + menuItemsListView.setDivider(null); menuItemsListView.setAdapter(mapActions.createMainOptionsMenu().createSimpleListAdapter(this, true)); } diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 8612790c83..02187a0059 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -544,6 +544,14 @@ public class MapActivityActions implements DialogProvider { final OsmandApplication app = mapActivity.getMyApplication(); ContextMenuAdapter optionsMenuHelper = new ContextMenuAdapter(app); + optionsMenuHelper.item(R.string.target_points).iconColor(R.drawable.ic_action_flage_dark) + .listen(new OnContextMenuClick() { + @Override + public boolean onContextMenuClick(ArrayAdapter adapter, int itemId, int pos, boolean isChecked) { + mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.WAYPOINTS); + return false; + } + }).reg(); optionsMenuHelper.item(R.string.get_directions).iconColor(R.drawable.ic_action_gdirections_dark) .listen(new OnContextMenuClick() { @Override @@ -557,15 +565,7 @@ public class MapActivityActions implements DialogProvider { return true; } }).reg(); - optionsMenuHelper.item(R.string.target_points).iconColor(R.drawable.ic_action_flage_dark) - .listen(new OnContextMenuClick() { - @Override - public boolean onContextMenuClick(ArrayAdapter adapter, int itemId, int pos, boolean isChecked) { - mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.WAYPOINTS); - return false; - } - }).reg(); - // Default actions (Layers, Configure Map screen, Settings, Search, Favorites) + // Default actions (Layers, Configure Map screen, Settings, Search, Favorites) optionsMenuHelper.item(R.string.search_button) .iconColor(R.drawable.ic_action_search_dark) .listen(new OnContextMenuClick() {