當前位置:首頁 » 安卓系統 » android選擇圖片多張

android選擇圖片多張

發布時間: 2024-01-17 10:52:46

❶ android如何從伺服器取多張圖片,在本地保存並顯示

//獲取connection conn = getURLConnection(url); is = conn.getInputStream(); //獲取Bitmap的引用 Bitmap bitmap = BitmapFactory.decodeStream(is) //獲取長度 int length = (int) conn.getContentLength(); if (length != -1) { byte[] imgData = new byte[length]; byte[] temp=new byte[512]; int readLen=0; int destPos=0; while((readLen=is.read(temp))>0){ System.array(temp, 0, imgData, destPos, readLen); destPos+=readLen; } bitmap=BitmapFactory.decodeByteArray(imgData, 0, imgData.length); }可能想得不是很完善,你可以參考參考。

熱點內容
隨機啟動腳本 發布:2025-07-05 16:10:30 瀏覽:515
微博資料庫設計 發布:2025-07-05 15:30:55 瀏覽:19
linux485 發布:2025-07-05 14:38:28 瀏覽:299
php用的軟體 發布:2025-07-05 14:06:22 瀏覽:748
沒有許可權訪問計算機 發布:2025-07-05 13:29:11 瀏覽:423
javaweb開發教程視頻教程 發布:2025-07-05 13:24:41 瀏覽:682
康師傅控流腳本破解 發布:2025-07-05 13:17:27 瀏覽:231
java的開發流程 發布:2025-07-05 12:45:11 瀏覽:676
怎麼看內存卡配置 發布:2025-07-05 12:29:19 瀏覽:275
訪問學者英文個人簡歷 發布:2025-07-05 12:29:17 瀏覽:825