我要在Android中创建一个具有圆形形状的提醒对话框。 我遵循这个网站的许多线程。创建shape.xml,并把它绘制资源Android:将圆形形状应用于线性布局
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="5dp" android:color="#FF0000" />
<corners android:bottomRightRadius="20dp" android:bottomLeftRadius="20dp"
android:topLeftRadius="20dp" android:topRightRadius="20dp"/> <solid android:color="#FFFF00"/>
和上面的形状适用于LinearLayout中。 layout.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/transparent" >
<LinearLayout android:layout_width="200dip"
android:layout_height="60dip"
android:orientation="vertical"
android:background="@drawable/shape">
</LinearLayout>
不过,目前仍然有对话框外的矩形边框和背面的颜色。这不是我想要的。 我有很长一段时间的搜索,我不知道如何解决它。 我的目标是让它在对话框布局的角落之外透明。非常感谢!
屏幕截图:http://postimg.org/image/3xbnmquyt/
你能张贴那张图吗? –
就像[http://openclipart.org/people/rg1024/rg1024_set_of_eight_rounded_shapes.svg](this)中间一个的左边。谢谢。 – dsafajw