android - popup window instead of popup menu -


I want to show the popup window in my application on the click of the image The problem is that I do not want to show it according to my height and width , which comes,

this is my code,

  ivmainmenu.setOnClickListener (new OnClickListener () {@Override public void onClick (View v) {// TODO auto-generated method stub LayoutInflater layoutInflater = (LayoutInflater) getBaseContext () .getSystemService (LAYOUT_INFLATER_SERVICE); View popupView = layoutInflater .inflate (R.layout.popupwindow, null), last PopupWindow popupWindow = new PopupWindow (); popupWindow.showAsDropDown (ivmainmenu, 50, -30);}});   

Here is my XML file, this XML I want to show in my application,

    

Please help me, thank you.

insted of popupWindow .showAsDropDown (ivmainmenu, 50, -30); popupWindow.setHeight (200); Popup Window.setWidth (400);

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -