我自定义的dialog,边上的黑色部分怎么去掉

对话框的布局(部分省略)<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"... 对话框的布局(部分省略)
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="@drawable/dialogshape" >
<ImageView。。。 />
<TextView。。。 />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/content_alarmclock"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:orientation="horizontal" >
<Button。。。/>
<TextView。。。 />
<Button。。。 />
</LinearLayout>
</RelativeLayout>

对话框样式
<style name="alarm_alert" parent="android:Theme.Dialog">
<item name="android:windowBackground">@android:color/transparent</item>
</style>
展开
 我来答
董俊锟djk
2014-04-21 · TA获得超过2550个赞
知道小有建树答主
回答量:1231
采纳率:66%
帮助的人:1000万
展开全部
不用dialog,使用activity,将activity设置成窗口样式,可以实现你的想法,我也尝试过用对话框遇到你上面的情况,我是这么解决的
百度网友84ef749b56
2014-04-21 · TA获得超过291个赞
知道小有建树答主
回答量:204
采纳率:0%
帮助的人:202万
展开全部
继承的是AlertDialog? 可以考虑直接用Dialog,将你的布局用setContentView设置进去看看。
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式