diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameListItem.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameListItem.java index bb9abc9f1..ca337fb5a 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameListItem.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameListItem.java @@ -325,9 +325,7 @@ public class GameListItem extends LinearLayout DateFormat.SHORT ); m_modTime.setText( df.format( new Date( lastMoveTime ) ) ); - int iconID = summary.isMultiGame() ? - R.drawable.ic_multigame : R.drawable.ic_sologame; - m_gameTypeImage.setImageResource( iconID ); + setTypeIcon(); // Let's use the chat-icon space for an ALERT icon when we're // quarantined. Not ready for non-debug use though, as it shows up @@ -367,11 +365,28 @@ public class GameListItem extends LinearLayout } } + private void setTypeIcon() + { + if ( null != m_summary ) { // to be safe + int iconID; + if ( m_selected ) { + iconID = R.drawable.check_circle__gen; + } else if ( m_summary.isMultiGame() ) { + iconID = R.drawable.ic_multigame; + } else { + iconID = R.drawable.ic_sologame; + } + m_gameTypeImage.setImageResource( iconID ); + } + } + private void toggleSelected() { m_selected = !m_selected; m_dsdel.showSelected( m_selected ); m_cb.itemToggled( this, m_selected ); + + setTypeIcon(); } private void makeThumbnailIf( boolean expanded ) diff --git a/xwords4/android/app/src/main/res/layout/game_list_item.xml b/xwords4/android/app/src/main/res/layout/game_list_item.xml index c5b5ddbd0..cc9a0d690 100644 --- a/xwords4/android/app/src/main/res/layout/game_list_item.xml +++ b/xwords4/android/app/src/main/res/layout/game_list_item.xml @@ -40,7 +40,6 @@ android:layout_width="30dp" android:layout_height="30dp" android:layout_centerInParent="true" - android:src="@drawable/ic_multigame" /> The back button clears any selection instead of exiting. Hit it again to exit the app. - Games: %1$d - Groups: %1$d + Selected Games: %1$d + Selected Groups: %1$d Thumbnail size Disabled diff --git a/xwords4/android/img_src/check_circle.svg b/xwords4/android/img_src/check_circle.svg new file mode 100644 index 000000000..12e2775f2 --- /dev/null +++ b/xwords4/android/img_src/check_circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/xwords4/android/scripts/images.mk b/xwords4/android/scripts/images.mk index 3e649cf57..991889611 100644 --- a/xwords4/android/scripts/images.mk +++ b/xwords4/android/scripts/images.mk @@ -25,6 +25,7 @@ SRC_SVGS = \ send.svg \ trade.svg \ untrade.svg \ + check_circle.svg \ XHDPI_IMGS:=$(foreach img,$(SRC_SVGS:.svg=__gen.png),$(IMG_DEST)/drawable-xhdpi/$(img)) MDPI_IMGS:=$(foreach img,$(SRC_SVGS:.svg=__gen.png),$(IMG_DEST)/drawable-mdpi/$(img))