/AnkoPlayground

example using kotlin and anko

Primary LanguageKotlin

Simple experiment with the Anko DSL

Contains a DrawerLayout with a RecyclerView inside a CoordinatorLayout

Contains 3 activities:
    * MainActivity: layout created with Anko DSL
    * MainActivity2: layout inflated from XML using Anko
    * MainActivity3: layout inflated from XML the normal way
    * MainActivity4: databinding layout

Thoughts:
    While the Anko DSL looks really cool and make declaring layouts more fun than xml,
    android is /very/ averse to creating layouts programmatically.

    The prime example in this project is the DrawerLayout which will not apply fitsSystemWindows
    when set programmatically through the DSL

    Other views (textView) has much of its logic in the ctor and is very tedious to setup
    programmatically and Anko does not (at the time of writing) support applying xml styles
    to views