Using Kotlin to bind Android views
Let’s build a concise and user-friendly view binding solution
Published in
5 min readJan 30, 2019
Remastered on 1 Sept 2019
When working in the UI layer of an Android app, it won’t be long before we need to perform an operation upon one of our views. In order to do this, we first need to retrieve it via findViewById
. Although using the API can seem simple, it does introduce a block of boilerplate to our Activities. On top of this the code to bind all the views usually ends up in onCreate
, completely separate from the view properties…