diff --git a/OsmAnd/src/net/osmand/plus/LiveUpdates/LiveUpdatesFragment.java b/OsmAnd/src/net/osmand/plus/LiveUpdates/LiveUpdatesFragment.java index 2cb2d470ba..bfd3e2d9d4 100644 --- a/OsmAnd/src/net/osmand/plus/LiveUpdates/LiveUpdatesFragment.java +++ b/OsmAnd/src/net/osmand/plus/LiveUpdates/LiveUpdatesFragment.java @@ -1,11 +1,13 @@ package net.osmand.plus.liveupdates; +import android.content.Context; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.ArrayAdapter; import android.widget.ListView; import net.osmand.plus.R; @@ -26,10 +28,17 @@ public class LiveUpdatesFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - final View view = inflater.inflate(R.layout.fragment_live_updates, container, false); + View view = inflater.inflate(R.layout.fragment_live_updates, container, false); ListView listView = (ListView) view.findViewById(android.R.id.list); + View header = inflater.inflate(R.layout.live_updates_header, listView, false); + listView.addHeaderView(header); return view; } + private static class LiveUpdatesAdapter extends ArrayAdapter { + public LiveUpdatesAdapter(Context context, int resource, Object[] objects) { + super(context, resource, objects); + } + } } diff --git a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java index e076731324..249ef2f13c 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java @@ -161,7 +161,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement if(current == null || current.getStatus() == AsyncTask.Status.FINISHED || current.isCancelled() || current.getResult() != null) { asyncLoader = new LoadLocalIndexTask(); - asyncLoader.execute(getActivity()); + asyncLoader.execute(); } } @@ -277,12 +277,12 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement } - public class LoadLocalIndexTask extends AsyncTask> { + public class LoadLocalIndexTask extends AsyncTask> { private List result; @Override - protected List doInBackground(Activity... params) { + protected List doInBackground(Void... params) { LocalIndexHelper helper = new LocalIndexHelper(getMyApplication()); return helper.getLocalIndexData(this); } @@ -888,7 +888,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement LocalIndexInfoViewHolder viewHolder; if (convertView == null) { LayoutInflater inflater = LayoutInflater.from(ctx); - convertView = inflater.inflate(net.osmand.plus.R.layout.local_index_list_item, parent, false); + convertView = inflater.inflate(R.layout.local_index_list_item, parent, false); viewHolder = new LocalIndexInfoViewHolder(convertView); convertView.setTag(viewHolder); } else {