0

I applied margins to AlertDialog successfully to one screen size but when the same code run on different screen size its appearing large because of screen size and density, how can i use inser to apply margins using dimens? because when i used dimens instead of head coded int the dimens are not fetching and just background got blured as if alert dialog appeared.

Here is the code:

ColorDrawable back = new ColorDrawable(Color.TRANSPARENT);
InsetDrawable inset = new InsetDrawable(back, R.dimens.margin);
dialog.getWindow().setBackgroundDrawable(inset);

this is not working

blackHawk
  • 6,047
  • 13
  • 57
  • 100

0 Answers0