internal void SetStyleTheme(StyleTheme theme) { var preferences = PreferenceManager.GetDefaultSharedPreferences(this).Edit(); preferences.PutInt(nameof(StyleTheme), (int)theme); preferences.Apply(); RestartActivity(); }
public void SetThemeResources(StyleTheme theme) { if (theme == StyleTheme.Light) { App.Current.Resources = new LightTheme(); } else { App.Current.Resources = new DarkTheme(); } }
public void SetTheme(StyleTheme theme) { SetThemeResources(theme); _settingsService.StyleTheme = theme; _nativeThemeService.SetTheme(theme); }
/// <summary> /// Adds a color scheme to the list. /// </summary> /// <param name="styleTheme">The color scheme to add.</param> public void AddStyleTheme(StyleTheme styleTheme) { _styleThemeManager.AddStyleTheme(styleTheme); }
public void SetTheme(StyleTheme theme) { MainActivity.Instance.SetStyleTheme(theme); }