Is there a way to take a programmatically-created button (not defined in XML) and shrink it so it matches the size of its text?
Essentially I want these buttons to be much smaller:
I have tried setting minWidth and minHeight to 0, to no avail:
val btn = Button(view.context)
btn.text = getTranslationLabel(t)
btn.minWidth = 0
btn.minHeight = 0
translationsHolder.addView(btn)