mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Change listview code and .xml file
This commit is contained in:
parent
9836fb920e
commit
b7d0e6e725
2 changed files with 16 additions and 6 deletions
|
|
@ -13,6 +13,7 @@ import android.view.ViewGroup;
|
||||||
import android.widget.Adapter;
|
import android.widget.Adapter;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.ListAdapter;
|
import android.widget.ListAdapter;
|
||||||
|
import android.widget.ListView;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
|
@ -58,9 +59,11 @@ public class NearbyListFragment extends ListFragment {
|
||||||
ViewGroup root = (ViewGroup) view.getRootView();
|
ViewGroup root = (ViewGroup) view.getRootView();
|
||||||
root.addView(progressBar);
|
root.addView(progressBar);
|
||||||
*/
|
*/
|
||||||
|
final ListView listview = (ListView) view.findViewById(R.id.listview);
|
||||||
|
|
||||||
mAdapter = new NearbyAdapter(getActivity(), places);
|
mAdapter = new NearbyAdapter(getActivity(), places);
|
||||||
setListAdapter(mAdapter);
|
//setListAdapter(mAdapter);
|
||||||
|
listview.setAdapter(mAdapter);
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout
|
||||||
android:id="@android:id/list"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="match_parent"
|
||||||
/>
|
android:orientation="vertical" >
|
||||||
|
|
||||||
|
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/listview"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue