Skip to content

Commit

Permalink
1.1版本上线。
Browse files Browse the repository at this point in the history
可以不选择toast 显示器。
增加注释
  • Loading branch information
暄落丶 committed May 25, 2019
1 parent 3664a86 commit e733e15
Show file tree
Hide file tree
Showing 15 changed files with 320 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
public class GlideImageLoader implements LKaleidoImageLoader {
@Override
public void displayImage(Context context, String path, ImageView imageView, int width, int height) {
// TODO: 2019/4/27 占位图 缩略图等等
RequestOptions requestOptions = new RequestOptions()
.diskCacheStrategy(DiskCacheStrategy.ALL); //缓存全尺寸;
// .error(R.drawable.) //设置错误图片
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/java/com/xuanluo/kaleidoscope/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private void initLKaleidoscope(){
LKaleidoscope lKaleidoscope = LKaleidoscope.getInstance()
.setImageLoader(new GlideImageLoader())//设置图片加载器
.setThemeStyle(R.style.mainTheme)//设置样式
.setToastShow(new ToastShow())//toast 显示仪
// .setToastShow(new ToastShow())//toast 显示仪
.setSelectLimit(3)//图片最多数量//如果設置為1 則為單選
.setGifShow(true)//是否显示gif 默认显示
.setSelectMinLimit(1)//最小选择图片数量 //如果显示相机,则无法控制
Expand All @@ -108,8 +108,9 @@ private void initLKaleidoscope(){
.setOutPutY(1)//宽高比
.setFreeStyleCrop(false)//是否能够拖动裁剪框(比例自定)
.setCompressionQuality(100)//设置裁剪的图片质量,取值0-100
.setCircleDimmed(false)//是否要圆形
.setCircleDimmed(true)//是否要圆形
.setRotate(false);//是否支持旋转

// .setIcCameraBack(R.mipmap.ic_launcher)//相机页面-退出拍照页面按钮
// .setIcCameraTake(R.mipmap.ic_launcher)//相机页面-拍照按钮
// .setIcCameraFlip(R.mipmap.ic_launcher)//相机页面-切换前后摄像头按钮
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!-- 页面主要背景色的透明色 -->
<item name="Lkaleido_main_color_transparent">#44FC766A</item>
<!-- 页面主要颜色 (选中等效果的颜色) -->
<item name="Lkaleido_two_color">#C5DE48</item>
<item name="Lkaleido_two_color">#C50E08</item>
<!-- 页面主要颜色背景色 -->
<item name="Lkaleido_two_color_transparent">#44C5DE48</item>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,9 @@ public void onLoadFinished(@NonNull Loader<Cursor> loader, Cursor data) {
String imageMimeType = data.getString(data.getColumnIndexOrThrow(IMAGE_PROJECTION[5])); //图片的类型
long imageAddTime = data.getLong(data.getColumnIndexOrThrow(IMAGE_PROJECTION[6])); //图片被添加的时间


// TODO: 2019/5/10
if (!mLKaleidoscope.isGifShow() && imageMimeType.equals("image/gif")){
continue;
}


//封装实体
LKaleidoImageBean imageBean = new LKaleidoImageBean();
imageBean.setName(imageName);
Expand Down
Loading

0 comments on commit e733e15

Please sign in to comment.