use of com.lzy.imagepicker.ImagePicker in project okhttp-OkGo by jeasonlzy.
the class RxFormUploadActivity method selectImage.
@OnClick(R.id.selectImage)
public void selectImage(View view) {
ImagePicker imagePicker = ImagePicker.getInstance();
imagePicker.setImageLoader(new GlideImageLoader());
//多选
imagePicker.setMultiMode(true);
//显示拍照按钮
imagePicker.setShowCamera(true);
//最多选择9张
imagePicker.setSelectLimit(9);
//不进行裁剪
imagePicker.setCrop(false);
Intent intent = new Intent(this, ImageGridActivity.class);
startActivityForResult(intent, 100);
}
use of com.lzy.imagepicker.ImagePicker in project ImagePicker by jeasonlzy.
the class WxDemoActivity method initImagePicker.
private void initImagePicker() {
ImagePicker imagePicker = ImagePicker.getInstance();
//设置图片加载器
imagePicker.setImageLoader(new GlideImageLoader());
//显示拍照按钮
imagePicker.setShowCamera(true);
//允许裁剪(单选才有效)
imagePicker.setCrop(false);
//是否按矩形区域保存
imagePicker.setSaveRectangle(true);
//选中数量限制
imagePicker.setSelectLimit(maxImgCount);
//裁剪框的形状
imagePicker.setStyle(CropImageView.Style.RECTANGLE);
//裁剪框的宽度。单位像素(圆形自动取宽高最小值)
imagePicker.setFocusWidth(800);
//裁剪框的高度。单位像素(圆形自动取宽高最小值)
imagePicker.setFocusHeight(800);
//保存文件的宽度。单位像素
imagePicker.setOutPutX(1000);
//保存文件的高度。单位像素
imagePicker.setOutPutY(1000);
}
use of com.lzy.imagepicker.ImagePicker in project okhttp-OkGo by jeasonlzy.
the class FormUploadActivity method selectImage.
@OnClick(R.id.selectImage)
public void selectImage(View view) {
ImagePicker imagePicker = ImagePicker.getInstance();
imagePicker.setImageLoader(new GlideImageLoader());
//多选
imagePicker.setMultiMode(true);
//显示拍照按钮
imagePicker.setShowCamera(true);
//最多选择9张
imagePicker.setSelectLimit(9);
//不进行裁剪
imagePicker.setCrop(false);
Intent intent = new Intent(this, ImageGridActivity.class);
startActivityForResult(intent, 100);
}
Aggregations