Navigation bar adaptive display method and device, computer equipment and storage medium

By obtaining the color mode of the in-vehicle application page and monitoring changes in the navigation bar properties, the navigation bar depth mode is automatically adjusted, solving the problem of mismatch between the navigation bar and the page color, improving user experience and system compatibility and security.

CN120653341APending Publication Date: 2025-09-16SHENZHEN LANYOU TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510674200.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

In the car system, the navigation bar may not match the color of the application page when switching the system theme, resulting in unclear content and affecting the user experience.

Method used

By obtaining the color mode of the current page of the in-vehicle application, monitoring the changes in the navigation bar properties, determining whether the system supports in-vehicle application control switching, and obtaining the top application in the whitelist application stack, the dark and light mode of the navigation bar is automatically adjusted according to the page content and system configuration.

Benefits of technology

Ensure the visual consistency of the navigation bar and page content, improve user experience, enhance system compatibility and security, and solve the problem of unclear navigation bar display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653341A_ABST
    Figure CN120653341A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of vehicle-mounted applications, and relates to a navigation bar adaptive display method and device, computer equipment and a storage medium, and the method comprises the following steps: obtaining and judging a current page content depth mode of a vehicle-mounted application; notifying the navigation bar to switch to a corresponding deep and shallow mode theme; monitoring the attribute change of the navigation bar, and obtaining a callback function of the attribute change of the navigation bar; judging whether the vehicle-mounted application is supported to control the switching of the depth mode of the navigation bar at present, otherwise, switching the depth mode by the navigation bar along with the system theme, and if so, judging whether the vehicle-mounted application in the white list is limited to support the vehicle-mounted application to control the switching of the depth mode of the navigation bar at present; if yes, obtaining a stack top application; and judging whether the stack top application is in the white list, if so, switching a navigation bar depth mode according to a mode set by the vehicle-mounted application, and otherwise, switching the depth mode by the navigation bar along with the system theme. The problem of unclear display of the navigation bar is solved, and the content display integrity, compatibility and safety of the vehicle-mounted system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle-mounted application technology, and in particular to a navigation bar adaptive display method, device, computer equipment and storage medium. Background Art

[0002] In the current in-car system, the in-car application pages have two sets of user interface themes, light and dark, that is, day and night modes. The traditional approach is that after the user switches the day or night mode in the car computer, the application switches the corresponding light and dark mode UI layout according to the system callback. However, there is a scenario where some application pages may have dark content, which corresponds to the night UI layout, when the current system theme is daytime. At this time, the navigation bar will follow the light and dark switching of the system, and the application page will be black, but the navigation bar will be white. As a result, the content of the navigation bar on this page will be unclear, affecting user use. Summary of the Invention

[0003] In order to solve the above technical problems, the present invention provides a method for adaptively displaying a navigation bar, which adopts the following technical solution, including:

[0004] S1, obtaining and determining whether the current page content of the in-vehicle application is in dark mode or light mode;

[0005] S2: If the current page content is in dark mode, the notification navigation bar switches to the dark mode theme; if the current page content is in light mode, the notification navigation bar switches to the light mode theme;

[0006] S3, monitors the attribute changes of the navigation bar and obtains the callback function of the navigation bar attribute change;

[0007] S4, based on the navigation bar attribute change callback function, determine whether the vehicle application currently supports switching the navigation bar depth mode. If not, proceed to step S5. If so, determine whether the vehicle application currently supports switching the navigation bar depth mode only for the vehicle application in the whitelist, and proceed to step S6.

[0008] On S5, the navigation bar switches between dark and light modes according to the system theme.

[0009] S6, if it is determined that only the in-vehicle applications in the whitelist support in-vehicle application control to switch the navigation bar dark and light modes, then the top application of the stack is obtained and the process proceeds to step S7;

[0010] S7, determine whether the obtained top stack application is in the whitelist, if so, switch the navigation bar dark and light modes according to the mode set by the in-vehicle application, otherwise go to step S5.

[0011] Preferably, the step of S1, obtaining and determining whether the current page content of the in-vehicle application is in dark mode or light mode, specifically includes:

[0012] S11, obtaining the color mode of the current page content of the in-vehicle application;

[0013] S12: Determine whether the current page content is in dark mode or light mode according to the acquired color mode value.

[0014] Preferably, the step of notifying the navigation bar to switch to a dark mode theme if the current page content is in dark mode, and notifying the navigation bar to switch to a light mode theme if the current page content is in light mode, specifically includes:

[0015] S21, if the current page content is in dark mode, the notification navigation bar is switched to the dark mode theme;

[0016] S22, if the current page content is in light mode, the notification navigation bar is switched to the light mode theme;

[0017] S23, confirm that the navigation bar theme has been switched correctly.

[0018] Preferably, the step of monitoring the attribute changes of the navigation bar and obtaining the callback function of the navigation bar attribute change in S3 specifically includes:

