From dbfa6ce39f88340dd4f9bda502ea08e0e8b12502 Mon Sep 17 00:00:00 2001 From: li-xiaojun <16167479@qq.com> Date: Wed, 14 Dec 2022 14:32:25 +0800 Subject: [PATCH] try to fix popup height --- build.gradle | 2 +- library/src/main/java/com/lxj/xpopup/core/BasePopupView.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 646eb2b2..4fa9f08d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.xpopup_version = "2.9.16" + ext.xpopup_version = "2.9.17-beta" repositories { google() mavenCentral() diff --git a/library/src/main/java/com/lxj/xpopup/core/BasePopupView.java b/library/src/main/java/com/lxj/xpopup/core/BasePopupView.java index 9849d147..7e6612f2 100644 --- a/library/src/main/java/com/lxj/xpopup/core/BasePopupView.java +++ b/library/src/main/java/com/lxj/xpopup/core/BasePopupView.java @@ -92,9 +92,7 @@ public Lifecycle getLifecycle() { @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); - init(); - Log.d("tag", "onAttachedToWindow"); } public BasePopupView show() { @@ -226,6 +224,7 @@ protected void doMeasure(){ params.height = activityContent.getHeight(); } params.leftMargin = popupInfo!=null && popupInfo.isViewMode ? activityContent.getLeft():0; + params.topMargin = activityContent.getTop(); setLayoutParams(params); }