我有一张图片,我目前正在将它设置在 imageview 上。
我希望当单击 Imageview 时,应该出现一个像对话框一样的弹出窗口,显示图像..任何方法我怎么能做到这一点。
Context mContext = getApplicationContext();
Dialog dialog = new Dialog(mContext);
dialog.setContentView(R.layout.customdialog);
dialog.setTitle("wateva");
ImageView ivDialog = (ImageView) dialog.findViewById(R.id.ivDialog);
String filepath = Environment.getExternalStorageDirectory().getPath();
folder = new File(filepath,"checking");
File fa = new File(folder,"bmp1.png");
Bitmap bmpa = BitmapFactory.decodeFile(fa.getAbsolutePath());
Log.d("error " , "here");
ivDialog.setImageBitmap(bmpa);
dialog.show();