我为自定义对话框进行了布局,它内部有两个图像视图。我想在出现对话框时显示两个Imageview。并且我想隐藏我使用“#00000000”作为背景的xml文件的主布局:color,但它不起作用。 有没有办法做同样的事情?隐藏自定义对话框的主布局
谢谢。
这是我的布局。我已经拍摄了屏幕快照,请看看我想隐藏图片中显示的边框。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent" android:layout_width="fill_parent"
android:orientation="vertical" android:background="#00000000">
<LinearLayout android:id="@+id/linearLayout1"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
<ImageView android:id="@+id/img_closeimage" android:src="@drawable/product_zoom_close"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:clickable="true"></ImageView>
</LinearLayout>
<LinearLayout android:id="@+id/linearLayout2"
android:layout_marginLeft="25dip" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginTop="-5dip" android:layout_marginBottom="20dip" android:layout_marginRight="20dip">
<ImageView android:id="@+id/img_ProductZoom" android:src="@drawable/index"
android:layout_width="wrap_content" android:layout_height="wrap_content"
></ImageView>
</LinearLayout>
</LinearLayout>
您的自定义布局看起来很奇怪;为什么在主Linearlayout中有两个嵌入的LinearLayout(即使使用相同的id @ @ id/linearLayout1!!),每个都带有一个ImageView,如果您只需要一个ImageView用于该对话框? – Adinia