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

可否给PictureSelector.create(this).openPreview()多增加一个按钮,并响应点击事件? #2346

Closed
luojing1336 opened this issue Apr 27, 2022 · 3 comments

Comments

@luojing1336
Copy link

Current use version?

当前使用的版本是多少?

3.0.3

Will this problem occur in demo?

Demo能否复现这问题?

openPreview无法重写布局,并获得localMedia数组的脚标?

Describe the problem or provide an error log?

描述问题或提供错误log?

首先,感谢这个开源第三方库,很强大!但是在使用过程中发现,好像只会有openGallery才可以重写布局,并自定义新的事件;而直接openPreview无法在预览layout中自定义一个button并响应点击事件;实例就是,在外部预览时,只能使用delete按钮删除和长按下载,我想获取到当前预览的List<localMedia>数组下角标的图片相关的localMedia数据,并调用下载方法或分享(如微信分享)方法,不知道如何实现?
最后,感谢大大开源这个强大的图片库,望回复!
@luojing1336 luojing1336 changed the title 可否给PictureSelector.create(this).openPreview()多增加一个按钮,并相应点击事件? 可否给PictureSelector.create(this).openPreview()多增加一个按钮,并响应点击事件? Apr 27, 2022
@sunshengfei
Copy link

+1

另外:preview的时候,导航栏删除按钮可以拿掉吗

@luojing1336
Copy link
Author

我已经写好了一个更多按钮的逻辑,想要替换掉删除按钮,先用在自己的项目里了,等整理整理给pull request一下

另:
PictureSelector.create(this).openPreview().startFragmentPreview/startActivityPreview (int currentPosition, boolean isDisplayDelete, ArrayList list), 把isDisplayDelete置为false,就不会展示删除按钮

@LuckSiege
Copy link
Owner

v3.10.0版本 预览新增api

.setInjectLayoutResourceListener();
.setAttachViewLifecycle();

可以相结合使用实现此功能,具体可参考demo

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

3 participants