Display device and display style control method
By setting the focus attribute and the focus control flag in the display device, the focus effect of the control is dynamically adjusted according to the input device type, which solves the matching problem of the user interface between different input devices and improves the user experience.
Patent Information
- Application Number
- CN202510571974.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-09-16
AI Technical Summary
How to match the presentation of the user interface with the input device when the user uses different input devices to improve the user experience.
By setting the focus attribute and the focus control flag in the display device, the focus effect of the control is dynamically adjusted according to the type of input device. For example, the focus attribute is displayed when the remote control is used, and the out-of-focus attribute is displayed when the touch screen is used.
The user interface is matched between different input devices, which conforms to the user's usage habits and improves the user experience.
Smart Images

Figure CN120653162A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of display devices, and in particular to a display device and a display style control method. Background Art
[0002] With the rapid development of display devices, the functions they can provide users are becoming increasingly rich. Input devices for display devices are also becoming increasingly diverse, such as touch screens, mice, and pointing remote controls. Ensuring that the user interface presentation matches the input device when used by different input devices is a pressing issue. Summary of the Invention
[0003] The present application provides a method for solving the problem of matching the presentation of the user interface with the input device when the user uses different input devices.
[0004] In a first aspect, some embodiments provide a display device comprising: a touch screen configured to: display a user interface, the user interface comprising at least one control;
[0005] The processor is configured to: the control is provided with a focus attribute and a focus control flag; the focus attribute includes a focus attribute and a focus-out attribute; the focus control flag is used to indicate whether the control is allowed to focus; the focus control flag is set to a first preset value to indicate that the control is allowed to focus; the focus control flag is set to a second preset value to indicate that the control is not allowed to focus;
[0006] When the pointing function of the remote control is turned on and the cursor of the remote control moves into the control, setting the focus control flag of the control to a first preset value, setting the focus attribute of the control to an upper focus attribute based on the first preset value; and drawing a display style corresponding to the upper focus attribute on the control;
[0007] When a press event of the control is received via the touch screen, the focus control flag of the control is set to a second preset value, and the focus attribute of the control is set to a defocus attribute based on the second preset value; and a display style corresponding to the defocus attribute is drawn on the control.
[0008] The above solution proposes the setting of the upper focus control mark, so that the focus effect exists when the user uses the remote control, and the focus effect disappears when the user uses the touch screen. This realizes that the user interface presentation matches the input device when the user uses different input devices, which is more in line with the user's usage habits of different input sources and improves the user experience.
[0009] In some embodiments, before the processor executes setting the focus attribute of the control to the upper focus attribute, it is further configured to: determine whether the current focus attribute of the control is the upper focus attribute; if it is not the upper focus attribute, set the focus attribute of the control to the upper focus attribute; if it is the upper focus attribute, directly draw the display style corresponding to the upper focus attribute on the control.
[0010] In the above scheme, when it is detected that the cursor moves into the control, an action of judging the focus attribute of the control is added. Only when the focus attribute is not the upper focus attribute, the operation of setting the focus attribute to the upper focus attribute is performed. When the focus attribute is the upper focus attribute, the operation is no longer performed, thereby avoiding repeated setting of the focus attribute.
[0011] In some embodiments, the control is a parent control, and the parent control includes at least one child control; the processor executes drawing the display style corresponding to the up-focus attribute on the control, and is further configured to: draw the display style corresponding to the up-focus attribute on the parent control and the at least one child control; the processor executes drawing the display style corresponding to the out-of-focus attribute on the control, and is further configured to: draw the display style corresponding to the out-of-focus attribute on the parent control and the at least one child control.
[0012] In the above solution, when a control contains at least one child control, drawing is performed synchronously on the parent control and the child control, so that the parent control and the child control as a whole present an in-focus effect or an out-of-focus effect, which is closer to the user's expected effect and further improves the user experience.
[0013] In a second aspect, some embodiments further provide a display style control method, including:
[0014] When the pointing function of the remote control is enabled and the cursor of the remote control moves into the control, setting the focus control flag of the control to a first preset value, setting the focus attribute of the control to an upper focus attribute based on the first preset value; and drawing a display style corresponding to the upper focus attribute on the control;
[0015] When a press event triggered by the touch screen is received, the focus control flag of the control is set to a second preset value, and the focus attribute of the control is set to a defocus attribute based on the second preset value; and a display style corresponding to the defocus attribute is drawn on the control.
[0016] The above method proposes the setting of the upper focus control mark, so that the focus effect exists when the user uses the remote control, and the focus effect disappears when the user uses the touch screen. This achieves the matching of the user interface presentation and the input device when the user uses different input devices, which is more in line with the user's usage habits of different input sources and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0018] Figure 1 A schematic diagram of an operation scenario between a display device and a control device provided in some embodiments of the present application;
[0019] Figure 2 A schematic diagram of the hardware configuration of a display device provided in some embodiments of the present application;
[0020] Figure 3 A schematic diagram of the hardware configuration of a control device provided in some embodiments of the present application;
[0021] Figure 4 A schematic diagram of software configuration of a display device provided in some embodiments of the present application;
[0022] Figure 5 A cursor hover diagram provided for some embodiments of the present application;
[0023] Figure 6 A click diagram provided for some embodiments of the present application;
[0024] Figure 7 A selection diagram is provided for some embodiments of the present application;
[0025] Figure 8 A schematic diagram of drag-and-drop multi-selection provided in some embodiments of the present application;
[0026] Figure 9 A drag schematic diagram provided for some embodiments of the present application;
[0027] Figure 10 A sliding schematic diagram provided for some embodiments of the present application;
[0028] Figure 11 A schematic diagram of continuous sliding provided for some embodiments of the present application;
[0029] Figure 12 A schematic diagram of continuous reverse sliding provided in some embodiments of the present application;
[0030] Figure 13 Display style control method process provided in some embodiments of this application Figure 1 ;
[0031] Figure 14A schematic diagram of display style changes provided in some embodiments of the present application;
[0032] Figure 15 The process of the display style control method provided in some embodiments of the present application Figure 2 ;
[0033] Figure 16 A schematic diagram of the interaction between a pointing remote control and a display device provided for some embodiments of the present application. DETAILED DESCRIPTION
[0034] The following embodiments are described in detail, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numbers in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following embodiments are not intended to represent all possible implementations consistent with the present application. They are merely examples of systems and methods consistent with certain aspects of the present application, as detailed in the claims.
[0035] It should be noted that the brief descriptions of terms in this application are only for the purpose of facilitating the understanding of the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and usual meanings.
[0036] In the specification and claims of this application and the accompanying drawings, the terms "first," "second," "third," etc. are used to distinguish similar or similar objects or entities, and are not necessarily intended to limit a particular order or sequence, unless otherwise noted. It should be understood that the terms used in this manner are interchangeable under appropriate circumstances.
[0037] The terms "comprise," "include," and "have," and any variations thereof, are intended to cover but not exclude inclusion; for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0038] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functionality associated with that element.
[0039] In the embodiments of the present application, the display device 200 generally refers to a device capable of displaying images and processing data. For example, the display device 200 includes but is not limited to a smart TV, a mobile terminal, a computer, a monitor, an advertising screen, a wearable device, a virtual reality device, an augmented reality device, etc.
[0040] Figure 1 This is a schematic diagram of an operation scenario between a display device and a control device provided in some embodiments of the present application. Figure 1As shown in FIG, a user can operate the display device 200 through touch operation, the mobile terminal 300 and the control device 100. For example, the control device 100 can be a remote controller, a stylus pen, a handle, etc.
[0041] The mobile terminal 300 can function as a control device for performing human-computer interaction between a user and the display device 200. The mobile terminal 300 can also function as a communication device for establishing a communication connection with the display device 200 and exchanging data. In some embodiments, the mobile terminal 300 can install software applications with the display device 200, enabling connection and communication via a network communication protocol, enabling one-to-one control operations and data communication. Audio and video content displayed on the mobile terminal 300 can also be transmitted to the display device 200 for synchronized display.
[0042] like Figure 1 As shown in FIG, the display device 200 also communicates data with the server 400 through various communication methods. The display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks.
[0043] The display device 200 may provide a broadcast receiving television function, and may also additionally provide an intelligent network television function with a computer support function, including but not limited to network television, smart TV, Internet Protocol television (IPTV), etc.
[0044] Figure 2 Some embodiments of this application provide Figure 1 2 is a block diagram of the hardware configuration of the display device 200.
[0045] In some embodiments, the display device 200 may include at least one of a tuner 210, a communication device 220, a detector 230, a device interface 240, a controller 250, a display 260, an audio output device 270, a memory, a power supply, and a user input interface.
[0046] In some embodiments, detector 230 is used to collect signals from the external environment or external interactions. For example, detector 230 may include a light receiver, such as a sensor for collecting ambient light intensity; or an image collector, such as a camera, for collecting external environmental scenes, user attributes, or user interaction gestures; or a sound collector, such as a microphone, for receiving external sounds.
[0047] In some embodiments, the display 260 includes a display component for presenting images and a driver component for driving image display. The display 260 is configured to receive image signals output from the controller 250 for display. For example, the display 260 can be used to display video content, image content, menu control interface components, and user control UI interfaces.
[0048] In some embodiments, the communication device 220 is a component for communicating with an external device or server 400 according to various communication protocol types. The display device 200 can be provided with multiple communication devices 220 depending on the supported communication methods. For example, when the display device 200 supports wireless network communication, the display device 200 can be provided with a communication device 220 including WiFi functionality. When the display device 200 supports Bluetooth connection communication, the display device 200 needs to be provided with a communication device 220 including Bluetooth functionality. When the display device 200 supports ultra-wideband connection communication (UWB), the display device 200 needs to be provided with a communication device 220 including a UWB antenna array.
[0049] The communication device 220 can establish a communication connection between the display device 200 and an external device or server 400 via a wireless or wired connection. A wired connection can connect the display device 200 to an external device via a data cable, an interface, or other components. A wireless connection can connect the display device 200 to an external device via a wireless signal or wireless network. The display device 200 can establish a connection with an external device directly or indirectly through a gateway, router, or connection device.
[0050] In some embodiments, the controller 250 may include at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processor, and a power processor, and first to nth interfaces for input / output. The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in a memory. The controller 250 controls the overall operation of the display device 200.
[0051] In some embodiments, the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0052] In some embodiments, the user may input a user command through a graphical user interface (GUI) displayed on the display 260 , and the user input interface receives the user input command through the graphical user interface (GUI).
[0053] In some embodiments, the audio output device 270 may be a local speaker of the display device 200, or an external audio output device connected to the display device 200. For the external audio output device connected to the display device 200, the display device 200 may further be provided with an external audio output terminal, through which the audio output device may be connected to the display device 200 to output the sound of the display device 200.
[0054] In some embodiments, the user input interface 280 may be configured to receive instructions from a user.
[0055] Figure 3 Some embodiments of this application provide Figure 1 The hardware configuration diagram of the control device in the figure is as follows. Figure 3 As shown, the control device 100 may include: a controller 110, a communication interface 130, a user input / output interface, a memory, and a power supply.
[0056] The control device 100 is configured to control the display device 200 , and can receive user input operation instructions, and convert the operation instructions into instructions that the display device 200 can recognize and respond to, playing the role of an interactive intermediary between the user and the display device 200 .
[0057] In some embodiments, the control device 100 may be a smart device. For example, the control device 100 may be installed with various applications for controlling the display device 200 according to user needs.
[0058] In some embodiments, as Figure 1 As shown, the mobile terminal 300 or other intelligent electronic devices can play a similar function as the control device 100 after installing the application for controlling the display device 200 .
[0059] The controller 110 includes a processor 112, RAM 113, ROM 114, a communication interface 130, and a communication bus. The controller 110 is used to control the operation and operation of the control device 100, as well as the communication and cooperation between internal components and external and internal data processing functions.
[0060] Under the control of the controller 110, the communication interface 130 communicates control signals and data signals with the display device 200. The communication interface 130 may include at least one of a WiFi chip 131, a Bluetooth module 132, an NFC module 133, or other near field communication modules.
[0061] The user input / output interface 140 includes at least one of a microphone 141 , a touch panel 142 , a sensor 143 , a button 144 and other input interfaces.
[0062] In some embodiments, the control device 100 includes at least one of a communication interface 130 and an input / output interface 140. The control device 100 is configured with a communication interface 130, such as a WiFi, Bluetooth, NFC, or UWB module, to encode user input commands via the WiFi, Bluetooth, NFC, or UWB protocols and transmit them to the display device 200. Encoding user input commands via the UWB protocol and transmitting them to the display device 200 enables control of the pointing function.
[0063] The memory 190 is used to store various operating programs, data and applications for driving and controlling the control device 100 under the control of the controller. The memory 190 can store various control signal instructions input by the user.
[0064] The power supply 180 is used to provide operating power support for each component of the control device 100 under the control of the controller.
[0065] To facilitate user interaction, in some embodiments, the display device 200 may run an operating system. An operating system is a computer program used to manage and control the hardware and software resources of the display device 200. The operating system may provide a user interface (control the display device), allow the user to interact with the display device 200, and support the running of various application programs.
[0066] It should be noted that the operating system can be a native operating system based on a specific operating platform, a third-party operating system deeply customized based on a specific operating platform, or an independent operating system specially developed for display devices.
[0067] The operating system can be divided into different modules or layers according to the functions implemented, e.g. Figure 4 As shown, in some embodiments, the system is divided into four layers, from top to bottom, namely, the application layer (referred to as "application layer"), the application framework layer (referred to as "framework layer"), the system library layer and the kernel layer.
[0068] In some embodiments, the application layer provides services and interfaces for applications, enabling the display device 200 to run applications and interact with the user based on the applications. The application layer can host at least one application, which can include built-in window programs, system settings programs, clock programs, and the like, or applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the examples above.
[0069] The framework layer provides applications with an application programming interface (API) and programming framework. The application framework layer includes predefined functions. The application framework layer acts as a processing center, determining the actions taken by applications in the application layer. Through the API, applications can access system resources and services during execution.
[0070] like Figure 4 As shown, in the embodiment of the present application, the application framework layer includes a view system, managers, content providers, etc., wherein the view system can design and implement the interface and interaction of the application, and the view system includes lists, grids, text boxes, buttons, etc. The manager includes at least one of the following modules: an activity manager for interacting with all activities running in the system; a location manager for providing system services or applications with access to the system location service; a package manager for retrieving various information related to the application packages currently installed on the device; a notification manager for controlling the display and clearing of notification messages; and a window manager for managing icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.
[0071] In some embodiments, the activity manager is used to manage the lifecycle of each application and common navigation back functions, such as controlling application exit, opening, and back. The window manager is used to manage all window programs, such as obtaining the display screen size, determining whether there is a status bar, locking the screen, taking screenshots, and controlling changes in display windows, such as shrinking, shaking, or distorting the display window.
[0072] In some embodiments, the system runtime layer can provide support for the framework layer. When the framework layer is used, the operating system will run the instruction library contained in the system runtime layer, such as the C / C++ instruction library, to implement the functions to be implemented by the framework layer.
[0073] In some embodiments, the kernel layer is a functional layer between the hardware and software of the display device 200. The kernel layer can implement functions such as hardware abstraction, multitasking, and memory management. Figure 4As shown, the kernel layer can be configured with hardware drivers, and the drivers included in the kernel layer can be at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.
[0074] It should be noted that the above example is only a simple division of the operating system functions and does not constitute a limitation on the specific operating system form of the display device 200 in the embodiment of the present application. Depending on factors such as the function of the display device and the type of operating system, the number of levels and specific level types contained in the operating system may be expressed in other forms.
[0075] In some embodiments, a display device is provided, including a touch screen configured to display a user interface including at least one control.
[0076] The touch screen can be understood as a display with a touch function.
[0077] Optionally, the user can control the display device to start up through voice, remote control, or the switch of the TV device. After the display device is started, the user interface corresponding to the homepage is displayed through the display. The user can switch to other user interfaces through voice or remote control, such as: the user interface corresponding to the TV series label, the user interface corresponding to the movie label, the user interface corresponding to a page provided by a certain application, etc. The embodiment of the present application does not limit this.
[0078] Optionally, among all the user interfaces displayed on the display, some user interfaces contain controls, while some user interfaces may not contain controls. The solution provided in the embodiment of the present application is aimed at user interfaces containing controls. The number of controls on a user interface containing controls may be only one or may be greater than one, and the embodiment of the present application does not limit this.
[0079] Optionally, the remote control used with the display device may be a remote control with a pointing function, hereinafter referred to as a pointing remote control. When the pointing function is enabled, the user interface displayed on the display also includes a cursor, and the position of the cursor on the user interface is determined by the position pointed to by the pointing remote control in three-dimensional space. In the embodiments of the present application, the position pointed to by the pointing remote control in three-dimensional space is also referred to as the position data of the pointing remote control in three-dimensional space. The specific implementation process for determining the position of the cursor on the user interface based on the position data of the pointing remote control is described below.
[0080] The position data of a pointing remote control in three-dimensional space may include: position coordinates and pointing direction. The position coordinates are the physical position of the pointing remote control relative to the display device (e.g., horizontal distance and vertical height from the display device). The pointing direction is the pointing angle of the pointing remote control (e.g., horizontal and vertical angles relative to the display device). The pointing remote control has a built-in gyroscope to detect the remote control's rotation angle and an accelerometer to detect the remote control's acceleration. Using these sensors, the pointing remote control can determine its position data in three-dimensional space in real time.
[0081] In some embodiments, after obtaining its own position data in three-dimensional space, the pointing remote control can send this position data to a display device. The display device can perform screen coordinate conversion based on this position data, thereby converting the position data of the pointing remote control in three-dimensional space into a screen coordinate system. The obtained screen coordinates can be used as the position of the cursor on the user interface, and the cursor can be drawn at this position, thereby displaying the cursor.
[0082] In some embodiments, the pointing remote control includes a coordinate conversion module. After obtaining its own position data in three-dimensional space, the pointing remote control can input the position data into the coordinate conversion module. The coordinate conversion module can perform screen coordinate conversion based on the position data, thereby converting the position data into a screen coordinate system to obtain screen coordinates. The screen coordinates can be used as the position of the cursor on the user interface, and the position of the cursor on the user interface is sent to the display device. After receiving the position of the cursor on the user interface, the display device draws the cursor at the position, thereby displaying the cursor. Exemplarily, the position of the cursor on the user interface is the coordinates (a, b), and the display device draws the cursor at the position with the coordinates (a, b) on the user interface, thereby displaying the cursor.
[0083] For example, see Figure 5 As shown, when the position data of the pointing remote control in three-dimensional space is A, the position of the cursor on the user interface is coordinates (a1, b1). When the position data of the pointing remote control in three-dimensional space is B, the position of the cursor on the user interface is coordinates (a2, b2). When the position data of the pointing remote control in three-dimensional space is C, the screen coordinates calculated using the above method exceed the screen range, and the display device no longer draws the cursor, so the cursor disappears.
[0084] See also Figure 6As shown, the pointing remote control supports tapping. When the cursor hovers over a control, the user can press the touch area (confirmation key) on the pointing remote control, and the display device executes the corresponding logic in response to the operation. The controls here can be cards, buttons, input boxes, single choices, switches, dialog boxes, multiple choices, sliders, playback progress bars, scroll bars, drop-down menus, labels, lists, etc., and the embodiments of the present application do not limit this.
[0085] See also Figure 7 As shown, the pointing remote control supports selection. When the user interface displays multiple options and selection boxes corresponding to these multiple options, if the user wants to select the first option and the third option, the user can first control the cursor to hover over the selection box corresponding to the first option and press the touch area on the pointing remote control. At this time, the first option is selected; then, the user can control the cursor to hover over the selection box corresponding to the third option and press the touch area on the pointing remote control. At this time, the third option is selected, thereby completing the jump selection.
[0086] See also Figure 8 As shown, the pointing remote control supports drag-and-drop multi-selection. When the user interface displays multiple options and selection boxes corresponding to these multiple options, if the user wants to select all options, the user can control the cursor to hover anywhere in the area above the first option, press the touch area on the pointing remote control and drag downward until the cursor moves to the area below the last option. At this time, all options are selected, thus completing the drag-and-drop multi-selection.
[0087] See also Figure 9 As shown, the pointing remote control supports dragging. When the user interface is playing a video and a playback progress bar is displayed, the user can control the cursor to hover over a certain position on the playback progress bar, and then press the touch area on the pointing remote control. The video played in the user interface will fast forward or rewind the video frame corresponding to the position, thereby completing the dragging of the playback progress. The playback progress bar in this example is only an example. Controls that support dragging also include sliders, scroll bars, labels, cards, lists, etc., and the embodiments of the present application are not limited to this.
[0088] See also Figure 10 As shown, the pointing remote control supports sliding. When a cursor is displayed on the user interface, the user can slide up, down, left or right on the touch area on the pointing remote control, and the display device will respond to these slides.
[0089] See also Figure 11As shown, the pointing remote control supports continuous sliding. When a cursor is displayed on the user interface, the user can continuously slide up, down, left or right on the touch area on the pointing remote control. The display device will respond to these continuous slides and display a damped sliding effect on the user interface. Figure 11 A schematic diagram of continuous upward sliding.
[0090] See also Figure 12 As shown, the pointing remote control supports continuous reverse sliding. When a cursor is displayed on the user interface, the user can slide in a certain direction and then in the opposite direction on the touch area on the pointing remote control. The display device will respond to the continuous reverse sliding and display a damped sliding effect on the user interface. Figure 12 A schematic diagram of sliding up and then sliding down.
[0091] In some embodiments, the display device further includes a processor configured to: set a focus attribute on the control; the focus attribute includes an up-focus attribute and an out-of-focus attribute.
[0092] Among them, as described above, the number of controls on the user interface containing controls may be one or more than one. Among these controls, some controls are set with focus attributes, while some controls are not set with focus attributes. The developer can decide whether to set the focus attributes based on the function of the control, or the developer can set the focus attributes for all controls by default. The solution provided in the embodiment of the present application is aimed at controls with focus attributes.
[0093] For controls with a focus attribute, there are two possible focus attributes: one is the focus attribute and the other is the out-of-focus attribute. When the focus attribute of a control is the focus attribute, it can also be understood that the control has obtained focus or is in the focused state; when the focus attribute of a control is the out-of-focus attribute, it can also be understood that the control has released focus or is in the unfocused state.
[0094] In some embodiments, for a control that is set with a focus attribute, the control is also set with a focus control flag, and the focus attribute includes a focus attribute and a defocus attribute; the focus control flag is used to indicate whether the control is allowed to be focused; the focus control flag is set to a first preset value to indicate that the control is allowed to be focused; the focus control flag is set to a second preset value to indicate that the control is not allowed to be focused.
[0095] Optionally, the first preset value may be a combination of one or more of numbers, letters, words, and English words. Similarly, the second preset value may also be a combination of one or more of numbers, letters, words, and English words. For example, the first preset value may be true, and the second preset value may be false.
[0096] In some embodiments, the processor is configured to implement the following steps: Figure 13 As shown:
[0097] Step 1301: When the pointing function of the remote control is turned on and the cursor of the remote control moves into the control, the focus control flag of the control is set to a first preset value, and the focus attribute of the control is set to an upper focus attribute based on the first preset value; a display style corresponding to the upper focus attribute is drawn on the control.
[0098] Optionally, a pointing function switch is provided on the pointing remote control. When the user turns on the switch, the pointing function of the pointing remote control is turned on. When the user turns off the switch, the pointing function of the pointing remote control is turned off.
[0099] Optionally, when the pointing function of a pointing remote control is enabled, as described above, the pointing remote control will obtain real-time position data of its position in three-dimensional space. This position data is used to determine the position of the cursor on the user interface. The display device then draws the cursor at the corresponding position, thereby displaying the cursor. The position of the cursor on the user interface changes as the position data of the pointing remote control in three-dimensional space changes. The detailed implementation process is described above and will not be repeated here.
[0100] Optionally, the display device may determine that the pointing function of the remote control is turned on when receiving position data of the pointing remote control in three-dimensional space, or receiving data representing the display position of the cursor.
[0101] Optionally, for all controls displayed in the user interface, a hover listener can be configured for all or some of them. When configuring the hover listener, multiple listening events can be configured, such as entry events, move events, and exit events. In this way, for a control configured with a hover listener, when the remote control cursor moves into the control, the system will trigger an entry event for the control, that is, case MotionEvent.ACTION_HOVER_ENTER; when the remote control cursor moves within the control, the system will trigger a move event for the control, that is, case MotionEvent.ACTION_HOVER_MOVE; when the remote control cursor moves out of the control, the system will trigger an exit event for the control, that is, case MotionEvent.ACTION_OUTSIDE. The application can capture the above events through the hover listener (OnHoverListener) interface. When an entry event is captured, it can be determined that the remote control cursor has moved into the corresponding control. The application here is the application corresponding to the current user interface.
[0102] When the pointing function of the remote control is turned on and the cursor of the remote control moves into the control, the focus control flag of the control is set to a first preset value to indicate that the control is allowed to be focused.
[0103] Among them, since the focus control identifier of the control is set to the first preset value, that is, the control is allowed to be focused, the focus attribute of the control is set to the focus attribute. In a specific implementation, the application can send a focus acquisition request (request focus) to the system, and the focus acquisition request includes the control identifier of the control. After receiving the focus acquisition request, the system parses the focus acquisition request to obtain the control identifier, sets the focus attribute of the control that currently has focus to the out-of-focus attribute, and sets the focus attribute of the control corresponding to the control identifier to the focus attribute, thereby completing the focus switch.
[0104] Among them, after setting the focus attribute of the control to the upper focus attribute, the application can call back the focus state acquisition method and set the focus attribute returned by the focus state acquisition method, thereby achieving the display style corresponding to the upper focus attribute on the control.
[0105] Step 1302: When a press event of the control is received via the touch screen, the focus control flag of the control is set to a second preset value, and the focus attribute of the control is set to a defocus attribute based on the second preset value; a display style corresponding to the defocus attribute is drawn on the control.
[0106] The user may operate the touch screen with fingers or other tools supported by the touch screen to control the user interface.
[0107] Optionally, when a user clicks on a control on the user interface with a finger or other tool supported by the touch screen, the display device receives a press event triggered by the touch screen. When the display device receives the press event triggered by the touch screen, it sets the focus control flag of the control to a second preset value to indicate that the control is not allowed to be focused.
[0108] Optionally, the kernel of the operating system includes a touch screen module, a pointing module, and a button module. When the user clicks a control on the user interface with a finger or other tool supported by the touch screen, the touch screen module will receive a press event. The touch screen module will send the press event and its own identifier to the upper-level application. The upper-level application can determine that it has received a press event triggered by the touch screen based on the received identifier.
[0109] Among them, since the focus control identifier of the control is set to the second preset value, that is, the control is not allowed to be focused, the focus attribute of the control is set to the out-of-focus attribute. In a specific implementation, the application can send a focus acquisition request (request focus) to the system, and the focus acquisition request includes the control identifier of the control. After receiving the focus acquisition request, the system parses the focus acquisition request to obtain the control identifier, and sets the focus attribute of the control corresponding to the control identifier to the out-of-focus attribute.
[0110] Among them, when the operating system detects that the focus attribute of a control has changed, it will call back the focus state acquisition method to obtain the current focus attribute of the updated control and return it to the application. Since the focus attribute of the control has been set to the out-of-focus attribute, the focus state acquisition method returns the out-of-focus attribute to the application, and the application further draws the display style corresponding to the out-of-focus attribute on the control.
[0111] It should be noted that: when a press event on a control is received through the touch screen, the display device will set the focus control flag of the control to a second preset value, and set the focus attribute of the control to a defocused attribute based on the second preset value. At this time, the focus attributes of all controls on the user interface are defocused attributes, that is, the interface presentation logic associated with the focus attribute will not be executed, similar to a mobile phone.
[0112] In the above embodiment, the display device includes: a touch screen, configured to: display a user interface, the user interface includes at least one control; a processor, configured to: the control is set with a focus attribute and a focus control identifier; the focus attribute includes a focus attribute and a defocus attribute; the focus control identifier is used to indicate whether the control is allowed to be focused; the focus control identifier is set to a first preset value to indicate that the control is allowed to be focused; the focus control identifier is set to a second preset value to indicate that the control is not allowed to be focused; when the pointing function of the remote control is turned on and the cursor of the remote control moves into the control, the focus control identifier of the control is set to the first preset value, and the focus attribute of the control is set to the focus attribute based on the first preset value; the display style corresponding to the focus attribute is drawn on the control; when a press event triggered by the touch screen is received, the focus control identifier of the control is set to the second preset value, and the focus attribute of the control is set to the defocus attribute based on the second preset value; the display style corresponding to the defocus attribute is drawn on the control. The above solution proposes the setting of the upper focus control mark, so that the focus effect exists when the user uses the remote control, and the focus effect disappears when the user uses the touch screen. This realizes that the user interface presentation matches the input device when the user uses different input devices, which is more in line with the user's usage habits of different input sources and improves the user experience.
[0113] In some embodiments, before the processor sets the focus attribute of the control to the upper focus attribute, the processor is further configured to: determine whether the current focus attribute of the control is the upper focus attribute; if it is not the upper focus attribute, set the focus attribute of the control to the upper focus attribute; if it is the upper focus attribute, directly draw a display style corresponding to the upper focus attribute on the control;
[0114] Among them, referring to the description above, when the cursor moves into a certain control, the display device will set the focus attribute of the control to the upper focus attribute. If the cursor moves out of the control but does not move into other controls and then moves into the control again, the focus attribute of the control is already the upper focus attribute, and there is no need to set it to the upper focus attribute again. Taking into account the existence of this scenario, the embodiment of the present application proposes that when it is detected that the cursor moves into the control, it is first determined whether the current focus attribute of the control is the upper focus attribute. If it is already the upper focus attribute, the operation of setting the focus attribute to the upper focus attribute is no longer performed, and the display style corresponding to the upper focus attribute is directly drawn on the control; if it is not the upper focus attribute, the focus attribute of the control is set to the upper focus attribute, and the display style corresponding to the upper focus attribute is drawn on the control.
[0115] In the above embodiment, when it is detected that the cursor moves into the control, an action of judging the focus attribute of the control is added. Only when the focus attribute is not the upper focus attribute, the operation of setting the focus attribute to the upper focus attribute is performed. When the focus attribute is the upper focus attribute, the operation is no longer performed, thereby avoiding repeated setting of the focus attribute.
[0116] In some embodiments, the processor executes drawing a display style corresponding to the upper-focus attribute on the control, and is further configured to: apply a callback focus state acquisition method, and set the focus attribute returned by the focus state acquisition method to the upper-focus attribute; search for upper-focus style data corresponding to the upper-focus attribute from a pre-stored layout file, and draw the display style corresponding to the upper-focus attribute on the control based on the upper-focus style data.
[0117] Among them, when the pointing function of the remote control is turned on and the cursor of the remote control moves into the control, the focus control flag of the control is set to the first preset value. Since the focus control flag of the control is set to the first preset value, that is, the control is allowed to focus, then the focus attribute of the control is set to the focus attribute, the application further calls back the focus state acquisition method, and sets the focus attribute returned by the focus state acquisition method to the focus attribute.
[0118] Optionally, the focus state acquisition method may be, for example, the onFocusChange method. The onFocusChange method returns the hasFocus parameter. When the value of this parameter is true, it indicates that the returned focus attribute is the in-focus attribute. When this parameter is false, it indicates that the returned focus attribute is the out-of-focus attribute. You can set whether the focus attribute returned by the onFocusChange method is the in-focus attribute or the out-of-focus attribute by changing the value of this parameter.
[0119] Among them, when it is determined that the focus attribute returned by the focus state acquisition method is the upper focus attribute, the upper focus style data corresponding to the upper focus attribute is searched from the pre-stored layout file, and based on the upper focus style data, the display style corresponding to the upper focus attribute is drawn on the control.
[0120] The pre-stored layout file stores the focus style data corresponding to the focus attribute and the out-of-focus style data corresponding to the out-of-focus attribute.
[0121] For example, the background color of the upper focus style data corresponding to the upper focus attribute is red and the control size is the first size; the background color of the out-of-focus style data corresponding to the out-of-focus attribute is gray and the control size is the second size (the second size is smaller than the first size). This is just an example. The upper focus style data can also include style data of other dimensions, or the upper focus style data only includes style data of any dimension of background color or control size. The embodiments of the present application are not limited to this.
[0122] Taking the first preset value as true and the second preset value as false as an example, when the pointing function of the remote control is turned on and the cursor of the remote control moves into the control, the focus control flag of the control is set to true. Since the focus control flag of the control is set to true, that is, the control is allowed to focus, then the focus attribute of the control is set to the focus attribute, the application further calls back the onFocusChange method, and sets the focus parameter hasFocus returned by the onFocusChange method to true. Since the focus parameter hasFocus returned by the onFocusChange method is true, the focus style data corresponding to the focus attribute is searched from the pre-stored layout file. The found focus style data is, for example: the background color is red and the control size is the first size, then the control is drawn to the first size, and the background color of the control is updated to red.
[0123] In the above embodiment, when the pointing function of the remote control is turned on and the cursor of the remote control moves into the control, the focus control flag of the control is set to a first preset value, and the focus attribute of the control is set to the upper focus attribute based on the first preset value; a callback focus state acquisition method is applied, and the focus attribute returned by the focus state acquisition method is set to the upper focus attribute; the upper focus style data corresponding to the upper focus attribute is searched from a pre-stored layout file, and based on the upper focus style data, the display style corresponding to the upper focus attribute is drawn on the control. This allows the user to have a focus effect when using the remote control, which is more in line with the user's habit of using the remote control and improves the user experience.
[0124] In some embodiments, the processor executes drawing a display style corresponding to the out-of-focus attribute on the control, and is further configured to: callback the focus state acquisition method through the system, and the focus attribute returned by the focus state acquisition method is the out-of-focus attribute; search for out-of-focus style data corresponding to the out-of-focus attribute from a pre-stored layout file, and draw the display style corresponding to the out-of-focus attribute on the control based on the out-of-focus style data.
[0125] When a press event on a control is received via the touch screen, the focus control flag of the control is set to a second preset value. In other words, the control is not allowed to be focused, and the focus attribute of the control is set to the out-of-focus attribute. When the operating system detects that the focus attribute of a control has changed, it calls back the focus state acquisition method to obtain the current focus attribute of the updated control and returns it to the application. Since the focus attribute of the control has been set to the out-of-focus attribute, the focus state acquisition method returns the out-of-focus attribute to the application.
[0126] Among them, based on the defocus attribute returned by the focus state acquisition method, the defocus style data corresponding to the defocus attribute is searched from the pre-stored layout file, and based on the defocus style data, the display style corresponding to the defocus attribute is drawn on the control.
[0127] As described above, the pre-stored layout file stores the focus style data corresponding to the focus attribute and the defocus style data corresponding to the defocus attribute. For example, the focus style data corresponding to the focus attribute has a red background color and a first control size; the defocus style data corresponding to the defocus attribute has a gray background color and a second control size (the second size is smaller than the first size).
[0128] Taking the first preset value as true and the second preset value as false as an example, when a press event of the control triggered by the touch screen is received, the focus control flag of the control is set to false. Since the focus control flag of the control is set to false, that is, the control is not allowed to be focused, the focus attribute of the control is set to the out-of-focus attribute. When the operating system detects that the focus attribute of the control has changed, it will call back the focus state acquisition method to obtain the current focus attribute of the updated control and return it to the application. Since the focus attribute of the control has been set to the out-of-focus attribute, the focus state acquisition method returns the out-of-focus attribute to the application. The application searches for the out-of-focus style data corresponding to the out-of-focus attribute from the pre-stored layout file. The out-of-focus style data found is, for example: the background color is gray and the control size is the second size, then the control is drawn to the second size, and the background color of the control is updated to gray.
[0129] In the above embodiment, when a press event on a control is received via the touch screen, the focus control flag of the control is set to a second preset value, and based on the second preset value, the focus attribute of the control is set to a defocused attribute; the system calls back a focus state acquisition method, and the focus attribute returned by the focus state acquisition method is a defocused attribute; the defocused style data corresponding to the defocused attribute is searched from a pre-stored layout file, and based on the defocused style data, the display style corresponding to the defocused attribute is drawn on the control. This makes the focus effect disappear when the user uses the touch screen, which is more in line with the user's touch screen usage habits and improves the user experience.
[0130] In some embodiments, the processor is further configured to: when the cursor of the remote control moves out of the control, maintain the focus control identifier of the control as a first preset value, and maintain the focus attribute of the control as an on-focus attribute, by applying a callback focus state acquisition method, and setting the focus attribute returned by the focus state acquisition method to a defocus attribute; search for defocus style data corresponding to the defocus attribute from a pre-stored layout file, and draw a display style corresponding to the defocus attribute on the control based on the defocus style data.
[0131] When the application captures a move-out event through the OnHoverListener interface, it can be determined that the cursor has moved out of the control. At this time, the focus control flag of the control is maintained at the first preset value, and the focus attribute of the control is maintained as the focused attribute. The focus state acquisition method is further called back, and the focus attribute returned by the focus state acquisition method is set to the out-of-focus attribute.
[0132] As described above, the focus state acquisition method can be, for example, the onFocusChange method. The onFocusChange method returns the hasFocus parameter. When the value of this parameter is true, it indicates that the returned focus attribute is the in-focus attribute. When this parameter is false, it indicates that the returned focus attribute is the out-of-focus attribute. You can set whether the focus attribute returned by the onFocusChange method is the in-focus attribute or the out-of-focus attribute by changing the value of this parameter.
[0133] Among them, when it is determined that the focus attribute returned by the focus state acquisition method is a defocus attribute, the defocus style data corresponding to the defocus attribute is searched from the pre-stored layout file, and based on the defocus style data, the display style corresponding to the defocus attribute is drawn on the control.
[0134] Taking the first preset value as true and the second preset value as false as an example, when the cursor of the remote control moves out of the control, the focus control identifier of the control is kept at the first preset value, and the focus attribute of the control is kept at the upper focus attribute, the onFocusChange method is called back, and the focus parameter hasFocus returned by the onFocusChange method is set to false. Since the focus parameter hasFocus returned by the onFocusChange method is false, the application searches for the out-of-focus style data corresponding to the out-of-focus attribute from the pre-stored layout file. The out-of-focus style data found is, for example: the background color is gray and the control size is the second size, then the control is drawn to the second size, and the background color of the control is updated to gray.
[0135] In the above embodiment, when the cursor of the remote control moves out of the control, the focus control identifier of the control is maintained at the first preset value, and the focus attribute of the control is maintained as the upper focus attribute. By applying a callback focus state acquisition method, the focus attribute returned by the focus state acquisition method is set to the out-of-focus attribute; the out-of-focus style data corresponding to the out-of-focus attribute is searched from the pre-stored layout file, and based on the out-of-focus style data, the display style corresponding to the out-of-focus attribute is drawn on the control. When the cursor moves out of a certain control but has not yet moved into another control, although the focus attribute of the control is still the upper focus attribute, the display style of the control is changed to the display style corresponding to the out-of-focus attribute. Such presentation is more in line with user expectations and improves the user experience of the display device.
[0136] In some embodiments, the processor is further configured to: when receiving a press event triggered by a remote control, maintain the focus control identifier of the control to a first preset value, apply a callback focus state acquisition method, and set the focus attribute returned by the focus state acquisition method to a defocus attribute; search for defocus style data corresponding to the defocus attribute from a pre-stored layout file, and draw a display style corresponding to the defocus attribute on the control based on the defocus style data.
[0137] As described above, the kernel of the operating system includes a touch screen module, a pointing module, and a button module. When the cursor hovers over a certain control, if the user presses the touch area (confirmation key) on the pointing remote control, the pointing module will receive the press event. The pointing module will send the press event and its own identification to the upper-level application. The upper-level application can determine that it has received a press event triggered by the remote control based on the received identification.
[0138] Among them, when a press event triggered by the remote control is received, the focus control flag of the control is maintained at the first preset value, the focus state acquisition method is further called back, and the focus attribute returned by the focus state acquisition method is set to the out-of-focus attribute.
[0139] As described above, the focus state acquisition method can be, for example, the onFocusChange method. The onFocusChange method returns the hasFocus parameter. When the value of this parameter is true, it indicates that the returned focus attribute is the in-focus attribute. When this parameter is false, it indicates that the returned focus attribute is the out-of-focus attribute. You can set whether the focus attribute returned by the onFocusChange method is the in-focus attribute or the out-of-focus attribute by changing the value of this parameter.
[0140] Among them, when it is determined that the focus attribute returned by the focus state acquisition method is a defocus attribute, the defocus style data corresponding to the defocus attribute is searched from the pre-stored layout file, and based on the defocus style data, the display style corresponding to the defocus attribute is drawn on the control.
[0141] Exemplarily, the pre-stored layout file stores focus style data corresponding to the focus attribute, and out-of-focus style data corresponding to the out-of-focus attribute. The focus style data and the out-of-focus style data only include style data for the dimension of control size. Exemplarily, the control size in the focus style data is a first size, and the control size in the out-of-focus style data is a second size.
[0142] Taking the first preset value as true and the second preset value as false as an example, when a press event triggered by the remote control is received, the focus control flag of the control is kept true, the onFocusChange method is called back, and the focus parameter hasFocus returned by the onFocusChange method is set to false. Since the focus parameter hasFocus returned by the onFocusChange method is false, the application searches for the defocus style data corresponding to the defocus attribute from the pre-stored layout file. The defocus style data found is, for example, that if the control size is the second size, the control is drawn to the second size. This presentation is more in line with user expectations and improves the user experience of the display device.
[0143] In the above embodiment, when a press event triggered by a remote control is received, the focus control flag of the control is maintained at a first preset value, a focus state acquisition method is called back by the application, and the focus attribute returned by the focus state acquisition method is set to the out-of-focus attribute; out-of-focus style data corresponding to the out-of-focus attribute is searched from a pre-stored layout file, and a display style corresponding to the out-of-focus attribute is drawn on the control based on the out-of-focus style data. This allows for flexible control of the control's display style.
[0144] In some embodiments, the processor is further configured to: receive an interactive behavior event triggered by a remote control, the interactive behavior event being triggered after a press event; if the interactive behavior event occurs inside the control, apply a callback focus state acquisition method, and set the focus attribute returned by the focus state acquisition method to the upper focus attribute; search for upper focus style data corresponding to the upper focus attribute from a pre-stored layout file, and based on the upper focus style data, draw a display style corresponding to the upper focus attribute on the control; if the interactive behavior event occurs outside the control, apply a callback focus state acquisition method, and set the focus attribute returned by the focus state acquisition method to the out-of-focus attribute; search for out-of-focus style data corresponding to the out-of-focus attribute from a pre-stored layout file, and based on the out-of-focus style data, draw a display style corresponding to the out-of-focus attribute on the control.
[0145] Among them, after the user triggers a press event by pointing at the remote control, it may also trigger a move event ACTION_MOVE, a lift event ACTION_UP, a cursor move event ACTION_OUTSIDE, an interrupt event ACTION_CANCEL, etc. These events can all be regarded as the interactive behavior events mentioned above.
[0146] When the cursor is hovering over a control, if the user presses the touch area on the remote control, a press event is triggered. If the user presses the touch area and controls the cursor to move on the user interface, a move event ACTION_MOVE is triggered. If the user presses the touch area and controls the cursor to move out of the control, a cursor move-out event ACTION_OUTSIDE is triggered. If the user releases the touch area, an up event ACTION_UP is triggered. If the parent control of the control is a list, if the user presses the touch area and moves the cursor, an interrupt event ACTION_CANCEL is triggered.
[0147] Among them, after receiving any of the above-mentioned interactive behavior events, it can be determined whether the interactive behavior event occurs inside the control. If it occurs inside the control, the callback onFocusChange method is applied, and the focus parameter hasFocus returned by the onFocusChange method is set to true. Since the focus parameter hasFocus returned by the onFocusChange method is true, the upper focus style data corresponding to the upper focus attribute is searched from the pre-stored layout file, and based on the upper focus style data, the display style corresponding to the upper focus attribute is drawn on the control.
[0148] Among them, after receiving any of the above-mentioned interactive behavior events, it can be determined whether the interactive behavior event occurs inside the control. If it occurs outside the control, the callback onFocusChange method is applied, and the focus parameter hasFocus returned by the onFocusChange method is set to false. Since the focus parameter hasFocus returned by the onFocusChange method is false, the out-of-focus style data corresponding to the out-of-focus attribute is searched from the pre-stored layout file, and based on the out-of-focus style data, the display style corresponding to the out-of-focus attribute is drawn on the control.
[0149] In the above embodiment, after receiving an interactive behavior event triggered by a remote control, if the interactive behavior event occurs inside the control, the display style corresponding to the in-focus attribute is drawn on the control by simulating the callback focus state acquisition method; if the interactive behavior event occurs outside the control, the display style corresponding to the out-of-focus attribute is drawn on the control by simulating the callback focus state acquisition method. This method of simulating the callback focus state acquisition method can achieve flexible control of the control's display style.
[0150] In some embodiments, the processor is further configured to: when the cursor of the remote control moves into the target control and then moves out of the target control to the non-interactive area, and the target control is the last control along the first direction, if a key event in the first direction is received triggered by the remote control; apply a callback focus state acquisition method, and set the focus attribute returned by the focus state acquisition method to the upper focus attribute; search for the upper focus style data corresponding to the upper focus attribute from a pre-stored layout file, and draw the display style corresponding to the upper focus attribute on the control based on the upper focus style data.
[0151] Among them, at least one control on the user interface occupies a partial area of the user interface, and the area on the user interface not occupied by the control is a non-interactive area.
[0152] Optionally, the key event here can be triggered by pointing at the remote control or by an ordinary remote control, and this embodiment of the present application does not limit this.
[0153] Exemplarily, the pre-stored layout file stores focus style data corresponding to the focus attribute, and out-of-focus style data corresponding to the out-of-focus attribute. The focus style data and the out-of-focus style data only include style data for the dimension of control size. Exemplarily, the control size in the focus style data is a first size, and the control size in the out-of-focus style data is a second size.
[0154] See also Figure 14 As shown, control A is the last control upwards. When the cursor of the remote control moves into control A, the focus attribute of control A becomes the upper focus attribute, and control A is drawn as the first size. When the cursor of the remote control moves out of control A to the non-interactive area, the focus attribute of control A is still the upper focus attribute, but control A is updated to the second size. At this time, if the user presses the up button of the remote control, the application will call back the onFocusChange method and set the focus parameter hasFocus returned by the onFocusChange method to true. Since the focus parameter hasFocus returned by the onFocusChange method is true, the upper focus style data corresponding to the upper focus attribute is searched from the pre-stored layout file. The upper focus style data found is, for example: if the control size is the first size, the control is drawn as the first size.
[0155] In the above embodiment, when the cursor of the remote control moves into the target control and then moves out of the target control to the non-interactive area, and the target control is the last control along the first direction, if the user triggers a key event in the first direction through the remote control, the focus state acquisition method is called back by the application, and the focus attribute returned by the focus state acquisition method is set to the upper focus attribute; the upper focus style data corresponding to the upper focus attribute is searched from the pre-stored layout file, and the display style corresponding to the upper focus attribute is drawn on the control based on the upper focus style data. This is more in line with the user's habit of using the remote control and improves the user experience.
[0156] In some embodiments, the control is a parent control, and the parent control includes at least one child control; the processor executes drawing a display style corresponding to the in-focus attribute on the control, and is further configured to: draw the display style corresponding to the in-focus attribute on the parent control and at least one child control; the processor executes drawing a display style corresponding to the out-of-focus attribute on the control, and is further configured to: draw the display style corresponding to the out-of-focus attribute on the parent control and at least one child control.
[0157] Among them, the control mentioned in the embodiment of the present application can be a parent control, which contains at least one child control. The parent control has two display styles, one is the display style corresponding to the parent control's in-focus attribute, and the other is the display style corresponding to the parent control's out-of-focus attribute. For each child control, there are also two display styles, one is the display style corresponding to the parent control's in-focus attribute, and the other is the display style corresponding to the parent control's out-of-focus attribute.
[0158] Among them, when drawing the display style, both the parent control and the child control are drawn. For example, when the pointing function of the remote control is turned on and the cursor of the remote control moves into the control, the focus control identifier of the control is set to a first preset value, and the focus attribute of the control is set to an upper focus attribute based on the first preset value; the display style corresponding to the upper focus attribute of the control is drawn on the control, and the display style corresponding to the upper focus attribute of the control is drawn on the child control inside the control. When a press event of the control is received triggered by the touch screen, the focus control identifier of the control is set to a second preset value, and the focus attribute of the control is set to an out-of-focus attribute based on the second preset value; the display style corresponding to the out-of-focus attribute of the control is drawn on the control, and the display style corresponding to the out-of-focus attribute of the control is drawn on the child control inside the control.
[0159] For example, parent control A contains child controls A1, A2, and A3. For parent control A, the display style corresponding to its on-focus attribute is style A1, and the display style corresponding to its out-of-focus attribute is style A2; for child control A1, the display style corresponding to the on-focus attribute of the parent control is style A11, and the display style corresponding to the out-of-focus attribute of the parent control is style A12; for child control A2, the display style corresponding to the on-focus attribute of the parent control is style A21, and the display style corresponding to the out-of-focus attribute of the parent control is style A22; for child control A3, the display style corresponding to the on-focus attribute of the parent control is style A31, and the display style corresponding to the out-of-focus attribute of the parent control is style A32. When the pointing function of the remote control is turned on and the cursor of the remote control moves into the parent control A, the focus control flag of the parent control A is set to a first preset value, and the focus attribute of the parent control A is set to an upper focus attribute based on the first preset value; based on the upper focus attribute, style A1 is drawn on the parent control A, style A11 is drawn on the child control A1, style A21 is drawn on the child control A2, and style A31 is drawn on the child control A3. When a press event of the parent control A is received via the touch screen, the focus control flag of the parent control A is set to a second preset value, and based on the second preset value, the focus attribute of the parent control A is set to an out-of-focus attribute, and based on the out-of-focus attribute, style A2 is drawn on the parent control A, style A12 is drawn on the child control A1, style A22 is drawn on the child control A2, and style A32 is drawn on the child control A3. When the property validity flag of the parent control A is set to the second preset value, style A2 is drawn on the parent control A, style A12 is drawn on the child control A1, style A22 is drawn on the child control A2, and style A32 is drawn on the child control A3.
[0160] In the above embodiment, when a control contains at least one child control, drawing is performed synchronously on the parent control and the child control, so that the parent control and the child control as a whole present an in-focus effect or an out-of-focus effect, which is closer to the user's expected effect and further improves the user experience.
[0161] In some embodiments, a display style control method is provided, see Figure 15As shown, the method includes: when it is detected that the cursor pointing to the remote control or the mouse cursor moves into the control, the focus control flag of the control is set to true, and the HoverEnter sub-process is executed. The HoverEnter sub-process includes: judging whether the focus attribute of the control is the upper focus attribute, if it is not the upper focus attribute, first requesting the system to set the focus attribute of the control to the upper focus attribute; if it is already the upper focus attribute, simulating the callback onFocusChange method, and setting the focus parameter hasFocus returned by the onFocusChange method to true. Since the focus parameter hasFocus returned by the onFocusChange method is true, searching for the upper focus style data corresponding to the upper focus attribute from the pre-stored layout file, and drawing the display style corresponding to the upper focus attribute on the control based on the upper focus style data. When it is detected that the cursor of the remote control or the mouse cursor moves out of the control, the HoverExit sub-process is executed. The HoverExit sub-process includes: simulating the callback of the onFocusChange method, and setting the focus parameter hasFocus returned by the onFocusChange method to false. Since the focus parameter hasFocus returned by the onFocusChange method is false, the application searches for the defocus style data corresponding to the defocus attribute from the pre-stored layout file, and based on the defocus style data, draws the display style corresponding to the defocus attribute on the control. When a press event is received for a control, the device source of the press event is determined. When the device source of the press event is a touch screen, it is considered that a press event triggered by the touch screen is received. At this time, the focus control flag of the control is set to false. Since the focus control flag of the control is set to false, that is, the control is not allowed to be focused. At this time, the focus attribute of the control is set to the out-of-focus attribute. When the operating system detects that the focus attribute of a control has changed, it will call back the focus state acquisition method to obtain the current focus attribute of the updated control and return it to the application. Since the focus attribute of the control has been set to the out-of-focus attribute, the focus state acquisition method returns the out-of-focus attribute to the application. The application searches for the out-of-focus style data corresponding to the out-of-focus attribute from the pre-stored layout file, and draws the display style corresponding to the out-of-focus attribute on the control based on the out-of-focus style data.In the case where the device source of the press event is a remote control, it is considered that a press event triggered by the remote control has been received, and the HoverPress sub-process is executed. The HoverPress sub-process includes: calling back the onFocusChange method, and setting the focus parameter hasFocus returned by the onFocusChange method to false. Since the focus parameter hasFocus returned by the onFocusChange method is false, the application searches for the defocus style data corresponding to the defocus attribute from the pre-stored layout file, and based on the defocus style data, draws the display style corresponding to the defocus attribute on the control. In the case of receiving an ACTION_UP event after the press event, it can be determined whether the ACTION_UP event occurs inside the control. If it occurs inside the control, it can be ended directly, or the HoverEnter sub-process can be executed to draw the display style corresponding to the focus attribute on the control; if it occurs outside the control, the HoverExit sub-process is executed to draw the display style corresponding to the defocus attribute on the control. When receiving the ACTION_MOVE move event after a press event, it is possible to determine whether the ACTION_MOVE move event occurs inside the control. If so, it can be ended directly or the HoverEnter sub-process can be executed; if it occurs outside the control, the HoverExit sub-process can be executed. When receiving the ACTION_OUTSIDE cursor move event after a press event, the HoverExit sub-process can be executed directly. When receiving the ACTION_CANCEL interrupt event after a press event, it is possible to determine whether the ACTION_CANCEL interrupt event occurs inside the control. If so, it can be ended directly or the HoverEnter sub-process can be executed; if it occurs outside the control, the HoverExit sub-process can be executed. When the user triggers a key event through the remote control, if the focus attribute of the control corresponding to the key event is the upper focus attribute, and the key event is for pressing the up key, down key, left key, right key, or confirm key, and the key event is pressed, the onFocusChange method is called back, and the focus parameter hasFocus returned by the onFocusChange method is set to true. Since the focus parameter hasFocus returned by the onFocusChange method is true, the upper focus style data corresponding to the upper focus attribute is searched from the pre-stored layout file, and based on the upper focus style data, the display style corresponding to the upper focus attribute is drawn on the control.
[0162] In some embodiments, a display style control method is provided, see Figure 16, the method includes: S1, pointing the remote control to send data representing the cursor display position to the display device; S2, the display device determines based on the received data that when the cursor moves into the control, sets the focus control identifier of the control to a first preset value, and sets the focus attribute of the control to an upper focus attribute based on the first preset value; and draws a display style corresponding to the upper focus attribute on the control; S3, the user triggers a press event on the control through the touch screen; S4, the display device sets the focus control identifier of the control to a second preset value, and sets the focus attribute of the control to an out-of-focus attribute based on the second preset value; and draws a display style corresponding to the out-of-focus attribute on the control. S5, the user triggers a press event on the control through the remote control; S6, the display device keeps the focus control identifier of the control at the first preset value, applies a callback focus state acquisition method, and sets the focus attribute returned by the focus state acquisition method to an out-of-focus attribute; searches for out-of-focus style data corresponding to the out-of-focus attribute from a pre-stored layout file, and draws a display style corresponding to the out-of-focus attribute on the control based on the out-of-focus style data. S7. The user triggers an interactive behavior event (movement event ACTION_MOVE, lift event ACTION_UP, cursor move event ACTION_OUTSIDE, interruption event ACTION_CANCEL, etc.) through the remote control; S8. If the interactive behavior event occurs inside the control, the focus state acquisition method is called back by the application, and the focus attribute returned by the focus state acquisition method is set to the upper focus attribute; the upper focus style data corresponding to the upper focus attribute is searched from the pre-stored layout file, and the display style corresponding to the upper focus attribute is drawn on the control based on the upper focus style data; if the interactive behavior event occurs outside the control, the focus state acquisition method is called back by the application, and the focus attribute returned by the focus state acquisition method is set to the out-of-focus attribute; the out-of-focus style data corresponding to the out-of-focus attribute is searched from the pre-stored layout file, and the display style corresponding to the out-of-focus attribute is drawn on the control based on the out-of-focus style data. S9. When the cursor of the remote control moves into the target control and then moves out of the target control to the non-interactive area, and the target control is the last control along the first direction, the user triggers a key event in the first direction through the remote control; S10. The display device callbacks the focus state acquisition method through the application, and sets the focus attribute returned by the focus state acquisition method to the upper focus attribute; searches for the upper focus style data corresponding to the upper focus attribute from the pre-stored layout file, and draws the display style corresponding to the upper focus attribute on the control based on the upper focus style data.
[0163] In some embodiments, a display style control method is provided, comprising: when the pointing function of a remote control is activated and the cursor of the remote control moves into a control, setting the focus control flag of the control to a first preset value, and setting the focus attribute of the control to an upper focus attribute based on the first preset value; drawing a display style corresponding to the upper focus attribute on the control; when a press event triggered by the touch screen is received, setting the focus control flag of the control to a second preset value, and setting the focus attribute of the control to an out-of-focus attribute based on the second preset value; and drawing a display style corresponding to the out-of-focus attribute on the control. The specific implementation process of this method is described above and will not be repeated here.
[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
[0165] For ease of explanation, the above description has been presented in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations are possible. The above embodiments have been selected and described to better explain the principles and practical applications, thereby enabling those skilled in the art to better utilize the embodiments and various different variations of the embodiments suitable for specific use considerations.
Claims
1. A display device, characterized in that: include: A touch screen configured to: display a user interface, wherein the user interface includes at least one control; The processor is configured to: the control is provided with a focus attribute and a focus control flag; the focus attribute includes a focus attribute and a focus-out attribute; the focus control flag is used to indicate whether the control is allowed to focus; The focus control flag is set to a first preset value to indicate that the control is allowed to focus; The focus control flag is set to a second preset value to indicate that the control is not allowed to focus; When the pointing function of the remote control is turned on and the cursor of the remote control moves into the control, setting the focus control flag of the control to a first preset value, setting the focus attribute of the control to an upper focus attribute based on the first preset value; and drawing a display style corresponding to the upper focus attribute on the control; When a press event of the control is received via the touch screen, the focus control flag of the control is set to a second preset value, and the focus attribute of the control is set to a defocus attribute based on the second preset value; and a display style corresponding to the defocus attribute is drawn on the control.
2. The display device according to claim 1, wherein Before the processor sets the focus attribute of the control to the top focus attribute, the processor is further configured to: Determine whether the current focus attribute of the control is the top focus attribute; If it is not the upper focus attribute, then setting the focus attribute of the control to the upper focus attribute; If it is an upper focus attribute, the display style corresponding to the upper focus attribute is directly drawn on the control.
3. The display device according to claim 1, wherein The processor executes drawing a display style corresponding to the upper focus attribute on the control, and is further configured to: By applying a callback focus state acquisition method, and setting the focus attribute returned by the focus state acquisition method as the upper focus attribute; searching for the upper focus style data corresponding to the upper focus attribute from a pre-stored layout file, and drawing the display style corresponding to the upper focus attribute on the control based on the upper focus style data.
4. The display device according to claim 1, wherein The processor executes drawing a display style corresponding to the out-of-focus attribute on the control, and is further configured to: The system callbacks the focus state acquisition method, and the focus attribute returned by the focus state acquisition method is the out-of-focus attribute; the out-of-focus style data corresponding to the out-of-focus attribute is searched from the pre-stored layout file, and based on the out-of-focus style data, the display style corresponding to the out-of-focus attribute is drawn on the control.
5. The display device according to claim 1, wherein The processor is further configured to: When the cursor of the remote control moves out of the control, the focus control identifier of the control is maintained at the first preset value, and the focus attribute of the control is maintained as the on-focus attribute, and a focus state acquisition method is callback applied, and the focus attribute returned by the focus state acquisition method is set to the out-of-focus attribute; out-of-focus style data corresponding to the out-of-focus attribute is searched from a pre-stored layout file, and based on the out-of-focus style data, a display style corresponding to the out-of-focus attribute is drawn on the control.
6. The display device according to claim 1, wherein The processor is further configured to: When a press event triggered by a remote control is received, the focus control flag of the control is maintained at a first preset value, a focus state acquisition method is callbacked by the application, and the focus attribute returned by the focus state acquisition method is set to a defocus attribute; the defocus style data corresponding to the defocus attribute is searched from a pre-stored layout file, and based on the defocus style data, the display style corresponding to the defocus attribute is drawn on the control.
7. The display device according to claim 1, wherein The processor is further configured to: receiving an interactive behavior event triggered by a remote controller, wherein the interactive behavior event is triggered after the pressing event; If the interactive behavior event occurs inside the control, the focus state acquisition method is called back by the application, and the focus attribute returned by the focus state acquisition method is set to the upper focus attribute; Searching for upper focus style data corresponding to the upper focus attribute from a pre-stored layout file, and drawing a display style corresponding to the upper focus attribute on the control based on the upper focus style data; If the interactive behavior event occurs outside the control, the focus state acquisition method is called back by the application, and the focus attribute returned by the focus state acquisition method is set to the out-of-focus attribute; Defocus style data corresponding to the defocus attribute is searched for in a pre-stored layout file, and based on the defocus style data, a display style corresponding to the defocus attribute is drawn on the control.
8. The display device according to claim 1, wherein The processor is further configured to: When the cursor of the remote control moves into a target control and then moves out of the target control to a non-interactive area, and the target control is the last control along a first direction, if a key event in the first direction triggered by the remote control is received; Calling back the focus state acquisition method by the application, and setting the focus attribute returned by the focus state acquisition method as the upper focus attribute; The upper focus style data corresponding to the upper focus attribute is searched from a pre-stored layout file, and based on the upper focus style data, a display style corresponding to the upper focus attribute is drawn on the control.
9. The display device according to claim 1, wherein The control is a parent control, and the parent control includes at least one child control; The processor executes drawing the display style corresponding to the upper focus attribute on the control, and is further configured to: draw the display style corresponding to the upper focus attribute on the parent control and the at least one child control; The processor executes drawing a display style corresponding to the out-of-focus attribute on the control, and is further configured to: draw the display style corresponding to the out-of-focus attribute on the parent control and the at least one child control.
10. A display style control method, characterized in that: include: When the pointing function of the remote control is enabled and the cursor of the remote control moves into the control, the focus control flag of the control is set to a first preset value, and the focus attribute of the control is set to an upper focus attribute based on the first preset value; and a display style corresponding to the upper focus attribute is drawn on the control; When a press event triggered by the touch screen is received, the focus control flag of the control is set to a second preset value, and the focus attribute of the control is set to a defocus attribute based on the second preset value; and a display style corresponding to the defocus attribute is drawn on the control.
Citation Information
Patent Citations
Method and system for focus management in a software application
CN104866299A
Focus refreshing method and device of application window, storage medium and terminal
CN109828820A
Key trigger event processing method, intelligent terminal and storage medium
CN110286973A
Focusing and zooming method and device of page control, medium and electronic equipment
CN118550440A
Display device and display device control method
WO2024066538A1