[0019] S31, set the attribute change listener for the navigation bar;

[0020] S32, obtain the attribute change callback function from the listener.

[0021] Preferably, in step S4, based on the callback function of the navigation bar attribute change, it is determined whether the vehicle-mounted application is currently supported to control the switching of the navigation bar depth mode. Otherwise, the process proceeds to step S5. If so, it is determined whether only the vehicle-mounted applications in the whitelist are currently supported to support the vehicle-mounted application to control the switching of the navigation bar depth mode. The process proceeds to step S6 specifically includes:

[0022] S41, checking whether the current system or device supports the in-vehicle application to control the navigation bar dark and light mode switching;

[0023] S42, based on the support flag, determines whether the vehicle-mounted application currently supports switching the navigation bar's light / dark mode. If not, proceeds to step S5. If so, checks whether the current system or device is set to allow only vehicle-mounted applications in the whitelist to control switching of the navigation bar's light / dark mode.

[0024] S43: Determine whether there is a whitelist restriction currently based on the whitelist restriction flag, and proceed to step S6.

[0025] Preferably, the step of switching the dark and light modes by the navigation bar following the system theme in S5 specifically includes:

[0026] S51, obtaining whether the current system theme setting is dark mode or light mode;

[0027] S52, according to the current system theme setting, if it is dark mode, switch the navigation bar to dark mode, if it is light mode, switch the navigation bar to light mode;

[0028] S53 monitors the changes of the system theme in real time so as to update the dark and light modes of the navigation bar when the theme changes.

[0029] Preferably, in step S6, when it is determined that only the in-vehicle applications in the whitelist currently support in-vehicle application control to switch the navigation bar dark and light modes, the top application of the stack is obtained and the steps of entering step S7 specifically include:

[0030] S61, when it is determined that only in-vehicle applications in the whitelist are currently restricted to support in-vehicle application control to switch the navigation bar dark and light modes, obtain the package name or identifier of the current top application in the stack;

[0031] S62, checking whether the package name or identifier of the current top application is in the whitelist allowed to control the light / dark mode of the navigation bar;

[0032] The step S7, determining whether the obtained top stack application is in the whitelist, if yes, switching the navigation bar depth mode according to the mode set by the in-vehicle application, otherwise entering step S5 specifically includes:

[0033] S71, based on the whitelist check result, determine whether the current top application is in the whitelist;

[0034] S72, if the top application is in the whitelist, switch the navigation bar dark or light mode according to the mode set by the in-vehicle application, otherwise go to step S5.

[0035] In order to solve the above technical problems, the present invention further provides a navigation bar adaptive display device, which adopts the following technical solution, including:

[0036] The first judgment module is used to obtain and judge whether the current page content of the in-vehicle application is in dark mode or light mode;

[0037] A switching module is used to notify the navigation bar to switch to a dark mode theme if the current page content is in dark mode, and to notify the navigation bar to switch to a light mode theme if the current page content is in light mode;

[0038] The monitoring module is used to monitor the changes in the properties of the navigation bar and obtain the callback function of the navigation bar property changes;

[0039] The second judgment module is used to determine whether the in-vehicle application currently supports switching the navigation bar's light and dark mode according to the callback function of the navigation bar attribute change. If not, the navigation bar switches the light and dark mode according to the system theme. If so, it determines whether the in-vehicle application control of switching the navigation bar's light and dark mode is currently limited to only the in-vehicle applications in the whitelist;

[0040] The acquisition module is used to determine that only in-vehicle applications in the whitelist can support in-vehicle application control to switch the navigation bar's light and dark modes, and obtain the top application in the stack;

[0041] The switching module is used to determine whether the obtained top stack application is in the whitelist. If so, the navigation bar dark mode is switched according to the mode set by the in-vehicle application.

[0042] In order to solve the above technical problems, the present invention also provides a computer device, which adopts the technical solution described below, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, it implements the steps of the above-mentioned navigation bar adaptive display method.

[0043] In order to solve the above technical problems, the present invention also provides a computer-readable storage medium, which adopts the technical solution described below. The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the above-mentioned navigation bar adaptive display method are implemented.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] (1) It can intelligently identify the light and dark mode of the current page content of the in-vehicle application and automatically adjust the theme of the navigation bar accordingly, thereby ensuring the visual consistency between the navigation bar and the page content, avoiding the display problem caused by color mismatch, and improving the user experience;

[0046] (2) By monitoring the changes in the navigation bar properties and obtaining the callback function, it is possible to flexibly determine whether the current system supports the in-vehicle application to control the switching of the navigation bar's light and dark modes. This flexibility enables the in-vehicle system to make corresponding adjustments according to different system environments and configurations, thereby enhancing the system's compatibility;

