mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
include device role in game list summary
This commit is contained in:
parent
9f250c99ef
commit
24285b5d7a
1 changed files with 13 additions and 0 deletions
|
@ -14,6 +14,7 @@ import java.io.InputStreamReader;
|
|||
import java.nio.CharBuffer;
|
||||
|
||||
import org.eehouse.android.xw4.jni.*;
|
||||
import org.eehouse.android.xw4.jni.CurGameInfo.DeviceRole;
|
||||
|
||||
public class GameListAdapter implements ListAdapter {
|
||||
Context m_context;
|
||||
|
@ -61,6 +62,18 @@ public class GameListAdapter implements ListAdapter {
|
|||
sb.append( "\nDictionary: " );
|
||||
sb.append( gi.dictName );
|
||||
|
||||
DeviceRole role = gi.serverRole;
|
||||
if ( gi.serverRole != DeviceRole.SERVER_STANDALONE ) {
|
||||
sb.append( "\n" )
|
||||
.append( m_context.getString( R.string.role_label ) )
|
||||
.append( ": " );
|
||||
if ( role == DeviceRole.SERVER_ISSERVER ) {
|
||||
sb.append( m_context.getString( R.string.role_host ) );
|
||||
} else {
|
||||
sb.append( m_context.getString( R.string.role_guest ) );
|
||||
}
|
||||
}
|
||||
|
||||
view.setText( sb.toString() );
|
||||
}
|
||||
return view;
|
||||
|
|
Loading…
Reference in a new issue