2011-12-30 9 views

答えて

1

はこのお試しください:それは/ mntに含まれている場合だけをチェック

ImageView.setImageUri(Uri.parse(new File("/sdcard/cats.jpg").toString())); 

または

ImageView.setImageUri(Uri.fromFile(new File("/sdcard/cats.jpg"))); 

を:

if(test.contains("/mount")){ 
test.replace("/mount",""); 
} 
1

使用この

mImageview.setImageURI(Uri.parse(new File("/sdcard/photo.jpg").toString())); 
1
try this, 
Bitmap imageBitmap = BitmapFactory.decodeFile(yourpath); 
      BitmapDrawable imageDrawable = new BitmapDrawable(imageBitmap); 

yourImageView.setBackgroundDrawable(imageDrawable); 
+0

文字列のパス= Environment.getExternalStorageDirectory()getAbsolutePath()+ "/" + yourString。 –

1

あなたは、任意のパスから画像を設定するsetImageURI()ImageViewの方法を使用することができ

imageView.setImageURI(Uri.parse("/sdcard/images5.jpg")); 
関連する問題