0
我在做一個應用程序,允許用戶從畫廊上傳多張圖片。用戶選擇照片並將其顯示在列表視圖中,然後用戶單擊上傳按鈕。它工作正常,直到我發現一些圖像正在改變列表視圖和上傳方向。 我問周圍有關這個問題,有人告訴我,我必須允許上傳前裁剪。我應該讓用戶裁剪圖庫中的每個選定圖像,還是應該如何處理?多圖像裁剪的Android
if (requestCode == SELECT_MULTIPLE_PHOTOS) {
String imagesArray = data.getStringExtra(EXTRA_SELECTED_PHOTOS);//get Intent data
//Convert string array into List by splitting by ',' and substring after '[' and before ']'
List<String> selectedImages =
Arrays.asList(imagesArray.substring(1, imagesArray.length() - 1)
.split(", "));
Log.d(TAG, "Selected images is " + selectedImages.size());
mPhotosPathList = new ArrayList<String>(selectedImages);
Log.d(TAG, "Selected images path is " + mPhotosPathList.size());
}