From 9ef0b062af4cb89d2b948c9fea588aa94d20a92d Mon Sep 17 00:00:00 2001 From: renhaoting <370797079@qq.com> Date: Sun, 4 Jan 2026 15:50:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=A8=AA=E5=B1=8Fad=E5=90=8E?= =?UTF-8?q?=20dialog=20=E4=B8=8D=E5=B1=85=E4=B8=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bill/src/main/java/com/remax/bill/ads/ext/AdShowExt.kt | 1 + .../com/ama/core/architecture/widget/BindingDialog.kt | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bill/src/main/java/com/remax/bill/ads/ext/AdShowExt.kt b/bill/src/main/java/com/remax/bill/ads/ext/AdShowExt.kt index 5cae9dc..24dfbfc 100644 --- a/bill/src/main/java/com/remax/bill/ads/ext/AdShowExt.kt +++ b/bill/src/main/java/com/remax/bill/ads/ext/AdShowExt.kt @@ -334,6 +334,7 @@ object AdShowExt { { _, _, revenueValue -> val rewardedData = CommonRewardedData(revenueValue.toFloat()) rewardCallback?.invoke(rewardedData) + //xxxx AdLogger.e("TopOn激励视频奖励回调, 奖励值:$revenueValue") }, closeCallback ) diff --git a/core/architecture/src/main/java/com/ama/core/architecture/widget/BindingDialog.kt b/core/architecture/src/main/java/com/ama/core/architecture/widget/BindingDialog.kt index b313249..5394b24 100644 --- a/core/architecture/src/main/java/com/ama/core/architecture/widget/BindingDialog.kt +++ b/core/architecture/src/main/java/com/ama/core/architecture/widget/BindingDialog.kt @@ -107,13 +107,17 @@ open class BindingDialog(protected val mActivity: Activity, } + private fun getProperWidth(): Int { + return Math.min(ScreenUtils.getScreenWidth(), ScreenUtils.getScreenHeight()) + } + fun init() { if (mActivity is ComponentActivity) { mActivity.lifecycle.addObserver(this) } setCanceledOnTouchOutside(true) window?.setBackgroundDrawableResource(R.color.transparent) - width = (Math.min(ScreenUtils.getScreenWidth(), ScreenUtils.getScreenHeight()) * 0.8).toInt() + width = (getProperWidth() * 0.8).toInt() height = WindowManager.LayoutParams.WRAP_CONTENT setWidthHeight() window?.setWindowAnimations(R.style.dialog_alpha) @@ -280,7 +284,7 @@ open class BindingDialog(protected val mActivity: Activity, * 设置宽占屏幕的比例 */ fun setWidthRatio(widthRatio: Double): BindingDialog { - width = (ScreenUtils.getScreenWidth() * widthRatio).toInt() + width = (getProperWidth() * widthRatio).toInt() setWidthHeight() return this }