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

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -