Back to project page watchme.
The source code is released under:
Copyright (c) 2012 Johan Brook, Robin Andersson, Lisa Stenberg, Mattias Henriksson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documen...
If you think the Android project watchme listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * MenuUtils.java/* w w w . j av a 2 s . c o m*/ * * A utility class with common menu methods * * @author Robin Andersson * @copyright (c) 2012 Johan Brook, Robin Andersson, Lisa Stenberg, Mattias Henriksson * @license MIT */ package se.chalmers.watchme.utils; import android.view.MenuItem; public class MenuUtils { /** * Changes the menu item's icon to reflect enabled or disabled state. * * @param menuItem The menu item which icon is to be set */ public static void setMenuIconState(MenuItem menuItem) { menuItem.getIcon().setAlpha(menuItem.isEnabled() ? 255 : 64); } }