Display drawable icon appropriately (not conditional yet)

This commit is contained in:
misaochan 2016-08-29 19:52:33 +12:00
parent 2a7a0a3e08
commit 76bbc810c8
4 changed files with 7 additions and 7 deletions

View file

@ -148,7 +148,7 @@ public class NearbyListFragment extends ListFragment {
//TODO: Check for description type and set Drawable image here
//Types of desc: landmark, city, event, mountain, isle
icon.setImageResource(place.image);
icon.setImageResource(R.drawable.icon_war);
// Return the completed view to render on screen
return convertView;

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

View file

@ -9,7 +9,7 @@
android:layout_height="match_parent">
<ImageView
android:id="@android:id/icon"
android:id="@+id/icon"
android:layout_width="@dimen/icon_size"
android:layout_height="match_parent"
android:src="@drawable/empty_photo"
@ -19,7 +19,7 @@
android:id="@+id/distance"
android:layout_width="@dimen/icon_size"
android:layout_height="wrap_content"
android:layout_alignBottom="@android:id/icon"
android:layout_alignBottom="@+id/icon"
android:gravity="center"
android:padding="@dimen/tiny_margin"
style="?android:textAppearanceSmallInverse"
@ -30,8 +30,8 @@
android:id="@+id/tvName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@android:id/icon"
android:layout_toRightOf="@android:id/icon"
android:layout_toEndOf="@+id/icon"
android:layout_toRightOf="@+id/icon"
android:paddingTop="@dimen/small_margin"
android:paddingLeft="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
@ -44,8 +44,8 @@
android:id="@+id/tvDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@android:id/icon"
android:layout_toRightOf="@android:id/icon"
android:layout_toEndOf="@+id/icon"
android:layout_toRightOf="@+id/icon"
android:layout_below="@+id/tvName"
android:padding="@dimen/small_margin"
android:ellipsize="end"