Transparent Dialog Alignment
- by feragusper
I'm trying to get a custom dialog with a transparent background doing this way:
this.getWindow().setBackgroundDrawableResource(R.drawable.transparent);
(where "R.drawable.transparent" is a reference to the color "#00000000")
The weird issue on this is that I can't align my dialog window. It's always aligned to the left, even if I implicit set the Gravity of the window using:
this.getWindow().setGravity(Gravity.CENTER);
And if I just comment the line which set the transparent background, the alignment works fine.
Any help would be much appreciated!
Thanks.