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
android:id="@android:id/list"
style="@style/OsmandListView"
android:divider="?attr/list_divider"
android:divider="@drawable/divider"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:background="?attr/expandable_list_background"

View file

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