Hi, I have noticed that all padding settings set in xml layout for FlatButton are ignored (tested on Galaxy Nexus and Galaxy Tab 3 10). It is happening because custom paddings are overriden by paddings added to background drawables ( which is (0, 0, 0, bottom)). I have solution for that (sorry that I haven't done that by pull request). At the beginning of init() method you should save FlatButton paddings and apply them when background drawable is set:
private void init(AttributeSet attrs) {
final int paddingTop = getPaddingTop();
final int paddingRight = getPaddingRight();
final int paddingLeft = getPaddingLeft();
final int paddingBottom = getPaddingBottom();
...
setBackgroundDrawable(states);
setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);
...
}
Hi, I have noticed that all padding settings set in xml layout for FlatButton are ignored (tested on Galaxy Nexus and Galaxy Tab 3 10). It is happening because custom paddings are overriden by paddings added to background drawables ( which is (0, 0, 0, bottom)). I have solution for that (sorry that I haven't done that by pull request). At the beginning of init() method you should save FlatButton paddings and apply them when background drawable is set: