private void modifyAction(SapaAppInfo info, string actionKey, int iconResId, bool isEnabled) { // In this example only one action can be active at the same time. // We need to change state of actions every time action is called. if (info != null && mSapaAppService != null) { // Obtaining current ActionInfo. SapaActionInfo action = info.getActionInfo(actionKey); if (action != null) { // Settling state. action.Visible = isEnabled; // Settling icon of action by setting id of the resource. action.Icon = iconResId; } } }