I am creating a TextView with a drawable underneath, in a GridLayout.
I want to bring the drawable to the middle of the TextView
In XML:
android:drawablePadding = paddingValue
or
Programmatically:
TextView txt;
txt.setCompoundDrawablePadding(paddingValue)
android:drawablePadding is the easiest way to give padding to the drawable icon but you can not give specific one side padding like paddingRight or paddingLeft of the drawable icon. This gives padding to either side of the drawable.