Search in sources :

Example 1 with CarbonContextWrapper

use of carbon.CarbonContextWrapper in project Carbon by ZieIony.

the class FloatingActionMenu method setMenu.

public void setMenu(int resId) {
    Menu menu = new MenuBuilder(new CarbonContextWrapper(getContentView().getContext()));
    MenuInflater inflater = new MenuInflater(getContentView().getContext());
    inflater.inflate(resId, menu);
    setMenu(menu);
}
Also used : MenuInflater(android.view.MenuInflater) CarbonContextWrapper(carbon.CarbonContextWrapper) Menu(android.view.Menu) MenuBuilder(android.support.v7.view.menu.MenuBuilder)

Example 2 with CarbonContextWrapper

use of carbon.CarbonContextWrapper in project Carbon by ZieIony.

the class BottomBar method setMenu.

public void setMenu(int resId) {
    Menu menu = new MenuBuilder(new CarbonContextWrapper(getContext()));
    MenuInflater inflater = new MenuInflater(getContext());
    inflater.inflate(resId, menu);
    setMenu(menu);
}
Also used : MenuInflater(android.view.MenuInflater) CarbonContextWrapper(carbon.CarbonContextWrapper) Menu(android.view.Menu) MenuBuilder(android.support.v7.view.menu.MenuBuilder)

Example 3 with CarbonContextWrapper

use of carbon.CarbonContextWrapper in project Carbon by ZieIony.

the class NavigationView method setMenu.

public void setMenu(int resId) {
    Menu menu = new MenuBuilder(new CarbonContextWrapper(getContext()));
    MenuInflater inflater = new MenuInflater(getContext());
    inflater.inflate(resId, menu);
    setMenu(menu);
}
Also used : MenuInflater(android.view.MenuInflater) CarbonContextWrapper(carbon.CarbonContextWrapper) Menu(android.view.Menu) MenuBuilder(android.support.v7.view.menu.MenuBuilder)

Aggregations

MenuBuilder (android.support.v7.view.menu.MenuBuilder)3 Menu (android.view.Menu)3 MenuInflater (android.view.MenuInflater)3 CarbonContextWrapper (carbon.CarbonContextWrapper)3