我试图在对话框片段的顶部显示配置文件图片,其中一半是在image.and之外的,我在下面附加了示例对话框,就像那样。并尝试了所有来自旧的Stackoverflow解决方案的FrameLayout协作,但是我无法将其归档。请给我正确的解决方案。谢谢。如何在android中的对话框外显示图像?
更新 我还试图使透明的ImageView的父布局,但之后对话框显示不工作英寸我附上我的xml和下面的结果屏幕截图。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment_item"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/imageshow"
android:layout_width="match_parent"
android:layout_height="100dp">
<View
android:id="@+id/imagePadding"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/transparent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/imagePadding"
android:background="#ff0000"></LinearLayout>
<ImageView
android:id="@+id/info_profile"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerHorizontal="true"
android:src="@drawable/technician_pitcher" />
</RelativeLayout>
内进行对话BG透明。然后按你想要的那样画出它。 –
发布您的XML布局文件的对话框 –
透明的背景也我试过它不工作。请找出我最新的问题。 –