Swapped rating and state fields on details screen

This commit is contained in:
Zakhar Timoshenko
2022-08-06 17:28:49 +03:00
parent 17d07f3b14
commit 7b702e98da
7 changed files with 61 additions and 58 deletions

View File

@@ -28,6 +28,13 @@ var TextView.drawableEnd: Drawable?
setCompoundDrawablesRelativeWithIntrinsicBounds(dr[0], dr[1], value, dr[3])
}
var TextView.drawableTop: Drawable?
inline get() = compoundDrawablesRelative[1]
set(value) {
val dr = compoundDrawablesRelative
setCompoundDrawablesRelativeWithIntrinsicBounds(dr[0], value, dr[2], dr[3])
}
fun TextView.setTextAndVisible(@StringRes textResId: Int) {
if (textResId == 0) {
text = null
@@ -40,4 +47,4 @@ fun TextView.setTextAndVisible(@StringRes textResId: Int) {
fun TextView.setTextColorAttr(@AttrRes attrResId: Int) {
setTextColor(context.getThemeColorStateList(attrResId))
}
}