将Matisse的代码下载到本地,然后修改AlbumMediaLoader类中的ORDER_BY属性,改为:
private static final String ORDER_BY = MediaStore.Images.Media.DATE_MODIFIED+ " DESC";
也是无效的,特别急!
@Fudejun520 LZ解决了吗
@Fudejun520 replacing implementation 'androidx.fragment:fragment:1.3.0-alpha08' with implementation 'androidx.fragment:fragment:1..3.0-alpha06' 改一下androidx fragment的版本试试
@Fudejun520 replacing implementation 'androidx.fragment:fragment:1.3.0-alpha08' with implementation 'androidx.fragment:fragment:1..3.0-alpha06' 改一下androidx fragment的版本试试
可以了
@Fudejun520 replacing implementation 'androidx.fragment:fragment:1.3.0-alpha08' with implementation 'androidx.fragment:fragment:1..3.0-alpha06' 改一下androidx fragment的版本试试
这个在哪边改的?找了一遍没看到。
@Fudejun520 replacing implementation 'androidx.fragment:fragment:1.3.0-alpha08' with implementation 'androidx.fragment:fragment:1..3.0-alpha06' 改一下androidx fragment的版本试试
可以了
这个在哪边改的?找了一遍没看到。
@Fudejun520 replacing implementation 'androidx.fragment:fragment:1.3.0-alpha08' with implementation 'androidx.fragment:fragment:1..3.0-alpha06' 改一下androidx fragment的版本试试
可以了
这个在哪边改的?找了一遍没看到。
'androidx.appcompat:appcompat:1.3.0-alpha01'
遇到同样的问题,个人解决方案:
在 MatisseActivity.onAlbumSelected 中将 replace fragment,改为 remove 和 add
private Fragment fragment;
private void onAlbumSelected(Album album) {
if (album.isAll() && album.isEmpty()) {
mContainer.setVisibility(View.GONE);
mEmptyView.setVisibility(View.VISIBLE);
} else {
mContainer.setVisibility(View.VISIBLE);
mEmptyView.setVisibility(View.GONE);
if (fragment != null) {
getSupportFragmentManager()
.beginTransaction()
.remove(fragment)
.commitAllowingStateLoss();
}
fragment = MediaSelectionFragment.newInstance(album);
getSupportFragmentManager()
.beginTransaction()
.add(R.id.container, fragment, MediaSelectionFragment.class.getSimpleName())
.commitAllowingStateLoss();
}
}
我的 fork 版本 解决了这个问题,同时还修复一些其他问题,适配了新的 Result Api https://github.com/lwj1994/Matisse
Most helpful comment
@Fudejun520 replacing implementation 'androidx.fragment:fragment:1.3.0-alpha08' with implementation 'androidx.fragment:fragment:1..3.0-alpha06' 改一下androidx fragment的版本试试