Am showing a pop up menu dialog programmatically when a button is clicked.
ImageButton Btn = findViewById(R.id.Btn);
Btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
PopupMenu menu = new PopupMenu(getApplicationContext(), v);
menu.getMenu().add(Menu.NONE, 1, 1, "A");
menu.getMenu().add(Menu.NONE, 2, 2, "B");
menu.getMenu().add(Menu.NONE, 3, 3, "C. You were sent to heal...");
menu.show();
}
});
Now, I want to style the pop up menu dialog and change the background color. This is what I used in my styles.xml
<item name="android:itemBackground">@color/darkBlue</item>
However, I don't get any changes in my output.