InputButton fix

This commit is contained in:
Milos Kozak 2022-05-19 12:55:40 +02:00
parent 73fa9f5814
commit 0835a487c0

View file

@ -16,10 +16,10 @@ class InputButton() : Element() {
override fun addToLayout(root: LinearLayout) {
root.addView(
Button(root.context).apply {
text = text
setOnClickListener { runnable?.run() }
gravity = Gravity.CENTER_HORIZONTAL
Button(root.context).also {
it.text = text
it.setOnClickListener { runnable?.run() }
it.gravity = Gravity.CENTER_HORIZONTAL
})
}
}