Joining cursors and sorting

元气小坏坏 提交于 2019-12-02 06:28:40
joakimk

Hah, it seems one can "trick" Android into allowing CursorJoiner with descending sort by simply ordering by ID*(-1) (ascending):

Cursor c_thumbs = getContext().getContentResolver().query(
                baseUri, 
                MS_proj_thumbs_array, null, null, 
                "(" + PhotoContract.ThumbEntry.COLUMN_IMAGE_ID + "*(-1))"  // NB!
       );

So that solves my problem; newest images on top!

See full answer here: Querying the MediaStore: Joining thumbnails and images (on ID)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!