<@U76E5RMQ8> have you looked at `themedRelativeLay...
# anko
s
@alberto have you looked at
themedRelativeLayout()
. Anko convention seems to be to have a themed version of all the views which takes a theme resourceID
a
Thanks Nick, what about the style? How would you implement that XML RelativeLayout?
s
You can apply styles recursively like this. https://gist.github.com/vsouhrada/f851f213c82c72b6ae8afa5184a8bdca
a
I need to be able to apply style as a reference like in my example
"?defaultStyle"
Would I be able to do it with
applyRecursively
?
s
I was just looking into that. I have not done that myself so I am not sure. applyRecursively would require you to translate your style reference into anko.
a
mm I can't do that because it's a reference based on the theme context.
I could have another Layout with a different reference for the theme and a different
?defaultStyle
style, based on that theme.
s
https://github.com/Kotlin/anko/issues/16 — it looks like the way it has been implemented it to pass it through in the
theme
in the view. e.g. themedRelativeLayout(R.style.defaultStyle)
a
In this case there is no distinction between theme or style, which I reckon is wrong...
s
Yep.
a
Too bad... Thanks for your time anyway!
s
no problem. Sorry I couldn’t help