zhihu / Matisse

:fireworks: A well-designed local image and video selector for Android
Apache License 2.0
12.52k stars 2.07k forks source link

切换到其他相册,一片空白,没有显示照片 #864

Open bsxy000 opened 2 years ago

bsxy000 commented 2 years ago

切换到其他文件夹下,一片空白,没有显示照片

lenganjan commented 2 years ago

see #812

poplrz2 commented 2 years ago

image

image

image

不用谢!

poplrz2 commented 2 years ago

image image image 不用谢!

我使用的是依赖方式,你这种操作是只能将Matisse下载到本地再修改?

是的啊,下载源码, 以模块的方式导入到项目里面

image

Darlun1024 commented 2 years ago

修改AlbumMediaCollection 里面的 LOADER_ID 就好了,每个collection都使用单独的LOADER_ID.

poplrz2 commented 2 years ago

你发过来的邮件怎么都是乱码啊,什么都看不到,再发一次吧。

bsxy000 commented 2 years ago

修改AlbumMediaCollection 里面的 LOADER_ID 就好了,每个collection都使用单独的LOADER_ID.

你这个修改的前提还是得下载到本地了,如果Author能更新一下这个lib就好了~

xybCoder commented 2 years ago

image

image

image

不用谢!

非常棒

poplrz2 commented 2 years ago

你发过来的邮件怎么都是乱码啊,什么都看不到,再发一次吧。

funcodingdev commented 2 years ago

我这边这样改,预览会崩溃

Julius-lq commented 1 year ago

image

image

image

不用谢!

very nice

poplrz2 commented 1 year ago

你发过来的邮件怎么都是乱码啊,什么都看不到,再发一次吧。

Coder-HuangBH commented 1 year ago

修改 MatisseActivity image image

poplrz2 commented 1 year ago

你发过来的邮件怎么都是乱码啊,什么都看不到,再发一次吧。

ZhuoJunErGe commented 1 year ago

我的处理方式AlbumMediaCollection中加个方法

public void refreshLoad(@Nullable Album target, boolean enableCapture) { Bundle args = new Bundle(); args.putParcelable(ARGS_ALBUM, target); args.putBoolean(ARGS_ENABLE_CAPTURE, enableCapture); mLoaderManager.restartLoader(LOADER_ID, args, this); }

MediaSelectionFragment中加个方法

public void refreshLoad(Album album) { mAlbumMediaCollection.refreshLoad(album, selectionSpec.capture); } MatisseActivity 中onAlbumSelected(Album album) 方法进行处理

if (fragment == null) { fragment = MediaSelectionFragment.newInstance(album); getSupportFragmentManager() .beginTransaction() .replace(R.id.container, fragment, MediaSelectionFragment.class.getSimpleName()) .commitAllowingStateLoss(); } else { fragment.refreshLoad(album);

}

完毕

poplrz2 commented 1 year ago

你发过来的邮件怎么都是乱码啊,什么都看不到,再发一次吧。