/** * Inflate and load a menu resource id for the fly-in menu. This will set {@link * android.app.ActionBar#setDisplayHomeAsUpEnabled(boolean) * ActionBar.setDisplayHomeAsUpEnabled(true)} as well providing the device is Honeycomb or above. * Bear in mind, devices below Honeycomb or themes with no ActionBar (e.g. Theme.Holo.NoActionBar) * will require some way to manually open the fly-in menu. * * @param menuId menu resource to load */ protected void loadFlyInMenu(int menuWidth) { flyMenuView.setMenuItems(); flyMenuView.setMenuSize(menuWidth); flyMenuView.setOnFlyInItemClickListener(this); ((ViewGroup) getWindow().getDecorView()).removeView(flyMenuView); ((ViewGroup) getWindow().getDecorView()).addView(flyMenuView); hasFlyMenu = true; }
protected void updateMenuItems() { flyMenuView.setMenuItems(); }