ConstraintLayout project adds support for ConstraintLayout layout and other helper layouts available with ConstraintLayout.
To install the plugin use:
cordova plugin add https://github.com/AsheraCordova/ConstraintLayout.git
https://asheracordova.github.io/doc/androidx/constraintlayout/widget/package-summary.html
https://asheracordova.github.io/doc/help-doc.html
https://github.com/AsheraCordova/playground
See examples on https://asheracordova.github.io/playground/index.html.
Important Links:
https://developer.android.com/develop/ui/views/animations/motionlayout https://developer.android.com/develop/ui/views/animations/motionlayout/examples
Motion scene in android is loaded as native resource file rather than using a html parser. Hence the ids should use android native id. To workaround the same, any element used in motionscene and motionlayout should have id prefixed with n__.
@+id+/n__button @id+/n__button
Note: If the id is used only in motionlayout or motionscene, then n__ prefix is not needed.
KeyTrigger in motionlayout internally uses reflection in android. As reflection is not supported in browser and ios platform, state methods are provided to replace them on the view.
Method | Description |
---|---|
state[0-3] | Method to be used when the number of states are greater than 2 |
state[Yes/No] | Method to be used when the number of states is 2. hide and show methods are provided which triggers visibility change. |