Juky-App / SquircleView

SquircleView is a library which provides you with Squircle views to use for buttons, views, etc.
Other
105 stars 5 forks source link

darkmode not work on views with 48dp layout width #18

Closed mhkarami closed 1 month ago

mhkarami commented 2 years ago

i have faced a bug . background color of some of my views does not changed at nightmode. all i know that is : background color of each view with less than 72dp width (for example is 48dp) that has AppCompatImageView in itself, does not change in dark mode .

    <LinearLayout
      android:id="@+id/lyt_header"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      app:layout_constraintTop_toTopOf="parent">

      <app.juky.squircleview.views.SquircleConstraintLayout
        android:id="@+id/lyt_back"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_margin="16dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:squircle_background_gradient_end_color="@color/btn_back_gradient_end"
        app:squircle_background_gradient_start_color="@color/btn_back_gradient_start"
        app:squircle_shadow_elevation="2dp">

        <androidx.appcompat.widget.AppCompatImageView
          android:id="@+id/imgback"
          android:layout_width="match_parent" // tested with static dimon 24dp
          android:layout_height="match_parent"
          app:srcCompat="@drawable/ic_noun_play_488468_1_"
          android:background="@color/transparent"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          android:padding="12dp"
          android:elevation="0dp"
          android:tint="@color/icon_color"/>

      </app.juky.squircleview.views.SquircleConstraintLayout>
    </LinearLayout>
Nielssg commented 1 year ago

I tried to reproduce your issue using the given sample code, but I cannot get the same issue. Are you changing images when changing dark mode, or only colors?