ShapeableImageView的笔触被边框切割
我这里有一个 ShapeableImageView,笔画为 5dp:
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/profile_picture"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginTop="20dp"
android:scaleType="centerCrop"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/profile_toolbar"
app:shapeAppearanceOverlay="@style/circular"
app:strokeColor="@color/dark_blue"
app:strokeWidth="5dp" />
这是结果:
回答
我一直在尝试一些东西,最后,在视图中添加一个填充解决了这个问题