I'm going on with my contacts list for that I need a popup menu should appear to get contacts I got the popup menu and options with the help of below code:
PopupMenu popup = new PopupMenu(SettingsPage.this, dropdown);
// Inflating the Popup using xml file
popup.getMenuInflater().inflate(R.menu.contactmenu, popup.getMenu());
// registering popup with OnMenuItemClickListener
popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case R.id.contacts:
{
// my activity
}
default:
return false;
}
}
});
popup.show(); */
// showing popup menu
}
But my problem was popup appears just below the button what I need was to get the popup in the bottom of screen is it possible to get it.
If anyidea about this please help me friends.