Android 带有背景图像的自定义对话框在顶部被截断
我使用以下xml作为自定义对话框的内容Android 带有背景图像的自定义对话框在顶部被截断,android,Android,我使用以下xml作为自定义对话框的内容 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:background="@dr
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="@drawable/dialogue_base" >
.
.
.
</FrameLayout>
.
.
.
正如您所见,背景是从背景图像中提取的。当我在Galaxy手机上这么做时,一切看起来都很棒。但是当我在nexus上尝试时,对话框的顶部被切断,尽管顶部(切断对话框上方)仍有一些空间未被使用
我如何克服这个问题
多谢各位
这是一张图片
我找到了答案,尽管它毫无意义。我不得不把灯拆了 diag.requestWindowFeature(Window.FEATURE\u NO\u TITLE)
我不知道为什么删除它对nexus有效!!但是它解决了这个问题你能试试框架布局内的android:foregroundGravity=“fill”吗?Cna你可以发布截图,这样我就可以解决了……@RajeshVijayakumar,这是图片。很抱歉反应太晚。我必须找到产生这种现象的设备