Back to project page RibbonMenu.
The source code is released under:
Apache License
If you think the Android project RibbonMenu 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.darvds.ribbonmenu.sample; //w w w . j a v a 2 s. co m import android.app.Activity; import android.os.Bundle; import android.view.MenuItem; import com.darvds.ribbonmenu.R; import com.darvds.ribbonmenu.RibbonMenuView; import com.darvds.ribbonmenu.iRibbonMenuCallback; public class RibbonsampleActivity extends Activity implements iRibbonMenuCallback { /** Called when the activity is first created. */ private RibbonMenuView rbmView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); rbmView = (RibbonMenuView) findViewById(R.id.ribbonMenuView1); rbmView.setMenuClickCallback(this); rbmView.setMenuItems(R.menu.ribbon_menu); getActionBar().setDisplayHomeAsUpEnabled(true); } @Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == android.R.id.home) { rbmView.toggleMenu(); return true; } else { return super.onOptionsItemSelected(item); } } @Override public void RibbonMenuItemClick(int itemId) { } }