Vincent
Vincent

Reputation: 6188

Add margin to Button in activity

There's a setPadding(left, top, right, bottom) but is there a way to dynamically add a margin value to a button in android?

Upvotes: 0

Views: 664

Answers (1)

chris
chris

Reputation: 1184

I think this is answered here Set margins in a LinearLayout programmatically

It uses layoutParams and layoutParams.setMargins

Upvotes: 2

Related Questions