How can I get the margin value of a View from an Activity? The View can be of any type.
After a bit of searching I found out ways to get padding of a view, but couldn\'
now use this edited code. this will help you
FrameLayout.LayoutParams lp=(FrameLayout.LayoutParams)mainLayout.getLayoutParams(); lp.leftMargin // for left margin lp.rightMargin // for right margin