How do I display a Popup Window without XML and show a custom image? I have not found any working examples.
Tried this:
public void showMenu() {
PopupWindow myWindow=new PopupWindow(this);
LinearLayout mainLayout = (LinearLayout) findViewById(R.id.main_layout);
myWindow.setBackgroundDrawable(ContextCompat.getDrawable(this, R.drawable.dashboard_instructions));
myWindow.showAtLocation(mainLayout, Gravity.CENTER, 0, 0);