Back to project page ExpandableButtonMenu.
The source code is released under:
Apache License
If you think the Android project ExpandableButtonMenu 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 lt.lemonlabs.android.samples.expandablebuttonmenu; /*from w w w.ja va 2s . c o m*/ import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.widget.Toast; import lt.lemonlabs.android.expandablebuttonmenu.ExpandableButtonMenu; import lt.lemonlabs.android.expandablebuttonmenu.ExpandableMenuOverlay; public class DemoActivity extends ActionBarActivity { private ExpandableMenuOverlay menuOverlay; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.demo); menuOverlay = (ExpandableMenuOverlay) findViewById(R.id.button_menu); menuOverlay.setOnMenuButtonClickListener(new ExpandableButtonMenu.OnMenuButtonClick() { @Override public void onClick(ExpandableButtonMenu.MenuButton action) { switch (action) { case MID: Toast.makeText(DemoActivity.this, "Mid pressed and dismissing...", Toast.LENGTH_SHORT).show(); menuOverlay.getButtonMenu().toggle(); break; case LEFT: Toast.makeText(DemoActivity.this, "Left pressed", Toast.LENGTH_SHORT).show(); break; case RIGHT: Toast.makeText(DemoActivity.this, "Right pressed", Toast.LENGTH_SHORT).show(); break; } } }); } }