zhihu / Matisse

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

Image not loading on switch of folder #854

Open Miteshmakwana73 opened 3 years ago

Miteshmakwana73 commented 3 years ago

image not showing on switch of folder

this is what i done so far

btnPick.setOnClickListener {
            Matisse.from(this@ImagePicker)
                .choose(MimeType.ofAll())
                .capture(true)
                .captureStrategy( CaptureStrategy(true, BuildConfig.APPLICATION_ID))
                .theme(R.style.Matisse_Dracula)
                .countable(false)
                .maxSelectable(5)
                .maxOriginalSize(0)
                .originalEnable(false)
                .imageEngine(Glide4Engine())
                .showPreview(false) // Default is `true`
                .forResult(111)
        }

Library

repositories {
        google()
        jcenter()
        mavenCentral()
    }

//imagepicker
    implementation "com.zhihu.android:matisse:0.5.3-beta3"

    //glide
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'

this is what i am getting in log

2021-06-14 16:16:13.273 9322-9322/com.tops.popupmenu W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@21e44eb
2021-06-14 16:16:13.503 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:13.592 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:13.605 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:13.615 9322-9352/com.tops.popupmenu I/chatty: uid=10153(com.tops.popupmenu) RenderThread identical 1 line
2021-06-14 16:16:13.628 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:13.834 9322-9322/com.tops.popupmenu W/Glide: Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored
2021-06-14 16:16:22.119 9322-9322/com.tops.popupmenu W/.tops.popupmen: Accessing hidden field Landroid/widget/AbsListView;->mIsChildViewEnabled:Z (greylist, reflection, allowed)
2021-06-14 16:16:22.304 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:22.523 9322-9352/com.tops.popupmenu I/chatty: uid=10153(com.tops.popupmenu) RenderThread identical 15 lines
2021-06-14 16:16:22.530 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:23.855 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:23.890 9322-9352/com.tops.popupmenu I/chatty: uid=10153(com.tops.popupmenu) RenderThread identical 3 lines
2021-06-14 16:16:24.191 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)

this is what i am getting on first time open

Screenshot_1623666781

i am getting this if i switch folder

Screenshot_1623666785 Screenshot_1623666803

didi789 commented 3 years ago

Hey there, I ran into this issue as well, My solution (for now) is to keep the implementation of appcompat at 1.2.0, do not update it to 1.3.0

build.gradle (app): implementation 'androidx.appcompat:appcompat:1.2.0'

akkisjoy commented 3 years ago

Hey there, I ran into this issue as well, My solution (for now) is to keep the implementation of appcompat at 1.2.0, do not update it to 1.3.0

build.gradle (app): implementation 'androidx.appcompat:appcompat:1.2.0'

Thank you for the suggestion but it does not help in my case.

didi789 commented 3 years ago

Please check out PictureSelector https://github.com/LuckSiege/PictureSelector

Miteshmakwana73 commented 3 years ago

Hey there, I ran into this issue as well, My solution (for now) is to keep the implementation of appcompat at 1.2.0, do not update it to 1.3.0

build.gradle (app): implementation 'androidx.appcompat:appcompat:1.2.0'

didn't understand if appcompat is issue then why it's showing all media?

and it's not working for me either

vickyappbull commented 3 years ago

image not showing on switch of folder

this is what i done so far

btnPick.setOnClickListener {
            Matisse.from(this@ImagePicker)
                .choose(MimeType.ofAll())
                .capture(true)
                .captureStrategy( CaptureStrategy(true, BuildConfig.APPLICATION_ID))
                .theme(R.style.Matisse_Dracula)
                .countable(false)
                .maxSelectable(5)
                .maxOriginalSize(0)
                .originalEnable(false)
                .imageEngine(Glide4Engine())
                .showPreview(false) // Default is `true`
                .forResult(111)
        }

Library

repositories {
        google()
        jcenter()
        mavenCentral()
    }

//imagepicker
    implementation "com.zhihu.android:matisse:0.5.3-beta3"

    //glide
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'

this is what i am getting in log

2021-06-14 16:16:13.273 9322-9322/com.tops.popupmenu W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@21e44eb
2021-06-14 16:16:13.503 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:13.592 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:13.605 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:13.615 9322-9352/com.tops.popupmenu I/chatty: uid=10153(com.tops.popupmenu) RenderThread identical 1 line
2021-06-14 16:16:13.628 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:13.834 9322-9322/com.tops.popupmenu W/Glide: Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored
2021-06-14 16:16:22.119 9322-9322/com.tops.popupmenu W/.tops.popupmen: Accessing hidden field Landroid/widget/AbsListView;->mIsChildViewEnabled:Z (greylist, reflection, allowed)
2021-06-14 16:16:22.304 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:22.523 9322-9352/com.tops.popupmenu I/chatty: uid=10153(com.tops.popupmenu) RenderThread identical 15 lines
2021-06-14 16:16:22.530 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:23.855 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)
2021-06-14 16:16:23.890 9322-9352/com.tops.popupmenu I/chatty: uid=10153(com.tops.popupmenu) RenderThread identical 3 lines
2021-06-14 16:16:24.191 9322-9352/com.tops.popupmenu D/EGL_emulation: eglMakeCurrent: 0xdc8b8060: ver 3 0 (tinfo 0xdc8e9c50)

this is what i am getting on first time open

Screenshot_1623666781

i am getting this if i switch folder

Screenshot_1623666785 Screenshot_1623666803

Any solution? media not showing when switch folder

pawankumar2 commented 2 years ago

use this:-

implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.activity:activity:1.3.0' implementation 'androidx.fragment:fragment:1.2.0'

this work for me

Aksx73 commented 2 years ago

any update?

marcinkunert commented 2 years ago

any update?

This library seems to be no longer maintained https://github.com/zhihu/Matisse/issues/869

marcinkunert commented 2 years ago

I've created a PR with fix for this issue. I doubt it will be merged any time soon, so if you want to use newer versions of appcompat and still use this library you could build it to an aar and attach this way to the project.

hemrajKumawat1 commented 2 years ago

not working with this code still facing the same issue after changing the folder showing a blank screen

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.activity:activity:1.3.0'
implementation 'androidx.fragment:fragment:1.2.0'
aman-jham commented 2 years ago

@hemrajKumawat1 - https://github.com/zhihu/Matisse/issues/814#issuecomment-1028747472

change to this in class AlbumMediaCollection

private final int LOADER_ID = hashCode();

It will work.

shalenMathew commented 1 year ago

hey anybody found a solution i am also getting this same issue