79538108

Date: 2025-03-27 07:31:40
Score: 0.5
Natty:
Report link

Maybe this approach is not the best practice and is only a temporary solution, but it's worth trying. In my case, the background is a transparent gradient, and the border is also a gradient, so I can't use the usual solution of replicating the background color.

Instead of creating a complex layer list, I used an SVG from the UI design (Figma) as the background and simply attached it to the background properties.
enter image description here

<androidx.constraintlayout.widget.ConstraintLayout
    android:id="@+id/containerAproProgress"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginHorizontal="@dimen/space_16"
    android:layout_marginTop="@dimen/space_24"
    android:background="@drawable/box_apro_account"
    android:padding="@dimen/space_16"
    app:layout_constraintTop_toBottomOf="@+id/container_business_profile">

and heres the result

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Godofsleepy