Skip to content

Commit

Permalink
解决直接调起拍照,并裁剪后无法返回图片的bug,考虑到改动很少,所以该bug解决后未上传到远程仓库
Browse files Browse the repository at this point in the history
  • Loading branch information
nanchen2251 committed Mar 22, 2017
1 parent 32d77d9 commit bb4490c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private void initImagePicker() {
ImagePicker imagePicker = ImagePicker.getInstance();
imagePicker.setImageLoader(new GlideImageLoader()); //设置图片加载器
imagePicker.setShowCamera(true); //显示拍照按钮
imagePicker.setCrop(false); //允许裁剪(单选才有效)
imagePicker.setCrop(true); //允许裁剪(单选才有效)
imagePicker.setSaveRectangle(true); //是否按矩形区域保存
imagePicker.setSelectLimit(maxImgCount); //选中数量限制
imagePicker.setStyle(CropImageView.Style.RECTANGLE); //裁剪框的形状
Expand Down Expand Up @@ -96,6 +96,13 @@ public void onItemClick(View view, int position) {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
switch (position) {
case 0: // 直接调起相机
/**
* 0.4.7 目前直接调起相机不支持裁剪,如果开启裁剪后不会返回图片,请注意,后续版本会解决
*
* 但是当前直接依赖的版本已经解决,考虑到版本改动很少,所以这次没有上传到远程仓库
*
* 如果实在有所需要,请直接下载源码引用。
*/
//打开选择,本次允许选择的数量
ImagePicker.getInstance().setSelectLimit(maxImgCount - selImageList.size());
Intent intent = new Intent(WxDemoActivity.this, ImageGridActivity.class);
Expand Down
2 changes: 1 addition & 1 deletion bintray.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

version = "0.4.7" // 数据仓库依赖第三部分
version = "0.4.8" // 数据仓库依赖第三部分

def siteUrl = 'https://github.com/jeasonlzy0216/NineGridView'
def gitUrl = 'https://github.com/jeasonlzy0216/NineGridView.git'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
setResult(ImagePicker.RESULT_CODE_ITEMS, intent); //单选不需要裁剪,返回数据
finish();
}
}
if (directPhoto){
} else if (directPhoto){
finish();
}
}
Expand Down

0 comments on commit bb4490c

Please sign in to comment.