From 08abf4789026478865a9cde9db07d3d9ca0e1bc3 Mon Sep 17 00:00:00 2001 From: wzq Date: Wed, 27 Sep 2023 12:02:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E6=88=BF=E9=97=B4?= =?UTF-8?q?=E5=B0=8F=E6=B8=B8=E6=88=8F=E5=AE=89=E5=85=A8=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yizhuan/erban/avroom/game/GameDelegate.kt | 6 +++--- app/src/module_mini_world/res/layout/fragment_game_room.xml | 3 ++- gradle.properties | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/yizhuan/erban/avroom/game/GameDelegate.kt b/app/src/main/java/com/yizhuan/erban/avroom/game/GameDelegate.kt index 9687f99c7..948f19ab3 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/game/GameDelegate.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/game/GameDelegate.kt @@ -11,7 +11,7 @@ import android.view.View import android.view.ViewTreeObserver.OnGlobalLayoutListener import android.widget.FrameLayout import com.google.gson.Gson -import com.netease.nim.uikit.common.util.sys.ScreenUtil +import com.yizhuan.erban.R import com.yizhuan.xchat_android_core.auth.AuthModel import com.yizhuan.xchat_android_core.manager.AvRoomDataManager import com.yizhuan.xchat_android_core.room.game.GameCfg @@ -317,9 +317,9 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId: //遊戲安全操作區域 val viewGameRect = JSONObject() viewGameRect.put("left", 0) - viewGameRect.put("top", ScreenUtil.dip2px(200f)) + viewGameRect.put("top", container.context.resources.getDimensionPixelOffset(R.dimen.dp_180)) viewGameRect.put("right", 0) - viewGameRect.put("bottom", ScreenUtil.dip2px(200f)) + viewGameRect.put("bottom", container.context.resources.getDimensionPixelOffset(R.dimen.dp_150)) jsonObject.put("view_game_rect", viewGameRect) //通知遊戲 diff --git a/app/src/module_mini_world/res/layout/fragment_game_room.xml b/app/src/module_mini_world/res/layout/fragment_game_room.xml index 1ce005f13..5b49ed287 100644 --- a/app/src/module_mini_world/res/layout/fragment_game_room.xml +++ b/app/src/module_mini_world/res/layout/fragment_game_room.xml @@ -124,7 +124,8 @@ android:id="@+id/bottom_view" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentBottom="true" /> + android:layout_alignParentBottom="true" + tools:layout_height="@dimen/dp_52" />