enter image description here

Hi there, everything i click on my fragment. It adds a menu button to action bar . So if i click it 3 times. It adds the menu button 3 times..

Does anyone know where went wrong???

This is my code

public boolean onOptionsItemSelected(MenuItem item) {
    Intent i = null;
    switch (item.getItemId()) {
    case R.id.refresher:

        i = new Intent(this.context, CameraInfoActivity.class);


        return true;

    case R.id.settings:

        return true;

        return super.onOptionsItemSelected(item);

public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    // TODO Auto-generated method stub
    super.onCreateOptionsMenu(menu, inflater);
    inflater = getActivity().getMenuInflater();
    inflater.inflate(R.menu.menu_indoor, menu);


and i added


at my OnCreateView .

Related posts

Recent Viewed