Add a Theme

You can add new themes for users to select or view by default:

  1. Finish making changes to your default theme (light_theme.json).
  2. Duplicate the default theme file and change its name.
  3. Open institutions/mxmobile/strings/master/en-US.json and copy the following code, which adds the Indeterminate section. Replace <NEW_THEME_NAME> with the name of your theme in all capital letters. Enter the theme’s name for the string (“New Theme”), which will be displayed as text in your app.
Define your Theme
1
2
3
4
5
6
7
8
9
10
11
12
13
"Indeterminate" :
    {
      "Color Theme" :
      {
        "file" : "generated/models/helios/theme.h",
        "line" : 141,
        "Table" :
        {
          "COLOR_THEME_LIGHT"                                   : "Light",
          "COLOR_THEME_DARK"                                    : "Dark",
          "COLOR_THEME_<NEW_THEME_NAME>"                        : "New Theme"
        }
      },
  1. In your new theme file, update:
    • id to any name you want to define your theme, like “light” or “dark”. This ensures all your themes are unique.
    • display_key to point to the new key.
    • display_order to determine which theme displays by default (starting at 0). Note: If changing the order, you’ll need to update any other theme files.
    • keyboard_appearance to either “DEFAULT” or “DARK”.