android - XML 中的 SimpleDraweeView 圆角

标签 android fresco

我正在尝试使用 Fresco 库对图像的特定角进行圆角处理。

如图所示,如何将图像的左下角圆化。

enter image description here

这是 xml:

<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/cardview"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_marginBottom="4.0dp"
android:layout_marginLeft="8.0dp"
android:layout_marginRight="8.0dp"
android:layout_marginTop="4.0dp"
card_view:cardCornerRadius="5dp"
card_view:cardPreventCornerOverlap="false"
>

<com.facebook.drawee.view.SimpleDraweeView xmlns:fresco="http://schemas.android.com/apk/res-auto"
    android:id="@+id/image1"
    android:layout_width="145dp"
    android:layout_height="180dp"
    fresco:placeholderImage="@color/pink"
    fresco:roundedCornerRadius="5dp"
    fresco:roundBottomRight="false"
    fresco:roundTopRight="false"
    fresco:roundBottomLeft="true"/>

</android.support.v7.widget.CardView>

最佳答案

如果您的父布局中有 xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:fresco="http://schemas.android.com/tools" 使用

app:roundedCornerRadius="5dp"

代替

fresco:roundedCornerRadius="5dp"

关于android - XML 中的 SimpleDraweeView 圆角,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36787426/

相关文章:

java - 我想在android中创建一个服务但我的服务没有运行?

Android 当前日期和时间

android - FrescoImageViewer给出未经授权的错误

android - instagram android 是如何实现导航的?

android - 任务 ':compileDebugJavaWithJavac' 的 Apache Cordova 执行失败

android - 关于错误 : UNEXPECTED TOP-LEVEL EXCEPTION in android

android - 任务的Gradle执行失败

Android 5.0 不支持 BitmapFactory.Options inPurgeable

android - 使用 Fresco 时如何将图像保存到 SD 卡?

android - 使用 Retaining Data Source Supplier 播放动画图像