【问题标题】:black edges on shapeable imageview after corner round圆角后可成形图像视图上的黑色边缘
【发布时间】:2021-08-31 18:58:52
【问题描述】:

在可塑形图像视图上对边缘进行圆角处理后,圆角边缘周围仍然出现黑色边缘

这是我的 xml:

<com.google.android.material.imageview.ShapeableImageView
    android:id="@+id/shapeableImageView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/background"
    android:scaleType="fitXY"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:shapeAppearance="@style/article_shape" />

【问题讨论】:

  • 请添加@style/article_shape的代码?
  • 其中一位父母的背景是黑色的。
  • 这是我风格的代码

标签: android android-layout material-design material-components-android


【解决方案1】:

app:shapeAppearanceOverlay="@style/article_shape" 确实有效。当您在模拟器或设备上运行时,黑色边缘不会反射。谢谢

【讨论】:

    猜你喜欢
    • 2022-09-28
    • 1970-01-01
    • 1970-01-01
    • 2019-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多