簡體   English   中英

Android CardView/FloatingActionButton 透明色顯示不正確

[英]Android CardView/FloatingActionButton transparent color not show properly

我是android工作室的新人。
我在旁邊創建了一個應用程序,我使用 20% 的透明顏色,例如#C8FF8066正常顏色是#FF8066

在卡片視圖和浮動按鈕中顯示在側面菱形陰影中?

  • 正常顏色工作正常但 20% 透明顏色不工作

在此處輸入圖像描述

<com.google.android.material.floatingactionbutton.FloatingActionButton
    android:id="@+id/createBtnFloating"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentEnd="true"
    android:layout_alignParentBottom="true"
    android:backgroundTint="@color/AppColor"
    android:src="@drawable/plus"
    android:layout_marginBottom="20dp"
    android:layout_marginEnd="20dp"
    android:transitionName="CreateNewNote"
    app:borderWidth="0dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:tint="@color/colorWhite"
    tools:ignore="ContentDescription" />

您可以嘗試添加此屬性:

app:elevation="0dp"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM