Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Sindre Tellevik
    @graknol
    yes it works when you dont wrap it (ofc it's why we added it, I'm just stupid)
    but I'm still trying to do this, and I'm confident (sorta :P)
    well that was easy...
    Sindre Tellevik
    @graknol
    Anko has it simpler, since they have the whole View tree
    but unless we somehow rewrite the core of Anvil to better support types and context objects, rather than pure functions, I hardly believe we can do anything better like you said :(
    So, I've decided, that until something gets done in that department, I'm not providing any layoutParams functions
    oh yeah, I forgot that there's that functional this@xxx.layoutParams witchery, that'll stay ;)
    Lalit Maganti
    @tilal6991
    Although it is your library so it's your call I totally disagree with leaving things how they are.
    Also I had another idea.
    Sindre Tellevik
    @graknol
    Yeah, it's not a plan to have them like taht
    but I'm starting to write "Anvil 2" or somethng
    let me hear it
    Lalit Maganti
    @tilal6991
    How about we store the parent view object inside anvilkotlin and when layout Paramus is called on the child we call the function inside the stored class?
    Although no type safety actually.
    Damn it.
    Sindre Tellevik
    @graknol
    I tried that, but then the children need the generics passed
    yeah :/
    we think alike though ;)
    Lalit Maganti
    @tilal6991
    Right a more kotlinesque version of anvil may be in order.
    Sindre Tellevik
    @graknol
    yeah
    I'll create a repo and a gitter room, then we can discuss how to write it if you want to be in on it :)
    name looked fancy, sooo... :P
    Sindre Tellevik
    @graknol
    aaronpoweruser
    @aaronpoweruser
    Is there a wa to set layout_scrollFlags on a CollapsingToolbarLayout in current anvil
    Sindre Tellevik
    @graknol
    are you using the kotlin or java version?
    aaronpoweruser
    @aaronpoweruser
    Java, but I can switch if needed
    Sindre Tellevik
    @graknol
    nono that's not needed
    lparams = (CollapsingToolbarLayout.LayoutParams) Anvil.currentView<View>().getLayoutParams()
    then set scrollFlags
    and call DSL.layoutParams(lparams)
    all of this must happen inside view() and your child view you're doing this on
    aaronpoweruser
    @aaronpoweruser
    thanks
    Sindre Tellevik
    @graknol
    np :)
    Sindre Tellevik
    @graknol
    Could someone point out what would potentially be wrong with this implementation? https://gist.github.com/graknol/e4608a6e3fa60189908126c7fcc7bc7f
    Sindre Tellevik
    @graknol
    dammit it would have been so nice, but inheritance kills it, children can't inherit from both the Android class and this one :/
    Sindre Tellevik
    @graknol
    @tilal6991 @brianegan What do you think about this approach? https://github.com/graknol/AnvilCore
    This way, one's not stuck with a single library, but can choose which DSL library one would like to use (or not DSL at all)
    Lalit Maganti
    @tilal6991
    Hmmmmm
    Sindre Tellevik
    @graknol
    Ofc, I will solve the nesting problem though
    Lalit Maganti
    @tilal6991
    Right now feels quite unwieldy to Mr.
    *me
    The idea of wrapping properties feels too much like android databinding.
    Which I really did not like doing.
    I moved to anvil specifically to get away from that.
    And at that point you might as well us android databinding.
    *use
    Sindre Tellevik
    @graknol
    hmm true :/
    Serge Zaitsev
    @zserge
    http://blog.jetbrains.com/kotlin/2016/05/gradle-meets-kotlin/ - I'm not sure if this means that DSL generator can now be rewritten in Kotlin, but that would be a nice improvement