[go: up one dir, main page]

WO2019047465A1 - Navigation bar display method and apparatus, and computer readable storage medium - Google Patents

Navigation bar display method and apparatus, and computer readable storage medium Download PDF

Info

Publication number
WO2019047465A1
WO2019047465A1 PCT/CN2018/072897 CN2018072897W WO2019047465A1 WO 2019047465 A1 WO2019047465 A1 WO 2019047465A1 CN 2018072897 W CN2018072897 W CN 2018072897W WO 2019047465 A1 WO2019047465 A1 WO 2019047465A1
Authority
WO
WIPO (PCT)
Prior art keywords
navigation bar
color
interface
display
icon
Prior art date
Application number
PCT/CN2018/072897
Other languages
French (fr)
Chinese (zh)
Inventor
孙晓明
曲焕鹏
Original Assignee
青岛海信移动通信技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 青岛海信移动通信技术股份有限公司 filed Critical 青岛海信移动通信技术股份有限公司
Publication of WO2019047465A1 publication Critical patent/WO2019047465A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to a navigation bar display method, apparatus, and computer readable storage medium.
  • the virtual keys (such as the return key, the home key, the menu key, etc.) in the terminal are often set in the navigation bar, and the navigation bar is displayed on the screen of the terminal for the user to operate.
  • the terminal generally sets the background color of the navigation bar to black, sets the icon color of the navigation bar to white, and displays the navigation bar according to the set background color and the icon color.
  • the calendar interface shown in FIG. 1 is mainly white.
  • the background color of the navigation bar is black
  • the icon color is white, that is, the navigation bar as a whole has a dark color, so the color difference between the interface and the navigation bar is too large, resulting in uncoordinated display of the interface and the navigation bar, affecting The overall display effect.
  • a navigation bar display method comprising:
  • the navigation bar is displayed according to the color of the navigation bar.
  • the determining a primary color tone of the display interface includes:
  • the main color of the display interface is determined.
  • the displaying the navigation bar according to the color of the navigation bar comprises:
  • the display interface When the display interface includes a specified view, a target area having the same size as the navigation bar is divided in a specified view of the display interface, and the navigation is displayed in the target area according to a color of the navigation bar.
  • the displaying the navigation bar according to the color of the navigation bar comprises:
  • the navigation bar is displayed in a designated area on the screen according to the color of the navigation bar, wherein the specified view is a view that is at the top level and displayed in full screen.
  • the displaying the navigation bar in the target area according to the color of the navigation bar comprises:
  • the background of the navigation bar is drawn in a transparent color
  • the icon of the navigation bar is drawn in the icon color of the navigation bar.
  • the method further includes:
  • the navigation bar is displayed according to the color of the navigation bar.
  • a navigation bar display device comprising:
  • a receiving module configured to receive a display instruction for displaying an interface
  • a first determining module configured to determine a primary color tone of the display interface
  • a second determining module configured to determine a color of the navigation bar according to a primary color tone of the display interface, where the color of the navigation bar includes a background color and an icon color;
  • a display module configured to display the navigation bar according to a color of the navigation bar.
  • the first determining module is configured to:
  • the main color of the display interface is determined.
  • the display module includes:
  • a first display submodule configured to: when the interface includes a specified view, divide a target area that is the same size as the navigation bar in a specified view of the interface, according to a color of the navigation bar, in the target The navigation bar is displayed in the area, wherein the specified view is a top-level and full-screen view.
  • the display module includes:
  • a second display submodule configured to display the navigation bar in a designated area on the screen according to a color of the navigation bar when the interface does not include a specified view, where the specified view is at the top layer and full screen The view that is displayed.
  • the first display submodule is used to:
  • the background of the navigation bar is drawn in a transparent color
  • the icon of the navigation bar is drawn in the icon color of the navigation bar.
  • the device further includes:
  • a third determining module configured to determine an input method window from at least two interfaces displayed on the screen when the input method program is detected, wherein the at least two interfaces include an interface of the input method program and a call center An interface of an application of the input method program;
  • a fourth determining module configured to determine a primary color tone of the input method window
  • a fifth determining module configured to determine a color of the navigation bar according to a primary color tone of the input method window
  • a display module configured to display the navigation bar according to a color of the navigation bar.
  • a terminal comprising a memory and a processor, the memory storing a computer program, the computer program being executed by the processor to implement the steps of any of the methods of the first aspect.
  • a computer readable storage medium having computer instructions stored thereon, the computer instructions being executed by a processor to implement the steps of any of the methods of the first aspect.
  • the beneficial effects of the technical solution provided by the embodiment of the present application include: after receiving a display instruction for displaying an interface, determining a primary color tone of the interface, and determining a color of the navigation bar according to a primary color tone of the interface, thereby enabling navigation The color of the bar matches the primary color of the interface. After that, according to the color of the navigation bar, the navigation bar is displayed, so that the coordinated display of the interface and the navigation bar can be realized, thereby improving the overall display effect.
  • FIG. 1 is a schematic diagram of a display interface and a navigation bar provided by the related art
  • FIG. 2 is a schematic structural diagram of a navigation bar display system according to an embodiment of the present application.
  • 3A is a flowchart of a method for displaying a navigation bar according to an embodiment of the present application
  • FIG. 3B is a flowchart of another navigation bar display method according to an embodiment of the present application.
  • FIG. 3C is a flowchart of still another method for displaying a navigation bar according to an embodiment of the present application.
  • 3D is a schematic diagram of a target area provided by an embodiment of the present application.
  • 3E is a schematic diagram of a designated area provided by an embodiment of the present application.
  • FIG. 3F is a flowchart of a first navigation bar display operation provided by an embodiment of the present application.
  • 3G is a flowchart of a second navigation bar display operation provided by an embodiment of the present application.
  • 3H is a flowchart of a third navigation bar display operation provided by an embodiment of the present application.
  • FIG. 3I is a flowchart of a fourth navigation bar display operation according to an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a navigation bar display device according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of another navigation bar display apparatus according to an embodiment of the present application.
  • the virtual button is usually set in the terminal, and the virtual button is set in the navigation bar displayed by the terminal.
  • the virtual button is set in the navigation bar displayed by the terminal.
  • the user can click the virtual button in the displayed navigation bar to implement the operation of exiting from one interface and entering another interface. Let's take an example of this scenario.
  • the user when the user is reading news in a browser in the terminal, if the user wants to make a call, the user can click the virtual button in the displayed navigation bar to switch from the browser interface to the dialing interface to make a call.
  • the user when the user watches the video in the video application in the terminal, if the user wants to query the weather, the user can click the virtual button in the displayed navigation bar to switch from the video interface to the weather query interface to query the weather.
  • the virtual button in the navigation bar can be used not only to implement interface switching, but also to implement other functions, such as setting a desktop pendant, a sliding screen special effect, etc., which is not limited in this embodiment.
  • the embodiments of the present application may be applied to the foregoing application scenarios, and may be applied to other application scenarios in the actual application.
  • FIG. 2 is a schematic structural diagram of a navigation bar display system according to an embodiment of the present application.
  • the navigation bar display system can be deployed on the terminal.
  • the navigation bar display system can include an intermediate service layer 201 and a navigation bar display module 202.
  • the intermediate service layer 201 can determine the primary color of the interface after receiving the display instruction for displaying the interface, and determine the color of the navigation bar according to the primary color tone of the interface; the navigation bar display module 202 can be configured according to the intermediate service layer 201. Determine the color of the navigation bar and display the navigation bar.
  • the intermediate service layer 201 and the navigation bar display module 202 can communicate with each other through a specified interface, and the specified interface can be set in advance, for example, the designated interface can be an aidl (Android Interface Definition Language) interface, etc.
  • the embodiment does not limit this.
  • FIG. 3A is a flowchart of a method for displaying a navigation bar according to an embodiment of the present disclosure, where the method is applied to a navigation bar display system included in the terminal. Referring to FIG. 3A, the method includes the following steps:
  • Step 301 Receive a display instruction for displaying an interface.
  • step 301 can be performed by the intermediate service layer in the navigation bar display system.
  • step 301 can also be performed by other modules in the terminal, which is not limited in this embodiment of the present application.
  • the display instruction is used to display the interface, and the display instruction may be triggered by the user, and the user may trigger the operation by a specified operation, and the specified operation may be a click operation, a double-click operation, a voice operation, or the like, which is not limited in this embodiment of the present application.
  • the interface may be various interfaces in the terminal, such as a system interface, an application interface, a bullet box window, and the like in the terminal.
  • a display instruction for displaying the homepage of the system is triggered; when the user clicks on the icon of an application, a display instruction for displaying the application interface of the application is triggered; When the user clicks the back key in the terminal, a display instruction for displaying the previous interface is triggered.
  • Step 302 Determine a primary color of the interface, and determine a color of the navigation bar according to a primary color of the interface, the color including a background color and an icon color.
  • step 302 can be performed by the intermediate service layer in the navigation bar display system.
  • the step 302 can also be performed by other modules in the terminal, which is not limited in this embodiment of the present application.
  • the primary hue of an interface is the overall tendency of the color of the interface, which may include dark tones, bright tones, and the like.
  • the color of the navigation bar may be determined according to the main color tone of the interface, and the color of the navigation bar is matched with the main color of the interface, so that after the navigation bar is subsequently displayed, the interface and the navigation bar may be implemented. Coordinated display, which improves the overall display and improves the user experience.
  • the main color of the interface when the interface adopts the system theme, the parameter value of the specified parameter of the system theme is obtained, and the main color of the interface is determined according to the parameter value of the specified parameter; when the interface is not adopted by the system
  • the color of the interface is determined, and the main color of the interface is determined according to the color of the interface.
  • the main color of the interface may also be determined by other means. For example, whether the interface is judged by using the system theme may be directly determined, and the color of the interface may be directly determined, and the main interface of the interface may be determined according to the color of the interface.
  • the color tone and the like are not limited in the embodiment of the present application.
  • the specified parameter may be set in advance, and the specified parameter is a parameter for indicating the primary color tone of the interface, and the parameter value of the specified parameter may be an overall brightness value of the interface or the like.
  • the color of the interface can be represented by the overall brightness value of the interface, and the overall brightness value of the interface can be determined according to the brightness value of the sub-pixel of the pixel in the interface.
  • the color of the interface in the RGB (Red Green Blue) color mode, can be represented by the overall brightness value of the interface, and the overall brightness value of the interface can be based on the R sub-pixels of the pixels in the interface.
  • the luminance values of the G sub-pixel and the B sub-pixel are determined.
  • the main color of the interface is determined according to the parameter value of the specified parameter, or according to The color of the interface determines the dominant color of the interface, that is, determines the dominant color of the interface based on the overall brightness value of the interface.
  • the corresponding main color tone may be obtained from the correspondence relationship between the stored brightness value and the main color tone according to the overall brightness value of the interface, and the acquired main color tone is determined as the main color tone of the interface.
  • the main color tone of the interface may be determined according to the overall brightness value of the interface, which is not limited in this embodiment of the present application.
  • the corresponding primary color tone may be obtained as a dark color tone according to the brightness value 1 from the correspondence relationship between the brightness value and the main color tone shown in Table 1 below, and determined.
  • the main color of the interface is a dark hue.
  • the corresponding background color and icon color may be obtained from the corresponding relationship between the stored main color and the background color and the icon color according to the main color of the interface. And determining the background color obtained as the background color of the navigation bar, and determining the obtained icon color as the icon color of the navigation bar.
  • the color of the navigation bar may be determined according to the main color of the interface in other manners, which is not limited in this embodiment of the present application.
  • the corresponding background color is obtained from the correspondence between the main color and the background color and the icon color as shown in Table 2 below, and the corresponding background color is obtained.
  • the icon color is white, and the background color of the navigation bar is determined to be black, and the icon color of the navigation bar is determined to be white.
  • the primary color tone of the interface is determined in step 302 to determine the color of the navigation bar according to the primary color tone of the interface.
  • the interface depends on its parent window, in which case the color of the navigation bar can be determined directly from the dominant color of the parent window of the interface.
  • the parent window has been displayed before the child window is displayed, that is, the color of the navigation bar has been determined according to the main color of the parent window, when the interface is a child window, step 302 is not required, and the process can be directly ended.
  • the color of the navigation bar displayed at this time is determined according to the main color of the parent window of the interface.
  • the primary color of the interface may be determined when the interface is not a child window. That is, after receiving the display instruction for the display interface in step 301, the main color of the interface can be determined not only directly by step 302, but further, referring to FIG. 3B, before step 302, the following step 3021 can also be performed. .
  • Step 3021 Determine whether the interface is a child window. If not, execute step 302. If yes, end the process.
  • the interface attribute of the interface may be obtained when the interface is determined to be a child window.
  • the interface is determined to be a child window; when the interface attribute includes the specified
  • the attribute value of the attribute is not the specified attribute value, it is determined that the interface is not a child window.
  • the interface attribute of the interface is used to describe the nature or feature of the interface.
  • the interface attribute of the interface may include the name, title, and style of the interface.
  • the specified attribute and the specified attribute value can be set in advance, for example, the specified attribute can be LayoutParams.type, and the specified attribute value can be a value between 1000 and 1999, and the specified attribute can be LayoutParams.flags,
  • the specified attribute value can be a value containing FLAG LAYOUT ATTACHED IN DECORE.
  • the primary color tone of the interface is determined in step 302 to determine the color of the navigation bar according to the primary color tone of the interface. However, if the color of the navigation bar has been customized for the interface, then step 302 is not needed at this time, and the subsequent navigation bar display can be directly implemented according to the color of the customized navigation bar.
  • the main color of the interface can be determined not only by step 302, but further, referring to FIG. 3C, before step 302, the following steps 3022-3023 can also be performed. .
  • Step 3022 Obtain interface attributes of the interface.
  • Step 3023 Determine whether the navigation bar background attribute and the navigation bar icon attribute are included in the interface attribute. If not, execute step 302. If yes, execute step 3024.
  • the navigation bar background attribute is an attribute for indicating the background color of the navigation bar, and the attribute value of the navigation bar background attribute can be set by the user, which is not limited by the embodiment of the present application.
  • the navigation bar icon attribute is an attribute for indicating the icon color of the navigation bar, and the attribute value of the navigation bar icon attribute can be set by the user, which is not limited by the embodiment of the present application.
  • step 302 may be performed to determine the main color of the interface, so that the The primary color of the interface determines the color of the navigation bar.
  • Step 3024 Determine the background color of the navigation bar according to the attribute value of the navigation bar background attribute, determine the icon color of the navigation bar according to the attribute value of the navigation bar icon attribute, and continue to step 303.
  • step 3024 can be performed at this time according to the attribute value of the navigation bar background attribute and the navigation bar icon.
  • the attribute value of the attribute determines the color of the navigation bar.
  • one of the background color of the navigation bar and the icon color of the navigation bar may be customized only for the interface.
  • the colors of the navigation bar may be determined in combination with steps 302 and 3024. That is, when the attribute value of the navigation bar background attribute is included in the interface attribute, the background color of the navigation bar is determined according to the attribute value of the navigation bar background attribute, and the icon of the navigation bar is determined according to the main color of the interface or the background color of the navigation bar. Color; when the interface attribute only includes the attribute value of the navigation bar icon attribute, the icon color of the navigation bar is determined according to the attribute value of the navigation bar icon attribute, and the background of the navigation bar is determined according to the main color of the interface or the icon color of the navigation bar. colour.
  • the corresponding icon color may be obtained from the corresponding relationship between the stored background color and the icon color according to the background color of the navigation bar, and the acquired icon The color is determined as the icon color of the navigation bar.
  • the icon color of the navigation bar may be determined according to the background color of the navigation bar in other manners, which is not limited in this embodiment of the present application.
  • the background color of the navigation bar is a transparent color
  • the corresponding icon color is grayish white from the correspondence between the background color and the icon color shown in Table 3 below, and the navigation bar is determined.
  • the icon color is grayish white.
  • the operation of determining the background color of the navigation bar according to the icon color of the navigation bar is similar to the operation of determining the icon color of the navigation bar according to the background color of the navigation bar, which is not described in detail in this embodiment of the present application.
  • the color of the navigation bar may be determined according to the main color tone of the interface, but also the color of the navigation bar may be determined according to the background property of the navigation bar and the icon property of the navigation bar in the interface property of the interface. In this case, the color of the navigation bar is actually set by the user, thereby satisfying the personalized needs of the user and improving the user experience.
  • the execution manner of the method of the foregoing step 3021 and the manner of the foregoing step 3022-3023 is not limited, and may be set according to actual application requirements, for example, the method of step 3021 may be performed first. In the manner of step 3022-3023, the manner of step 3021 is performed again in the manner of step 3022-3023. Of course, only one of the manner of step 3021 and the manner of step 3022-3023 described above may be selected. Considering that if the user customizes the color of the navigation bar, the color of the navigation bar may not be reset. Therefore, the method of step 30221.
  • Step 303 Display a navigation bar according to the color of the navigation bar.
  • a target area having the same size as the navigation bar is divided in the specified view of the interface, and the navigation bar is displayed in the target area according to the color of the navigation bar.
  • the navigation bar is displayed in a specified area on the screen according to the color of the navigation bar; or, the target area having the same size as the navigation bar is added to the position adjacent to the interface, according to the navigation The color of the bar, showing the navigation bar in the target area.
  • the specified view can be set in advance, and the specified view can be a top-level and full-screen view, such as a specified view, such as decorview.
  • the target area when the target area is divided from the specified view of the interface, the target area may be located at the bottom of the specified view of the interface, of course, the target area may also be located at the bottom of the specified view.
  • Other locations in the specified view of the interface that are convenient for the user to operate; when the target area is added in the position adjacent to the interface, the target area may be located below the bottom of the interface, of course, the target area may also be located at the interface.
  • the designated area can be set in advance, and in order to facilitate the user to operate the virtual button in the navigation bar, the designated area can be located at the bottom of the screen.
  • the designated area can also be located at other positions in the screen that are convenient for the user to operate. This example does not limit this.
  • the interface includes a specified view, and a target area having the same size as the navigation bar may be divided in the specified view of the interface, and the navigation bar is displayed in the target area according to the color of the navigation bar.
  • the interface does not include a specified view, and the navigation bar can be displayed in a designated area on the screen according to the color of the navigation bar.
  • the color of the target area when the navigation bar is displayed in the target area, the color of the target area may be set as the background color of the navigation bar, and in the target area, the background of the navigation bar is drawn in a transparent color, and the icon of the navigation bar is used.
  • the color draws the icon of the navigation bar to realize the display of the navigation bar in the target area; or, in the target area, draws the background of the navigation bar with the background color of the navigation bar, and draws the icon of the navigation bar with the icon color of the navigation bar, thereby realizing The display of the navigation bar in the target area.
  • the color of the target area is set to the background color of the navigation bar.
  • the background of the navigation bar is drawn in a transparent color, which can be visually achieved when the interface is started or closed, that is, when the interface is switched. Better coherence, which further enhances the display.
  • the background of the navigation bar may be drawn in the specified area
  • the icon of the navigation bar may be drawn by the icon color of the navigation bar.
  • the interface and the navigation bar may be displayed at the same time.
  • the navigation bar may be displayed first and then the interface is displayed. .
  • the edge of the area where the content of the navigation bar is displayed and the area of the content of the display interface may be set to a designated color, and of course, other manners may be used.
  • the content of the navigation bar and the content of the interface are distinguished, which is not limited in this application.
  • the specified color may be set in advance, for example, the designated color may be grayish white, white, or the like, which is not limited in the embodiment of the present application.
  • most of the interfaces can start the input method window for text input.
  • the chat interface in the social application and the search interface in the browser can start the input method window for text input. Therefore, further, the coordinated display of the input method window and the navigation bar can be implemented in the embodiment of the present application.
  • the input method window is determined from at least two interfaces displayed on the screen; determining the main color of the input method window; determining the color of the navigation bar according to the main color of the input method window; displaying according to the color of the navigation bar Navigation Bar.
  • an interface attribute of each of the at least two interfaces may be acquired, according to each of the at least two interfaces The interface properties of the interfaces from which the input method window is determined.
  • the operation of determining the primary color tone of the input method window is similar to the operation of determining the primary color tone of the interface in the above step 302, and details are not described herein again.
  • the operation of determining the color of the navigation bar according to the main color of the input method window is similar to the operation of determining the color of the navigation bar according to the main color of the interface in the above step 302, which is not described in detail in this embodiment of the present application.
  • the navigation bar when the navigation bar is displayed, the navigation bar may be displayed in the designated area on the screen according to the color of the navigation bar; or, the size of the navigation bar may be added to the position adjacent to the input method window.
  • the same target area displays the navigation bar in the target area according to the color of the navigation bar.
  • the target area when the target area is added in the position adjacent to the input method window, the target area may be located below the bottom of the input method window. Of course, the target area may also be located in the input method window.
  • the other embodiments of the present application are not limited in this embodiment.
  • the display and hiding of the navigation bar has its own fixed program, that is, the navigation bar will be displayed at a specific timing and hidden at a specific timing. For example, when a specified operation is detected, a navigation bar is displayed, when at a certain The navigation bar is hidden when the specified action is not detected within the duration. However, when the navigation bar is displayed, the color of the navigation bar needs to be determined before the navigation bar can be drawn. Therefore, in order to prevent the display of the navigation bar from being inaccurate, the embodiment of the present application receives the display instruction for displaying the interface in step 301. If the navigation bar display instruction is detected, it may be determined whether the operation of determining the color of the navigation bar has been performed.
  • the navigation bar is displayed; if the operation has not been performed, the preset duration is continued, if If the operation is performed within the preset duration, the navigation bar is displayed when the operation is completed. If the operation has not been performed within the preset duration, the navigation bar is displayed after the preset duration.
  • the navigation bar display instruction is used to display the navigation bar, and the navigation bar display instruction can be automatically triggered by the terminal, and the terminal can trigger at a specific timing.
  • the preset duration can be set in advance, and the preset duration can be set according to actual application requirements, which is not limited in this embodiment of the present application.
  • the background color of the navigation bar and the icon color of the navigation bar may be determined first. Whether the colors are the same, if yes, the color of the navigation bar is re-determined, and if not, the step of displaying the navigation bar according to the color of the navigation bar is performed.
  • the operation of re-determining the color of the navigation bar is the same as the operation of determining the color of the navigation bar.
  • the primary color tone of the interface may be determined, and the color of the navigation bar is determined according to the primary color tone of the interface, so that the color of the navigation bar and the main interface of the interface The tones match.
  • the navigation bar is displayed, so that the coordinated display of the interface and the navigation bar can be realized, thereby improving the overall display effect.
  • the embodiment of the present application can determine the input method window from at least two interfaces displayed on the screen, and determine the color of the navigation bar according to the main color of the input method window, thereby implementing the input method. Coordinated display of windows and navigation bars.
  • the navigation bar display method provided in the foregoing embodiment is exemplified for the sake of easy understanding, and the navigation bar display method provided by the foregoing embodiment is described in conjunction with FIG. 3F to FIG. Specifically, the following cases are taken as an example for explanation.
  • the first case after receiving the display instruction for displaying the application interface, referring to FIG. 3F, the display of the navigation bar can be implemented by the following steps 3F01-3F03.
  • Step 3F01 determining whether the interface attribute of the application interface includes the navigation bar background attribute and the navigation bar icon attribute; if the interface attribute of the application interface includes the navigation bar background attribute and the navigation bar icon attribute, proceed to step 3F02;
  • Step 3F02 determining the background color of the navigation bar according to the attribute value of the navigation bar background attribute, and determining the icon color of the navigation bar according to the attribute value of the navigation bar icon attribute;
  • Step 3F03 Display the navigation bar according to the color of the navigation bar.
  • the second case after receiving the display instruction for displaying the bullet frame window, referring to FIG. 3G, the display of the navigation bar can be implemented by the following steps 3G01-3G04.
  • Step 3G01 Determine whether the navigation bar background attribute and the navigation bar icon attribute are included in the interface attribute of the bullet box window. If the interface attribute of the bullet box window does not include the navigation bar background attribute and the navigation bar icon attribute, proceed to step 3G02. ;
  • Step 3G02 determining whether the frame window is a child window, and assuming that the frame window is not a child window, proceeding to step 3G03;
  • Step 3G03 determining the main color of the bullet frame window, and determining the color of the navigation bar according to the main color of the bullet frame window;
  • Step 3G04 Display the navigation bar according to the color of the navigation bar.
  • the third case after receiving the display instruction for displaying the sub-window, referring to FIG. 3H, the display of the navigation bar can be implemented by the following steps 3H01-3H02.
  • Step 3H01 determining whether the navigation window background attribute and the navigation bar icon attribute are included in the interface attribute of the sub-window, and assuming that the navigation window background attribute and the navigation bar icon attribute are not included in the interface attribute of the sub-window, proceeding to step 3H02;
  • Step 3H02 Determine whether the child window is a child window. Since the child window is a child window, the process ends. At this time, the color of the navigation bar is determined according to the parent window of the child window.
  • the fourth case When the call input program is detected, referring to FIG. 3I, the display of the navigation bar can be implemented by the following steps 3I01-3I05.
  • Step 3I01 determining an input method window from at least two interfaces displayed on the screen
  • the at least two interfaces include an interface of the input method program and an interface of an application that invokes the input method program.
  • Step 3I02 Determine whether the navigation bar background attribute and the navigation bar icon attribute are included in the interface attribute of the input method window. If the interface attribute of the input method window does not include the navigation bar background attribute and the navigation bar icon attribute, proceed to step 3I03. ;
  • Step 3I03 determining whether the input method window is a child window, since the input method window is not a child window, proceeding to step 3I04;
  • Step 3I04 determining a primary color of the input method window, and determining a color of the navigation bar according to a primary color of the input method window;
  • Step 3I05 Display the navigation bar according to the color of the navigation bar.
  • the display process of the navigation bar is only described by using the above several situations as an example.
  • the display process of the navigation bar may also be different. For example, this is not listed one by one.
  • an embodiment of the present application provides a navigation bar display device, which includes a receiving module 401, a first determining module 402, a second determining module 403, and a display module 404.
  • a navigation bar display device comprising:
  • the receiving module 401 is configured to receive a display instruction for displaying the interface
  • a first determining module 402 configured to determine a primary color tone of the interface
  • a second determining module 403 configured to determine a color of the navigation bar according to a primary color tone of the interface, where the color includes a background color and an icon color;
  • the display module 404 is configured to display a navigation bar according to the color of the navigation bar.
  • the first determining module 402 is configured to:
  • the dominant color of the interface is determined.
  • the display module 404 includes:
  • a first display sub-module configured to: when the interface includes the specified view, divide a target area having the same size as the navigation bar in the specified view of the interface, and display a navigation bar in the target area according to the color of the navigation bar, and specify a view a view that is at the top and displayed in full screen;
  • the second display sub-module is configured to display a navigation bar in a designated area on the screen according to the color of the navigation bar when the interface does not include the specified view.
  • the first display submodule is used to:
  • the background of the navigation bar is drawn in a transparent color
  • the icon of the navigation bar is drawn in the icon color of the navigation bar.
  • the device further includes:
  • a third determining module configured to determine an input method window from at least two interfaces displayed on the screen when the input method program is detected, wherein the at least two interfaces include an interface of the input method program and a call center An interface of an application of the input method program;
  • a fourth determining module configured to determine a primary color tone of the input method window
  • a fifth determining module configured to determine a color of the navigation bar according to a primary color tone of the input method window
  • a display module for displaying a navigation bar according to the color of the navigation bar.
  • the primary color tone of the interface may be determined, and the color of the navigation bar is determined according to the primary color tone of the interface, so that the color of the navigation bar and the interface are The main tones match. After that, according to the color of the navigation bar, the navigation bar is displayed, so that the coordinated display of the interface and the navigation bar can be realized, thereby improving the overall display effect.
  • navigation bar display device provided by the above embodiment is displayed in the navigation bar, only the division of the above functional modules is illustrated. In actual applications, the functions may be allocated by different functional modules as needed. Upon completion, the internal structure of the navigation bar display device is divided into different functional modules to complete all or part of the functions described above.
  • the navigation bar display device and the navigation bar display method embodiment provided in the above embodiments are in the same concept, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • FIG. 5 is a schematic structural diagram of a navigation bar display device according to an embodiment of the present disclosure, which may be, but not limited to, a terminal.
  • the apparatus includes at least one processor 501, a communication bus 502, a memory 503, and at least one communication interface 504.
  • the processor 501 can be a general purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more programs for controlling the execution of the embodiment of the present application. Integrated circuit.
  • CPU general purpose central processing unit
  • ASIC application-specific integrated circuit
  • Communication bus 502 can include a path for communicating information between the components described above.
  • the memory 503 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type that can store information and instructions.
  • the dynamic storage device can also be an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, and a disc storage device. (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be Any other medium accessed by the device, but is not limited thereto.
  • Memory 503 may be present independently and coupled to processor 501 via communication bus 502. The memory 503 can also be integrated with the processor 501.
  • Communication interface 504 using any type of transceiver, for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc. .
  • RAN Radio Access Network
  • WLAN Wireless Local Area Networks
  • processor 501 can include one or more CPUs, such as CPU0 and CPU1 shown in FIG.
  • the apparatus can include a plurality of processors, such as processor 501 and processor 505 shown in FIG.
  • processors can be a single core processor (CPU) or a multi-core processor (multi-CPU).
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data, such as computer program instructions.
  • the memory 503 is configured to store the program code 510 for executing the embodiment of the present application
  • the processor 501 is configured to execute the program code 510 stored in the memory 503.
  • the device can implement the navigation bar display method provided by the embodiment of FIG. 3A, FIG. 3B, FIG. 3C, FIG. 3F, FIG. 3G, FIG. 3H, and FIG. 3I by using the program code 510 in the processor 501 and the memory 503.
  • the present application provides a computer readable storage medium having stored thereon computer instructions that, when executed by the processor, implement the navigation bar display method provided by the above embodiments.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)). )Wait.
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a digital versatile disc (DVD)
  • DVD digital versatile disc
  • SSD solid state disk

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A navigation bar display method and apparatus, and a computer readable storage medium, the method comprising: receiving a display instruction that is used for displaying an interface (301), determining the dominant hue of the interface, and determining the color of a navigation bar according to the dominant hue of the interface, the color comprising a background color and an icon color (302); displaying the navigation bar according to the color of the navigation bar (303). When displaying the navigation bar, the color of the navigation bar may be determined according to the dominant hue of the interface, so that the color of the navigation bar matches the dominant hue of the interface, thus achieving the coordinated display of the interface and the navigation bar, improving the overall display effect.

