Open thekalinga opened 7 years ago
Yes, it would be excellent.
Along with visibility state, we should identify additional common views/components whose state we would want to be restore out of the box such as LinearLayoutManager
, e.t.c.
Why does anyone needs to pollute code with most basic things when its apt
can do this much better
@frankiesardo Any views on this?
FYI: I'm not comfortable clojure, else, I would have submitted a pull request :(
Currently if there are views whose visibility changes at runtime, we have to explicitly add member variables that represent the visibility status for each view.
This is tedious & error prone.
It would be much better if we add a new annotation
@VisibilityState
that can auto save the visibility status of a view.The annotation processor can add a new variable (whose name can be derived from the name of the variable, for eg.,
mycustomViewRef$$visibility
) in the bundle duringsaveInstanceState
& auto apply the visibility status onrestoreInstanceState
Here is an example