添加后轮后如何去除白色的边角?
编辑:这是一个弹出对话框
它看起来像这样:
代码如下:
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/color_choose_dialog"
//下面是后台的代码:
`<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid
android:color="@color/md_theme_light_onPrimary" />
<corners
android:radius="30dp" />
<padding
android:left="20dp"
android:top="20dp"
android:right="20dp"
android:bottom="20dp" />
</shape>
谢谢你的帮助!!!
3条答案
按热度按时间jdg4fx2g1#
zf9nrax12#
我认为您需要使用卡片,而不是使用ConstraintLayout,并使用
app:cardCornerRadius="20dp"
我想这会解决你的问题
snz8szmq3#
尝试将背景颜色从白色更改为透明。角的白色将不可见。