Description

导航栏显示方法、装置和计算机可读存储介质Navigation bar display method, device and computer readable storage medium
本申请要求于2017年9月7日提交中国专利局、申请号为201710819750.5、发明名称为“导航栏显示方法、装置和计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on Sep. 7, 2017, the Chinese Patent Application No. PCT Application No. Combined in this application.
技术领域Technical field
本申请涉及终端技术领域,特别涉及一种导航栏显示方法、装置和计算机可读存储介质。The present application relates to the field of terminal technologies, and in particular, to a navigation bar display method, apparatus, and computer readable storage medium.
背景技术Background technique
随着终端技术的发展,诸如手机、电脑等终端已经成为人们日常生活中不可或缺的一部分。为了便于用户对终端的使用,往往将终端中的虚拟按键(如返回键、主页键、菜单键等)设置在导航栏中,并将导航栏显示在终端的屏幕上以供用户操作。With the development of terminal technologies, terminals such as mobile phones and computers have become an indispensable part of people's daily lives. In order to facilitate the user's use of the terminal, the virtual keys (such as the return key, the home key, the menu key, etc.) in the terminal are often set in the navigation bar, and the navigation bar is displayed on the screen of the terminal for the user to operate.
相关技术中,如图1所示,终端通常将导航栏的背景颜色固定设置为黑色,将导航栏的图标颜色固定设置为白色,并根据设置的背景颜色和图标颜色来对导航栏进行显示。In the related art, as shown in FIG. 1 , the terminal generally sets the background color of the navigation bar to black, sets the icon color of the navigation bar to white, and displays the navigation bar according to the set background color and the icon color.
然而,为了使用户能够看清终端中的界面,大多数的界面都是亮色调,如图1所示的日历界面即是以白色为主。在此情况下,由于导航栏的背景颜色为黑色,图标颜色为白色,即导航栏整体为暗色调,所以界面与导航栏的颜色差异过大,从而导致界面与导航栏的显示不协调,影响了整体的显示效果。However, in order to enable the user to see the interface in the terminal, most of the interfaces are bright colors, and the calendar interface shown in FIG. 1 is mainly white. In this case, since the background color of the navigation bar is black, the icon color is white, that is, the navigation bar as a whole has a dark color, so the color difference between the interface and the navigation bar is too large, resulting in uncoordinated display of the interface and the navigation bar, affecting The overall display effect.
发明内容Summary of the invention
第一方面,提供了一种导航栏显示方法,所述方法包括:In a first aspect, a navigation bar display method is provided, the method comprising:
接收用于显示界面的显示指令;Receiving a display instruction for displaying an interface;
确定所述显示界面的主色调;Determining a primary color of the display interface;
根据所述显示界面的主色调,确定导航栏的颜色,所述导航栏的颜色包括背景颜色和图标颜色;Determining a color of the navigation bar according to a primary color tone of the display interface, where the color of the navigation bar includes a background color and an icon color;
根据所述导航栏的颜色,显示所述导航栏。The navigation bar is displayed according to the color of the navigation bar.
可选地,所述确定所述显示界面的主色调,包括:Optionally, the determining a primary color tone of the display interface includes:
当所述显示界面不为子窗口时,确定所述显示界面的主色调。When the display interface is not a sub-window, the main color of the display interface is determined.
可选地,所述根据所述导航栏的颜色,显示所述导航栏,包括:Optionally, the displaying the navigation bar according to the color of the navigation bar comprises:
当所述显示界面包括指定视图时,在所述显示界面的指定视图中划分与所述导航栏的尺寸相同的目标区域,根据所述导航栏的颜色,在所述目标区域中显示所述导航栏,其中,所述指定视图为处于顶层且全屏显示的视图。When the display interface includes a specified view, a target area having the same size as the navigation bar is divided in a specified view of the display interface, and the navigation is displayed in the target area according to a color of the navigation bar. a column, wherein the specified view is a top-level and full-screen view.
可选地,所述根据所述导航栏的颜色,显示所述导航栏,包括:Optionally, the displaying the navigation bar according to the color of the navigation bar comprises:
当所述界面不包括指定视图时,根据所述导航栏的颜色,在屏幕上的指 定区域中显示所述导航栏,其中,所述指定视图为处于顶层且全屏显示的视图。When the interface does not include the specified view, the navigation bar is displayed in a designated area on the screen according to the color of the navigation bar, wherein the specified view is a view that is at the top level and displayed in full screen.
可选地,所述根据所述导航栏的颜色,在所述目标区域中显示所述导航栏,包括:Optionally, the displaying the navigation bar in the target area according to the color of the navigation bar comprises:
将所述目标区域的颜色设置为所述导航栏的背景颜色;Setting a color of the target area to a background color of the navigation bar;
在所述目标区域中,以透明色绘制所述导航栏的背景,以所述导航栏的图标颜色绘制所述导航栏的图标。In the target area, the background of the navigation bar is drawn in a transparent color, and the icon of the navigation bar is drawn in the icon color of the navigation bar.
可选地,所述方法还包括:Optionally, the method further includes:
当检测到调用输入法程序时,从屏幕上显示的至少两个界面中确定输入法窗口,其中,所述至少两个界面包括所述输入法程序的界面以及调用所述输入法程序的应用程序的界面;Determining an input method window from at least two interfaces displayed on the screen when the input method program is detected, wherein the at least two interfaces include an interface of the input method program and an application that invokes the input method program Interface
确定所述输入法窗口的主色调;Determining a primary color of the input method window;
根据所述输入法窗口的主色调,确定所述导航栏的颜色;Determining a color of the navigation bar according to a primary color tone of the input method window;
根据所述导航栏的颜色,显示所述导航栏。The navigation bar is displayed according to the color of the navigation bar.
第二方面,提供了一种导航栏显示装置,所述装置包括:In a second aspect, a navigation bar display device is provided, the device comprising:
接收模块,用于接收用于显示界面的显示指令;a receiving module, configured to receive a display instruction for displaying an interface;
第一确定模块,用于确定所述显示界面的主色调;a first determining module, configured to determine a primary color tone of the display interface;
第二确定模块,用于根据所述显示界面的主色调,确定导航栏的颜色,所述导航栏的颜色包括的背景颜色和图标颜色;a second determining module, configured to determine a color of the navigation bar according to a primary color tone of the display interface, where the color of the navigation bar includes a background color and an icon color;
显示模块,用于根据所述导航栏的颜色,显示所述导航栏。a display module, configured to display the navigation bar according to a color of the navigation bar.
可选地,所述第一确定模块用于:Optionally, the first determining module is configured to:
当所述显示界面不为子窗口时,确定所述显示界面的主色调。When the display interface is not a sub-window, the main color of the display interface is determined.
可选地,所述显示模块包括:Optionally, the display module includes:
第一显示子模块,用于当所述界面包括指定视图时,在所述界面的指定视图中划分与所述导航栏的尺寸相同的目标区域,根据所述导航栏的颜色,在所述目标区域中显示所述导航栏,其中,所述指定视图为处于顶层且全屏显示的视图。a first display submodule, configured to: when the interface includes a specified view, divide a target area that is the same size as the navigation bar in a specified view of the interface, according to a color of the navigation bar, in the target The navigation bar is displayed in the area, wherein the specified view is a top-level and full-screen view.
可选地,所述显示模块包括:Optionally, the display module includes:
第二显示子模块,用于当所述界面不包括指定视图时,根据所述导航栏的颜色,在屏幕上的指定区域中显示所述导航栏,其中,所述指定视图为处于顶层且全屏显示的视图。a second display submodule, configured to display the navigation bar in a designated area on the screen according to a color of the navigation bar when the interface does not include a specified view, where the specified view is at the top layer and full screen The view that is displayed.
可选地,所述第一显示子模块用于:Optionally, the first display submodule is used to:
将所述目标区域的颜色设置为所述导航栏的背景颜色;Setting a color of the target area to a background color of the navigation bar;
在所述目标区域中,以透明色绘制所述导航栏的背景,以所述导航栏的图标颜色绘制所述导航栏的图标。In the target area, the background of the navigation bar is drawn in a transparent color, and the icon of the navigation bar is drawn in the icon color of the navigation bar.
可选地,所述装置还包括:Optionally, the device further includes:
第三确定模块,用于当检测到调用输入法程序时,从屏幕上显示的至少两个界面中确定输入法窗口,其中,所述至少两个界面包括所述输入法程序 的界面以及调用所述输入法程序的应用程序的界面;a third determining module, configured to determine an input method window from at least two interfaces displayed on the screen when the input method program is detected, wherein the at least two interfaces include an interface of the input method program and a call center An interface of an application of the input method program;
第四确定模块,用于确定所述输入法窗口的主色调;a fourth determining module, configured to determine a primary color tone of the input method window;
第五确定模块,用于根据所述输入法窗口的主色调,确定所述导航栏的颜色;a fifth determining module, configured to determine a color of the navigation bar according to a primary color tone of the input method window;
显示模块,用于根据所述导航栏的颜色,显示所述导航栏。a display module, configured to display the navigation bar according to a color of the navigation bar.
第三方面,提供一种终端,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时实现上述第一方面所述的任一项方法的步骤。In a third aspect, a terminal is provided, comprising a memory and a processor, the memory storing a computer program, the computer program being executed by the processor to implement the steps of any of the methods of the first aspect.
第四方面,提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,所述计算机指令被处理器执行时实现上述第一方面所述的任一项方法的步骤。In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium having computer instructions stored thereon, the computer instructions being executed by a processor to implement the steps of any of the methods of the first aspect.
本申请实施例提供的技术方案带来的有益效果包括:接收用于显示界面的显示指令后,可以确定该界面的主色调,并根据该界面的主色调,确定导航栏的颜色,从而使得导航栏的颜色与该界面的主色调相匹配。之后,根据导航栏的颜色,显示导航栏,从而可以实现界面与导航栏的协调显示,进而提高了整体的显示效果。The beneficial effects of the technical solution provided by the embodiment of the present application include: after receiving a display instruction for displaying an interface, determining a primary color tone of the interface, and determining a color of the navigation bar according to a primary color tone of the interface, thereby enabling navigation The color of the bar matches the primary color of the interface. After that, according to the color of the navigation bar, the navigation bar is displayed, so that the coordinated display of the interface and the navigation bar can be realized, thereby improving the overall display effect.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图1是相关技术提供的显示界面与导航栏的示意图;1 is a schematic diagram of a display interface and a navigation bar provided by the related art;
图2是本申请实施例提供的一种导航栏显示系统的结构示意图;2 is a schematic structural diagram of a navigation bar display system according to an embodiment of the present application;
图3A是本申请实施例提供的一种导航栏显示方法的流程图;3A is a flowchart of a method for displaying a navigation bar according to an embodiment of the present application;
图3B是本申请实施例提供的另一种导航栏显示方法的流程图;FIG. 3B is a flowchart of another navigation bar display method according to an embodiment of the present application; FIG.
图3C是本申请实施例提供的又一种导航栏显示方法的流程图;FIG. 3C is a flowchart of still another method for displaying a navigation bar according to an embodiment of the present application; FIG.
图3D是本申请实施例提供的一种目标区域的示意图;3D is a schematic diagram of a target area provided by an embodiment of the present application;
图3E是本申请实施例提供的一种指定区域的示意图;3E is a schematic diagram of a designated area provided by an embodiment of the present application;
图3F是本申请实施例提供的第一种导航栏显示操作的流程图;FIG. 3F is a flowchart of a first navigation bar display operation provided by an embodiment of the present application; FIG.
图3G是本申请实施例提供的第二种导航栏显示操作的流程图;3G is a flowchart of a second navigation bar display operation provided by an embodiment of the present application;
图3H是本申请实施例提供的第三种导航栏显示操作的流程图;3H is a flowchart of a third navigation bar display operation provided by an embodiment of the present application;
图3I是本申请实施例提供的第四种导航栏显示操作的流程图;FIG. 3I is a flowchart of a fourth navigation bar display operation according to an embodiment of the present application; FIG.
图4是本申请实施例提供的一种导航栏显示装置的结构示意图;4 is a schematic structural diagram of a navigation bar display device according to an embodiment of the present application;
图5是本申请实施例提供的另一种导航栏显示装置的结构示意图。FIG. 5 is a schematic structural diagram of another navigation bar display apparatus according to an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申 请实施方式作进一步地详细描述。In order to make the objects, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
为了便于理解,在对本申请实施例进行详细地解释说明之前,对本申请实施例涉及的应用场景和系统架构进行介绍。For the sake of understanding, the application scenarios and system architectures involved in the embodiments of the present application are introduced before the embodiments of the present application are explained in detail.
首先,对本申请实施例涉及的应用场景进行介绍。First, the application scenario involved in the embodiment of the present application is introduced.
在人们的日常生活中,为了避免终端上的实体按键的频繁损坏给用户带来不好的使用体验,通常会在终端中设置虚拟按键,且会将虚拟按键设置在终端所显示的导航栏中以供用户操作。当用户打开终端上的一个界面后,如果想要切换到另一个界面,则用户可以点击所显示的导航栏中的虚拟按键来实现从一个界面退出并进入另一个界面的操作。接下来对这种场景进行举例说明。In people's daily life, in order to avoid frequent damage to the user's keys on the terminal, the virtual button is usually set in the terminal, and the virtual button is set in the navigation bar displayed by the terminal. For the user to operate. After the user opens an interface on the terminal, if you want to switch to another interface, the user can click the virtual button in the displayed navigation bar to implement the operation of exiting from one interface and entering another interface. Let's take an example of this scenario.
例如,当用户正在终端中的浏览器中阅读新闻时,如果用户想要拨打电话,则用户可以点击所显示的导航栏中的虚拟按键,从浏览器界面切换到拨号界面来拨打电话。For example, when the user is reading news in a browser in the terminal, if the user wants to make a call, the user can click the virtual button in the displayed navigation bar to switch from the browser interface to the dialing interface to make a call.
例如,当用户在终端中的视频应用中观看视频时,如果用户想要查询天气,则用户可以点击所显示的导航栏中的虚拟按键,从视频界面切换到天气查询界面来查询天气。For example, when the user watches the video in the video application in the terminal, if the user wants to query the weather, the user can click the virtual button in the displayed navigation bar to switch from the video interface to the weather query interface to query the weather.
需要说明的是,导航栏中的虚拟按键不仅可以用于实现界面切换,也可以用于实现其他功能,如可以用于设置桌面挂件、滑屏特效等,本申请实施例对此不作限定。It should be noted that the virtual button in the navigation bar can be used not only to implement interface switching, but also to implement other functions, such as setting a desktop pendant, a sliding screen special effect, etc., which is not limited in this embodiment.
本申请实施例不仅可以应用于上述几种应用场景中,实际应用中,可能还可以应用于其他的应用场景中,本申请实施例对此不再一一列举。The embodiments of the present application may be applied to the foregoing application scenarios, and may be applied to other application scenarios in the actual application.
然后,对本申请实施例涉及的系统架构进行介绍。Then, the system architecture involved in the embodiment of the present application is introduced.
图2是本申请实施例提供的一种导航栏显示系统的结构示意图。导航栏显示系统可以部署于终端上。如图2所示,导航栏显示系统可以包括中间服务层201和导航栏显示模块202。FIG. 2 is a schematic structural diagram of a navigation bar display system according to an embodiment of the present application. The navigation bar display system can be deployed on the terminal. As shown in FIG. 2, the navigation bar display system can include an intermediate service layer 201 and a navigation bar display module 202.
其中,中间服务层201可以接收用于显示界面的显示指令后,确定该界面的主色调,并根据该界面的主色调,确定导航栏的颜色;导航栏显示模块202可以根据中间服务层201所确定的导航栏的颜色,显示导航栏。The intermediate service layer 201 can determine the primary color of the interface after receiving the display instruction for displaying the interface, and determine the color of the navigation bar according to the primary color tone of the interface; the navigation bar display module 202 can be configured according to the intermediate service layer 201. Determine the color of the navigation bar and display the navigation bar.
另外,中间服务层201和导航栏显示模块202之间可以通过指定接口进行通信,指定接口可以预先进行设置,如指定接口可以为aidl(Android Interface Definition Language,安卓接口定义语言)接口等,本申请实施例对此不作限定。In addition, the intermediate service layer 201 and the navigation bar display module 202 can communicate with each other through a specified interface, and the specified interface can be set in advance, for example, the designated interface can be an aidl (Android Interface Definition Language) interface, etc. The embodiment does not limit this.
在介绍完本申请实施例涉及的应用场景和系统架构之后,下面对本申请实施例提供的导航栏显示方法进行详细的解释说明。After the application scenario and system architecture involved in the embodiment of the present application are introduced, the navigation bar display method provided by the embodiment of the present application is explained in detail below.
图3A为本申请实施例提供的一种导航栏显示方法的流程图,该方法应用于终端包括的导航栏显示系统。参见图3A,该方法包括如下步骤:FIG. 3A is a flowchart of a method for displaying a navigation bar according to an embodiment of the present disclosure, where the method is applied to a navigation bar display system included in the terminal. Referring to FIG. 3A, the method includes the following steps:
步骤301:接收用于显示界面的显示指令。Step 301: Receive a display instruction for displaying an interface.
需要说明的是,步骤301可以由导航栏显示系统中的中间服务层执行,当然,实际应用中,步骤301也可以由终端中的其他模块执行,本申请实施例对此不作限定。It should be noted that the step 301 can be performed by the intermediate service layer in the navigation bar display system. Of course, in the actual application, the step 301 can also be performed by other modules in the terminal, which is not limited in this embodiment of the present application.
另外,该显示指令用于显示界面,且该显示指令可以由用户触发,用户可以通过指定操作触发,指定操作可以为单击操作、双击操作、语音操作等,本申请实施例对此不作限定。In addition, the display instruction is used to display the interface, and the display instruction may be triggered by the user, and the user may trigger the operation by a specified operation, and the specified operation may be a click operation, a double-click operation, a voice operation, or the like, which is not limited in this embodiment of the present application.
再者,该界面可以为终端中的各种界面,如可以为终端中的系统界面、应用界面、弹框窗口等。Furthermore, the interface may be various interfaces in the terminal, such as a system interface, an application interface, a bullet box window, and the like in the terminal.
例如,当用户点击终端中的主页键时,即会触发用于显示系统主页的显示指令;当用户点击某一应用的图标时,即会触发用于显示该应用的应用界面的显示指令;当用户点击终端中的返回键时,即会触发用于显示前一界面的显示指令。For example, when the user clicks the home button in the terminal, a display instruction for displaying the homepage of the system is triggered; when the user clicks on the icon of an application, a display instruction for displaying the application interface of the application is triggered; When the user clicks the back key in the terminal, a display instruction for displaying the previous interface is triggered.
步骤302:确定该界面的主色调,根据该界面的主色调,确定导航栏的颜色,该颜色包括背景颜色和图标颜色。Step 302: Determine a primary color of the interface, and determine a color of the navigation bar according to a primary color of the interface, the color including a background color and an icon color.
需要说明的是,步骤302可以由导航栏显示系统中的中间服务层执行,当然,实际应用中,步骤302也可以由终端中的其他模块执行,本申请实施例对此不作限定。It should be noted that the step 302 can be performed by the intermediate service layer in the navigation bar display system. Of course, in the actual application, the step 302 can also be performed by other modules in the terminal, which is not limited in this embodiment of the present application.
另外,某个界面的主色调为该界面的颜色的总体倾向,该主色调可以包括暗色调、亮色调等。In addition, the primary hue of an interface is the overall tendency of the color of the interface, which may include dark tones, bright tones, and the like.
再者,本申请实施例中可以根据界面的主色调来确定导航栏的颜色,此时导航栏的颜色与界面的主色调相匹配,从而在后续显示导航栏后,可以实现界面与导航栏的协调显示,进而提高了整体的显示效果,提高了用户体验。Furthermore, in the embodiment of the present application, the color of the navigation bar may be determined according to the main color tone of the interface, and the color of the navigation bar is matched with the main color of the interface, so that after the navigation bar is subsequently displayed, the interface and the navigation bar may be implemented. Coordinated display, which improves the overall display and improves the user experience.
其中,确定该界面的主色调时,可以当该界面采用系统主题时,获取该系统主题的指定参数的参数值,根据指定参数的参数值,确定该界面的主色调;当该界面未采用系统主题时,确定该界面的颜色,根据该界面的颜色,确定该界面的主色调。当然,实际应用中,也可以通过其他方式来确定该界面的主色调,如可以不对该界面是否采用系统主题进行判断,直接确定该界面的颜色,并根据该界面的颜色,确定该界面的主色调等,本申请实施例对此不作限定。Wherein, when determining the main color of the interface, when the interface adopts the system theme, the parameter value of the specified parameter of the system theme is obtained, and the main color of the interface is determined according to the parameter value of the specified parameter; when the interface is not adopted by the system When the theme is used, the color of the interface is determined, and the main color of the interface is determined according to the color of the interface. Of course, in actual applications, the main color of the interface may also be determined by other means. For example, whether the interface is judged by using the system theme may be directly determined, and the color of the interface may be directly determined, and the main interface of the interface may be determined according to the color of the interface. The color tone and the like are not limited in the embodiment of the present application.
需要说明的是,指定参数可以预先进行设置,且指定参数为用于指示该界面的主色调的参数,如指定参数的参数值可以为该界面的整体亮度值等。It should be noted that the specified parameter may be set in advance, and the specified parameter is a parameter for indicating the primary color tone of the interface, and the parameter value of the specified parameter may be an overall brightness value of the interface or the like.
另外,该界面的颜色可以用该界面的整体亮度值来表示,该界面的整体亮度值可以根据该界面中像素的子像素的亮度值确定得到。例如,在RGB(Red Green Blue,红绿蓝)色彩模式下,该界面的颜色可以用该界面的整体亮度值来表示,且该界面的整体亮度值可以根据该界面中像素的R子像素、G子像素和B子像素的亮度值确定得到。In addition, the color of the interface can be represented by the overall brightness value of the interface, and the overall brightness value of the interface can be determined according to the brightness value of the sub-pixel of the pixel in the interface. For example, in the RGB (Red Green Blue) color mode, the color of the interface can be represented by the overall brightness value of the interface, and the overall brightness value of the interface can be based on the R sub-pixels of the pixels in the interface. The luminance values of the G sub-pixel and the B sub-pixel are determined.
其中,当指定参数的参数值为该界面的整体亮度值时,或当该界面的颜色用该界面的整体亮度值来表示时,根据指定参数的参数值,确定该界面的 主色调,或根据该界面的颜色,确定该界面的主色调,即是根据该界面的整体亮度值,确定该界面的主色调。具体地,可以根据该界面的整体亮度值,从存储的亮度值与主色调之间的对应关系中,获取对应的主色调,并将获取的主色调确定为该界面的主色调。当然,实际应用中,也可以通过其他方式根据该界面的整体亮度值,确定该界面的主色调,本申请实施例对此不作限定。Wherein, when the parameter value of the specified parameter is the overall brightness value of the interface, or when the color of the interface is represented by the overall brightness value of the interface, the main color of the interface is determined according to the parameter value of the specified parameter, or according to The color of the interface determines the dominant color of the interface, that is, determines the dominant color of the interface based on the overall brightness value of the interface. Specifically, the corresponding main color tone may be obtained from the correspondence relationship between the stored brightness value and the main color tone according to the overall brightness value of the interface, and the acquired main color tone is determined as the main color tone of the interface. Of course, in the actual application, the main color tone of the interface may be determined according to the overall brightness value of the interface, which is not limited in this embodiment of the present application.
例如,该界面的整体亮度值为亮度值1,则可以根据该亮度值1,从如下表1所示的亮度值与主色调之间的对应关系,获取对应的主色调为暗色调,并确定该界面的主色调为暗色调。For example, if the overall brightness value of the interface is a brightness value of 1, the corresponding primary color tone may be obtained as a dark color tone according to the brightness value 1 from the correspondence relationship between the brightness value and the main color tone shown in Table 1 below, and determined. The main color of the interface is a dark hue.
表1Table 1
亮度值Brightness value 主色调main color tone
[亮度值1,亮度值15)[Brightness value 1, brightness value 15) 暗色调Dark tones
[亮度值15,亮度值25)[Brightness value 15, brightness value 25) 亮色调Bright tones
……...... ……......
需要说明的是,本申请实施例中仅以上表1所示的亮度值与主色调之间的对应关系为例进行说明,上表1并不对本申请实施例构成限定。It should be noted that, in the embodiment of the present application, only the correspondence relationship between the luminance value and the primary color tone shown in Table 1 above is taken as an example. The above Table 1 does not limit the embodiment of the present application.
其中,根据该界面的主色调,确定导航栏的颜色时,可以根据该界面的主色调,从存储的主色调与背景颜色和图标颜色之间的对应关系中,获取对应的背景颜色和图标颜色,并将获取的背景颜色确定为导航栏的背景颜色,将获取的图标颜色确定为导航栏的图标颜色。当然,实际应用中,也可以通过其他方式根据该界面的主色调,确定导航栏的颜色,本申请实施例对此不作限定。Wherein, according to the main color of the interface, when determining the color of the navigation bar, the corresponding background color and icon color may be obtained from the corresponding relationship between the stored main color and the background color and the icon color according to the main color of the interface. And determining the background color obtained as the background color of the navigation bar, and determining the obtained icon color as the icon color of the navigation bar. Of course, in the actual application, the color of the navigation bar may be determined according to the main color of the interface in other manners, which is not limited in this embodiment of the present application.
例如,该界面的主色调为暗色调,则可以根据该暗色调,从如下表2所示的主色调与背景颜色和图标颜色之间的对应关系中,获取对应的背景颜色为黑色,获取对应的图标颜色为白色,并确定导航栏的背景颜色为黑色,确定导航栏的图标颜色为白色。For example, if the main color of the interface is a dark color, according to the dark color, the corresponding background color is obtained from the correspondence between the main color and the background color and the icon color as shown in Table 2 below, and the corresponding background color is obtained. The icon color is white, and the background color of the navigation bar is determined to be black, and the icon color of the navigation bar is determined to be white.
表2Table 2
主色调main color tone 背景颜色background color 图标颜色Icon color
暗色调Dark tones 黑色black 白色white
亮色调Bright tones 白色white 黑色black
……...... ……...... ……......
需要说明的是,本申请实施例中仅以上表2所示的主色调与背景颜色和图标颜色之间的对应关系为例进行说明,上表2并不对本申请实施例构成限定。It should be noted that, in the embodiment of the present application, only the correspondence between the primary color and the background color and the icon color shown in Table 2 above is taken as an example. The above Table 2 does not limit the embodiment of the present application.
本申请实施例中,在步骤302中确定该界面的主色调是为了根据该界面的主色调确定导航栏的颜色。然而,如果该界面为子窗口,则该界面依赖于其父窗口存在,在此情况下,导航栏的颜色可以直接根据该界面的父窗口的 主色调来确定。又由于在显示子窗口之前,必然已经显示其父窗口,即已经根据该父窗口的主色调确定导航栏的颜色,所以,当该界面为子窗口时,无需执行步骤302,可以直接结束流程,此时显示的导航栏的颜色是根据该界面的父窗口的主色调确定的。In the embodiment of the present application, the primary color tone of the interface is determined in step 302 to determine the color of the navigation bar according to the primary color tone of the interface. However, if the interface is a child window, the interface depends on its parent window, in which case the color of the navigation bar can be determined directly from the dominant color of the parent window of the interface. In addition, since the parent window has been displayed before the child window is displayed, that is, the color of the navigation bar has been determined according to the main color of the parent window, when the interface is a child window, step 302 is not required, and the process can be directly ended. The color of the navigation bar displayed at this time is determined according to the main color of the parent window of the interface.
因此,步骤302中确定该界面的主色调时,可以当该界面不为子窗口时,确定该界面的主色调。也即是,在步骤301接收到用于显示界面的显示指令之后,不仅可以直接通过步骤302来确定该界面的主色调,进一步地,参见图3B,在步骤302之前,还可以执行如下步骤3021。Therefore, when the primary color of the interface is determined in step 302, the primary color of the interface may be determined when the interface is not a child window. That is, after receiving the display instruction for the display interface in step 301, the main color of the interface can be determined not only directly by step 302, but further, referring to FIG. 3B, before step 302, the following step 3021 can also be performed. .
步骤3021:判断该界面是否为子窗口,如果否,则执行步骤302,如果是,则结束流程。 Step 3021: Determine whether the interface is a child window. If not, execute step 302. If yes, end the process.
其中,判断该界面是否为子窗口时,可以获取该界面的界面属性,当该界面属性包括的指定属性的属性值为指定属性值时,确定该界面为子窗口;当该界面属性包括的指定属性的属性值不为指定属性值时,确定该界面不为子窗口。The interface attribute of the interface may be obtained when the interface is determined to be a child window. When the attribute value of the specified attribute included in the interface attribute is a specified attribute value, the interface is determined to be a child window; when the interface attribute includes the specified When the attribute value of the attribute is not the specified attribute value, it is determined that the interface is not a child window.
需要说明的是,界面的界面属性用于描述界面的性质或特征,如界面的界面属性可以包括该界面的名称、标题、样式等。It should be noted that the interface attribute of the interface is used to describe the nature or feature of the interface. For example, the interface attribute of the interface may include the name, title, and style of the interface.
另外,指定属性和指定属性值均可以预先进行设置,如指定属性可以为LayoutParams.type,此时指定属性值可以为位于1000与1999之间的值,又如指定属性可以为LayoutParams.flags,此时指定属性值可以为含有FLAG LAYOUT ATTACHED IN DECORE的值。In addition, the specified attribute and the specified attribute value can be set in advance, for example, the specified attribute can be LayoutParams.type, and the specified attribute value can be a value between 1000 and 1999, and the specified attribute can be LayoutParams.flags, The specified attribute value can be a value containing FLAG LAYOUT ATTACHED IN DECORE.
本申请实施例中,在步骤302中确定界面的主色调是为了根据该界面的主色调确定导航栏的颜色。然而,如果已经针对该界面自定义了导航栏的颜色,则此时无需执行步骤302,直接根据自定义的导航栏的颜色,实现后续的导航栏显示即可。In the embodiment of the present application, the primary color tone of the interface is determined in step 302 to determine the color of the navigation bar according to the primary color tone of the interface. However, if the color of the navigation bar has been customized for the interface, then step 302 is not needed at this time, and the subsequent navigation bar display can be directly implemented according to the color of the customized navigation bar.
因此,在步骤301接收到用于显示界面的显示指令之后,不仅可以直接通过步骤302来确定该界面的主色调,进一步地,参见图3C,在步骤302之前,还可以执行如下步骤3022-3023。Therefore, after receiving the display instruction for the display interface in step 301, the main color of the interface can be determined not only by step 302, but further, referring to FIG. 3C, before step 302, the following steps 3022-3023 can also be performed. .
步骤3022:获取该界面的界面属性。 Step 3022: Obtain interface attributes of the interface.
步骤3023:判断该界面属性中是否包括导航栏背景属性和导航栏图标属性,如果否,则执行步骤302,如果是,则执行步骤3024。 Step 3023: Determine whether the navigation bar background attribute and the navigation bar icon attribute are included in the interface attribute. If not, execute step 302. If yes, execute step 3024.
需要说明的是,导航栏背景属性为用于指示导航栏的背景颜色的属性,且导航栏背景属性的属性值可以由用户设置得到,本申请实施例对此不作限定。It should be noted that the navigation bar background attribute is an attribute for indicating the background color of the navigation bar, and the attribute value of the navigation bar background attribute can be set by the user, which is not limited by the embodiment of the present application.
另外,导航栏图标属性为用于指示导航栏的图标颜色的属性,且导航栏图标属性的属性值可以由用户设置得到,本申请实施例对此不作限定。In addition, the navigation bar icon attribute is an attribute for indicating the icon color of the navigation bar, and the attribute value of the navigation bar icon attribute can be set by the user, which is not limited by the embodiment of the present application.
当该界面属性中未包括导航栏背景属性和导航栏图标属性时,表明未针对该界面自定义导航栏的颜色,因此,此时可以执行步骤302来确定该界面的主色调,以便可以根据该界面的主色调来确定导航栏的颜色。When the navigation bar background attribute and the navigation bar icon attribute are not included in the interface attribute, it indicates that the color of the navigation bar is not customized for the interface. Therefore, step 302 may be performed to determine the main color of the interface, so that the The primary color of the interface determines the color of the navigation bar.
步骤3024:根据导航栏背景属性的属性值确定导航栏的背景颜色,根据 导航栏图标属性的属性值确定导航栏的图标颜色,并继续执行步骤303。 Step 3024: Determine the background color of the navigation bar according to the attribute value of the navigation bar background attribute, determine the icon color of the navigation bar according to the attribute value of the navigation bar icon attribute, and continue to step 303.
当该界面属性中包括导航栏背景属性和导航栏图标属性时,表明已针对该界面自定义导航栏的颜色,因此,此时可以执行步骤3024来根据导航栏背景属性的属性值和导航栏图标属性的属性值确定导航栏的颜色。When the interface attribute includes the navigation bar background attribute and the navigation bar icon attribute, it indicates that the color of the navigation bar has been customized for the interface. Therefore, step 3024 can be performed at this time according to the attribute value of the navigation bar background attribute and the navigation bar icon. The attribute value of the attribute determines the color of the navigation bar.
需要说明的是,实际应用中,可能会仅针对该界面自定义导航栏的背景颜色和导航栏的图标颜色中的一个,在此情况下,可以结合步骤302和3024来确定导航栏的颜色,即当该界面属性中只包括导航栏背景属性的属性值时,根据导航栏背景属性的属性值确定导航栏的背景颜色,根据该界面的主色调或导航栏的背景颜色来确定导航栏的图标颜色;当该界面属性中只包括导航栏图标属性的属性值时,根据导航栏图标属性的属性值确定导航栏的图标颜色,根据该界面的主色调或导航栏的图标颜色确定导航栏的背景颜色。It should be noted that, in an actual application, one of the background color of the navigation bar and the icon color of the navigation bar may be customized only for the interface. In this case, the colors of the navigation bar may be determined in combination with steps 302 and 3024. That is, when the attribute value of the navigation bar background attribute is included in the interface attribute, the background color of the navigation bar is determined according to the attribute value of the navigation bar background attribute, and the icon of the navigation bar is determined according to the main color of the interface or the background color of the navigation bar. Color; when the interface attribute only includes the attribute value of the navigation bar icon attribute, the icon color of the navigation bar is determined according to the attribute value of the navigation bar icon attribute, and the background of the navigation bar is determined according to the main color of the interface or the icon color of the navigation bar. colour.
其中,根据导航栏的背景颜色,确定导航栏的图标颜色时,可以根据导航栏的背景颜色,从存储的背景颜色与图标颜色之间的对应关系中,获取对应的图标颜色,将获取的图标颜色确定为导航栏的图标颜色。当然,实际应用中,也可以通过其他方式根据导航栏的背景颜色,确定导航栏的图标颜色,本申请实施例对此不作限定。Wherein, according to the background color of the navigation bar, when determining the icon color of the navigation bar, the corresponding icon color may be obtained from the corresponding relationship between the stored background color and the icon color according to the background color of the navigation bar, and the acquired icon The color is determined as the icon color of the navigation bar. Of course, in an actual application, the icon color of the navigation bar may be determined according to the background color of the navigation bar in other manners, which is not limited in this embodiment of the present application.
例如,导航栏的背景颜色为透明色,则可以根据该透明色,从如下表3所示的背景颜色与图标颜色之间的对应关系中,获取对应的图标颜色为灰白色,并确定导航栏的图标颜色为灰白色。For example, if the background color of the navigation bar is a transparent color, according to the transparent color, the corresponding icon color is grayish white from the correspondence between the background color and the icon color shown in Table 3 below, and the navigation bar is determined. The icon color is grayish white.
表3table 3
背景颜色background color 图标颜色Icon color
透明色Transparent color 灰白色Grayish white
黑色black 白色white
……...... ……......
需要说明的是,本申请实施例中仅以上表3所示的背景颜色与图标颜色之间的对应关系为例进行说明,上表3并不对本申请实施例构成限定。It should be noted that, in the embodiment of the present application, only the correspondence between the background color and the icon color shown in Table 3 above is taken as an example. The above Table 3 does not limit the embodiment of the present application.
其中,根据导航栏的图标颜色,确定导航栏的背景颜色的操作与上述根据导航栏的背景颜色,确定导航栏的图标颜色的操作类似,本申请实施例对此不再赘述。The operation of determining the background color of the navigation bar according to the icon color of the navigation bar is similar to the operation of determining the icon color of the navigation bar according to the background color of the navigation bar, which is not described in detail in this embodiment of the present application.
值得说明的是,本申请实施例中不仅可以根据界面的主色调来确定导航栏的颜色,还可以根据界面的界面属性中的导航栏背景属性和导航栏图标属性来确定导航栏的颜色,在此情况下,导航栏的颜色实际上是由用户设置得到,从而满足了用户的个性化需求,提高了用户体验。It should be noted that, in the embodiment of the present application, not only the color of the navigation bar may be determined according to the main color tone of the interface, but also the color of the navigation bar may be determined according to the background property of the navigation bar and the icon property of the navigation bar in the interface property of the interface. In this case, the color of the navigation bar is actually set by the user, thereby satisfying the personalized needs of the user and improving the user experience.
需要说明的是,本申请实施例中对上述步骤3021的方式与上述步骤3022-3023的方式的执行顺序不进行限制,可以根据实际应用需求来进行设置,如可以先执行步骤3021的方式再执行步骤3022-3023的方式,或者先执行步骤3022-3023的方式再执行步骤3021的方式,当然,也可以选择仅执行步骤3021的方式和上述步骤3022-3023的方式中的一种。考虑到如果用户自 定义设置导航栏的颜色时,可能不希望导航栏的颜色被重置,所以通常可以设置为先执行步骤3021的方式再执行步骤3022-3023的方式。It should be noted that, in the embodiment of the present application, the execution manner of the method of the foregoing step 3021 and the manner of the foregoing step 3022-3023 is not limited, and may be set according to actual application requirements, for example, the method of step 3021 may be performed first. In the manner of step 3022-3023, the manner of step 3021 is performed again in the manner of step 3022-3023. Of course, only one of the manner of step 3021 and the manner of step 3022-3023 described above may be selected. Considering that if the user customizes the color of the navigation bar, the color of the navigation bar may not be reset. Therefore, the method of step 30221.
步骤303:根据导航栏的颜色,显示导航栏。Step 303: Display a navigation bar according to the color of the navigation bar.
具体地,当该界面包括指定视图时,在该界面的指定视图中划分与导航栏的尺寸相同的目标区域,根据导航栏的颜色,在目标区域中显示导航栏。当该界面不包括指定视图时,根据导航栏的颜色,在屏幕上的指定区域中显示导航栏;或者,在与该界面相邻的位置中增加与导航栏的尺寸相同的目标区域,根据导航栏的颜色,在目标区域中显示导航栏。Specifically, when the interface includes a specified view, a target area having the same size as the navigation bar is divided in the specified view of the interface, and the navigation bar is displayed in the target area according to the color of the navigation bar. When the interface does not include the specified view, the navigation bar is displayed in a specified area on the screen according to the color of the navigation bar; or, the target area having the same size as the navigation bar is added to the position adjacent to the interface, according to the navigation The color of the bar, showing the navigation bar in the target area.
需要说明的是,指定视图可以预先进行设置,且指定视图可以为处于顶层且全屏显示的视图,如指定视图可以为decorview等。It should be noted that the specified view can be set in advance, and the specified view can be a top-level and full-screen view, such as a specified view, such as decorview.
另外,为了便于用户对导航栏中的虚拟按键进行操作,当目标区域为从该界面的指定视图中划分得到时,目标区域可以位于该界面的指定视图的底部,当然,目标区域也可以位于该界面的指定视图中其他便于用户操作的位置;当目标区域为在与该界面相邻的位置中增加得到时,目标区域可以位于该界面的底部的下方,当然,目标区域也可以位于与该界面相邻的位置中其他便于用户操作的区域,本申请实施例对此不作限定。In addition, in order to facilitate the user to operate the virtual button in the navigation bar, when the target area is divided from the specified view of the interface, the target area may be located at the bottom of the specified view of the interface, of course, the target area may also be located at the bottom of the specified view. Other locations in the specified view of the interface that are convenient for the user to operate; when the target area is added in the position adjacent to the interface, the target area may be located below the bottom of the interface, of course, the target area may also be located at the interface The other embodiments of the present application are not limited in this embodiment.
再者,指定区域可以预先进行设置,且为了便于用户对导航栏中的虚拟按键进行操作,指定区域可以位于屏幕底部,当然,指定区域也可以位于屏幕中其他便于用户操作的位置,本申请实施例对此不作限定。In addition, the designated area can be set in advance, and in order to facilitate the user to operate the virtual button in the navigation bar, the designated area can be located at the bottom of the screen. Of course, the designated area can also be located at other positions in the screen that are convenient for the user to operate. This example does not limit this.
例如,如图3D所示,该界面包括指定视图,则可以在该界面的指定视图中划分与导航栏的尺寸相同的目标区域,根据导航栏的颜色,在目标区域中显示导航栏。又例如,如图3E所示,该界面不包括指定视图,则可以根据导航栏的颜色,在屏幕上的指定区域中显示导航栏。For example, as shown in FIG. 3D, the interface includes a specified view, and a target area having the same size as the navigation bar may be divided in the specified view of the interface, and the navigation bar is displayed in the target area according to the color of the navigation bar. For another example, as shown in FIG. 3E, the interface does not include a specified view, and the navigation bar can be displayed in a designated area on the screen according to the color of the navigation bar.
其中,根据导航栏的颜色,在目标区域中显示导航栏时,可以将目标区域的颜色设置为导航栏的背景颜色,在目标区域中,以透明色绘制导航栏的背景,以导航栏的图标颜色绘制导航栏的图标,实现在目标区域中对导航栏的显示;或者,在目标区域中,以导航栏的背景颜色绘制导航栏的背景,以导航栏的图标颜色绘制导航栏的图标,实现在目标区域中对导航栏的显示。Wherein, according to the color of the navigation bar, when the navigation bar is displayed in the target area, the color of the target area may be set as the background color of the navigation bar, and in the target area, the background of the navigation bar is drawn in a transparent color, and the icon of the navigation bar is used. The color draws the icon of the navigation bar to realize the display of the navigation bar in the target area; or, in the target area, draws the background of the navigation bar with the background color of the navigation bar, and draws the icon of the navigation bar with the icon color of the navigation bar, thereby realizing The display of the navigation bar in the target area.
值得说明的是,将目标区域的颜色设置为导航栏的背景颜色,在该目标区域中,以透明色绘制导航栏的背景,可以在界面启动或关闭时,即在界面切换时在视觉上达到较好的连贯性,从而进一步地提高了显示效果。It is worth noting that the color of the target area is set to the background color of the navigation bar. In the target area, the background of the navigation bar is drawn in a transparent color, which can be visually achieved when the interface is started or closed, that is, when the interface is switched. Better coherence, which further enhances the display.
其中,根据导航栏的颜色,在屏幕上的指定区域中显示导航栏时,可以在指定区域中,以导航栏的背景颜色绘制导航栏的背景,以导航栏的图标颜色绘制导航栏的图标,实现在指定区域中对导航栏的显示。According to the color of the navigation bar, when the navigation bar is displayed in the specified area on the screen, the background of the navigation bar may be drawn in the specified area, and the icon of the navigation bar may be drawn by the icon color of the navigation bar. Implements the display of the navigation bar in the specified area.
需要说明的是,实际应用中,可以将该界面与导航栏同时进行显示,当然,当该界面不包括指定视图时,也可以先显示导航栏再显示该界面,本申请实施例对此不作限定。It should be noted that, in an actual application, the interface and the navigation bar may be displayed at the same time. Of course, when the interface does not include the specified view, the navigation bar may be displayed first and then the interface is displayed. .
进一步地,为了在视觉上将导航栏的内容和界面的内容进行区分,可以将显示导航栏的内容的区域与显示界面的内容的区域重合的边设置为指定颜 色,当然,也可以通过其他方式将导航栏的内容和界面的内容进行区分,本申请对此不作限定。Further, in order to visually distinguish the content of the navigation bar from the content of the interface, the edge of the area where the content of the navigation bar is displayed and the area of the content of the display interface may be set to a designated color, and of course, other manners may be used. The content of the navigation bar and the content of the interface are distinguished, which is not limited in this application.
需要说明的是,指定颜色可以预先进行设置,如指定颜色可以为灰白色、白色等,本申请实施例对此不作限定。It should be noted that the specified color may be set in advance, for example, the designated color may be grayish white, white, or the like, which is not limited in the embodiment of the present application.
实际应用中,大多数界面上都能够启动输入法窗口来进行文字输入,比如社交应用中的聊天界面、浏览器中的搜索界面等都能够启动输入法窗口来进行文字输入。所以,进一步地,本申请实施例中还可以实现输入法窗口与导航栏的协调显示。In practical applications, most of the interfaces can start the input method window for text input. For example, the chat interface in the social application and the search interface in the browser can start the input method window for text input. Therefore, further, the coordinated display of the input method window and the navigation bar can be implemented in the embodiment of the present application.
由于输入法窗口的特殊性,屏幕上显示有输入法窗口时,并不能直接定位出哪个窗口为输入法窗口,因此,在实现输入法窗口与导航栏的协调显示时,可以当检测到调用输入法程序时,从屏幕上显示的至少两个界面中确定输入法窗口;确定该输入法窗口的主色调;根据该输入法窗口的主色调,确定导航栏的颜色;根据导航栏的颜色,显示导航栏。Due to the particularity of the input method window, when the input method window is displayed on the screen, it is not possible to directly locate which window is the input method window. Therefore, when the coordinate display of the input method window and the navigation bar is implemented, the call input can be detected. In the program, the input method window is determined from at least two interfaces displayed on the screen; determining the main color of the input method window; determining the color of the navigation bar according to the main color of the input method window; displaying according to the color of the navigation bar Navigation Bar.
其中,当检测到调用输入法程序时,从屏幕上显示的至少两个界面中确定输入法窗口时,可以获取该至少两个界面中每个界面的界面属性,根据该至少两个界面中每个界面的界面属性,从该至少两个界面中确定输入法窗口。Wherein, when the input method is detected, when the input method window is determined from at least two interfaces displayed on the screen, an interface attribute of each of the at least two interfaces may be acquired, according to each of the at least two interfaces The interface properties of the interfaces from which the input method window is determined.
其中,确定该输入法窗口的主色调的操作与上述步骤302中确定该界面的主色调的操作类似,本申请实施例对此不再赘述。The operation of determining the primary color tone of the input method window is similar to the operation of determining the primary color tone of the interface in the above step 302, and details are not described herein again.
其中,根据该输入法窗口的主色调,确定导航栏的颜色的操作与上述步骤302中根据该界面的主色调,确定导航栏的颜色的操作类似,本申请实施例对此不再赘述。The operation of determining the color of the navigation bar according to the main color of the input method window is similar to the operation of determining the color of the navigation bar according to the main color of the interface in the above step 302, which is not described in detail in this embodiment of the present application.
其中,根据导航栏的颜色,显示导航栏时,可以根据导航栏的颜色,在屏幕上的指定区域中显示导航栏;或者,在与该输入法窗口相邻的位置中增加与导航栏的尺寸相同的目标区域,根据导航栏的颜色,在目标区域中显示导航栏。Wherein, according to the color of the navigation bar, when the navigation bar is displayed, the navigation bar may be displayed in the designated area on the screen according to the color of the navigation bar; or, the size of the navigation bar may be added to the position adjacent to the input method window. The same target area displays the navigation bar in the target area according to the color of the navigation bar.
需要说明的是,当目标区域为在与该输入法窗口相邻的位置中增加得到时,目标区域可以位于该输入法窗口的底部的下方,当然,目标区域也可以位于与该输入法窗口相邻的位置中其他便于用户操作的区域,本申请实施例对此不作限定。It should be noted that when the target area is added in the position adjacent to the input method window, the target area may be located below the bottom of the input method window. Of course, the target area may also be located in the input method window. The other embodiments of the present application are not limited in this embodiment.
实际应用中,导航栏的显示和隐藏具有自己固定的程序,即导航栏会在特定的时机显示,并在特定的时机隐藏,如当检测到指定操作时,会显示导航栏,当在某个时长内未检测到指定操作时,就会隐藏导航栏。然而,显示导航栏时需要先确定导航栏的颜色,才能绘制导航栏,因此,为了避免导航栏的显示不准确,进一步地,本申请实施例在步骤301中接收用于显示界面的显示指令后,如果检测到导航栏显示指令,则可以判断是否执行过确定导航栏的颜色的操作,如果已经执行过该操作,则显示导航栏;如果未执行过该操作,则继续等待预设时长,如果预设时长内执行过该操作,则在该操作执行完成时,显示导航栏,如果预设时长内未执行过该操作,则在预设时长 后显示导航栏。In practical applications, the display and hiding of the navigation bar has its own fixed program, that is, the navigation bar will be displayed at a specific timing and hidden at a specific timing. For example, when a specified operation is detected, a navigation bar is displayed, when at a certain The navigation bar is hidden when the specified action is not detected within the duration. However, when the navigation bar is displayed, the color of the navigation bar needs to be determined before the navigation bar can be drawn. Therefore, in order to prevent the display of the navigation bar from being inaccurate, the embodiment of the present application receives the display instruction for displaying the interface in step 301. If the navigation bar display instruction is detected, it may be determined whether the operation of determining the color of the navigation bar has been performed. If the operation has been performed, the navigation bar is displayed; if the operation has not been performed, the preset duration is continued, if If the operation is performed within the preset duration, the navigation bar is displayed when the operation is completed. If the operation has not been performed within the preset duration, the navigation bar is displayed after the preset duration.
需要说明的是,导航栏显示指令用于显示导航栏,且导航栏显示指令可以由终端自动触发,终端可以在特定的时机进行触发。It should be noted that the navigation bar display instruction is used to display the navigation bar, and the navigation bar display instruction can be automatically triggered by the terminal, and the terminal can trigger at a specific timing.
另外,预设时长可以预先进行设置,且预设时长可以根据实际的应用需求进行设置,本申请实施例对此不作限定。In addition, the preset duration can be set in advance, and the preset duration can be set according to actual application requirements, which is not limited in this embodiment of the present application.
实际应用中,为了防止出现导航栏的背景颜色和导航栏的图标颜色相同的情况,进一步地,在根据导航栏的颜色,显示导航栏之前,可以先判断导航栏的背景颜色和导航栏的图标颜色是否相同,如果是,则重新确定导航栏的颜色,如果否,则执行根据导航栏的颜色,显示导航栏的步骤。In practical applications, in order to prevent the background color of the navigation bar and the icon color of the navigation bar from being the same, further, before displaying the navigation bar according to the color of the navigation bar, the background color of the navigation bar and the icon of the navigation bar may be determined first. Whether the colors are the same, if yes, the color of the navigation bar is re-determined, and if not, the step of displaying the navigation bar according to the color of the navigation bar is performed.
其中,重新确定导航栏的颜色的操作与上述确定导航栏的颜色的操作相同,本申请实施例对此不再赘述。The operation of re-determining the color of the navigation bar is the same as the operation of determining the color of the navigation bar.
在本申请实施例中,接收用于显示界面的显示指令后,可以确定该界面的主色调,并根据该界面的主色调,确定导航栏的颜色,从而使得导航栏的颜色与该界面的主色调相匹配。之后,根据导航栏的颜色,显示导航栏,从而可以实现界面与导航栏的协调显示,进而提高了整体的显示效果。另外,本申请实施例在检测到调用输入法程序时,可以从屏幕上显示的至少两个界面中确定输入法窗口,并根据输入法窗口的主色调确定导航栏的颜色,以此实现输入法窗口与导航栏的协调显示。In the embodiment of the present application, after receiving the display instruction for displaying the interface, the primary color tone of the interface may be determined, and the color of the navigation bar is determined according to the primary color tone of the interface, so that the color of the navigation bar and the main interface of the interface The tones match. After that, according to the color of the navigation bar, the navigation bar is displayed, so that the coordinated display of the interface and the navigation bar can be realized, thereby improving the overall display effect. In addition, when detecting the calling input program, the embodiment of the present application can determine the input method window from at least two interfaces displayed on the screen, and determine the color of the navigation bar according to the main color of the input method window, thereby implementing the input method. Coordinated display of windows and navigation bars.
实际应用中,由于终端中界面的类型较多,因此,为了便于理解,接下来结合图3F-图3I对上述实施例提供的导航栏显示方法进行举例说明。具体地,以如下几种情况为例进行说明。In the actual application, the navigation bar display method provided in the foregoing embodiment is exemplified for the sake of easy understanding, and the navigation bar display method provided by the foregoing embodiment is described in conjunction with FIG. 3F to FIG. Specifically, the following cases are taken as an example for explanation.
第一种情况:接收用于显示应用界面的显示指令后,参见图3F,可以通过如下步骤3F01-3F03来实现导航栏的显示。The first case: after receiving the display instruction for displaying the application interface, referring to FIG. 3F, the display of the navigation bar can be implemented by the following steps 3F01-3F03.
步骤3F01:判断该应用界面的界面属性中是否包括导航栏背景属性和导航栏图标属性;假设该应用界面的界面属性中包括导航栏背景属性和导航栏图标属性,则继续执行步骤3F02; Step 3F01: determining whether the interface attribute of the application interface includes the navigation bar background attribute and the navigation bar icon attribute; if the interface attribute of the application interface includes the navigation bar background attribute and the navigation bar icon attribute, proceed to step 3F02;
步骤3F02:根据导航栏背景属性的属性值确定导航栏的背景颜色,根据导航栏图标属性的属性值确定导航栏的图标颜色; Step 3F02: determining the background color of the navigation bar according to the attribute value of the navigation bar background attribute, and determining the icon color of the navigation bar according to the attribute value of the navigation bar icon attribute;
步骤3F03:根据导航栏的颜色,显示导航栏。 Step 3F03: Display the navigation bar according to the color of the navigation bar.
第二种情况:接收用于显示弹框窗口的显示指令后,参见图3G,可以通过如下步骤3G01-3G04来实现导航栏的显示。The second case: after receiving the display instruction for displaying the bullet frame window, referring to FIG. 3G, the display of the navigation bar can be implemented by the following steps 3G01-3G04.
步骤3G01:判断该弹框窗口的界面属性中是否包括导航栏背景属性和导航栏图标属性,假设该弹框窗口的界面属性中不包括导航栏背景属性和导航栏图标属性,则继续执行步骤3G02; Step 3G01: Determine whether the navigation bar background attribute and the navigation bar icon attribute are included in the interface attribute of the bullet box window. If the interface attribute of the bullet box window does not include the navigation bar background attribute and the navigation bar icon attribute, proceed to step 3G02. ;
步骤3G02:判断该弹框窗口是否为子窗口,假设该弹框窗口不为子窗口,则继续执行步骤3G03; Step 3G02: determining whether the frame window is a child window, and assuming that the frame window is not a child window, proceeding to step 3G03;
步骤3G03:确定该弹框窗口的主色调,根据该弹框窗口的主色调,确定导航栏的颜色; Step 3G03: determining the main color of the bullet frame window, and determining the color of the navigation bar according to the main color of the bullet frame window;
步骤3G04:根据导航栏的颜色,显示导航栏。 Step 3G04: Display the navigation bar according to the color of the navigation bar.
第三种情况:接收用于显示子窗口的显示指令后,参见图3H,可以通过如下步骤3H01-3H02来实现导航栏的显示。The third case: after receiving the display instruction for displaying the sub-window, referring to FIG. 3H, the display of the navigation bar can be implemented by the following steps 3H01-3H02.
步骤3H01:判断该子窗口的界面属性中是否包括导航栏背景属性和导航栏图标属性,假设该子窗口的界面属性中不包括导航栏背景属性和导航栏图标属性,则继续执行步骤3H02; Step 3H01: determining whether the navigation window background attribute and the navigation bar icon attribute are included in the interface attribute of the sub-window, and assuming that the navigation window background attribute and the navigation bar icon attribute are not included in the interface attribute of the sub-window, proceeding to step 3H02;
步骤3H02:判断该子窗口是否为子窗口,由于该子窗口为子窗口,所以结束流程,此时导航栏的颜色是根据该子窗口的父窗口确定得到。 Step 3H02: Determine whether the child window is a child window. Since the child window is a child window, the process ends. At this time, the color of the navigation bar is determined according to the parent window of the child window.
第四种情况:当检测到调用输入法程序时,参见图3I,可以通过如下步骤3I01-3I05来实现导航栏的显示。The fourth case: When the call input program is detected, referring to FIG. 3I, the display of the navigation bar can be implemented by the following steps 3I01-3I05.
步骤3I01:从屏幕上显示的至少两个界面中确定输入法窗口; Step 3I01: determining an input method window from at least two interfaces displayed on the screen;
其中,所述至少两个界面包括所述输入法程序的界面以及调用所述输入法程序的应用程序的界面。The at least two interfaces include an interface of the input method program and an interface of an application that invokes the input method program.
步骤3I02:判断该输入法窗口的界面属性中是否包括导航栏背景属性和导航栏图标属性,假设该输入法窗口的界面属性中不包括导航栏背景属性和导航栏图标属性,则继续执行步骤3I03; Step 3I02: Determine whether the navigation bar background attribute and the navigation bar icon attribute are included in the interface attribute of the input method window. If the interface attribute of the input method window does not include the navigation bar background attribute and the navigation bar icon attribute, proceed to step 3I03. ;
步骤3I03:判断该输入法窗口是否为子窗口,由于该输入法窗口不为子窗口,所以继续执行步骤3I04; Step 3I03: determining whether the input method window is a child window, since the input method window is not a child window, proceeding to step 3I04;
步骤3I04:确定该输入法窗口的主色调,根据该输入法窗口的主色调,确定导航栏的颜色; Step 3I04: determining a primary color of the input method window, and determining a color of the navigation bar according to a primary color of the input method window;
步骤3I05:根据导航栏的颜色,显示导航栏。 Step 3I05: Display the navigation bar according to the color of the navigation bar.
需要说明的是,本申请仅以以上几种情况为例对导航栏的显示过程进行说明,实际应用中,当所显示的界面的类型不同时,导航栏的显示过程可能也有所不同,本申请实施例对此不再一一列举。It should be noted that, in the present application, the display process of the navigation bar is only described by using the above several situations as an example. In actual applications, when the types of displayed interfaces are different, the display process of the navigation bar may also be different. For example, this is not listed one by one.
参见图4,本申请实施例提供了一种导航栏显示装置,该装置包括接收模块401、第一确定模块402、第二确定模块403和显示模块404。Referring to FIG. 4, an embodiment of the present application provides a navigation bar display device, which includes a receiving module 401, a first determining module 402, a second determining module 403, and a display module 404.
第二方面,提供了一种导航栏显示装置,所述装置包括:In a second aspect, a navigation bar display device is provided, the device comprising:
接收模块401,用于接收用于显示界面的显示指令;The receiving module 401 is configured to receive a display instruction for displaying the interface;
第一确定模块402,用于确定该界面的主色调;a first determining module 402, configured to determine a primary color tone of the interface;
第二确定模块403,用于根据该界面的主色调,确定导航栏的颜色,该颜色包括背景颜色和图标颜色;a second determining module 403, configured to determine a color of the navigation bar according to a primary color tone of the interface, where the color includes a background color and an icon color;
显示模块404,用于根据导航栏的颜色,显示导航栏。The display module 404 is configured to display a navigation bar according to the color of the navigation bar.
可选地,该第一确定模块402用于:Optionally, the first determining module 402 is configured to:
当该界面不为子窗口时,确定该界面的主色调。When the interface is not a child window, the dominant color of the interface is determined.
可选地,该显示模块404包括:Optionally, the display module 404 includes:
第一显示子模块,用于当该界面包括指定视图时,在该界面的指定视图中划分与导航栏的尺寸相同的目标区域,根据导航栏的颜色,在目标区域中显示导航栏,指定视图为处于顶层且全屏显示的视图;a first display sub-module, configured to: when the interface includes the specified view, divide a target area having the same size as the navigation bar in the specified view of the interface, and display a navigation bar in the target area according to the color of the navigation bar, and specify a view a view that is at the top and displayed in full screen;
第二显示子模块,用于当该界面不包括指定视图时,根据导航栏的颜色,在屏幕上的指定区域中显示导航栏。The second display sub-module is configured to display a navigation bar in a designated area on the screen according to the color of the navigation bar when the interface does not include the specified view.
可选地,该第一显示子模块用于:Optionally, the first display submodule is used to:
将目标区域的颜色设置为导航栏的背景颜色;Set the color of the target area to the background color of the navigation bar;
在目标区域中,以透明色绘制导航栏的背景,以导航栏的图标颜色绘制导航栏的图标。In the target area, the background of the navigation bar is drawn in a transparent color, and the icon of the navigation bar is drawn in the icon color of the navigation bar.
可选地,该装置还包括:Optionally, the device further includes:
第三确定模块,用于当检测到调用输入法程序时,从屏幕上显示的至少两个界面中确定输入法窗口,其中,所述至少两个界面包括所述输入法程序的界面以及调用所述输入法程序的应用程序的界面;a third determining module, configured to determine an input method window from at least two interfaces displayed on the screen when the input method program is detected, wherein the at least two interfaces include an interface of the input method program and a call center An interface of an application of the input method program;
第四确定模块,用于确定该输入法窗口的主色调;a fourth determining module, configured to determine a primary color tone of the input method window;
第五确定模块,用于根据该输入法窗口的主色调,确定导航栏的颜色;a fifth determining module, configured to determine a color of the navigation bar according to a primary color tone of the input method window;
显示模块,用于根据导航栏的颜色,显示导航栏。A display module for displaying a navigation bar according to the color of the navigation bar.
在本申请实施例中,接收用于显示界面的显示指令后,可以确定该界面的主色调,并根据该界面的主色调,来确定导航栏的颜色,从而使得导航栏的颜色与该界面的主色调相匹配。之后,根据导航栏的颜色,显示导航栏,从而可以实现界面与导航栏的协调显示,进而提高了整体的显示效果。In the embodiment of the present application, after receiving the display instruction for displaying the interface, the primary color tone of the interface may be determined, and the color of the navigation bar is determined according to the primary color tone of the interface, so that the color of the navigation bar and the interface are The main tones match. After that, according to the color of the navigation bar, the navigation bar is displayed, so that the coordinated display of the interface and the navigation bar can be realized, thereby improving the overall display effect.
需要说明的是:上述实施例提供的导航栏显示装置在进行导航栏显示时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将导航栏显示装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的导航栏显示装置与导航栏显示方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that, when the navigation bar display device provided by the above embodiment is displayed in the navigation bar, only the division of the above functional modules is illustrated. In actual applications, the functions may be allocated by different functional modules as needed. Upon completion, the internal structure of the navigation bar display device is divided into different functional modules to complete all or part of the functions described above. In addition, the navigation bar display device and the navigation bar display method embodiment provided in the above embodiments are in the same concept, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
图5是本申请实施例提供的一种导航栏显示装置的结构示意图,该装置可以为但不限于终端。参见图5,该装置包括至少一个处理器501,通信总线502,存储器503以及至少一个通信接口504。FIG. 5 is a schematic structural diagram of a navigation bar display device according to an embodiment of the present disclosure, which may be, but not limited to, a terminal. Referring to FIG. 5, the apparatus includes at least one processor 501, a communication bus 502, a memory 503, and at least one communication interface 504.
处理器501可以是一个通用中央处理器(Central Processing Unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请实施例程序执行的集成电路。The processor 501 can be a general purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more programs for controlling the execution of the embodiment of the present application. Integrated circuit.
通信总线502可包括一通路,在上述组件之间传送信息。 Communication bus 502 can include a path for communicating information between the components described above.
存储器503可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备、或者能够 用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由该装置存取的任何其它介质,但不限于此。存储器503可以是独立存在,通过通信总线502与处理器501相连接。存储器503也可以和处理器501集成在一起。The memory 503 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type that can store information and instructions. The dynamic storage device can also be an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, and a disc storage device. (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be Any other medium accessed by the device, but is not limited thereto. Memory 503 may be present independently and coupled to processor 501 via communication bus 502. The memory 503 can also be integrated with the processor 501.
通信接口504,使用任何收发器一类的装置,用于与其它设备或通信网络通信,如以太网,无线接入网(Radio Access Network,RAN),无线局域网(Wireless Local Area Networks,WLAN)等。 Communication interface 504, using any type of transceiver, for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc. .
在具体实现中,作为一种实施例,处理器501可以包括一个或多个CPU,例如图5中所示的CPU0和CPU1。In a particular implementation, as an embodiment, processor 501 can include one or more CPUs, such as CPU0 and CPU1 shown in FIG.
在具体实现中,作为一种实施例,该装置可以包括多个处理器,例如图5中所示的处理器501和处理器505。这些处理器中的每一个可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a particular implementation, as an embodiment, the apparatus can include a plurality of processors, such as processor 501 and processor 505 shown in FIG. Each of these processors can be a single core processor (CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data, such as computer program instructions.
其中,存储器503用于存储执行本申请实施例的程序代码510,处理器501用于执行存储器503中存储的程序代码510。该装置可以通过处理器501以及存储器503中的程序代码510,来实现上述图3A、图3B、图3C、图3F、图3G、图3H、图3I实施例提供的导航栏显示方法。The memory 503 is configured to store the program code 510 for executing the embodiment of the present application, and the processor 501 is configured to execute the program code 510 stored in the memory 503. The device can implement the navigation bar display method provided by the embodiment of FIG. 3A, FIG. 3B, FIG. 3C, FIG. 3F, FIG. 3G, FIG. 3H, and FIG. 3I by using the program code 510 in the processor 501 and the memory 503.
本申请提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,所述计算机指令被所述处理器执行时实现上述实施例提供的导航栏显示方法。The present application provides a computer readable storage medium having stored thereon computer instructions that, when executed by the processor, implement the navigation bar display method provided by the above embodiments.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意结合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如:同轴电缆、光纤、数据用户线(Digital Subscriber Line,DSL))或无线(例如:红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如:软盘、硬盘、磁带)、光介质(例如:数字通用光盘(Digital Versatile Disc,DVD))、或者半导体介质(例如:固态硬盘(Solid State Disk,SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)). )Wait.

Claims (12)

  1. 一种导航栏显示方法,其特征在于,所述方法包括:A navigation bar display method, characterized in that the method comprises:
    接收用于显示界面的显示指令;Receiving a display instruction for displaying an interface;
    确定所述显示界面的主色调;Determining a primary color of the display interface;
    根据所述显示界面的主色调,确定导航栏的颜色,所述导航栏的颜色包括背景颜色和图标颜色;Determining a color of the navigation bar according to a primary color tone of the display interface, where the color of the navigation bar includes a background color and an icon color;
    根据所述导航栏的颜色,显示所述导航栏。The navigation bar is displayed according to the color of the navigation bar.
  2. 如权利要求1所述的方法,其特征在于,所述确定所述显示界面的主色调,包括:The method of claim 1 wherein said determining a dominant color of said display interface comprises:
    当所述显示界面不为子窗口时,确定所述显示界面的主色调。When the display interface is not a sub-window, the main color of the display interface is determined.
  3. 如权利要求1所述的方法,其特征在于,所述根据所述导航栏的颜色,显示所述导航栏,包括:The method of claim 1, wherein the displaying the navigation bar according to a color of the navigation bar comprises:
    当所述显示界面包括指定视图时,在所述显示界面的指定视图中划分与所述导航栏的尺寸相同的目标区域,根据所述导航栏的颜色,在所述目标区域中显示所述导航栏,其中,所述指定视图为处于顶层且全屏显示的视图。When the display interface includes a specified view, a target area having the same size as the navigation bar is divided in a specified view of the display interface, and the navigation is displayed in the target area according to a color of the navigation bar. a column, wherein the specified view is a top-level and full-screen view.
  4. 如权利要求1所述的方法,其特征在于,所述根据所述导航栏的颜色,显示所述导航栏,包括:The method of claim 1, wherein the displaying the navigation bar according to a color of the navigation bar comprises:
    当所述显示界面不包括指定视图时,根据所述导航栏的颜色,在屏幕上的指定区域中显示所述导航栏,其中,所述指定视图为处于顶层且全屏显示的视图。When the display interface does not include the specified view, the navigation bar is displayed in a designated area on the screen according to the color of the navigation bar, wherein the specified view is a view that is at the top level and displayed in full screen.
  5. 如权利要求3所述的方法,其特征在于,所述根据所述导航栏的颜色,在所述目标区域中显示所述导航栏,包括:The method of claim 3, wherein the displaying the navigation bar in the target area according to a color of the navigation bar comprises:
    将所述目标区域的颜色设置为所述导航栏的背景颜色;Setting a color of the target area to a background color of the navigation bar;
    在所述目标区域中,以透明色绘制所述导航栏的背景,以所述导航栏的图标颜色绘制所述导航栏的图标。In the target area, the background of the navigation bar is drawn in a transparent color, and the icon of the navigation bar is drawn in the icon color of the navigation bar.
  6. 如权利要求1-5任一所述的方法,其特征在于,所述方法还包括:The method of any of claims 1-5, wherein the method further comprises:
    当检测到调用输入法程序时,从屏幕上显示的至少两个界面中确定输入法窗口,其中,所述至少两个界面包括所述输入法程序的界面以及调用所述输入法程序的应用程序的界面;Determining an input method window from at least two interfaces displayed on the screen when the input method program is detected, wherein the at least two interfaces include an interface of the input method program and an application that invokes the input method program Interface
    确定所述输入法窗口的主色调;Determining a primary color of the input method window;
    根据所述输入法窗口的主色调,确定所述导航栏的颜色;Determining a color of the navigation bar according to a primary color tone of the input method window;
    根据所述导航栏的颜色,显示所述导航栏。The navigation bar is displayed according to the color of the navigation bar.
  7. 一种导航栏显示装置,其特征在于,所述装置包括:A navigation bar display device, characterized in that the device comprises:
    接收模块,用于接收用于显示界面的显示指令;a receiving module, configured to receive a display instruction for displaying an interface;
    第一确定模块,用于确定所述显示界面的主色调;a first determining module, configured to determine a primary color tone of the display interface;
    第二确定模块,用于根据所述显示界面的主色调,确定导航栏的颜色,所述导航栏的颜色包括的背景颜色和图标颜色;a second determining module, configured to determine a color of the navigation bar according to a primary color tone of the display interface, where the color of the navigation bar includes a background color and an icon color;
    显示模块,用于根据所述导航栏的颜色,显示所述导航栏。a display module, configured to display the navigation bar according to a color of the navigation bar.
  8. 如权利要求7所述的装置,其特征在于,所述显示模块包括:The device of claim 7, wherein the display module comprises:
    第一显示子模块,用于当所述显示界面包括指定视图时,在所述显示界面的指定视图中划分与所述导航栏的尺寸相同的目标区域,根据所述导航栏的颜色,在所述目标区域中显示所述导航栏,其中,所述指定视图为处于顶层且全屏显示的视图。a first display sub-module, configured to: when the display interface includes a specified view, divide a target area that is the same size as the navigation bar in a specified view of the display interface, according to the color of the navigation bar, The navigation bar is displayed in the target area, wherein the specified view is a top-level and full-screen view.
  9. 如权利要求7所述的装置,其特征在于,所述显示模块包括:The device of claim 7, wherein the display module comprises:
    第二显示子模块,用于当所述显示界面不包括指定视图时,根据所述导航栏的颜色,在屏幕上的指定区域中显示所述导航栏,其中,所述指定视图为处于顶层且全屏显示的视图。a second display submodule, configured to display the navigation bar in a specified area on the screen according to a color of the navigation bar when the display interface does not include a specified view, where the specified view is at a top level and The view displayed in full screen.
  10. 如权利要求8所述的装置,其特征在于,所述第一显示子模块用于:The apparatus of claim 8 wherein said first display sub-module is for:
    将所述目标区域的颜色设置为所述导航栏的背景颜色;Setting a color of the target area to a background color of the navigation bar;
    在所述目标区域中,以透明色绘制所述导航栏的背景,以所述导航栏的图标颜色绘制所述导航栏的图标。In the target area, the background of the navigation bar is drawn in a transparent color, and the icon of the navigation bar is drawn in the icon color of the navigation bar.
  11. 一种终端,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述计算机程序被所述处理器执行时实现如权利要求1-6所述的任一项方法的步骤。A terminal comprising a memory and a processor, the memory storing a computer program, wherein the computer program is executed by the processor to implement the steps of any of the methods of claims 1-6.
  12. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,其特征在于,所述计算机指令被所述处理器执行时实现如权利要求1-6所述的任一项方法的步骤。A computer readable storage medium having computer instructions stored thereon, wherein the computer instructions are executed by the processor to implement any of the methods of claims 1-6 A step of.
PCT/CN2018/072897 2017-09-07 2018-01-16 Navigation bar display method and apparatus, and computer readable storage medium WO2019047465A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710819750.5 2017-09-07
CN201710819750.5A CN107479793A (en) 2017-09-07 2017-09-07 Navigation bar display methods, device and computer-readable recording medium

Publications (1)

Publication Number Publication Date
WO2019047465A1 true WO2019047465A1 (en) 2019-03-14

Family

ID=60583795

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/072897 WO2019047465A1 (en) 2017-09-07 2018-01-16 Navigation bar display method and apparatus, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN107479793A (en)
WO (1) WO2019047465A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4502789A4 (en) * 2022-07-20 2025-07-02 Huawei Tech Co Ltd DISPLAY METHOD AND ELECTRONIC DEVICE

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107479793A (en) * 2017-09-07 2017-12-15 青岛海信移动通信技术股份有限公司 Navigation bar display methods, device and computer-readable recording medium
CN108037956A (en) * 2017-12-27 2018-05-15 南昌黑鲨科技有限公司 A kind of display interface display methods, display device and computer-readable recording medium
CN108319416B (en) * 2018-03-16 2021-09-14 联想(北京)有限公司 Display control method and device and electronic equipment
CN109460272A (en) * 2018-09-11 2019-03-12 广州优视网络科技有限公司 For the application display method and device of Android system
CN110968386B (en) * 2018-09-30 2023-05-02 阿里巴巴集团控股有限公司 Navigation bar processing method and system
CN109783747B (en) * 2018-12-25 2020-12-22 北京字节跳动网络技术有限公司 Page jump method, terminal equipment and computer storage medium
CN110109725A (en) * 2019-04-30 2019-08-09 努比亚技术有限公司 A kind of interface color method of adjustment and wearable device
CN111309425A (en) * 2020-02-14 2020-06-19 Oppo广东移动通信有限公司 A system bar setting method, device and computer-readable storage medium
CN111488191A (en) * 2020-04-13 2020-08-04 Oppo广东移动通信有限公司 Screen display method, electronic device and storage medium
CN115480852A (en) * 2021-05-31 2022-12-16 北京字跳网络技术有限公司 Page display method and device of application program and electronic equipment
CN116229188B (en) * 2023-05-08 2023-07-25 腾讯科技(深圳)有限公司 Image processing display method, classification model generation method and equipment thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126725A (en) * 2016-06-30 2016-11-16 北京小米移动软件有限公司 Page display method and device
CN106155454A (en) * 2015-03-30 2016-11-23 阿里巴巴集团控股有限公司 A kind of interface display method, device and electronic equipment
CN106502689A (en) * 2016-11-02 2017-03-15 珠海市魅族科技有限公司 A kind of display methods of status bar and device
CN107479793A (en) * 2017-09-07 2017-12-15 青岛海信移动通信技术股份有限公司 Navigation bar display methods, device and computer-readable recording medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007888A (en) * 2013-02-27 2014-08-27 深圳市阿科达汽车电子有限公司 Interface display method and apparatus based on vehicle DVD (Digital Versatile Disc) navigating instrument
CN104850395B (en) * 2015-04-17 2018-11-30 魅族科技(中国)有限公司 interface display method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155454A (en) * 2015-03-30 2016-11-23 阿里巴巴集团控股有限公司 A kind of interface display method, device and electronic equipment
CN106126725A (en) * 2016-06-30 2016-11-16 北京小米移动软件有限公司 Page display method and device
CN106502689A (en) * 2016-11-02 2017-03-15 珠海市魅族科技有限公司 A kind of display methods of status bar and device
CN107479793A (en) * 2017-09-07 2017-12-15 青岛海信移动通信技术股份有限公司 Navigation bar display methods, device and computer-readable recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4502789A4 (en) * 2022-07-20 2025-07-02 Huawei Tech Co Ltd DISPLAY METHOD AND ELECTRONIC DEVICE

Also Published As

Publication number Publication date
CN107479793A (en) 2017-12-15

Similar Documents

Publication Publication Date Title
WO2019047465A1 (en) Navigation bar display method and apparatus, and computer readable storage medium
US11868586B2 (en) Floating window user interface display method and apparatus, device, and storage medium
KR102710712B1 (en) Method and device for displaying live broadcast data, device and storage medium
US20190073113A1 (en) Method and Terminal for Displaying Notification Message and Non-transitory Computer-readable Storage Medium
TWI684906B (en) Interface display method, device and electronic equipment
US20210209404A1 (en) Method for Adjusting Thematic Color, Storage Medium, and Electronic Device
US9665247B2 (en) Method and device for applying a new skin to a display environment
WO2019047728A1 (en) Method for opening shortcut function, device, mobile terminal, and storage medium
CN101866287A (en) Widget system appearance setting method and device
CN107506086A (en) Touch screen control method, device, mobile terminal and storage medium
US10235030B2 (en) Electronic device and user interface display method for the same
US11210449B2 (en) Page display method and device and storage medium
CN107688430A (en) Change method, apparatus, terminal and the storage medium of wallpaper
CN110865864B (en) Quick application interface display method, device, equipment and storage medium
WO2015184736A1 (en) Method and terminal for transforming background picture of touchscreen device
CN112612436A (en) Screen projection switching method, device, equipment and storage medium
WO2018050095A1 (en) Screen display method and mobile terminal
WO2019052115A1 (en) Application control style customization method and apparatus, and computer-readable storage medium
CN107219989A (en) Icon processing method, device and terminal
CN107864333A (en) Image processing method, device, terminal and storage medium
US8693042B2 (en) Image copying method and device
US8904301B2 (en) Mobile terminal data refreshing method and mobile terminal
CN114416089A (en) Page display method, device, mobile terminal and storage medium
CN112612633A (en) Inter-process communication method, device, storage medium and terminal
CN110618849A (en) Notification bar setting method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18854611

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 03/08/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18854611

Country of ref document: EP

Kind code of ref document: A1