如何在Android中单击缩略图后显示全尺寸图像?

如何在Android中单击缩略图后显示全尺寸图像?,android,Android,我有一个缩略图,当用户单击该图像时, 它将弹出(窗口或对话框??)以显示大图像。 背景应该是透明的(窗口或对话框)。 是否有任何教程???使用背景色透明的对话框,没有标题主题,自定义布局只有一个图像视图是的,您可以将全屏对话框设置为如下所示显示图像 final Dialog nagDialog = new Dialog(backgroundsActivity.this,android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);

我有一个缩略图,当用户单击该图像时,
它将弹出(窗口或对话框??)以显示大图像。
背景应该是透明的(窗口或对话框)。

是否有任何教程???

使用背景色透明的对话框,没有标题主题,自定义布局只有一个图像视图

是的,您可以将全屏对话框设置为如下所示显示图像

final Dialog nagDialog = new Dialog(backgroundsActivity.this,android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);
            nagDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); 
            nagDialog.setCancelable(false);
            nagDialog.setContentView(R.layout.preview_image);
            Button btnClose = (Button)nagDialog.findViewById(R.id.btnIvClose);
            ImageView ivPreview = (ImageView)nagDialog.findViewById(R.id.iv_preview_image);
            ivPreview.setBackgroundDrawable(dd);

            btnClose.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View arg0) {

                    nagDialog.dismiss();
                }
            });
            nagDialog.show();
其中preview\u image是xml,仅包含ImageView和close按钮。

这里是用于全屏显示图像的xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <ImageView android:layout_width="fill_parent"
        android:layout_height="fill_parent" android:id="@+id/iv_preview_image" />


    <Button android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:background="@drawable/close"
        android:id="@+id/btnIvClose" android:layout_alignParentRight="true"
        android:layout_alignParentTop="true" />

</RelativeLayout>


这里的
dd
是什么?dd是可绘制的对象。