Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

图片预览 系统返回导致PictureSelectorTransparentActivity不消失 #2690

Closed
JamisonQian opened this issue Jun 5, 2023 · 2 comments
Closed

Comments

@JamisonQian
Copy link

Current use version?

当前使用的版本是多少?3.11.1

3.11.1

Will this problem occur in demo?

Demo能否复现这问题?

在Demo中无法复现次问题

Describe the problem or provide an error log?

描述问题或提供错误log?

使用图片预览代码如下
pictureSelector.openPreview()
.setImageEngine(PictureSelectorGlideEngine.createGlideEngine())
.setLanguage(language)
.isPreviewFullScreenMode(true)
.setExternalPreviewEventListener(object : OnExternalPreviewEventListener {
override fun onPreviewDelete(position: Int) {

            }

            override fun onLongPressDownload(context: Context?, media: LocalMedia?): Boolean {
                return false
            }


        })
        .startActivityPreview(position, false, medias as ArrayList<LocalMedia>)

在图片预览页面,使用系统自带侧滑返回,返回后当前页面无法操作点击,使用命名查看当前显示的Activity是PictureSelectorTransparentActivity,需要再次返回一次才可以操作点击,如果在预览页面点击标题栏的返回箭头则可正常。

@cp1006
Copy link

cp1006 commented Jun 23, 2023

问题解决了吗,我的编译版本是33也是这个问题,手动调用预览要返回两次,从图库去预览返回第一次是一个空白页

@KangYee
Copy link

KangYee commented Jul 28, 2023

我也遇到这个问题了,目前的解决方式:
在对应的 Fragment 里注册一下 OnBackPressedDispatcher, 在触发 handleOnBackPressed 回调后直接 finish 即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants