且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

定制的Andr​​oid图像裁剪

更新时间:2023-01-27 18:32:28

您应该尝试:

@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);

    setContentView(R.layout.crop_layout);


    myCropView = new CropView(this);

    Uri imageUri = getIntent().getExtras().getParcelable("path");

    b = (BitmapDrawable) BitmapDrawable.createFromPath(imageUri.getPath()); 

    myCropView.setImageURI(imageUri);
}

(摘自编辑你的问题。)

(Taken from an edit to your question.)