I an trying to display a PopWindow(whose height is to WRAP_CONTENT),which has a ListView inside it.If the content of list is more then popup window is not displayed at the exact position.
created Popup window:
mPopUp = new PopupWindow(mLayOut,popUpWidth ,
WindowManager.LayoutParams.WRAP_CONTENT, true);
show at Location:
mPopUp.showAtLocation(mLayOut, Gravity.NO_GRAVITY, xPos, yPos);
I have attached the screenshots
i)When Button One is clicked it works fine
ii) when button two is selected,Y position got changed to the top of the screen