本文整理汇总了Java中com.theartofdev.edmodo.cropper.CropImageView.CropResult方法的典型用法代码示例。如果您正苦于以下问题:Java CropImageView.CropResult方法的具体用法?Java CropImageView.CropResult怎么用?Java CropImageView.CropResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.theartofdev.edmodo.cropper.CropImageView
的用法示例。
在下文中一共展示了CropImageView.CropResult方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleCropResult
import com.theartofdev.edmodo.cropper.CropImageView; //导入方法依赖的package包/类
private void handleCropResult(CropImageView.CropResult result) {
if (result.getError() == null) {
Intent intent = new Intent(getActivity(), CropResultActivity.class);
intent.putExtra("SAMPLE_SIZE", result.getSampleSize());
if (result.getUri() != null) {
intent.putExtra("URI", result.getUri());
} else {
CropResultActivity.mImage = mCropImageView.getCropShape() == CropImageView.CropShape.OVAL
? CropImage.toOvalBitmap(result.getBitmap())
: result.getBitmap();
}
startActivity(intent);
} else {
Log.e("AIC", "Failed to crop image", result.getError());
Toast.makeText(getActivity(), "Image crop failed: " + result.getError().getMessage(), Toast.LENGTH_LONG).show();
}
}
示例2: handleCropResult
import com.theartofdev.edmodo.cropper.CropImageView; //导入方法依赖的package包/类
private void handleCropResult(CropImageView.CropResult result) {
if (result.getError() == null) {
Intent intent = new Intent(getActivity(), CropResultActivity.class);
intent.putExtra("SAMPLE_SIZE", result.getSampleSize());
if (result.getUri() != null) {
intent.putExtra("URI", result.getUri());
} else {
CropResultActivity.mImage =
mCropImageView.getCropShape() == CropImageView.CropShape.OVAL
? CropImage.toOvalBitmap(result.getBitmap())
: result.getBitmap();
}
startActivity(intent);
} else {
Log.e("AIC", "Failed to crop image", result.getError());
Toast.makeText(
getActivity(),
"Image crop failed: " + result.getError().getMessage(),
Toast.LENGTH_LONG)
.show();
}
}
示例3: onCropImageComplete
import com.theartofdev.edmodo.cropper.CropImageView; //导入方法依赖的package包/类
@Override
public void onCropImageComplete(CropImageView view, CropImageView.CropResult result) {
handleCropResult(result);
}
示例4: onCropImageComplete
import com.theartofdev.edmodo.cropper.CropImageView; //导入方法依赖的package包/类
@Override
public void onCropImageComplete(CropImageView view, CropImageView.CropResult result) {
handleCropResult(result);
}