我有一个ImageView,我想用它rounded corners.
我用这个:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@null"/>
<stroke android:width="1dp"
android:color="#ff000000"/>
<corners android:radius="62px"/>
</shape>
Run Code Online (Sandbox Code Playgroud)
并将此代码设置为我的imageview的背景.它可以工作,但我放在它上面的src图像ImageView是走出边界而不适应新的形状.
我该如何解决这个问题?