SyntaxFix
Write A Post
Hire A Developer
Questions
Use RelativeLayout, place your view in it, get RelativeLayout.LayoutParams object from your view and set margins as you need. Then call requestLayout() on your view. This is the only way I know.
RelativeLayout
RelativeLayout.LayoutParams
requestLayout()