Searching how to reduce the padding inside my buttons, I found out in https://stackoverflow.com/a/20323723/3888000 that I should set the min-height of my button to 0dp in the xml file. And yes, it works for me.
Problem is : I want to create my button programmatically, and neither setMinimumHeight(1) nor setMinHeight(1) did work. How to do it ?
By the way, what is the difference between these two methods ?
Thank you !
I think you should try using setPadding(0,0,0,0); instead and see if that works for you.
As far as minHeight vs minimumHeight goes, minHeight is the XML attribute name you can use in a layout file. setMinimumHeight is the corresponding View API method to do the same thing.