From ceee6e14234b08bbb3fca5f260cf23cfa63d88e3 Mon Sep 17 00:00:00 2001 From: li-xiaojun <16167479@qq.com> Date: Thu, 29 Dec 2022 20:27:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=832.9.18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 6 +++--- .../java/com/lxj/xpopupdemo/fragment/QuickStartDemo.java | 4 ++-- build.gradle | 2 +- library/build.gradle | 2 +- library/src/main/java/com/lxj/xpopup/util/XPopupUtils.java | 2 ++ 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9e330435..34d8e6ad 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -65,9 +65,9 @@ dependencies { implementation 'com.google.android.material:material:1.4.0' implementation 'androidx.recyclerview:recyclerview:1.2.1' // implementation "androidx.viewpager2:viewpager2:1.0.0" - implementation "com.umeng.umsdk:common:9.4.0" - implementation "com.umeng.umsdk:asms:1.2.3" // asms包依赖(必选) - implementation "com.umeng.umsdk:apm:1.3.1" // U-APM产品包依赖(必选) + implementation "com.umeng.umsdk:common:9.4.4" + implementation "com.umeng.umsdk:asms:1.4.1" // asms包依赖(必选) + implementation "com.umeng.umsdk:apm:1.5.2" // U-APM产品包依赖(必选) implementation project(':library') // implementation 'com.github.li-xiaojun:XPopup:2.9.0' diff --git a/app/src/main/java/com/lxj/xpopupdemo/fragment/QuickStartDemo.java b/app/src/main/java/com/lxj/xpopupdemo/fragment/QuickStartDemo.java index 450ef3f9..9a935f68 100644 --- a/app/src/main/java/com/lxj/xpopupdemo/fragment/QuickStartDemo.java +++ b/app/src/main/java/com/lxj/xpopupdemo/fragment/QuickStartDemo.java @@ -307,9 +307,9 @@ public void onSelect(int position, String text) { new XPopup.Builder(getContext()) .hasShadowBg(false) .moveUpToKeyboard(false) //如果不加这个,评论弹窗会移动到软键盘上面 -// .isViewMode(true) + .isViewMode(true) .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个 -// .isThreeDrag(true) //是否开启三阶拖拽,如果设置enableDrag(false)则无效 + .isThreeDrag(true) //是否开启三阶拖拽,如果设置enableDrag(false)则无效 .asCustom(new ZhihuCommentPopup(getContext())) .show(); break; diff --git a/build.gradle b/build.gradle index 8a534776..211c5fb7 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.17" + ext.xpopup_version = "2.9.18" repositories { google() mavenCentral() diff --git a/library/build.gradle b/library/build.gradle index 5b7ffaa1..45f07d5e 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -26,5 +26,5 @@ dependencies { implementation 'com.github.li-xiaojun:EasyAdapter:1.2.8' implementation 'com.github.bumptech.glide:glide:4.12.0' implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0' - implementation 'com.github.mmin18:realtimeblurview:1.2.1' + annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.3.1" } diff --git a/library/src/main/java/com/lxj/xpopup/util/XPopupUtils.java b/library/src/main/java/com/lxj/xpopup/util/XPopupUtils.java index 6ef971b1..fb876279 100644 --- a/library/src/main/java/com/lxj/xpopup/util/XPopupUtils.java +++ b/library/src/main/java/com/lxj/xpopup/util/XPopupUtils.java @@ -172,7 +172,9 @@ public static void applyPopupSize(final ViewGroup content, final int maxWidth, f final int popupWidth, final int popupHeight, final Runnable afterApplySize) { content.post(() -> { ViewGroup.LayoutParams params = content.getLayoutParams(); + if(content==null) return; View implView = content.getChildAt(0); + if(implView==null) return; ViewGroup.LayoutParams implParams = implView.getLayoutParams(); // 假设默认Content宽是match,高是wrap int w = content.getMeasuredWidth();