Search code examples
androidkotlinanko

Horizontal LinearLayout in Anko


What is a good way to do a horizontalLayout in anko / kotlin ? verticalLayout works fine - could set orientation on it but it feels wrong. Not sure what I am missing there.


Solution

  • Just use a linearLayout() function instead.

    linearLayout {
        button("Some button")
        button("Another button")
    }