unceple57we
New Member
I am trying to make a pop up take on the exact size of a view in my layout. The views is called featuredpanel, and it's size is created using weights within another xml file so I don't know the exact width or height before the code compiles. Below you can see the popup called logoutoption created and placed directly on top of the featuredpanel. I have tried \[code\]logoutoption.setHeight(featuredpanel.getHeight());\[/code\] but some reason no changes take effect.\[code\]private void getLogoutOption() { LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE); View popupView = layoutInflater.inflate(R.layout.logoutoption, null); final PopupWindow logoutoption = new PopupWindow(popupView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); logoutoption.showAsDropDown(featuredpanel, featuredpanel.getWidth()*-1, featuredpanel.getHeight()*-1); }\[/code\]