Uri发起图片和一个网址

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

2.String url = "http://almondmendoza.com/android-applications/"; 
Intent i = new Intent(Intent.ACTION_VIEW); 
i
.setData(Uri.parse(url)); 
startActivity
(i); 

你可能感兴趣的:(android)