[0047] (3) For situations where in-vehicle application control is supported but with restrictions (such as a whitelist), the system determines whether to switch the navigation bar display mode based on the mode set by the in-vehicle application by obtaining the top application and determining whether it is in the whitelist. This ensures that only authenticated applications can control the navigation bar display mode, thereby improving system security.

[0048] (4) It not only solves the problem of unclear navigation bar display, but also improves the content display integrity, compatibility and security of the in-vehicle system. This is of great significance to improving the overall performance and user experience of the in-vehicle system, and is an indispensable part of in-vehicle application development. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the solutions in the present invention, a brief introduction is given below to the drawings required for use in describing the embodiments of the present invention. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0050] Figure 1 is a flowchart of an embodiment of the method for adaptively displaying a navigation bar of the present invention;

[0051] Figure 2 It is a structural diagram of an embodiment of a navigation bar adaptive display device of the present invention;

[0052] Figure 3 It is a structural diagram of an embodiment of a computer device of the present invention. DETAILED DESCRIPTION

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this invention belongs. The terms used in the specification of the application are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. The terms "first" and "second" in the specification and claims of the present invention and the accompanying drawings are used to distinguish different objects, not to describe a specific order.

[0054] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0055] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0056] It should be noted that the navigation bar adaptive display method provided in the embodiment of the present invention is generally executed by an in-vehicle device. Accordingly, the navigation bar adaptive display device is generally provided in the in-vehicle device.

[0057] In-vehicle devices include the car, in-vehicle audio system, navigation system, driving recorder, in-vehicle communication equipment, in-vehicle entertainment system, in-vehicle safety system, in-vehicle lighting system, and in-vehicle electrical equipment. In-vehicle audio systems include radios, CD players, and MP3 players. Navigation systems include GPS and in-vehicle computers. In-vehicle communication equipment includes Bluetooth phones. In-vehicle entertainment systems include in-vehicle TVs and game consoles.

[0058] A navigation bar, a key element of the user interface, is a set of functional links or icons located in a prominent position, such as at the top or side of a webpage or application. It plays the important role of guiding users to browse information efficiently and quickly access different pages or functional modules.

[0059] Example 1

[0060] Please refer to Figure 1 , which shows a flowchart of an embodiment of a method for adaptively displaying a navigation bar according to the present invention. The method for adaptively displaying a navigation bar comprises the following steps:

[0061] Step S1, obtaining and determining whether the current page content of the in-vehicle application is in dark mode or light mode.

[0062] In this embodiment, step S1 may specifically include the following steps:

[0063] S11, obtaining the color mode of the current page content of the in-vehicle application.

[0064] You can call the API provided by the system, such as UISettings.getAppearanceMode() (for some operating systems), to obtain the current page content color mode of the in-vehicle application.

[0065] Through step S11 , the internal settings or state management of the application may be checked to determine the color mode of the current page content.

[0066] S12: Determine whether the current page content is in dark mode or light mode according to the acquired color mode value.

[0067] For example, you can use conditional statements (such as if-else) to determine the color mode value. You can also compare the color mode value with the system's predefined dark mode and light mode constants.

[0068] The purpose of step S1 is to determine the color mode of the current page content of the in-vehicle application so as to select a suitable theme for the navigation bar.

[0069] Step S2, if the current page content is in dark mode, notify the navigation bar to switch to the dark mode theme; if the current page content is in light mode, notify the navigation bar to switch to the light mode theme.

[0070] In this embodiment, step S2 may specifically include the steps:

[0071] S21, if the current page content is in dark mode, notify the navigation bar to switch to the dark mode theme.

[0072] Call the theme switching function of the navigation bar and pass in the dark mode theme parameter. Update the application status or settings and mark the navigation bar as the dark mode theme currently.

[0073] S22, if the current page content is in light mode, notify the navigation bar to switch to the light mode theme.

[0074] Call the theme switching function of the navigation bar and pass in the light mode theme parameter. Update the application status or settings and mark the navigation bar as the light mode theme currently.

[0075] S23, confirm that the navigation bar theme has been correctly switched.

