tweak title and body of notification

This commit is contained in:
Eric House 2014-08-26 21:53:28 -07:00
parent 88248131da
commit d8266f6a2c
7 changed files with 299 additions and 301 deletions

File diff suppressed because it is too large Load diff

View file

@ -1450,8 +1450,7 @@
posted. These are its title, which appears in the top bar of the
device, and the body that appears when you pull the notifications
down. -->
<string name="notify_title">Moves made</string>
<string name="notify_body_fmt">Activity in game \"%1$s\"</string>
<string name="notify_title_fmt">Move in game %1$s</string>
<!--
############################################################
@ -2268,8 +2267,9 @@
<string name="prev_player">Your opponent</string>
<!-- formatting for last move summary in notifications -->
<string name="lmi_pass_fmt">%1$s passed</string>
<string name="lmi_pass_fmt">%1$s passed (0 points)</string>
<string name="lmi_move_fmt">%1$s played %2$s for %3$d points</string>
<string name="lmi_trade_fmt">%1$s traded %2$d tiles</string>
<string name="lmi_phony_fmt">%1$s lost a turn</string>
<string name="lmi_tiles_fmt">Tiles assigned to %1$s</string>
</resources>

View file

@ -1238,8 +1238,7 @@
posted. These are its title, which appears in the top bar of the
device, and the body that appears when you pull the notifications
down. -->
<string name="notify_title">Sevom edam</string>
<string name="notify_body_fmt">Ytivitca ni emag \"%1$s\"</string>
<string name="notify_title_fmt">Evom ni emag %1$s</string>
<!--
############################################################
# Dialogs
@ -1938,8 +1937,9 @@
<!-- Used when prev player's name can't be looked up -->
<string name="prev_player">Ruoy tnenoppo</string>
<!-- formatting for last move summary in notifications -->
<string name="lmi_pass_fmt">%1$s dessap</string>
<string name="lmi_pass_fmt">%1$s dessap 0( )stniop</string>
<string name="lmi_move_fmt">%1$s deyalp %2$s rof %3$d stniop</string>
<string name="lmi_trade_fmt">%1$s dedart %2$d selit</string>
<string name="lmi_phony_fmt">%1$s tsol a nrut</string>
<string name="lmi_tiles_fmt">Selit dengissa ot %1$s</string>
</resources>

View file

@ -1238,8 +1238,7 @@
posted. These are its title, which appears in the top bar of the
device, and the body that appears when you pull the notifications
down. -->
<string name="notify_title">MOVES MADE</string>
<string name="notify_body_fmt">ACTIVITY IN GAME \"%1$s\"</string>
<string name="notify_title_fmt">MOVE IN GAME %1$s</string>
<!--
############################################################
# Dialogs
@ -1938,8 +1937,9 @@
<!-- Used when prev player's name can't be looked up -->
<string name="prev_player">YOUR OPPONENT</string>
<!-- formatting for last move summary in notifications -->
<string name="lmi_pass_fmt">%1$s PASSED</string>
<string name="lmi_pass_fmt">%1$s PASSED (0 POINTS)</string>
<string name="lmi_move_fmt">%1$s PLAYED %2$s FOR %3$d POINTS</string>
<string name="lmi_trade_fmt">%1$s TRADED %2$d TILES</string>
<string name="lmi_phony_fmt">%1$s LOST A TURN</string>
<string name="lmi_tiles_fmt">TILES ASSIGNED TO %1$s</string>
</resources>

View file

@ -381,15 +381,13 @@ public class RelayService extends XWService
private void setupNotification( long rowid, LastMoveInfo lmi )
{
Intent intent = GamesListDelegate.makeRowidIntent( this, rowid );
String msg;
if ( null == lmi ) {
msg = LocUtils.getString( this, R.string.notify_body_fmt,
GameUtils.getName( this, rowid ) );
} else {
String msg = "";
if ( null != lmi ) {
msg = lmi.format( this );
}
Utils.postNotification( this, intent, R.string.notify_title,
msg, (int)rowid );
String title = LocUtils.getString( this, R.string.notify_title_fmt,
GameUtils.getName( this, rowid ) );
Utils.postNotification( this, intent, title, msg, (int)rowid );
}
private boolean startFetchThreadIf()

View file

@ -46,6 +46,7 @@ public class LastMoveInfo {
if ( isValid ) {
switch( moveType ) {
case ASSIGN_TYPE:
result = LocUtils.getString( context, R.string.lmi_tiles_fmt, name );
break;
case MOVE_TYPE:
if ( 0 == nTiles ) {
@ -66,7 +67,6 @@ public class LastMoveInfo {
break;
}
}
DbgUtils.logf( "LastMoveInfo.format() => %s", result );
return result;
}
}

View file

@ -2411,7 +2411,7 @@ model_getPlayersLastScore( ModelCtxt* model, XP_S16 player, LastMoveInfo* lmi )
case PHONY_TYPE:
break;
case ASSIGN_TYPE:
found = XP_FALSE;
// found = XP_FALSE;
break;
}
}