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 }