更好看的谷歌游戏等候室UI

时间:2016-02-15 16:57:17

标签: android google-play-services

我正在使用Google Play服务创建游戏。当玩家等待连接到其他人时,他们会在等候室UI中这样:

enter image description here

正如您所看到的那样,默认的候诊室UI非常基本,并且根本不符合我游戏的主题。我想更改该UI中不同元素的背景,但布局的定义不会暴露在我能看到的任何地方。有没有办法编辑等候室的布局?

我正在使用他们的示例应用“ButtonClicker2000”中的代码:https://github.com/playgameservices/android-basic-samples

显示候诊室的方法如下:

// Show the waiting room UI to track the progress of other players as they enter the
// room and get connected.
void showWaitingRoom(Room room) {
    // minimum number of players required for our game
    // For simplicity, we require everyone to join the game before we start it
    // (this is signaled by Integer.MAX_VALUE).
    final int MIN_PLAYERS = Integer.MAX_VALUE;
    Intent i = Games.RealTimeMultiplayer.getWaitingRoomIntent(mGoogleApiClient, room, MIN_PLAYERS);

    // show waiting room UI
    startActivityForResult(i, RC_WAITING_ROOM);
}

1 个答案:

答案 0 :(得分:-1)

你需要在xml文件中使用android:background 颜色:android:background="@color/white"
对于img:android:background="@drawable/background"

相关问题