Add margin to Button in activity
There's a setPadding(left, top, right, bottom) but is there a way to dynamica开发者_运维问答lly add a margin value to a button in android?
I think this is answered here Set margins in a LinearLayout programmatically
It uses layoutParams
and layoutParams.setMargins
精彩评论