コード例 #1
0
 public static String getParticipantId(ArrayList<Participant> paramArrayList, String paramString) {
   int j = paramArrayList.size();
   int i = 0;
   while (i < j) {
     Participant localParticipant = (Participant) paramArrayList.get(i);
     Player localPlayer = localParticipant.getPlayer();
     if ((localPlayer != null) && (localPlayer.getPlayerId().equals(paramString))) {
       return localParticipant.getParticipantId();
     }
     i += 1;
   }
   return null;
 }
コード例 #2
0
  static String b(TurnBasedMatch var0, String var1) {
    ArrayList var6 = var0.getParticipants();
    int var3 = var6.size();

    for (int var2 = 0; var2 < var3; ++var2) {
      Participant var4 = (Participant) var6.get(var2);
      Player var5 = var4.getPlayer();
      if (var5 != null && var5.getPlayerId().equals(var1)) {
        return var4.getParticipantId();
      }
    }

    return null;
  }
コード例 #3
0
ファイル: MainActivity.java プロジェクト: tux1224/pushup
  private void playerInfo() {
    Player player = getGamesClient().getCurrentPlayer();
    String name = player.getDisplayName();
    Uri uri = player.getIconImageUri();

    String displayName;
    if (player == null) {
      Log.w(TAG, "mGamesClient.getCurrentPlayer() is NULL!");
      displayName = "???";
    } else {
      displayName = player.getDisplayName();
      appPreference.setLoginName(displayName);
    }

    userInfo.setText(String.format(getString(R.string.you_are_signed_in_as), displayName));
    // userIcon.setImageURI(uri);
  }