mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Modify listview, add button for debugging
This commit is contained in:
parent
d2e1c50fc5
commit
b779ec097d
2 changed files with 20 additions and 8 deletions
|
|
@ -71,12 +71,14 @@ public class NearbyListFragment extends ListFragment {
|
|||
mLatestLocation = ((NearbyActivity) getActivity()).getmLatestLocation();
|
||||
//FIXME: Hardcoding mLatestLocation to Michigan for testing
|
||||
//mLatestLocation = new LatLng(44.182205, -84.506836);
|
||||
places = loadAttractionsFromLocation(mLatestLocation);
|
||||
|
||||
final ListView listview = (ListView) view.findViewById(R.id.listview);
|
||||
places = loadAttractionsFromLocation(mLatestLocation);
|
||||
mAdapter = new NearbyAdapter(getActivity(), places);
|
||||
|
||||
ListView listview = (ListView) view.findViewById(R.id.listview);
|
||||
//setListAdapter(mAdapter);
|
||||
listview.setAdapter(mAdapter);
|
||||
|
||||
Log.d(TAG, "Adapter set to ListView");
|
||||
mAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ListView
|
||||
android:id="@+id/listview"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_above="@+id/btn_New">
|
||||
</ListView>
|
||||
<Button
|
||||
android:id="@+id/btn_New"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="Button"
|
||||
android:width="170dp"
|
||||
android:layout_alignParentBottom="true" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue