This repository has been archived by the owner on Nov 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 565
TextView.setCompoundDrawable... with default arguments #147
Comments
Name won't work. Extensions cannot override members. |
True, thanks. So replace |
Yeah. And that's unfortunate. We should do non-relative too.
PRs welcome.
…On Mon, Feb 5, 2018 at 5:34 PM Tomasz Rykała ***@***.***> wrote:
True, thanks. So replace set with update, eg. fun
TextView.updateCompoundDrawablesRelative(...) ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#147 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEXrZJpv__FV90srSiasjiRYV7gm3ks5tR4H1gaJpZM4R6L2x>
.
|
Will do, thanks. |
The compound drawables extensions could be "var" extensions like this? var TextView.drawableTop: Drawable?
get() = compoundDrawables[1]
set(value) {
setCompoundDrawables(
compoundDrawables[0],
value,
compoundDrawables[2],
compoundDrawables[3]
)
} Thanks |
@fredy-mederos That's |
@tomaszrykala
It's not as fast and pretty, probably not a great candidate for inlining. And do that for all the intrinsic and non-intrinsic and relative and absolute variants, of course. |
4 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
eg.
The text was updated successfully, but these errors were encountered: