Android/Kotlin: A FloatingActionButton setOnClickListener Snackbar example

As a quick note to self, this is an example of how to implement a setOnClickListener on a FloatingActionButton with Android and Kotlin:

fab.setOnClickListener { view ->
        "An exciting message!",
    ).setAction("Action", null).show()

Hopefully that’s enough to get “future me” pointed in the right direction when I need this again. :)

(There are more lambda details at this link.)