I am currently doing an android application that contains customize alert dialog. It contains a button , but i can\'t set the margin for the button . the code is given belo
The setMargin() method is available if you're using LinearLayout.LayoutParams but not if you're using ViewGroup.LayoutParams. Dipak Keshariya alludes to this but doesn't say it in so many words.