当您使用以下代码显示Google Play游戏服务LeaderBoard时:
startActivityForResult(Games.Leaderboards.getLeaderboardIntent(getApiClient(), "333333assad87asd"), 1);它首先显示了"circles“排行榜。我想先展示一下“公共”排行榜。
这有可能吗?
发布于 2014-07-19 19:57:52
不幸的是,没有。排行榜活动控制圆圈和公众偏好。您只能访问活动的意图,因此不能对其进行修改。
发布于 2016-03-14 18:31:43
实际上是这样的,有一种方法可以先显示public变量。我花了相当多的时间来找出答案,但你需要用适当的参数来构建“意图”
int showAllTime = LeaderboardVariant.TIME_SPAN_ALL_TIME;
int showPublicLb = LeaderboardVariant.COLLECTION_PUBLIC
Intent leaderboardIntent = Games.Leaderboards.getLeaderboardIntent(apiClient, menta.getString(R.string.lb_id), showAllTime, showPublicLb);https://stackoverflow.com/questions/24839882
复制相似问题