public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.wrapper_cn_image_cropper);
cropImageView = (CropImageView) findViewById(R.id.crop_imageview);
// Sets initial aspect ratio to 10/10, for demonstration purposes
//cropImageView.setAspectRatio(DEFAULT_ASPECT_RATIO_VALUES, DEFAULT_ASPECT_RATIO_VALUES);
Intent intent = getIntent();
isCrop = intent.getBooleanExtra(EXTRA_CROP, true);
aspectX = intent.getIntExtra(EXTRA_ASPECTX, 0);
aspectY = intent.getIntExtra(EXTRA_ASPECTY, 0);
outputX = intent.getIntExtra(EXTRA_OUTPUTX, 0);
outputY = intent.getIntExtra(EXTRA_OUTPUTY, 0);
isScale = intent.getBooleanExtra(EXTRA_SCALE, true);
output = intent.getParcelableExtra(EXTRA_OUTPUT);
isReturnData = intent.getBooleanExtra(EXTRA_RETURN_DATA, false);
noFaceDetection = intent.getBooleanExtra(EXTRA_NOFACEDETECTION, true);
outputFormat = intent.getStringExtra(EXTRA_OUTPUTFORMAT);
if (TextUtils.isEmpty(outputFormat))
{
outputFormat = Bitmap.CompressFormat.PNG.toString();
}
title = intent.getStringExtra(EXTRA_TITLE);
String path = output.getPath();
mSourceBitmap = BitmapFactory.decodeFile(path);
cropImageView.setImageBitmap(mSourceBitmap);
}
CropperActivity.java 文件源码
java
阅读 43
收藏 0
点赞 0
评论 0
项目:android-project-gallery
作者:
评论列表
文章目录