I have a dialog with a custom theme:
final Dialog d = new Dialog(this,android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);
This makes my background dialogue transparent.
Now the problem is that if I solve the normal theme (style.dialog), it will be centered on my screen, but now it has no layout and is in the upper left corner of the screen. Is there a way to programmatically center the dialogue?
source share