So I still donโt know if there is an โofficialโ way to do this, but in the end I did the following:
if (!isLollipopAndAbove()) { RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) tab.getLayoutParams(); params.setMargins(0, 0, 0, 0); tab.setLayoutParams(params); }
oh and yes, it was a non-supplemented field that needed to be changed
source share