mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Add icon field
This commit is contained in:
parent
271df17db9
commit
23eb8a2d37
1 changed files with 5 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.Adapter;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ProgressBar;
|
||||
|
|
@ -138,12 +139,16 @@ public class NearbyListFragment extends ListFragment {
|
|||
TextView tvName = (TextView) convertView.findViewById(R.id.tvName);
|
||||
TextView tvDesc = (TextView) convertView.findViewById(R.id.tvDesc);
|
||||
TextView distance = (TextView) convertView.findViewById(R.id.distance);
|
||||
ImageView icon = (ImageView) convertView.findViewById(R.id.icon);
|
||||
|
||||
// Populate the data into the template view using the data object
|
||||
tvName.setText(place.name);
|
||||
tvDesc.setText(place.description);
|
||||
distance.setText(place.distance);
|
||||
|
||||
//TODO: Check for description type and set Drawable image here
|
||||
icon.setImageResource(place.image);
|
||||
|
||||
// Return the completed view to render on screen
|
||||
return convertView;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue