Fix osm live fragment crash on 2.3

This commit is contained in:
Alexey Kulish 2016-08-20 21:27:26 +03:00
parent 3d474f7005
commit eb6166b468

View file

@ -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);