I wanna increase the width of my popup menu, when i click on menu button it open in the corner and small in size, I want to increase its size from small to the both ends.
here is my code of popup menu,
ivmainmenu.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
PopupMenu popup = new PopupMenu(Home.this,ivmainmenu);
popup.getMenuInflater().inflate(R.menu.popupmenu,popup.getMenu());
popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
// TODO Auto-generated method stub
switch (item.getItemId()) {
case R.id.ourwork:
Intent intent = new Intent(Home.this,Ourwork.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
break;
case R.id.aboutus:
Intent intent2= new Intent(Home.this,Aboutus.class);
startActivity(intent2);
break;
case R.id.services:
Intent intent3= new Intent(Home.this,Services.class);
startActivity(intent3);
break;
case R.id.contact:
Intent intent4= new Intent(Home.this,Contact.class);
startActivity(intent4);
break;
}
return true;
}
});
popup.show();
}
});
this is my way it looks,
I want it in the full widht and below the alfadesign logo, can it possible?
please help me regarding these, thank you.