I have an Android project that uses gridlayout (com.android.support:gridlayout-v7:22.1.0). I create the gridLayout in java code, and I need to set a padding to it. I use:
int padding = MetricUtil.dipToPixels(getContext(), 20);
setPadding(padding, padding, padding, padding);
This works on Android 5, but not in Android 4 devices. I've created a xml layout, with the gridLayout and padding and works on both 5 & 4 devices.
Anyone has faced this problem? Is this a bug?
Thanks
Aucun commentaire:
Enregistrer un commentaire