我想裁剪圖像,我可以實現這一點。如何使用裁剪選項直接打開圖像
我的代碼
Intent cropIntent = new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
cropIntent.setDataAndType(fileUri, "image/*");
// set crop properties
cropIntent.putExtra("crop", "true");
cropIntent.putExtra("return-data", true);
startActivityForResult(cropIntent, CROP_PIC);
其中fileUri
包含的URI,我想從畫廊裁剪圖像的路徑。
使用此代碼警告打開選擇應用程序來選擇圖像,我想知道,雖然我已經通過圖像路徑,然後爲什麼它要求選擇應用程序打開圖像,當我選擇應用程序(通過畫廊),那麼我必須從圖庫中選擇圖像進行裁剪。
我想要一個解決方案,使用該解決方案,我的圖像只是用裁切選項打開,而不要求選擇要打開的應用程序?
可能嗎?請幫我實現它...
有機會幾乎沒有,除非你使用的是內容,而不是觀衆的例子一些好的庫。結帳[這篇文章](http://stackoverflow.com/questions/5383797/open-an-image-using-uri-in-androids-default-gallery-image-viwer)。 – Matthias
@androidcode你找到解決方案嗎? – Amy