How to use the Android view extensions? #74
-
I noticed that there is a lot of documentation around using Decompose with a declarative UI toolkit and I noticed the Android view extensions module in the project and was wondering if there was an example anywhere on how exactly to use it? If I'm understanding the code for I was also curious how one might animate between children? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I seem to have found my answer digging into the Counter example. |
Beta Was this translation helpful? Give feedback.
-
The The Counter example indeed contains Android Views sample UI and can be used as reference. With |
Beta Was this translation helpful? Give feedback.
The
extensions-android
module is indeed for working with normal Android Views, but it is really really experimental. I will annotated its as experimental to make it explicit. Decompose is primarily designed for declarative UI frameworks, so it does not have things likeonViewCreated
,viewLifecycle
, etc. And so Android Views have to be attached externally, listen for state changes and update accordingly.The Counter example indeed contains Android Views sample UI and can be used as reference. With
RouterView
you have to manually add/remove child views, and so you can use e.g.TransitionManager
for animations.