Window window = screenDialog.getWindow();
WindowManager.LayoutParams wlp = window.getAttributes();
wlp.gravity = Gravity.CENTER_HORIZONTAL;
but it is not setting.
At the risk of this being a silly question... you *are* calling
setAttributes(wlp) afterwards, yes? {:v)
*Allegedly*
(https://groups.google.com/forum/?fromgroups#!topic/android-developers/8uZYE0C4uZY)
setting the .x and .y members of wlp both to 0 centres the dialog as well.
Worth trying to set .x to 0 if you only want horizontal centring.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en