好看的编程代码:更好看等候室 UI的谷歌游戏(ui connect waiting room)

关于好看的编程代码的问题,在ui connect waiting room中经常遇到, 我正在使用 google play 服务创建一个游戏。当玩家等待连接到其他人时,他们在等候室 UI 中,如下所示:

我正在使用 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(mGoogleApi, room, MIN_PLAYERS);
    // show waiting room UI
    startActivityForResult(i, RC_WAITING_ROOM);
}
-1

需要在 xml 文件中使用 android:background
for color:android:background="@color/white"
for img:android:background="@drawable/background"

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(342)
方舟代码大全怎么用:用 choco怎么安装流星(how do you install)
上一篇
Costco超市必买清单:用购物清单访问超市 以最快的方式获得所有物品
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(5条)