Back to project page UsarActionBarSherlockAndroidStudio.
The source code is released under:
GNU General Public License
If you think the Android project UsarActionBarSherlockAndroidStudio listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.aprendiendodeandroid.usaractionbarsherlockandroidstudio; // ww w .j a v a2 s . c o m import android.os.Bundle; import com.actionbarsherlock.app.ActionBar; import com.actionbarsherlock.app.SherlockActivity; import com.actionbarsherlock.view.Menu; import com.actionbarsherlock.view.MenuInflater; public class MainActivity extends SherlockActivity { private ActionBar actionBar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Configuramos algunas caracteristicas del actionbar actionBar = getSupportActionBar(); actionBar.setTitle(R.string.app_name); } // con este medoto nosotros agregamos el menu al action bar @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getSupportMenuInflater(); inflater.inflate(R.menu.main, menu); return true; } }