Есть ли какой-либо способ, которым мы можем оттенять Drawable
, используемый в TextView
? DrawableTint
работает только на уровне API 23 и выше.Android TextView DrawableTint на устройствах pre v23
В настоящее время я использую Vertical Linear Layout
для выполнения моих требований.
<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 студия предлагая мне использовать Compound Drawble
с TextView
для достижения этой цели. И я могу добиться этого, но я не могу найти способ сделать Tint
доступным.
<TextView
style="@style/ChoiceIllustratorTextStyle"
android:drawablePadding="4dp"
android:drawableTop="@drawable/ic_account_balance_white_24dp"
android:text="@string/ci_text_university" />
Может это поможет: http://stackoverflow.com/questions/29155463/drawable-tinting-for-api-21 – Gudin
Я проверил, что, для моего случая это не полезно. Спасибо –