addisonElliott / SegmentedButton

Segmented Control/Button with animation for Android API 16+
Apache License 2.0
148 stars 39 forks source link

Fix drawable caching #51

Open FirstSpectr opened 3 years ago

FirstSpectr commented 3 years ago

Fix for this issue: ` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/black" android:orientation="horizontal">

<com.addisonelliott.segmentedbutton.SegmentedButton
    android:layout_width="0dp"
    android:layout_height="40dp"
    android:layout_weight="1"
    app:drawable="@drawable/some_white_icon"
    app:selectedDrawableTint="#F00" />

<ImageView
    android:id="@+id/iv1"
    android:layout_width="0dp"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:src="@drawable/some_white_icon" />

` Now our ImageView drawable have red tint