public void UpdateIcon(int icon)
        {
            ComponentName adaptive = new Android.Content.ComponentName(Application.Context, "com.CloudStreamForms.CloudStreamForms.adaptive");
            ComponentName hexagon  = new Android.Content.ComponentName(Application.Context, "com.CloudStreamForms.CloudStreamForms.hexagon");

            ComponentEnabledState[] states = new ComponentEnabledState[2];

            switch (icon)
            {
            case 0:
                states[0] = ComponentEnabledState.Enabled;
                states[1] = ComponentEnabledState.Disabled;
                break;

            case 1:
                states[0] = ComponentEnabledState.Disabled;
                states[1] = ComponentEnabledState.Enabled;
                break;
            }

            Forms.Context.PackageManager.SetComponentEnabledSetting(
                adaptive,
                states[0],
                ComponentEnableOption.DontKillApp);
            Forms.Context.PackageManager.SetComponentEnabledSetting(
                hexagon,
                states[1],
                ComponentEnableOption.DontKillApp);
        }
 public int AddIntentOptions(int groupId, int itemId, int order, Android.Content.ComponentName caller, Android.Content.Intent[] specifics, Android.Content.Intent intent, int flags, Android.Views.IMenuItem[] outSpecificItems)
 {
     throw new NotSupportedException();
 }
Exemple #3
0
 public int AddIntentOptions(int groupId, int itemId, int order, Android.Content.ComponentName caller, Intent[] specifics, Android.Content.Intent intent, MenuAppendFlags flags, IMenuItem[] outSpecificItems)
 {
     throw new System.NotImplementedException();
 }