Reputation: 1018
I am trying to position myCustom Dialog using the below piece of code.. but somehow for the edge points the dialog is not cropping from the edges cases..I am basically trying to show dialog over a menu Item icon..
Window window = getDialog().getWindow();
WindowManager.LayoutParams params = window.getAttributes();
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
params.x = (int) x;
params.y = (int) y;
window.setAttributes(params);
The glowing circle is a dialog box ,I want to shift to over the Menu Item How do I implement corner cases??
Upvotes: 0
Views: 234
Reputation: 6657
What you want in that case is a full screen dialog, you have to add the following flags when creating the dialog:
window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
Upvotes: 1