【问题标题】:Android: Crop Image optionAndroid:裁剪图像选项
【发布时间】:2014-05-05 19:51:20
【问题描述】:

我正在做一个需要裁剪图像以设置个人资料图片的项目, 我更喜欢这个link,因为当我在Emulator 上测试它时,它对我来说非常完美,但问题是当我在我的标签上运行我的应用程序时,我遇到了问题.. 它给了我一个标题为Choose Crop App但没有选项意味着没有应用程序可以选择裁剪图像的对话框..

【问题讨论】:

  • 在主要搜索引擎上搜索 android crop image library 会发现很多可能性。

标签: android crop


【解决方案1】:
    final CropImageView cropImageView = (CropImageView) findViewById(R.id.CropImageView);
    cropImageView.setImageResource(R.drawable.bike01);
    cropImageView.setAspectRatio(DEFAULT_ASPECT_RATIO_VALUES, DEFAULT_ASPECT_RATIO_VALUES);
    crop.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View arg0) {
            // TODO Auto-generated method stub
              croppedImage = cropImageView.getCroppedImage();
                ImageView croppedImageView = (ImageView) findViewById(R.id.croppedImageView);
                croppedImageView.setImageBitmap(croppedImage);

        }
    });

并使用这个库来运行这段代码lib!

【讨论】:

    猜你喜欢
    • 2015-02-02
    • 2018-09-20
    • 2011-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-04
    • 2013-09-26
    • 2016-12-27
    相关资源
    最近更新 更多