I'm such new in Android and I would like to setPadding programmatically for a TableRow, I can have in my layout :
<TableRow
android:padding="15dp" >
It looks that the Margin can be setted programmatically by setMargin however it looks that programmatically the TableRow object doesn't have a setPadding Method... Is there any method to set a padding to a tableRow programmatically ??
Thank you.
The TableRow class, as with all View subclasses, indeed has a setPadding method.
However, since you mention that you found setMargin, I believe you are looking at the TableRow.LayoutParams instead of the TableRow itself.
Margins are set in a View's LayoutParams, whereas padding is set on the View.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With