NowWebTheme interface - Android

  • リリースバージョン: Australia
  • 更新日 2026年03月12日
  • 所要時間:4分
  • The NowWebTheme interface provides properties that enable you to override the colors used within web pages hosted on your ServiceNow instance in a native web view.

    The NowWebTheme interface extends the NowUITheme interface and inherits the property nowUIColoring.

    val nowUIColoring: NowUIColoring?

    This property is used to reference color variables that NowWebTheme can use. For additional information on how to theme the UI, see Use NowUIColoring to theme NowWebTheme and NowChatTheme in the Mobile SDK Developer Guide - Android.

    表 : 1. Properties
    Name Description
    alertCritical0 Use for:
    • error messages
    • snackbar background

    Default value: #F8C8CD

    alertCritical3 Use for:
    • error messages
    • snackbar border

    Default value: #B61C2D

    alertPositive0 Use for:
    • success messages
    • snackbar background

    Default value: #CADFC0

    alertPositive3 Use for:
    • success messages
    • snackbar border

    Default value: #266108

    alertWarning0 Use for:
    • warning messages
    • snackbar background

    Default value: #FBF7BF

    alertWarning3 Use for:
    • warning messages
    • snackbar border

    Default value: #B6AA00

    backgroundPrimary Use for:
    • card background
    • choice picker
    • input background
    • neutral background

    Default value: #FFFFFF

    backgroundSecondary Use for overflow menu background.

    Default value: #F6F6F8

    backgroundTertiaryActionable Use for the background color for the topic dialog search and edit text.

    Default value: #454D5B

    brand Use for the header background in the toolbar and tables.

    Default value: #302F4B

    notification Use for new message indicator.

    Default value: #B61C2D

    primary Use for:
    • actionable text
    • button backgrounds

    Default value: #4F52BD

    screenHeaderText Use for text and icon elements with a fixed color that appear on top of the brand color (screen header/toolbar).

    Default value: #FFFFFF

    textActionable Use for:
    • highlighted background
    • text on action buttons

    Default value: #FFFFFF

    textPrimary Use for:
    • alert dialog messages
    • card header text
    • chat bubble text
    • picture title and description
    • topic text

    Default value: #151920

    webPageThemeId Sys_id of the theme to apply to the ServiceNow web pages loaded by NowWeb.

    Default value: Configured default theme

    Table: UX Theme [sys_ux_theme] table.

    webPageThemeVariantId Sys_id of the theme variant to apply to the ServiceNow web pages loaded by NowWeb.

    Default value: Configured default theme variant

    Table: UX Style [sys_ux_style] table.