macroid
                                
                                 macroid copied to clipboard
                                
                                    macroid copied to clipboard
                            
                            
                            
                        enhancement: Make implicit layout available to child views
Might get a bit crazy/unmanageable with multiple layers of nesting, but it would be great for type-checking on things like LayoutParams, to have an implicit layout available.
What would be the syntax? Something like this?
l[LinearLayout](
  implicit l ⇒ w[Button] <~ lp(...),
  implicit l ⇒ w[TextView] <~ lp(...)
)
Also see this comment for an alternative idea.
l[LinearLayout]( implicit layout =>
  w[Button] <~ margin(all = 10 dp)
)
So this is the same as in my first comment, right?
Simliar, but maybe even just a signature like
def l[L <: ViewGroup](op: L => Seq[Ui[View]])
Then you’ll have to wrap your views into a Seq — I don’t think it will look very nice :(
Agreed, but for things like margin, there isn't a much cleaner way is there? Overloading it at least make it an option.
I see your point — will have to think about this. Feel free to make a PR with a solution of your own :)
Sounds good. Will do!