From 20f6d515260b67b475c81b3259dd12ed2fdb8560 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Sat, 20 Aug 2016 21:27:26 +0300 Subject: [PATCH] Fix osm live fragment crash on 2.3 --- OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java index 68f1c3aaff..f4ec9c7ff1 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java @@ -118,7 +118,6 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment implements InAppList View bottomShadowView = inflater.inflate(R.layout.card_bottom_divider, listView, false); listView.addFooterView(bottomShadowView); adapter = new LocalIndexesAdapter(this); - listView.setAdapter(adapter); listView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() { @Override public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { @@ -152,6 +151,7 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment implements InAppList } }); } + listView.setAdapter(adapter); if(Build.VERSION.SDK_INT >= 11) { loadLocalIndexesTask = new LoadLocalIndexTask(adapter, this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);