[0076] Listen for the navigation bar theme switching completion event or callback. In the callback, check whether the current theme of the navigation bar is consistent with the expectation. If not, perform error handling or retry. [[ID=​​​​​​​​​​​

[0081] This setting is particularly important in improving user experience because it ensures that the color of the navigation bar is coordinated with the main content of the application, reduces visual interference, and improves the friendliness and aesthetics of the operation interface.

[0082] In addition, the android:windowLightNavigationBar setting is part of responsive design, allowing developers to dynamically adjust the navigation bar's display style based on the app's theme or the user's system theme preferences, providing a more personalized experience for users. Therefore, making proper use of this setting during development can help create an app interface that better meets user expectations.

[0083] The purpose of step S2 is to notify the navigation bar to switch to a corresponding theme according to the color mode of the current page content.

[0084] Step S3: monitor the attribute changes of the navigation bar and obtain the callback function of the navigation bar attribute change.

[0085] In this embodiment, step S3 may specifically include the following steps:

[0086] S31, set a property change listener for the navigation bar.

[0087] Use the system-provided listener registration function, such as addNavigationBarChangeListener().

[0088] Implement a listener class and override its onChange() method to handle property changes.

[0089] S32, obtain the attribute change callback function from the listener.

[0090] In the listener's onChange() method, get information about navigation bar property changes. Associate a callback function with the property change event so that it will be called when the event occurs.

[0091] In specific implementation, systemUI will receive the onSystemBarAttributesChanged callback after the in-vehicle application executes step S2. In this callback, the switching operation can be performed according to the logic.

[0092] SystemUI, the System User Interface, is a key component of the Android operating system. It provides a unified management solution for the system UI in the form of an application, responsible for managing and presenting core UI elements such as the status bar, navigation bar, lock screen, and quick settings panel. SystemUI utilizes an MVC architecture and includes multiple components such as the StatusBar, NavigationBar, and NotificationManager. These components work together to provide users with an intuitive and convenient interactive experience.

[0093] onSystemBarAttributesChanged is a callback method used in Android development. It is mainly used to monitor changes in the attributes of the system bar (including the status bar and navigation bar). When the appearance, transparency, color, or other related attributes of the system bar change, the system will trigger this callback method.

[0094] This callback method is important for developers because it allows apps to adapt to changes in system bar properties. For example, when the navigation bar changes from dark mode to light mode, the app needs to adjust its interface layout to ensure that the content is not blocked or the user experience is not affected.

[0095] To implement this callback, developers typically need to override this method in the corresponding Activity or View and write the processing logic within the method body. In addition, they need to configure the necessary attributes for the corresponding Activity in the AndroidManifest.xml file to ensure that the system can correctly call this callback method.

[0096] The purpose of step S3 is to monitor the attribute changes of the navigation bar in real time so as to take corresponding processing measures when the attributes change.

[0097] Step S4, based on the callback function of the navigation bar attribute change, determine whether the vehicle-mounted application is currently supported to control the switching of the navigation bar depth mode. Otherwise, go to step S5. If so, determine whether the vehicle-mounted application is currently restricted to only the vehicle-mounted applications in the whitelist to support the vehicle-mounted application to control the switching of the navigation bar depth mode, and go to step S6.

[0098] The whitelist refers to the application package names that have special needs for adaptive application pages to switch the dark and light modes of the navigation bar.

[0099] During specific implementation, the systemUI switching operation is as follows. First, there are three configurations. The first is systemui_light, which indicates whether the application is supported to control the switching of the light and dark mode of the navigation bar. The second is systemui_light_limit, which indicates whether to limit the application control to the whitelist to support switching of the light and dark mode of the navigation bar. The third is a whitelist defined by systemUI, which stores the application package names that have special needs to adapt the application page to switch the light and dark mode of the navigation bar.

[0100] In this embodiment, step S4 may specifically include the following steps:

[0101] S41, checking whether the current system or device supports the in-vehicle application to control the navigation bar dark and light mode switching.

[0102] Call the system API or query the device configuration to check whether the function is supported. Based on the returned result, set a flag to indicate support.

[0103] S42, based on the support flag, determine whether the vehicle-mounted application is currently supported to control the switching of the navigation bar depth mode. Otherwise, go to step S5, and check whether the current system or device is set to only the vehicle-mounted applications in the whitelist can control the switching of the navigation bar depth mode.

[0104] Use conditional statements (such as `if`) to check for supported flags.

[0105] S43: Determine whether there is a whitelist restriction currently based on the whitelist restriction flag, and proceed to step S6.

[0106] If it is supported, that is, there is a whitelist restriction, proceed to the next step (S6, check whether the current system or device is set to only the car applications in the whitelist can control the navigation bar depth mode switching); if it is not supported, proceed to step S5.

[0107] The purpose of step S4 is to determine whether the in-vehicle application has the authority to control the switching of the light and dark modes of the navigation bar.

[0108] Step S5: The navigation bar switches between dark and light modes according to the system theme.

[0109] In this embodiment, step S5 may specifically include the following steps:

[0110] S51, obtains whether the current system theme setting is dark mode or light mode.

[0111] You can call system APIs, such as UISettings.getAppearanceMode(), to get the current system theme setting, whether it is dark mode or light mode. Save the obtained theme setting to a variable.

[0112] S52, according to the current system theme setting, if it is a dark mode, switch the dark mode of the navigation bar; if it is a light mode, switch the light mode of the navigation bar.

[0113] Call the navigation bar's theme switching function, passing in the system theme parameters. Update the application state or settings to mark the current navigation bar theme as the system theme.

[0114] S53 monitors the changes of the system theme in real time so as to update the dark and light modes of the navigation bar when the theme changes.

[0115] You can use the listener registration function provided by the system, such as

[0116] addSystemThemeChangeListener(). In the listener callback, get the new system theme and apply it to the navigation bar.

[0117] The purpose of step S5 is to allow the navigation bar to automatically switch between dark and light modes following the system theme when the in-vehicle application does not have control authority.

[0118] Step S6: If it is determined that only the in-vehicle applications in the whitelist currently support in-vehicle application control to switch the navigation bar dark and light modes, the top application of the stack is obtained and the process proceeds to step S7.

[0119] In the automotive application landscape, top-of-the-stack applications are those that are currently being used frequently or recently activated. These applications, like the top element in a stack data structure, enjoy high visibility and immediate availability. These applications typically include navigation systems, which provide real-time route guidance; music playback applications, which play audio content tailored to user preferences; and vehicle status monitoring applications, which display critical information such as fuel level and vehicle speed in real time. Due to their immediacy and importance, these applications occupy the top position in the in-vehicle infotainment system, ensuring that drivers can quickly access and operate them, thereby enhancing the driving experience and safety.

[0120] In this embodiment, step S6 may specifically include the following steps:

[0121] S61 , when it is determined that only the in-vehicle applications in the whitelist are currently restricted to support in-vehicle application control to switch the navigation bar dark and light modes, obtain the package name or identifier of the current top application in the stack.

[0122] If the system determines that only whitelisted in-car apps support switching the navigation bar's light / dark mode, it calls a system API or queries the app management status to obtain the package name or identifier of the top app in the stack. The obtained top app information is saved in a variable.

[0123] S62: Check whether the package name or identifier of the current top application is in the whitelist that allows controlling the light / dark mode of the navigation bar.

[0124] Read the whitelist from the system or device configuration. Traverse the whitelist to check whether the current top application is included in it.

[0125] The purpose of step S6 is to further determine whether the in-vehicle application is in the whitelist that is allowed to control the light / dark mode of the navigation bar when the in-vehicle application has the control authority.

[0126] Step S7, determine whether the obtained top stack application is in the whitelist, if so, switch the navigation bar dark mode according to the mode set by the in-vehicle application, otherwise go to step S5.

[0127] In this embodiment, step S7 may specifically include the following steps:

[0128] S71: Determine whether the current top application is in the whitelist based on the whitelist check result.

[0129] Use conditional statements (such as if `) to check the whitelist check result to determine whether the current top application on the stack is in the whitelist.

[0130] S72, if the top application is in the whitelist, switch the navigation bar dark or light mode according to the mode set by the in-vehicle application, otherwise go to step S5.

[0131] If the top application is in the whitelist, the navigation bar dark and light modes are switched according to the mode set by the in-vehicle application; if it is not in the whitelist, step S5 is entered (the navigation bar switches the dark and light modes according to the system theme).

[0132] The purpose of step S7 is to determine whether the current top application (ie, the currently running application) is in the whitelist when there is a whitelist restriction.

[0133] In specific implementation, after receiving the onSystemBarAttributesChanged callback, when systemui_light is false, the navigation bar obtains the current system theme mode through Configuration to switch to the corresponding dark and light mode.

[0134] Configuration is a class in the Android framework that encapsulates information related to resources and device configuration. This information includes screen size, screen orientation, screen density, language settings, and UI modes (such as night mode). When the system configuration changes, such as when the user switches between dark and light mode, the system triggers the corresponding callback and updates the relevant fields in the Configuration object.

[0135] In the onSystemBarAttributesChanged callback of the navigation bar, you can get the system theme information by accessing the currently active Configuration object. Specifically, you can check the uiMode field in the Configuration object, which contains a flag that indicates whether the current mode is night mode (dark mode).

[0136] If the configuration indicates that the current dark mode is dark, the navigation bar should switch to the dark mode icon and background; if it is light mode, it should switch to the light mode icon and background. This process usually involves adjusting the style and color of each view component in the navigation bar to ensure that they are consistent with the current system theme.

[0137] When systemui_light is true, if systemui_light_limit is false, it means that the navigation bar switches according to the light and dark mode in the callback.

[0138] When systemui_light is true, the system checks if systemui_light_limit is true and matches the top app in the current task stack to the whitelist. If the app is on the whitelist, the navigation bar mode is switched based on the light / dark mode specified in the callback. If the app is not on the whitelist, the navigation bar uses Configuration to determine the current system theme and switches to the appropriate light / dark mode.

[0139] The implementation of this embodiment has the following beneficial effects:

[0140] (1) It can intelligently identify the light and dark mode of the current page content of the in-vehicle application and automatically adjust the theme of the navigation bar accordingly, thereby ensuring the visual consistency between the navigation bar and the page content, avoiding the display problem caused by color mismatch, and improving the user experience;

[0141] (2) By monitoring the changes in the navigation bar properties and obtaining the callback function, it is possible to flexibly determine whether the current system supports the in-vehicle application to control the switching of the navigation bar's light and dark modes. This flexibility enables the in-vehicle system to make corresponding adjustments according to different system environments and configurations, thereby enhancing the system's compatibility;

[0142] (3) For situations where in-vehicle application control is supported but with restrictions (such as a whitelist), the system determines whether to switch the navigation bar display mode based on the mode set by the in-vehicle application by obtaining the top application and determining whether it is in the whitelist. This ensures that only authenticated applications can control the navigation bar display mode, thereby improving system security.

[0143] (4) It not only solves the problem of unclear navigation bar display, but also improves the content display integrity, compatibility and security of the in-vehicle system. This is of great significance to improving the overall performance and user experience of the in-vehicle system, and is an indispensable part of in-vehicle application development.

[0144] The present invention can be used in a wide variety of general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0145] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware via computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above-described method embodiments. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0146] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0147] Example 2

[0148] Further references Figure 2 , as a response to the above Figure 1The present invention provides an embodiment of a navigation bar adaptive display device. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0149] like Figure 2 As shown, the navigation bar adaptive display device 80 of this embodiment includes: a first judgment module 81, a switching module 82, a monitoring module 83, a second judgment module 84, an acquisition module 85 and a switching module 86.

[0150] The first judgment module 81 is used to obtain and judge whether the current page content of the in-vehicle application is in dark mode or light mode;

[0151] A switching module 82 is configured to notify the navigation bar to switch to a dark mode theme if the current page content is in dark mode, and to notify the navigation bar to switch to a light mode theme if the current page content is in light mode;

[0152] The monitoring module 83 is used to monitor the attribute changes of the navigation bar and obtain the callback function of the navigation bar attribute change;

[0153] The second judgment module 84 is used to determine whether the vehicle-mounted application currently supports switching the navigation bar's light / dark mode according to the navigation bar attribute change callback function. If not, the navigation bar switches the light / dark mode according to the system theme. If so, it determines whether the vehicle-mounted application is currently restricted to only the vehicle-mounted applications in the whitelist to support switching the navigation bar's light / dark mode.

[0154] The acquisition module 85 is used to determine that only the in-vehicle applications in the whitelist can support the in-vehicle application control to switch the navigation bar dark and light modes, and obtain the top application of the stack;

[0155] The switching module 86 is used to determine whether the obtained top stack application is in the whitelist, and if so, switch the navigation bar dark mode according to the mode set by the in-vehicle application.

[0156] The implementation of this embodiment has the following beneficial effects:

[0157] (1) It can intelligently identify the light and dark mode of the current page content of the in-vehicle application and automatically adjust the theme of the navigation bar accordingly, thereby ensuring the visual consistency between the navigation bar and the page content, avoiding the display problem caused by color mismatch, and improving the user experience;

[0158] (2) By monitoring the changes in the navigation bar properties and obtaining the callback function, it is possible to flexibly determine whether the current system supports the in-vehicle application to control the switching of the navigation bar's light and dark modes. This flexibility enables the in-vehicle system to make corresponding adjustments according to different system environments and configurations, thereby enhancing the system's compatibility;

[0159] (3) For situations where in-vehicle application control is supported but with restrictions (such as a whitelist), the system determines whether to switch the navigation bar display mode based on the mode set by the in-vehicle application by obtaining the top application and determining whether it is in the whitelist. This ensures that only authenticated applications can control the navigation bar display mode, thereby improving system security.

[0160] (4) It not only solves the problem of unclear navigation bar display, but also improves the content display integrity, compatibility and security of the in-vehicle system. This is of great significance to improving the overall performance and user experience of the in-vehicle system, and is an indispensable part of in-vehicle application development.

[0161] Example 3

[0162] To solve the above technical problems, the embodiment of the present invention also provides a computer device. Figure 3 , Figure 3 This is a basic structural block diagram of the computer device in this embodiment.

[0163] The computer device 9 includes a memory 91, a processor 92, and a network interface 93 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 9 having components of a memory 91, a processor 92, and a network interface 93, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.

[0164] The computer device may be a desktop computer, notebook computer, PDA, cloud server, etc. The computer device may interact with the user via a keyboard, mouse, remote control, touchpad, or voice control device.

[0165] The memory 91 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 91 may be an internal storage unit of the computer device 9, such as the hard disk or memory of the computer device 9. In other embodiments, the memory 91 may also be an external storage device of the computer device 9, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on the computer device 9. Of course, the memory 91 may also include both the internal storage unit of the computer device 9 and its external storage device. In this embodiment, the memory 91 is generally used to store the operating system and various application software installed on the computer device 9, such as computer-readable instructions for the navigation bar adaptive display method. In addition, the memory 91 can also be used to temporarily store various types of data that have been output or are about to be output.

[0166] In some embodiments, the processor 92 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 92 is generally used to control the overall operation of the computer device 9. In this embodiment, the processor 92 is used to execute computer-readable instructions or process data stored in the memory 91, such as computer-readable instructions for executing the above-mentioned navigation bar adaptive display method.

[0167] The network interface 93 may include a wireless network interface or a wired network interface. The network interface 93 is generally used to establish a communication connection between the computer device 9 and other electronic devices.

[0168] The implementation of this embodiment has the following beneficial effects:

[0169] (1) It can intelligently identify the light and dark mode of the current page content of the in-vehicle application and automatically adjust the theme of the navigation bar accordingly, thereby ensuring the visual consistency between the navigation bar and the page content, avoiding the display problem caused by color mismatch, and improving the user experience;

[0170] (2) By monitoring the changes in the navigation bar properties and obtaining the callback function, it is possible to flexibly determine whether the current system supports the in-vehicle application to control the switching of the navigation bar's light and dark modes. This flexibility enables the in-vehicle system to make corresponding adjustments according to different system environments and configurations, thereby enhancing the system's compatibility;

[0171] (3) For situations where in-vehicle application control is supported but with restrictions (such as a whitelist), the system determines whether to switch the navigation bar display mode based on the mode set by the in-vehicle application by obtaining the top application and determining whether it is in the whitelist. This ensures that only authenticated applications can control the navigation bar display mode, thereby improving system security.

[0172] (4) It not only solves the problem of unclear navigation bar display, but also improves the content display integrity, compatibility and security of the in-vehicle system. This is of great significance to improving the overall performance and user experience of the in-vehicle system, and is an indispensable part of in-vehicle application development.

[0173] Example 4

[0174] The present invention also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned navigation bar adaptive display method.

[0175] The implementation of this embodiment has the following beneficial effects:

[0176] (1) It can intelligently identify the light and dark mode of the current page content of the in-vehicle application and automatically adjust the theme of the navigation bar accordingly, thereby ensuring the visual consistency between the navigation bar and the page content, avoiding the display problem caused by color mismatch, and improving the user experience;

[0177] (2) By monitoring the changes in the navigation bar properties and obtaining the callback function, it is possible to flexibly determine whether the current system supports the in-vehicle application to control the switching of the navigation bar's light and dark modes. This flexibility enables the in-vehicle system to make corresponding adjustments according to different system environments and configurations, thereby enhancing the system's compatibility;

[0178] (3) For situations where in-vehicle application control is supported but with restrictions (such as a whitelist), the system determines whether to switch the navigation bar display mode based on the mode set by the in-vehicle application by obtaining the top application and determining whether it is in the whitelist. This ensures that only authenticated applications can control the navigation bar display mode, thereby improving system security.

[0179] (4) It not only solves the problem of unclear navigation bar display, but also improves the content display integrity, compatibility and security of the in-vehicle system. This is of great significance to improving the overall performance and user experience of the in-vehicle system, and is an indispensable part of in-vehicle application development.

[0180] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the various embodiment methods of the present invention.

[0181] Obviously, the embodiments described above are only some embodiments of the present invention, rather than all embodiments. The preferred embodiments of the present invention are given in the accompanying drawings, but they do not limit the patent scope of the present invention. The present invention can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. Although the present invention has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present invention specification and drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.

Claims

1. A navigation bar adaptive display method, characterized in that: The steps include: S1, obtaining and determining whether the current page content of the in-vehicle application is in dark mode or light mode; S2: If the current page content is in dark mode, the notification navigation bar switches to the dark mode theme; if the current page content is in light mode, the notification navigation bar switches to the light mode theme; S3, monitors the attribute changes of the navigation bar and obtains the callback function of the navigation bar attribute change; S4, based on the navigation bar attribute change callback function, determine whether the vehicle application currently supports switching the navigation bar depth mode. If not, proceed to step S5. If so, determine whether the vehicle application currently supports switching the navigation bar depth mode only for the vehicle application in the whitelist, and proceed to step S6. On S5, the navigation bar switches between dark and light modes according to the system theme. S6, if it is determined that only the in-vehicle applications in the whitelist support in-vehicle application control to switch the navigation bar dark and light modes, then the top application of the stack is obtained and the process proceeds to step S7; S7, determine whether the obtained top stack application is in the whitelist, if so, switch the navigation bar dark and light modes according to the mode set by the in-vehicle application, otherwise go to step S5.

2. The method for adaptively displaying a navigation bar according to claim 1, wherein: The step of obtaining and determining whether the current page content of the in-vehicle application is in dark mode or light mode in S1 specifically includes: S11, obtaining the color mode of the current page content of the in-vehicle application; S12: Determine whether the current page content is in dark mode or light mode according to the acquired color mode value.

3. The method for adaptively displaying a navigation bar according to claim 1, wherein: Said step S2, if the current page content is in dark mode, notifying the navigation bar to switch to a dark mode theme; if the current page content is in light mode, notifying the navigation bar to switch to a light mode theme specifically includes: S21, if the current page content is in dark mode, the notification navigation bar is switched to the dark mode theme; S22, if the current page content is in light mode, the notification navigation bar is switched to the light mode theme; S23, confirm that the navigation bar theme has been switched correctly.

4. The method for adaptively displaying a navigation bar according to claim 1, wherein: The step S3 of monitoring the attribute changes of the navigation bar and obtaining the callback function of the navigation bar attribute change specifically includes: S31, set the attribute change listener for the navigation bar; S32, obtain the attribute change callback function from the listener.

5. The method for adaptively displaying a navigation bar according to claim 1, wherein: In step S4, based on the callback function for the change of the navigation bar attribute, it is determined whether the vehicle-mounted application is currently supported to control the switching of the navigation bar depth mode. If not, the process proceeds to step S5. If yes, it is determined whether the vehicle-mounted application currently only supports the vehicle-mounted application in the whitelist to support the vehicle-mounted application to control the switching of the navigation bar depth mode. The process proceeds to step S6, which specifically includes: S41, checking whether the current system or device supports the in-vehicle application to control the navigation bar dark and light mode switching; S42, based on the support flag, determines whether the vehicle-mounted application currently supports switching the navigation bar's light / dark mode. If not, proceeds to step S5. If so, checks whether the current system or device is set to allow only vehicle-mounted applications in the whitelist to control switching of the navigation bar's light / dark mode. S43: Determine whether there is a whitelist restriction currently based on the whitelist restriction flag, and proceed to step S6.

6. The method for adaptively displaying a navigation bar according to claim 1, wherein: The step of switching the dark and light modes by the navigation bar following the system theme in S5 specifically includes: S51, obtaining whether the current system theme setting is dark mode or light mode; S52, according to the current system theme setting, if it is dark mode, switch the navigation bar to dark mode, if it is light mode, switch the navigation bar to light mode; S53 monitors the changes of the system theme in real time so as to update the dark and light modes of the navigation bar when the theme changes.

7. The method for adaptively displaying a navigation bar according to any one of claims 1 to 6, wherein: In step S6, when it is determined that only the in-vehicle applications in the whitelist currently support in-vehicle application control to switch the navigation bar dark and light modes, the top application of the stack is obtained and the steps of entering step S7 specifically include: S61, when it is determined that only in-vehicle applications in the whitelist are currently restricted to support in-vehicle application control to switch the navigation bar dark and light modes, obtain the package name or identifier of the current top application in the stack; S62, checking whether the package name or identifier of the current top application is in the whitelist allowed to control the light / dark mode of the navigation bar; The step S7, determining whether the obtained top stack application is in the whitelist, if yes, switching the navigation bar depth mode according to the mode set by the in-vehicle application, otherwise entering step S5 specifically includes: S71, based on the whitelist check result, determine whether the current top application is in the whitelist; S72, if the top application is in the whitelist, switch the navigation bar dark or light mode according to the mode set by the in-vehicle application, otherwise go to step S5.

8. A navigation bar adaptive display device, characterized in that: include: The first judgment module is used to obtain and judge whether the current page content of the in-vehicle application is in dark mode or light mode; A switching module is used to notify the navigation bar to switch to a dark mode theme if the current page content is in dark mode, and to notify the navigation bar to switch to a light mode theme if the current page content is in light mode; The monitoring module is used to monitor the changes in the properties of the navigation bar and obtain the callback function of the navigation bar property changes; The second judgment module is used to determine whether the in-vehicle application currently supports switching the navigation bar's light and dark mode according to the callback function of the navigation bar attribute change. If not, the navigation bar switches the light and dark mode according to the system theme. If so, it determines whether the in-vehicle application control of switching the navigation bar's light and dark mode is currently limited to only the in-vehicle applications in the whitelist; The acquisition module is used to determine that only in-vehicle applications in the whitelist can support in-vehicle application control to switch the navigation bar's light and dark modes, and obtain the top application in the stack; The switching module is used to determine whether the obtained top stack application is in the whitelist. If so, the navigation bar dark mode is switched according to the mode set by the in-vehicle application.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the navigation bar adaptive display method according to any one of claims 1 to 7 when executing the computer-readable instructions.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the method for adaptively displaying a navigation bar according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Vehicle-mounted information entertainment system theme switching method and system, equipment and storage medium

    CN112817677A

  • Display mode adaptation method, terminal and storage medium

    CN114064179A

  • Night mode

    US20140365965A1

  • Method for switching theme of application and electronic device

    US20210405858A1