You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@FunnyDevs it is possible to extend Anvil with custom views, although maybe not like with Anko.
You can always build "components", self-contained ViewGroups (extended from RenderableView).
You can always mounts custom views into existing renderables, like v(MyCustomView.class, () -> {...}).
You can now create your own Anvil.ViewFactory implementations, register them, and then use them to build custom classes on demand (e.g. if you class constructor is now just View(Context), but something more complex, like using styles etc.
Starting with Anvil 0.5.0 (just released it today) you may set custom attributes as well, just do attr("myAttr", someValue) and that will call setMyAttr(someValue) on your view if fthe value has been changed since the last call. In the worst case that will use reflection, but you may also register your own Anvil.AttributeSetter to handle your custom attributes and speed up things.
i would like to do like Anko that maps custom function (like toast(), dialog()), but with custom view:
customview()
Must i do a custom Anvil.ViewFactory???
Is possibile a tutorial to extend Anvil with custom views (like Anko)???
The text was updated successfully, but these errors were encountered: