Closed stanch closed 11 years ago
There is a first draft here: https://github.com/stanch/macroid/commit/5dd2ada38cbb91dcfbd71638ba87a54ee94efe85#L1R58
Apparently, zipper is not that useful for mutable structures, and layout manipulation without mutation is hardly doable, since widgets carry too much state to copy them around.
Current implementation is based on depth-first tree traversal and side-effecting (mutating) partial functions, e.g.
layout ~~> {
case t: TextView ⇒ t ~> text("Hijacked!")
case _ ⇒ ()
}
There is a Layout
extractor, that lets one write code like this:
layout ~~> {
case Layout(b: Button, t: TextView, otherChildren @ _*) ⇒ ...
}
So far no doubts, thus closing the issue.
In the spirit of
And of course with mq #3 integration.
Requires delaying
addView
calls on layouts.