checkmark replaces game-type when item selected

This commit is contained in:
Eric House 2020-08-20 10:38:57 -07:00
parent ca2dc0b78f
commit 6d74a56f09
5 changed files with 22 additions and 6 deletions

View file

@ -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 )

View file

@ -40,7 +40,6 @@
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerInParent="true"
android:src="@drawable/ic_multigame"
/>
<ImageView android:id="@+id/has_chat_marker"
android:layout_width="wrap_content"

View file

@ -1997,8 +1997,8 @@
<string name="not_again_backclears">The back button clears any
selection instead of exiting. Hit it again to exit the
app.</string>
<string name="sel_games_fmt">Games: %1$d</string>
<string name="sel_groups_fmt">Groups: %1$d</string>
<string name="sel_games_fmt">Selected Games: %1$d</string>
<string name="sel_groups_fmt">Selected Groups: %1$d</string>
<string name="summary_thumbsize">Thumbnail size</string>
<string name="thumb_off">Disabled</string>
<!-- <string name="summary_thumb_enabled">Display snapshots of games</string> -->

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>

After

Width:  |  Height:  |  Size: 255 B

View file

@ -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))