Fixed issue with selection in LIstView
This commit is contained in:
parent
8932aaf634
commit
bec16f2968
2 changed files with 5 additions and 2 deletions
|
@ -24,7 +24,8 @@
|
|||
<ListView android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
style="@style/OsmandListView"/>
|
||||
android:choiceMode="singleChoice"
|
||||
style="@style/OsmandListView"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
|
@ -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<RoutePoint> {
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue