Is there any way we can tint the Drawable
used in the TextView
? DrawableTint
works only on API level 23 and above.
Currently I'm using a Vertical Linear Layout
to achieve my requirement.
<LinearLayout style="@style/ChoiceIllustratorIconTextContainerStyle">
<ImageView
style="@style/ChoiceIllustratorImageStyle"
android:contentDescription="@string/cd_university"
android:src="@drawable/ic_account_balance_white_24dp" />
<TextView
style="@style/ChoiceIllustratorTextStyle"
android:text="@string/ci_text_university" />
</LinearLayout>
Android studio is suggesting me to use Compound Drawble
with TextView
to achieve this. And I'm able to achieve it, but I cannot find a way to Tint
the drawable.
<TextView
style="@style/ChoiceIllustratorTextStyle"
android:drawablePadding="4dp"
android:drawableTop="@drawable/ic_account_balance_white_24dp"
android:text="@string/ci_text_university" />