mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-09 22:00:39 +01:00
checkmark replaces game-type when item selected
This commit is contained in:
parent
ca2dc0b78f
commit
6d74a56f09
5 changed files with 22 additions and 6 deletions
|
@ -325,9 +325,7 @@ public class GameListItem extends LinearLayout
|
||||||
DateFormat.SHORT );
|
DateFormat.SHORT );
|
||||||
m_modTime.setText( df.format( new Date( lastMoveTime ) ) );
|
m_modTime.setText( df.format( new Date( lastMoveTime ) ) );
|
||||||
|
|
||||||
int iconID = summary.isMultiGame() ?
|
setTypeIcon();
|
||||||
R.drawable.ic_multigame : R.drawable.ic_sologame;
|
|
||||||
m_gameTypeImage.setImageResource( iconID );
|
|
||||||
|
|
||||||
// Let's use the chat-icon space for an ALERT icon when we're
|
// 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
|
// 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()
|
private void toggleSelected()
|
||||||
{
|
{
|
||||||
m_selected = !m_selected;
|
m_selected = !m_selected;
|
||||||
m_dsdel.showSelected( m_selected );
|
m_dsdel.showSelected( m_selected );
|
||||||
m_cb.itemToggled( this, m_selected );
|
m_cb.itemToggled( this, m_selected );
|
||||||
|
|
||||||
|
setTypeIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void makeThumbnailIf( boolean expanded )
|
private void makeThumbnailIf( boolean expanded )
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:src="@drawable/ic_multigame"
|
|
||||||
/>
|
/>
|
||||||
<ImageView android:id="@+id/has_chat_marker"
|
<ImageView android:id="@+id/has_chat_marker"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -1997,8 +1997,8 @@
|
||||||
<string name="not_again_backclears">The back button clears any
|
<string name="not_again_backclears">The back button clears any
|
||||||
selection instead of exiting. Hit it again to exit the
|
selection instead of exiting. Hit it again to exit the
|
||||||
app.</string>
|
app.</string>
|
||||||
<string name="sel_games_fmt">Games: %1$d</string>
|
<string name="sel_games_fmt">Selected Games: %1$d</string>
|
||||||
<string name="sel_groups_fmt">Groups: %1$d</string>
|
<string name="sel_groups_fmt">Selected Groups: %1$d</string>
|
||||||
<string name="summary_thumbsize">Thumbnail size</string>
|
<string name="summary_thumbsize">Thumbnail size</string>
|
||||||
<string name="thumb_off">Disabled</string>
|
<string name="thumb_off">Disabled</string>
|
||||||
<!-- <string name="summary_thumb_enabled">Display snapshots of games</string> -->
|
<!-- <string name="summary_thumb_enabled">Display snapshots of games</string> -->
|
||||||
|
|
1
xwords4/android/img_src/check_circle.svg
Normal file
1
xwords4/android/img_src/check_circle.svg
Normal 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 |
|
@ -25,6 +25,7 @@ SRC_SVGS = \
|
||||||
send.svg \
|
send.svg \
|
||||||
trade.svg \
|
trade.svg \
|
||||||
untrade.svg \
|
untrade.svg \
|
||||||
|
check_circle.svg \
|
||||||
|
|
||||||
XHDPI_IMGS:=$(foreach img,$(SRC_SVGS:.svg=__gen.png),$(IMG_DEST)/drawable-xhdpi/$(img))
|
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))
|
MDPI_IMGS:=$(foreach img,$(SRC_SVGS:.svg=__gen.png),$(IMG_DEST)/drawable-mdpi/$(img))
|
||||||
|
|
Loading…
Add table
Reference in a new issue