Updated context menu for selected gpx

This commit is contained in:
Bars107 2015-02-12 18:49:33 +02:00
parent 6ef9a76f27
commit 35a3a8ffaf
2 changed files with 6 additions and 4 deletions

View file

@ -18,7 +18,7 @@
<ExpandableListView <ExpandableListView
android:id="@android:id/list" android:id="@android:id/list"
style="@style/OsmandListView" style="@style/OsmandListView"
android:divider="?attr/list_divider" android:divider="@drawable/divider"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:background="?attr/expandable_list_background" android:background="?attr/expandable_list_background"

View file

@ -1,6 +1,7 @@
package net.osmand.plus.activities; package net.osmand.plus.activities;
import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.PopupMenu;
import android.view.*; import android.view.*;
import gnu.trove.list.array.TIntArrayList; import gnu.trove.list.array.TIntArrayList;
@ -630,9 +631,10 @@ public class SelectedGPXFragment extends OsmandExpandableListFragment {
String name = app.getString(R.string.favorite) + ": " + child.name; String name = app.getString(R.string.favorite) + ": " + child.name;
LatLon location = new LatLon(child.locationStart.lat, child.locationStart.lon); LatLon location = new LatLon(child.locationStart.lat, child.locationStart.lon);
OsmandSettings settings = app.getSettings(); OsmandSettings settings = app.getSettings();
DirectionsDialogs.createDirectionsActions(qa, location, child.locationStart, name, settings.getLastKnownMapZoom(), getMyActivity(), final PopupMenu optionsMenu = new PopupMenu(getActivity(), v);
true, false); DirectionsDialogs.createDirectionActionsPopUpMenu(optionsMenu, location, child.locationStart, name, settings.getLastKnownMapZoom(),
MapActivityActions.showObjectContextMenu(qa, getMyActivity(), null); getActivity(), true, false);
optionsMenu.show();
} else { } else {
child.expanded = !child.expanded; child.expanded = !child.expanded;
adapter.notifyDataSetInvalidated(); adapter.notifyDataSetInvalidated();