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
{{ message }}
This repository has been archived by the owner on Jul 13, 2020. It is now read-only.
I'm new to anko and I like the idea to write layouts without XML.
So right now I'm trying to build my XML layouts with anko. At this moment the MapView, but it will not work. I got no error, but I also do not see the map. Reading the wiki didn't help me eather to get a solution.
This is my current code:
From https://github.com/Kotlin/anko/wiki/Anko-Layouts, you need to add this extension function to your code: inline fun ViewManager.mapView(init: MapView.() -> Unit = {}): MapView { return ankoView({ MapView(it) }, theme = 0, init = init) }
You should be then be able to add a mapView in the DSL: frameLayout { val myMapView = mapView().lparams(width = matchParent) }
Call myMapView.MapAsync() somewhere after the above.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello.
I'm new to anko and I like the idea to write layouts without XML.
So right now I'm trying to build my XML layouts with anko. At this moment the MapView, but it will not work. I got no error, but I also do not see the map. Reading the wiki didn't help me eather to get a solution.
This is my current code:
What am I doing wrong?
It would be very nice, if someone with more expirience then me could give me a hint, how to create a MapView with anko.
Thanks!
The text was updated successfully, but these errors were encountered: