Closed HChenX closed 8 months ago
此问题会在下一个测试版修复
关于圆角消失的问题是因为 DialogX 的圆角是由OutlineProvider实现的,而要实现 FullScreenDialog 的背景下沉效果,需要对当前屏幕进行截图后执行动画实现,但是无法对OutlineProvider实现的圆角截图,因此圆角会消失,同样的MessageDialog没有在启动FullScreenDialog时消失也是同理,因为截图的瞬间MessageDialog并没有关闭,要解决此问题的简单方案是直接关掉FullScreenDialog的背景下沉效果:
.setHideZoomBackground(true)
关于闪退的问题已经在最新的 beta版本修复:0.0.50.beta10测试版本更新
关于圆角消失的问题是因为 DialogX 的圆角是由OutlineProvider实现的,而要实现 FullScreenDialog 的背景下沉效果,需要对当前屏幕进行截图后执行动画实现,但是无法对OutlineProvider实现的圆角截图,因此圆角会消失,同样的MessageDialog没有在启动FullScreenDialog时消失也是同理,因为截图的瞬间MessageDialog并没有关闭,要解决此问题的简单方案是直接关掉FullScreenDialog的背景下沉效果:
.setHideZoomBackground(true)
关于闪退的问题已经在最新的 beta版本修复:0.0.50.beta10测试版本更新
好的,感谢
⚠️ 重要阅读
问题描述
使用 MessageDialog 唤起 FullScreenDialog 时 MessageDialog 的圆角消失,且 FullScreenDialog 也没有圆角(我也不知道为什么,使用Demo打开FullScreenDialog是有圆角的,自己写就没了)。
当FullScreenDialog关闭时,会发现MessageDialog并没有在唤醒Full时关闭,很突兀。
而且当我更新最新0.0.50.beta9版本时,向下滑动关闭Full会崩溃。
下面是日志: Generated by AppErrorsTracking 1.3(6) Project URL: https://github.com/KitsunePie/AppErrorsTracking
[Stack Trace]: java.lang.NullPointerException: Attempt to invoke interface method 'void com.kongzue.dialogx.interfaces.ScrollController.lockScroll(boolean)' on a null object reference at com.kongzue.dialogx.util.FullScreenDialogTouchEventInterceptor$1.onTouch(FullScreenDialogTouchEventInterceptor.java:111) at android.view.View.dispatchTouchEvent(View.java:15099) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3178) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2820) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3184) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2834) at com.kongzue.dialogx.util.views.MaxRelativeLayout.dispatchTouchEvent(MaxRelativeLayout.java:258) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3206) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2834) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3184) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2834) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3184) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2834) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3184) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2834) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:571) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1899) at android.app.Activity.dispatchTouchEvent(Activity.java:4409) at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:70) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:529) at android.view.View.dispatchPointerEvent(View.java:15387) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:7110) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6869) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6284) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6341) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6307) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6472) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6315) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6529) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6288) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6341) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6307) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6315) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6288) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:9549) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:9500) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:9455) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:9694) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:291) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:341) at android.os.Looper.loopOnce(Looper.java:168) at android.os.Looper.loop(Looper.java:299) at android.app.ActivityThread.main(ActivityThread.java:8136) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028)
下面是我的代码示例:
https://github.com/kongzue/DialogX/assets/123531821/8b06f893-673a-4aac-9962-8b52c5e2360d
https://github.com/kongzue/DialogX/assets/123531821/d7780820-47b6-491a-9f96-ed35d7e7507d
DialogX 版本
0.0.50.beta9
设备信息
Redmi K50
是否在 Demo 中能复现此问题?
未尝试
问题截图/视频
截屏/视频
错误日志
No response