cpg*_*en2 12 android android-xml kotlin
我正在使用新的 ShapeableImageView 制作圆形图像,但叠加层显示为黑色。我怎样才能使它透明?这是它的样子:
这是代码:
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/app_icon"
android:layout_width="100dp"
android:layout_height="100dp"
app:layout_constraintBottom_toTopOf="@+id/guideline2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearanceOverlay="@style/CircleImageView"
app:srcCompat="@mipmap/ic_launcher_round" />
Run Code Online (Sandbox Code Playgroud)
<style name="CircleImageView">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">50%</item>
</style>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2248 次 |
| 最近记录: |