Closed HeJingWei closed 6 years ago
//单选,使用RxGalleryFinal默认设置,并且带有裁剪 instance .openGalleryRadioImgDefault( new RxBusResultDisposable() { @Override protected void onEvent(ImageRadioResultEvent imageRadioResultEvent) throws Exception { Logger.i("只要选择图片就会触发"); } }) .onCropImageResult( new IRadioImageCheckedListener() { @Override public void cropAfter(Object t) { Logger.i("裁剪完成"); }
@Override public boolean isActivityFinish() { Logger.i("返回false不关闭,返回true则为关闭"); return true; } });
这部分代码能设置裁剪比例吗?
如果我用 RxGalleryFinal .with(MainActivity.this) .image() .radio() .cropAspectRatioOptions(0, new AspectRatio("1:1", 300, 300)) .crop() .imageLoader(ImageLoaderType.FRESCO) .subscribe(new RxBusResultDisposable() { @Override protected void onEvent(ImageRadioResultEvent imageRadioResultEvent) throws Exception { Toast.makeText(getBaseContext(), "选中了图片路径:" + imageRadioResultEvent.getResult().getOriginalPath(), Toast.LENGTH_SHORT).show(); } }) .openGallery(); 设置裁剪比例,怎么获得裁剪回调呢?
@HeJingWei hi,请问你是怎么处理的
//单选,使用RxGalleryFinal默认设置,并且带有裁剪 instance .openGalleryRadioImgDefault( new RxBusResultDisposable() {
@Override
protected void onEvent(ImageRadioResultEvent imageRadioResultEvent) throws Exception {
Logger.i("只要选择图片就会触发");
}
})
.onCropImageResult(
new IRadioImageCheckedListener() {
@Override
public void cropAfter(Object t) {
Logger.i("裁剪完成");
}
这部分代码能设置裁剪比例吗?
如果我用 RxGalleryFinal .with(MainActivity.this) .image() .radio() .cropAspectRatioOptions(0, new AspectRatio("1:1", 300, 300)) .crop() .imageLoader(ImageLoaderType.FRESCO) .subscribe(new RxBusResultDisposable() {
@Override
protected void onEvent(ImageRadioResultEvent imageRadioResultEvent) throws Exception {
Toast.makeText(getBaseContext(), "选中了图片路径:" + imageRadioResultEvent.getResult().getOriginalPath(), Toast.LENGTH_SHORT).show();
}
})
.openGallery();
设置裁剪比例,怎么获得裁剪回调呢?