From 17bfdefde6cf682f75db239803b061908b8414e4 Mon Sep 17 00:00:00 2001 From: razerdp Date: Mon, 12 Oct 2020 10:04:22 +0800 Subject: [PATCH] 2.2.9 --- README.md | 60 +++++++++++++++++++------------------------------ README_V2_EN.md | 45 ++++++++++++++++++++----------------- build.gradle | 4 ++-- 3 files changed, 50 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index d269b284..97980129 100644 --- a/README.md +++ b/README.md @@ -120,45 +120,31 @@ BasePopup配备完善的文档,建议您优先查阅文档。 ### 更新日志 [(历史更新)](https://www.yuque.com/razerdp/basepopup/uyrsxx) -* **【Candy】2.2.9.0919** (2020/09/19) - * 方法更名:`onPreShow`-> `onBeforeShow` - * 增加方法:`onBeforeDismiss`,作用同OnDismissListener#onBeforeDismiss() - * 增加方法:`setTouchable`,该方法用于设置是否允Popup是否响应事件,如果不响应,则事件会穿透Popup - * BasePopupUnsafe增加方法: - * `getWindowManager`:获取BasePopup的WindowManager代理 - * `getBasePopupDecorViewProxy`:获取BasePopup最终的DecorView代理 - * `getDecorViewLayoutParams`:获取BasePopup最终DecorView的LayoutParams -* **【Candy】2.2.9.0923** (2020/09/23) - * 优化onBeforeDismiss()判断顺序 [#352](https://github.com/razerdp/BasePopup/issues/352) -* **【Candy】2.2.9.0928** (2020/09/28) - * 添加键盘对齐View的方法 `setAdjustInputMode(View,flag)` [#358](https://github.com/razerdp/BasePopup/issues/358) -* **【Candy】2.2.9.0929** (2020/09/29) - * 去除init时预测量的方法,该方法是历史遗留下来的,用于定位用,现在定位都已经代理到View里面了,因此该方法被启用 - * 但不排除部分用户需要这个,因此保留并改为允许用户触发 - * 添加方法:`preMeasure()`,预测兰contentView,该方法将会进行measure,但是不能保证能够准确测量(如recyclerview未设置adapter时) - * 添加方法:`getPreMeasureWidth()`,获取预测量后的宽度 - * 添加方法:`getPreMeasureHeight()`,获取预测量后的高度 - * 方法修改 - * `getWidth()`,只能在PopupWindow显示后才能正确获取宽度 - * `getHeight()`,只能在PopupWindow显示后才能正确获取高度 -* **【Candy】2.2.9.0930** (2020/09/30) - * 添加`onWindowFocusChanged`回调 - * 添加`updateKeyboardAlign`方法,该方法允许您手动通知BasePopup根据键盘对齐模式对齐键盘 - - **正在开发日志(Candy版本)请查看dev分支:** [**branch-dev**](https://github.com/razerdp/BasePopup/tree/dev) -* **【Release】2.2.8**(2020/09/18) - * 在2.2.8中,我们针对Api30进行了适配(beta),同时添加了一些【不安全】的工具类,对于2.2.7来说只是锦上添花,但也没有巨大的优化或者bug修复 - * **优化** - * 支持BasePopup使用BasePopup内的AnchorView弹窗 - * 添加BasePopupUnsafe,这个工具类初步定义为【不安全】的工具类,请谨慎使用 - * dismissAllPopup(boolean animateDismiss):关闭所有已经显示的BasePopup - * dump(BasePopupWindow p):记录最后调用dump()方法的调用堆栈 - * getDump(BasePopupWindow p):获取最后调用dump()方法的调用堆栈 - * 去掉BasePopup接口,其方法移动到BasePopupWindow类中 - * 适配Api30(初步适配,可能会有不稳定的情况或引发其他非致命的bug)[#349](https://github.com/razerdp/BasePopup/issues/349) - +* **【Release】2.2.9**(2020/10/10) + * 2.2.9主要更新内容:部分优化及回调增加 + * 【新增方法】 + * 增加方法:`onBeforeDismiss`,作用同OnDismissListener#onBeforeDismiss() + * 增加方法:`setTouchable`,该方法用于设置是否允Popup是否响应事件,如果不响应,则事件会穿透Popup + * 增加键盘对齐View的方法 `setAdjustInputMode(View,flag)` [#358](https://github.com/razerdp/BasePopup/issues/358) + * 增加方法:`preMeasure()`,预测量contentView,该方法将会进行measure,但是不能保证能够准确测量(如recyclerview未设置adapter时) + * 增加方法:`getPreMeasureWidth()`,获取预测量后的宽度 + * 增加方法:`getPreMeasureHeight()`,获取预测量后的高度 + * 增加方法:`updateKeyboardAlign()`,该方法允许您手动通知BasePopup根据键盘对齐模式对齐键盘 + * 增加回调:`onWindowFocusChanged`回调 + * BasePopupUnsafe增加方法: + * `getWindowManager`:获取BasePopup的WindowManager代理 + * `getBasePopupDecorViewProxy`:获取BasePopup最终的DecorView代理 + * `getDecorViewLayoutParams`:获取BasePopup最终DecorView的LayoutParams + * 【功能优化】 + * 方法更名:`onPreShow`-> `onBeforeShow` + * 优化onBeforeDismiss()判断顺序 [#352](https://github.com/razerdp/BasePopup/issues/352) + * 去除init时预测量的方法,该方法是历史遗留下来的,用于定位用,现在定位都已经代理到View里面了,因此该方法被弃用 + * 但不排除部分用户需要这个,因此保留并改为允许用户触发 + * 方法修改: + * `getWidth()`,只能在PopupWindow显示后才能正确获取宽度 + * `getHeight()`,只能在PopupWindow显示后才能正确获取高度
diff --git a/README_V2_EN.md b/README_V2_EN.md index a226c3e1..084e232a 100644 --- a/README_V2_EN.md +++ b/README_V2_EN.md @@ -55,9 +55,8 @@ - [Feature](#Feature) - [Precautions](#Precautions) - [Download](#Download) - - [Quick start](#quick-start) + - [Document](#Document) - [BasePopup manual](https://www.yuque.com/razerdp/basepopup) - - [Api(Wiki)](#api) - [ChangeLog](#changelog-historical-update) - [Historical update](https://www.yuque.com/razerdp/basepopup/uyrsxx) - [Preview](#Preview) @@ -103,33 +102,39 @@ Please replace **{$latestVersion}** with the version shown in the Jcenter tab ab
-### Quick start +### Document Reference document(CN):[**BasePopup manual**](https://www.yuque.com/razerdp/basepopup)
-### Api - -**Link👉**[WIKI](https://github.com/razerdp/BasePopup/wiki) - -
- - ### ChangeLog ([Historical update](https://www.yuque.com/razerdp/basepopup/uyrsxx)) **Candy dev log see dev branch:** [**branch-dev**](https://github.com/razerdp/BasePopup/tree/dev) -* **【Release】2.2.8**(2020/09/18) - * In 2.2.8, we adapted (beta) Api30 and added some [insecure] tool classes, which are just a bonus for 2.2.7, but no huge optimizations or bug fixes! - * **Optimisation** - * Support for BasePopup using AnchorView popup in BasePopup. - * Add BasePopupUnsafe, a tool class initially defined as [unsafe], please use caution! - * dismissAllPopup(boolean animateDismiss): Dismiss all the BasePopups that have been displayed. - * dump(BasePopupWindow p): records the call stack of the last call to the dump() method - * getDump(BasePopupWindow p): get the stack of the last call to the dump() method - * Remove the BasePopup interface and move its methods to the BasePopupWindow class. - * Adaptation to Api30 (beta, may be unstable or cause other non-fatal bugs)[#349](https://github.com/razerdp/BasePopup/issues/349) +* **【Release】2.2.9**(2020/10/10) + * 2.2.9 Major updates: Some optimizations and callbacks added. + * 【New Feature】 + * Add method:`onBeforeDismiss`,works the same as `OnDismissListener#onBeforeDismiss()`. + * Add method:`setTouchable`,set whether Popup is allowed to respond to the event or not, if not, the event will penetrate through Popup. + * Add method: `setAdjustInputMode(View,flag)` [#358](https://github.com/razerdp/BasePopup/issues/358) + * Add method:`preMeasure()`,to pre-measure the contentView, this method will measure, but there is no guarantee that it will measure accurately (e.g. if the cyclerview does not have an adapter). + * Add method:`getPreMeasureWidth()`,get pre-measured width + * Add method:`getPreMeasureHeight()`,get pre-measured height + * Add method:`updateKeyboardAlign()`,this method allows you to manually notify BasePopup to align the keyboard according to the keyboard alignment mode. + * Add Callback:`onWindowFocusChanged()` + * BasePopupUnsafe: + * Add method:`getWindowManager`,get the WindowManager proxy for BasePopup. + * Add method:`getBasePopupDecorViewProxy`,get the final DecorView proxy for BasePopup. + * Add method:`getDecorViewLayoutParams`,get the LayoutParams of the BasePopup final DecorView. + * 【Optimization】 + * Method change:`onPreShow`-> `onBeforeShow` + * Optimizing the order of onBeforeDismiss() judgments [#352](https://github.com/razerdp/BasePopup/issues/352) + * The method to remove the predicted amount of init, which is a legacy method for positioning, is deprecated because positioning is now proxied in the View. + * However, it does not preclude some users from needing this, so it is retained and changed to allow users to trigger the + * Method change: + * `getWidth()`,get the correct width after the PopupWindow is displayed. + * `getHeight()`,get the correct height after the PopupWindow is displayed.
diff --git a/build.gradle b/build.gradle index 05284347..57ab48bf 100644 --- a/build.gradle +++ b/build.gradle @@ -38,8 +38,8 @@ ext { minSdkVersion = 19 minLibSdkVersion = 16 targetSdkVersion = 30 - versionCode = 146 - versionName = '2.2.9.0930' + versionCode = 150 + versionName = '2.2.9' candy = false group = 'com.github.razerdp'