android studio set padding programmatically code example
Example: android view set padding programmatically
myView.setPadding(left, top, right, bottom);
/* The params are int values (pixel).
If you want to use a different measure (i.e. dips), you have to
convert these values first! */