I have an action bar that puts everything in a menu in the top right, which the user clicks and the menu options open up.
I inflate the action bar menu with this on
In my opinion
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); add_btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { onCreateDialog(getTaskId()); } }); }