I want to increase the width of my popup menu, when I click on the menu button that it opens in the corner and small size, I want to increase its size from small to both ends.
here is my popup menu code,
ivmainmenu.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
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) {
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 that looks

I want it to be in full form and under the alfadesign logo, is this possible?
please help me with this, thanks.
source
share