I need an example or a tutorial on how to add menu items with action bar sherlock
When I use the simple menu with the imports
import android.view.Menu;
You have to use Menu
, MenuInflater
and MenuItem
classes from com.actionbarsherlock.view
package:
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getSupportMenuInflater();
inflater.inflate(R.menu.settings_menu, menu);
return super.onCreateOptionsMenu(menu);
}
BTW, ActionBarSherlock
contains a lot of samples.