public class ShowPhotoActivity extends Activity { @Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_show_photo);
ImageView imgphoto = (ImageView) findViewById(R.id.imgviewphoto);
Bundle bundle = getIntent().getExtras();
String fileName = bundle.getString("fileName");
String s = fileName.replace(" ", "");
Log.i("test", "预览地址" + s);
// BitmapFactory.Options options = new BitmapFactory.Options();
// options.inSampleSize = 2;
Bitmap bm = BitmapFactory.decodeFile(s);
imgphoto.setImageBitmap(bm);
}}android手机图片imageview
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_show_photo);
ImageView imgphoto = (ImageView) findViewById(R.id.imgviewphoto);
Bundle bundle = getIntent().getExtras();
String fileName = bundle.getString("fileName");
String s = fileName.replace(" ", "");
Log.i("test", "预览地址" + s);
// BitmapFactory.Options options = new BitmapFactory.Options();
// options.inSampleSize = 2;
Bitmap bm = BitmapFactory.decodeFile(s);
imgphoto.setImageBitmap(bm);
}}android手机图片imageview
解决方案 »
- 在PopupWindow中使用EditText.setError()报错
- 新手求教jquery mobile+phonegap中文乱码
- 请大家进来看看,十分重要,音频合并,多谢!!!
- 新手求助,更新内核无法挂载flash
- android怎么实现调用其他应用?
- android assets文件夹下的资源操作
- 求OGG格式的播放代码片段
- android 下操作数据库
- 【急!】android 传递不了参数给webservice有问题?
- 新手的一个问题
- Activity读取的XML内,控件太多导致超出屏幕长度范围,显示出错,求解决方法~
- 在两个Activity之间传递ArrayList对象的问题,调二天了
然后在看看ImageView在Layout中的位置,是否显示到了屏幕外面,当然这种可能性比较小。
去掉file://