actionbar menu item onclick?

后端 未结 2 1388
傲寒
傲寒 2020-12-31 09:45

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

2条回答
  •  天命终不由人
    2020-12-31 10:10

    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());
            }
        });
    }
    
    
    
    
    
    

提交回复
热议问题