From bec16f2968fdd96450ad95f8943be9ececb9915d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Jun 2014 12:45:57 +0300 Subject: [PATCH] Fixed issue with selection in LIstView --- OsmAnd/res/layout/route_steps_main.xml | 3 ++- .../plus/routepointsnavigation/RoutePointsActivity.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/layout/route_steps_main.xml b/OsmAnd/res/layout/route_steps_main.xml index e190edb644..3faad7fd6e 100644 --- a/OsmAnd/res/layout/route_steps_main.xml +++ b/OsmAnd/res/layout/route_steps_main.xml @@ -24,7 +24,8 @@ + android:choiceMode="singleChoice" + style="@style/OsmandListView"/> \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java index a2e6d7a9ef..101502adad 100644 --- a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java +++ b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java @@ -132,6 +132,7 @@ public class RoutePointsActivity extends OsmandListActivity { super.onListItemClick(l, v, position, id); RoutePoint rp = adapter.getItem(position); getSherlock().startActionMode(getPointActionModeCallback(rp)); + adapter.notifyDataSetChanged(); } private class PointItemAdapter extends ArrayAdapter { @@ -216,7 +217,7 @@ public class RoutePointsActivity extends OsmandListActivity { }.execute(plugin.getCurrentRoute()); } - + private ActionMode.Callback getPointActionModeCallback(final RoutePoint rp) { return new ActionMode.Callback() { @@ -262,6 +263,7 @@ public class RoutePointsActivity extends OsmandListActivity { @Override public void onDestroyActionMode(ActionMode actionMode) { selectedItem = null; + adapter.notifyDataSetChanged(); } }; }