我必須創建一個應用程序使用的android有設施,以查看用戶圖像circularimageview circularimageview我使用com.pkmmte.view.CircularImageView庫和使用位圖來顯示圖像從URL,但我可以「在imageview的時間顯示的圖像也顯示一些錯誤無法解碼文件bitmapfactory
D/dalvikvm: GC_FOR_ALLOC freed 277K, 5% free 7693K/8044K, paused 2ms, total 2ms
D/dalvikvm: GC_FOR_ALLOC freed 747K, 9% free 8469K/9288K, paused 8ms, total 8ms
E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /http:/hennasilks.com/jijo/informe/profile_images/galimg2017-02- 16T11:16:02.403+0530178.jpeg: open failed: ENOENT (No such file or directory)
I/System.out: jijonull
E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /http:/hennasilks.com/jijo/informe/profile_images/galimg2017-02-16T11:16:02.403+0530178.jpeg: open failed: ENOENT (No such file or directory)
I/System.out: jijonull
E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /http:/hennasilks.com/jijo/informe/profile_images/galimg2017-02-16T11:16:02.403+0530178.jpeg: open failed: ENOENT (No such file or directory)
I/System.out: jijonull
D/dalvikvm: GC_FOR_ALLOC freed 325K, 7% free 9612K/10284K, paused 5ms, total 6ms
I/dalvikvm-heap: Grow heap (frag case) to 11.409MB for 2048012-byte allocation
D/dalvikvm: GC_FOR_ALLOC freed 5K, 6% free 11606K/12288K, paused 7ms, total 7ms
D/dalvikvm: GC_FOR_ALLOC freed 34K, 6% free 11604K/12288K, paused 5ms, total 5ms
I/dalvikvm-heap: Grow heap (frag case) to 29.683MB for 19170444-byte allocation
D/dalvikvm: GC_FOR_ALLOC freed 4K, 3% free 30320K/31012K, paused 4ms, total 4ms
V/FA: Inactivity, disconnecting from the service
V/FA: onUnbind called for intent. action: com.google.android.gms.measurement.START
V/FA: Local AppMeasurementService is shutting down
這裏是我的代碼用的顯示圖像
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 4;
String profurl="http://hennasilks.com/jijo/informe/profile_images/galimg2017-02-16T11:16:02.403+0530178.jpeg";
Bitmap bitmap = BitmapFactory.decodeFile(profurl,options);
System.out.println("jijo"+bitmap);
int height = bitmap.getHeight(), width = bitmap.getWidth();
if (height > 1280 && width > 960)
{
Bitmap imgbitmap = BitmapFactory.decodeFile(profurl);
holder.prof.setImageURI(Uri.parse(String.valueOf(imgbitmap)));
holder.prof.setVisibility(View.VISIBLE);
}
else {
holder.prof.setImageURI(Uri.parse(String.valueOf(bitmap)));
holder.prof.setVisibility(View.VISIBLE);
}
請幫我找到一個解決方案在此先感謝
使用畢加索或滑行 –
@DeepakKumar給例如 – fresher
,如果你想通過加載圖片的URL,那麼你應該畢加索使用或下滑,因爲它使用起來非常簡單,重量輕庫 –