From 3bdd4d39ad177c3271f44a8ae3ac1d7d82a81c5d Mon Sep 17 00:00:00 2001 From: Chumva Date: Tue, 27 Mar 2018 18:08:04 +0300 Subject: [PATCH] fixed bug with setAdapter before addHeaderView --- .../mapcontextmenu/other/MapMultiSelectionMenuFragment.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java index 44546d08a4..63cfaff46b 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java @@ -61,7 +61,6 @@ public class MapMultiSelectionMenuFragment extends Fragment implements MultiSele } listAdapter = createAdapter(); listAdapter.setListener(this); - listView.setAdapter(listAdapter); if (!menu.isLandscapeLayout()) { final Context context = getContext(); @@ -141,7 +140,7 @@ public class MapMultiSelectionMenuFragment extends Fragment implements MultiSele } }); } - + listView.setAdapter(listAdapter); View headerView = inflater.inflate(R.layout.menu_obj_selection_header, listView, false); if (!menu.isLandscapeLayout()) { AndroidUtils.setBackground(getContext(), headerView, !menu.isLight(), R.color.ctx_menu_bg_light, R.color.ctx_menu_bg_dark);