jeasonlzy / ImagePicker

完全仿微信的图片选择,并且提供了多种图片加载接口,选择图片后可以旋转,可以裁剪成矩形或圆形,可以配置各种其他的参数

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

关于有些同学遇到查看完图片点击返回列表没有数据问题,我这边给出解决办法,还有是IndexOutOf下标越界问题

liqiangCoding opened this issue · comments

ImageDataSource类里面加上if (data.getCount() > 0 && allImages.size() > 0)判断
列表没有数据问题把while(data.moveToNext)判断改为
if (data != null && data.moveToFirst()){
do{
...........
}while(data.moveToNext);
}

commented

每次返回后间距变宽解决办法:
ImageGridActivity.onImagesLoaded() 方法中的
`mRecyclerAdapter.setOnImageItemClickListener(this);

    mRecyclerView.setLayoutManager(new GridLayoutManager(this, 3));

    mRecyclerView.addItemDecoration(new GridSpacingItemDecoration(3, Utils.dp2px(this, 2), false));

    mRecyclerView.setAdapter(mRecyclerAdapter);`

移至onCreate() 中,adapter初始化后面就行

该给你一朵小红花

index问题可以引用这个库,我发布了一下,顺便改了这个bug

implementation 'com.github.Jimmuy:ImagePicker:v1.0.3'

0.6.1吧