Android Display Images From Specific Folder in Gallery View

后端 未结 1 1199
半阙折子戏
半阙折子戏 2020-12-18 05:34

I\'m trying to make a little app that displays only images from a specific folder in a gallery view. I have found a few examples, but every single one just ends up displayin

相关标签:
1条回答
  • 2020-12-18 05:56

    Figured it out! Below is the pasted code for anyone who wants to do something similar.

    Cursor imagecursor = getContentResolver().query( MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
                            columns, 
                            MediaStore.Images.Media.DATA + " like ? ",
                            new String[] {"%/yourfoldername/%"},  
                            null);
    
    0 讨论(0)
提交回复
热议问题