Focusing and zooming method and device of page control, medium and electronic equipment
By adopting the relative layout method and parameter configuration in Relative Layout, the remote control can be used to control the focus and zoom of sub-controls, which solves the problem of being unable to use the remote control to control the zoom range and switch focus of the parent area and sub-controls.
Patent Information
- Application Number
- CN202310175495.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2024-08-27
AI Technical Summary
When using Relative Layout, the zoom range and focus switching of the parent area and child controls cannot be controlled through the remote control.
Use the relative layout method of the preset page controls to determine the relative positions of the parent area and child controls, configure the parameters of the focus and zoom attributes, and realize the focus and zoom of the child controls through the key value events of the user's remote control.
The focus switching and scaling functions of the remote control controlled by the remote control are realized, and the problem in the original technology that the remote control cannot be used to control the parent area and the scaling range of the child control is solved.
Smart Images

Figure CN118550440A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of control technology, and in particular to a focus zooming method, device, medium and electronic device for a page control. Background Art
[0002] leanback-launcher is a client API development library for large-screen TVs, in which the most commonly used layout is the RelativeLayout layout. There are various subview components in the layout, which is a view group that displays subviews in relative positions. The position of each view can be specified relative to the position of the same level element or relative to the parent RelativeLayout area, but there is no native implementation for using the remote control to control the zoom range of the parent area and child controls, switch focus, etc. Summary of the invention
[0003] In view of this, the present invention provides a focus zoom method, device, storage medium and electronic device for a page control, the main purpose of which is to solve the problem that the zoom range and focus switching of the parent area and child controls cannot be controlled by a remote control when using a Relative Layout.
[0004] To solve the above problems, the present application provides a focus zooming method for a page control, including:
[0005] Adopting the relative layout mode of the preset page controls, determining the parent area corresponding to the target page and determining the relative positions of the child controls distributed on the parent area;
[0006] Performing parameter configuration on the focus attribute and the zoom attribute of each of the sub-controls to obtain each focused sub-control;
[0007] According to the currently displayed target page, a first key value triggered by the user's remote control is obtained, and according to the first key value, a target focus subcontrol that meets a preset focus condition is determined from each of the focus subcontrols to be focused;
[0008] A second key value triggered by a user remote control is obtained, and when the target focus sub-control meets a preset zoom condition, the target focus sub-control is controlled to zoom according to the second key value.
[0009] Optionally, the adopting of the relative layout mode of the preset page controls to determine the parent region corresponding to the target page and the relative positions of the child controls distributed on the parent region specifically includes:
[0010] Using the parent container positioning method to configure the row position parameter value and the column position parameter value distributed in the parent area for each of the child controls;
[0011] Determine the relative position of each of the sub-controls in the parent region based on the row position parameter value and the column position parameter value respectively corresponding to each of the sub-controls; or,
[0012] Identify reference controls;
[0013] Based on the position of the reference control, the position of each of the child controls is positioned using a sibling control positioning method to determine the relative position of each of the child controls in the parent area.
[0014] Optionally, parameter configuration is performed on the focus attribute and the zoom attribute of each sub-control to obtain each focused sub-control, specifically including:
[0015] Determine each sub-control to be focused corresponding to the target page based on each sub-control;
[0016] Parameter configuration is performed on the focus attribute of each sub-control to be focused, so as to obtain each focused sub-control.
[0017] Optionally, according to the currently displayed target page, obtaining a first key value triggered by the user's remote control, and before focusing on a target focus subcontrol that satisfies a preset focus condition from each focus subcontrol according to the first key value, the method further includes:
[0018] Determine each sub-control to be scaled in each of the focused sub-controls;
[0019] The interface scaling attribute parameter value and the scaling animation parameter value of each sub-control to be scaled are configured to obtain each scaling sub-control.
[0020] Optionally, the step of configuring the focus attribute of each sub-control to be focused to obtain each focused sub-control specifically includes:
[0021] Configure each focus parameter value of the combined focus attribute of each sub-control to be focused, to obtain each focused sub-control;
[0022] The combined focus attribute includes: a first attribute of acquiring focus and a second attribute of acquiring focus by touch.
[0023] Optionally, configuring the interface scaling attribute parameter value and the scaling animation parameter value of each sub-control to be scaled to obtain each scaling sub-control specifically includes:
[0024] Configure the interface zoom attribute parameters of each sub-control to be zoomed, and obtain the interface zoom sub-control corresponding to each sub-control to be zoomed, wherein the interface zoom attribute includes: a third attribute that focuses the zoom sub-control without being restricted by the parent area and a fourth attribute that focuses the zoom sub-control on the zoom area boundary;
[0025] Based on the animation tool class of the preset component library, the animation zoom property parameters of each of the interface zoom sub-controls are configured to obtain each of the zoom sub-controls.
[0026] Optionally, the animation tool class based on the preset component library configures the animation zoom attribute parameters of each of the interface zoom sub-controls to obtain each of the zoom sub-controls, specifically including:
[0027] The elastic property parameters of each of the interface zoom sub-controls are configured to obtain a first zoom sub-control corresponding to each of the interface zoom sub-controls, wherein the elastic property parameters include: a hardness coefficient parameter and an elastic speed parameter;
[0028] Configuring the animation property parameters of each of the first zoom sub-controls to obtain each of the second zoom sub-controls;
[0029] The animation change threshold parameters of each second zoom sub-control are configured to obtain each zoom sub-control.
[0030] In order to solve the above problems, the present application provides a focus zooming device for a page control, comprising:
[0031] Determination module: used to determine the parent area corresponding to the target page and the relative positions of the child controls distributed on the parent area by using the relative layout mode of the preset page controls;
[0032] Configuration module: used to configure the focus attribute and zoom attribute of each sub-control to obtain each focused sub-control;
[0033] Focus module: used for obtaining a first key value triggered by a user according to the current display interface, and determining a target focus subcontrol that meets a preset focus condition from each of the focus subcontrols according to the first key value for focusing;
[0034] Zoom module: used to obtain the first key value triggered by the user's remote control according to the currently displayed target page, and determine the target focus sub-control that meets the preset focus condition from each focus sub-control according to the first key value to focus on.
[0035] In order to solve the above problem, the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the focus zooming method of the page control are implemented.
[0036] To solve the above problem, the present application provides an electronic device, which at least includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned page control focus zoom method when executing the computer program in the memory.
[0037] The present application adopts a relative layout method of preset page controls to determine the parent area corresponding to the target page and the relative positions of each child control distributed on the parent area; configures the focus attribute and zoom attribute of each child control to obtain each focused child control; obtains the first key value triggered by the user's remote control according to the currently displayed target page, and determines the target focused subcontrol that meets the preset focus condition from each focused subcontrol according to the first key value to focus; obtains the second key value triggered by the user's remote control, and when the target focused subcontrol meets the preset zoom condition, controls the target focused subcontrol to zoom according to the second key value. The focus zoom method of the present application inherits the original relative layout method and adopts the extended attribute method to pre-configure the focus attribute and zoom attribute parameters of each child control to realize the focus and zoom functions of the child control, solving the problem in the prior art that the parent area and the zoom range of the child control and the focus switching cannot be controlled by the remote control.
[0038] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0040] Figure 1 A schematic diagram of a flow chart of a focus zooming method of a page control provided in an embodiment of the present application is shown;
[0041] Figure 2 A schematic diagram of a flow chart of another method for focusing and zooming a page control provided in an embodiment of the present application is shown;
[0042] Figure 3 A structural block diagram of a focus and zoom device for a page control provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0043] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0044] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0045] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0046] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0047] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.
[0048] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0049] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0050] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0051] The present application embodiment provides a method for focusing and zooming a page control, such as Figure 1 As shown, including:
[0052] Step S101: using a relative layout method of a preset page control, determining a parent region corresponding to a target page and determining relative positions of child controls distributed on the parent region;
[0053] In the specific implementation process of this step, the original relative layout Relative Layout is inherited, and the parent container positioning method or the sibling space positioning method is used to position the target page level area and the relative position of each child control distributed on the parent area. Specifically, the parent container positioning method is used to configure the row position parameter value and column position parameter value distributed in the parent area for each child control; based on the row position parameter value and column position parameter value corresponding to each child control, the relative position of each child control distributed in the parent area is determined; or, a reference control is determined; based on the position of the reference control, the sibling control positioning method is used to position the position of each child control, and the relative position of each child control distributed in the parent area is determined. This lays the foundation for the subsequent parameter configuration of each control.
[0054] Step S102: configuring the focus attribute and the zoom attribute of each sub-control to obtain each focused sub-control;
[0055] In the specific implementation process of this step, the sub-controls distributed in each page will determine the focused sub-controls and non-focused sub-controls according to the position of each control in accordance with the project requirements. Specifically, first: determine the sub-controls to be focused corresponding to the current page based on each of the sub-controls; configure the focus properties of each of the sub-controls to be focused to obtain each focused sub-control. Determine each sub-control to be scaled in each of the focused sub-controls; configure the interface scaling property parameter value and scaling animation parameter value of each of the sub-controls to be scaled to obtain each scaled sub-control.
[0056] Step S103: acquiring a first key value triggered by the user's remote control according to the currently displayed target page, and determining a target focus subcontrol that meets a preset focus condition from among the focus subcontrols according to the first key value to focus on;
[0057] In the specific implementation of this step, the first key value includes: a direction key value. When the user triggers the first key value through the remote control, the focus cursor will be controlled to switch from the current focused sub-control along the direction of the direction key value to the target focused sub-control for focusing. When there is a non-focused sub-control between the current focused sub-control and the target sub-control along the direction of the first key value, the non-focused sub-control will be skipped during the movement of the focus cursor. This application controls the focus of the sub-control by presetting a listener to monitor the focus event of the user triggering the first key value through the remote control.
[0058] Step S104: obtaining a second key value triggered by the user's remote control, and when the target focus sub-control meets a preset zoom condition, controlling the target focus sub-control to zoom according to the second key value.
[0059] In the specific implementation process of this step, the second key value includes: a zoom key value. When the user triggers the zoom key value on the target focus sub-control, when the target focus sub-control meets the preset zoom condition, the target focus sub-control is controlled to zoom according to the second key value.
[0060] The present application adopts a relative layout method of preset page controls to determine the parent area corresponding to the target page and the relative positions of each child control distributed on the parent area; configures the focus attribute and zoom attribute of each child control to obtain each focused child control; obtains the first key value triggered by the user's remote control according to the currently displayed target page, and determines the target focused subcontrol that meets the preset focus condition from each focused subcontrol according to the first key value to focus; obtains the second key value triggered by the user's remote control, and when the target focused subcontrol meets the preset zoom condition, controls the target focused subcontrol to zoom according to the second key value. The focus zoom method of the present application inherits the original relative layout method and adopts the extended attribute method to pre-configure the focus attribute and zoom attribute parameters of each child control to realize the focus and zoom functions of the child control, solving the problem in the prior art that the parent area and the zoom range of the child control and the focus switching cannot be controlled by the remote control.
[0061] Another embodiment of the present application provides a method for focusing and zooming a page control, such as Figure 2 As shown, including:
[0062] Step S201: using a relative layout method of a preset page control, determining a parent region corresponding to a target page and determining relative positions of child controls distributed on the parent region;
[0063] In the specific implementation process of this step, leanback-launcher is a client API development library for large-screen TVs, in which the more commonly used layout is the Relative Layout layout. This application inherits the Relative Layout layout and adopts the parent container positioning method to configure the row position parameter value and the column position parameter value distributed in the parent area for each of the child controls; based on the row position parameter value and the column position parameter value corresponding to each of the child controls, the relative position of each of the child controls in the parent area is determined; or, a reference control is determined; based on the position of the reference control, the position of each of the child controls is positioned using the sibling control positioning method to determine the relative position of each of the child controls in the parent area.
[0064] Step S202: determining each sub-control to be focused corresponding to the current page, configuring the focus attribute of each sub-control to be focused, and obtaining each focused sub-control;
[0065] In the specific implementation of this step, each sub-control is divided into a sub-control to be focused and a non-focused sub-control according to the layout requirements of the target page. In actual applications, the sub-controls that need to control the focus cursor to be selected and the sub-controls that provide the zoom function are sub-controls to be focused. Configure the focus parameter values of the combined focus attributes of each of the sub-controls to be focused to obtain each focused sub-control; the combined focus attributes include: a first attribute for obtaining focus and a second attribute for obtaining focus by touch. By adding a focusable attribute and a focusable In Touch Mode attribute, the attribute parameters corresponding to the focusable attribute and the focusable In Touch Mode attribute are configured to obtain each focused sub-control. The first attribute is the focusable attribute, and the second attribute is the focusable In Touch Mode attribute. Specifically, the configuration parameters of each focused subcontrol are "android:focusable="true"" and "android:focusableInTouchMode="true"", and the configuration parameters for the non-focused subcontrol are "android:focusable="false"" and "android:focusable In Touch Mode="false"". This application implements the focusing of subcontrols by extending the first attribute of applying the combined focus attribute and the second attribute of obtaining focus through touch, thereby obtaining each focused subcontrol and laying the foundation for subsequent switching of focus.
[0066] Step S203: determining each sub-control to be scaled in each of the focused sub-controls, configuring the interface scaling attribute parameter value and the scaling animation parameter value of each of the sub-controls to be scaled, and obtaining each scaling sub-control;
[0067] In the specific implementation process of this step, the interface zoom attribute parameters of each sub-control to be zoomed are configured to obtain the interface zoom sub-control corresponding to each sub-control to be zoomed, and the interface zoom attribute includes: a third attribute that the focused zoom sub-control is not restricted by the parent area and a fourth attribute that the focused zoom sub-control zoom area boundary; specifically, this application implements the zoom of the sub-control by adding the clip Children attribute and the clip To Padding attribute, the third attribute is the clip Children attribute, and the fourth attribute is the clip To Padding attribute. In order to realize the zoom function, this application configures the third attribute parameter as follows:
[0068] "android:clipChildren="false""; configure the fourth attribute parameter to:
[0069] "android:clipToPadding="false"";
[0070] Because: directly use the native android clipChildren and clipToPadding combination, if the third attribute parameter and the fourth attribute parameter are all set to true, the child control cannot expand beyond the layout range of the parent area. Based on the animation tool class of the preset component library, the animation scaling attribute parameters of each interface scaling subcontrol are configured to obtain each scaling subcontrol. This application uses the Jetpack library provided by Google natively to introduce the corresponding elastic animation library in the project to realize the scaling function of the subcontrol. Specifically, the elastic property parameters of each interface zoom sub-control are configured to obtain the first zoom sub-control corresponding to each interface zoom sub-control, and the elastic property parameters include: hardness coefficient parameter and elastic speed parameter; for example: the hardness coefficient parameter setDampingRatio is set to: 0.4f, and the elastic speed parameter setStiffness is set to: SpringForce.STIFFNESS_LOW; the animation property parameters of each first zoom sub-control are configured to obtain each second zoom sub-control; the animation property scale property of the first zoom sub-control is defined, and scaleX and scaleY are integrated for the component view that needs to perform zoom animation; the animation change threshold parameter of each second zoom sub-control is configured to obtain each zoom sub-control. For example: the animation change threshold parameter setMinimumVisibleChange is set to: 0.00390625f, and the animation threshold parameter can be set according to actual needs. Finally, it is integrated into a new function method set Scale Animator (View view, boolean isScale, floatscale) to be exposed to global projects for use. In the corresponding on Focus Change (View v, boolean hasFocus) function, implement the method Animator Utils.set Scale Animator (View view, boolean isScale, float scale) of the custom animation tool class. When the focus is obtained, set isScale to true, and set scale to the coefficient value required for the project requirement data to be enlarged; when the focus is lost and it needs to be restored to the initial state, set isScale to false and set scale to 1f.
[0071] Step S204: acquiring a first key value triggered by a user remote control according to the current display interface, and determining a target focus subcontrol that meets a preset focus condition from among the focus subcontrols according to the first key value to focus on;
[0072] In the specific implementation of this step, the first key value includes: a direction key value. When the user triggers the first key value through the remote control, the focus cursor will be controlled to switch from the current focused sub-control along the direction of the direction key value to the target focused sub-control for focusing. When there is a non-focused sub-control between the current focused sub-control and the target sub-control along the direction of the first key value, the non-focused sub-control will be skipped during the movement of the focus cursor. This application controls the focus of sub-controls by monitoring the focus event of the user triggering the first key value through the remote control through a preset listener. By implementing the native API focus monitoring interface new On Focus ChangeListener() in the set On FocusChange Listener listening function, the focus switching event of the focused sub-control corresponding to the onFocusChange(View v, boolean hasFocus) function is processed, and the target sub-control is controlled to focus according to the preset parameter value corresponding to the variable hasFocus provided by the function.
[0073] Step S205: obtaining a second key value triggered by the user's remote control, and when the target focus sub-control meets a preset zoom condition, controlling the target focus sub-control to zoom according to the second key value.
[0074] In the specific implementation process of this step, the second key value includes: a zoom key value. When the target focus sub-control is focused, when the user triggers the zoom key value on the remote control, and when the target focus sub-control meets the preset zoom condition, the target focus sub-control is controlled to zoom according to the second key value.
[0075] The present application determines the parent area corresponding to the target page and the relative positions of the child controls distributed on the parent area by adopting the relative layout method of the preset page controls; determines the child controls to be focused corresponding to the current page, configures the focus properties of the child controls to be focused, and obtains the focused child controls; determines the child controls to be scaled in the focused child controls, configures the interface scaling property parameter values and the scaling animation parameter values of the child controls to be scaled, and obtains the scaled child controls; obtains the first key value triggered by the user's remote control according to the current display interface, and determines the target focused subcontrol that meets the preset focusing condition from the focused subcontrols according to the first key value for focusing; obtains the second key value triggered by the user's remote control, and when the target focused subcontrol meets the preset scaling condition, controls the target focused subcontrol to be scaled according to the second key value. The focus zoom method of the present application inherits the layout mode of the original Relative Layout, and adopts the extended attribute method to pre-configure the focus attribute and zoom attribute parameters of each child control, thereby realizing the focus and zoom functions of the child control, and solving the problem in the prior art that the parent area and the zoom range of the child control and the switching focus cannot be controlled by the remote control.
[0076] Another embodiment of the present application provides a focus zooming device for a page control, such as Figure 3 As shown, including:
[0077] Determination module 1: used to determine the parent area corresponding to the target page and determine the relative positions of the child controls distributed on the parent area by using the relative layout mode of the preset page controls;
[0078] Configuration module 2: used to configure the focus attribute and zoom attribute of each sub-control to obtain each focused sub-control;
[0079] Focus module 3: used to obtain a first key value triggered by a user according to the current display interface, and determine a target focus subcontrol that meets a preset focus condition from each of the focus subcontrols according to the first key value to focus on;
[0080] Zoom module 4: used to obtain the first key value triggered by the user's remote control according to the currently displayed target page, and determine the target focus sub-control that meets the preset focus condition from each focus sub-control according to the first key value to focus on.
[0081] In the specific implementation process, the determination module 1 is specifically used to: use the parent container positioning method to configure the row position parameter value and the column position parameter value distributed in the parent area for each of the child controls; based on the row position parameter value and the column position parameter value corresponding to each of the child controls, determine the relative position of each of the child controls in the parent area; or, determine a reference control; based on the position of the reference control, use the sibling control positioning method to position the position of each of the child controls, and determine the relative position of each of the child controls in the parent area.
[0082] In the specific implementation process, the configuration module 2 is specifically used to: determine each sub-control to be focused corresponding to the target page based on each sub-control; perform parameter configuration on the focus attribute of each sub-control to be focused to obtain each focused sub-control.
[0083] In the specific implementation process, the configuration module 2 is also used to: determine each sub-control to be scaled in each focused sub-control; configure the interface scaling property parameter value and the scaling animation parameter value of each sub-control to be scaled to obtain each scaling sub-control.
[0084] In the specific implementation process, the configuration module 2 is also used to: configure each focus parameter value of the combined focus attribute of each sub-control to be focused to obtain each focused sub-control; the combined focus attribute includes: a first attribute for obtaining focus and a second attribute for obtaining focus by touch.
[0085] During the specific implementation process, the configuration module 2 is also used to: configure the interface zoom property parameters of each sub-control to be zoomed, and obtain the interface zoom sub-control corresponding to each sub-control to be zoomed, and the interface zoom property includes: a third property that the focused zoom sub-control is not restricted by the parent area and a fourth property that the focused zoom sub-control zoom area boundary; configure the animation zoom property parameters of each interface zoom sub-control based on the animation tool class of the preset component library to obtain each zoom sub-control.
[0086] During the specific implementation process, the configuration module 2 is also used to: configure the elastic property parameters of each of the interface zoom sub-controls to obtain a first zoom sub-control corresponding to each of the interface zoom sub-controls, and the elastic property parameters include: a hardness coefficient parameter and an elastic speed parameter; configure the animation property parameters of each of the first zoom sub-controls to obtain each second zoom sub-control; configure the animation change threshold parameters of each second zoom sub-control to obtain each zoom sub-control.
[0087] The present application adopts a relative layout method of preset page controls to determine the parent area corresponding to the target page and the relative positions of each child control distributed on the parent area; configures the focus attribute and zoom attribute of each child control to obtain each focused child control; obtains the first key value triggered by the user's remote control according to the currently displayed target page, and determines the target focused subcontrol that meets the preset focus condition from each focused subcontrol according to the first key value to focus; obtains the second key value triggered by the user's remote control, and when the target focused subcontrol meets the preset zoom condition, controls the target focused subcontrol to zoom according to the second key value. The focus zoom method of the present application inherits the original relative layout method and adopts the extended attribute method to pre-configure the focus attribute and zoom attribute parameters of each child control to realize the focus and zoom functions of the child control, solving the problem in the prior art that the parent area and the zoom range of the child control and the focus switching cannot be controlled by the remote control.
[0088] Another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented:
[0089] Step 1: using a relative layout method of a preset page control, determining a parent region corresponding to a target page and determining relative positions of child controls distributed on the parent region;
[0090] Step 2: configuring the focus attribute and the zoom attribute of each sub-control to obtain each focused sub-control;
[0091] Step 3: according to the currently displayed target page, obtain the first key value triggered by the user remote control, and determine the target focus sub-control that meets the preset focus condition from each of the focus sub-controls according to the first key value to focus on;
[0092] Step 4: obtaining a second key value triggered by the user's remote control, and when the target focus sub-control meets a preset zoom condition, controlling the target focus sub-control to zoom according to the second key value.
[0093] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0094] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0095] The specific implementation process of the above method steps can refer to the above-mentioned embodiment of the focus zoom method of any page control, and this embodiment will not be repeated here.
[0096] The present application adopts a relative layout method of preset page controls to determine the parent area corresponding to the target page and the relative positions of each child control distributed on the parent area; configures the focus attribute and zoom attribute of each child control to obtain each focused child control; obtains the first key value triggered by the user's remote control according to the currently displayed target page, and determines the target focused subcontrol that meets the preset focus condition from each focused subcontrol according to the first key value to focus; obtains the second key value triggered by the user's remote control, and when the target focused subcontrol meets the preset zoom condition, controls the target focused subcontrol to zoom according to the second key value. The focus zoom method of the present application inherits the original relative layout method and adopts the extended attribute method to pre-configure the focus attribute and zoom attribute parameters of each child control to realize the focus and zoom functions of the child control, solving the problem in the prior art that the parent area and the zoom range of the child control and the focus switching cannot be controlled by the remote control.
[0097] Another embodiment of the present application provides an electronic device, which may be a server, and the electronic device includes a processor, a memory, a network interface, and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external client via a network connection. When the electronic device program is executed by the processor, the functions or steps on the server side of a focus zoom method of a page control are implemented.
[0098] In one embodiment, an electronic device is provided, which may be a client. The electronic device includes a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external server via a network connection. When the electronic device program is executed by the processor, the functions or steps on the client side of a focus zoom method of a page control are implemented.
[0099] Another embodiment of the present application provides an electronic device, comprising at least a memory and a processor, wherein the memory stores a computer program, and the processor implements the following method steps when executing the computer program in the memory:
[0100] Step 1: using a relative layout method of a preset page control, determining a parent region corresponding to a target page and determining relative positions of child controls distributed on the parent region;
[0101] Step 2: configuring the focus attribute and the zoom attribute of each sub-control to obtain each focused sub-control;
[0102] Step 3: according to the currently displayed target page, obtain the first key value triggered by the user remote control, and determine the target focus sub-control that meets the preset focus condition from each of the focus sub-controls according to the first key value to focus on;
[0103] Step 4: Obtain a second key value triggered by the user's remote control, and when the target focus subcontrol meets the preset zoom condition, control the target focus subcontrol to zoom according to the second key value. The specific implementation process of the above method steps can refer to the embodiment of the focus zoom method of any page control mentioned above, and this embodiment will not be repeated here.
[0104] The present application adopts a relative layout method of preset page controls to determine the parent area corresponding to the target page and the relative positions of each child control distributed on the parent area; configures the focus attribute and zoom attribute of each child control to obtain each focused child control; obtains the first key value triggered by the user's remote control according to the currently displayed target page, and determines the target focused subcontrol that meets the preset focus condition from each focused subcontrol according to the first key value to focus; obtains the second key value triggered by the user's remote control, and when the target focused subcontrol meets the preset zoom condition, controls the target focused subcontrol to zoom according to the second key value. The focus zoom method of the present application inherits the original relative layout method and adopts the extended attribute method to pre-configure the focus attribute and zoom attribute parameters of each child control to realize the focus and zoom functions of the child control, solving the problem in the prior art that the parent area and the zoom range of the child control and the focus switching cannot be controlled by the remote control.
[0105] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A focus zoom method for a page control, characterized in that: include: Adopting the relative layout mode of the preset page controls, determining the parent area corresponding to the target page and determining the relative positions of the child controls distributed on the parent area; Performing parameter configuration on the focus attribute and the zoom attribute of each of the sub-controls to obtain each focused sub-control; According to the currently displayed target page, a first key value triggered by the user's remote control is obtained, and according to the first key value, a target focus subcontrol that meets a preset focus condition is determined from each of the focus subcontrols to be focused; A second key value triggered by a user remote control is acquired, and when the target focus sub-control meets a preset zoom condition, the target focus sub-control is controlled to zoom according to the second key value.
2. The method according to claim 1, characterized in that The method of using the relative layout mode of the preset page controls to determine the parent region corresponding to the target page and the relative positions of the child controls distributed on the parent region specifically includes: Using the parent container positioning method to configure the row position parameter value and the column position parameter value distributed in the parent area for each of the child controls; Determine the relative position of each of the sub-controls in the parent region based on the row position parameter value and the column position parameter value respectively corresponding to each of the sub-controls; or, Identify reference controls; Based on the position of the reference control, the position of each of the child controls is positioned using a sibling control positioning method to determine the relative position of each of the child controls in the parent area.
3. The method according to claim 1, characterized in that Parameter configuration is performed on the focus attribute and the zoom attribute of each sub-control to obtain each focused sub-control, specifically including: Determine each sub-control to be focused corresponding to the target page based on each sub-control; Parameter configuration is performed on the focus attribute of each sub-control to be focused, so as to obtain each focused sub-control.
4. The method according to claim 3, characterized in that According to the currently displayed target page, a first key value triggered by the user's remote control is obtained, and before focusing on a target focus subcontrol that meets a preset focus condition is determined from each of the focus subcontrols according to the first key value, the method further includes: Determine each sub-control to be scaled in each of the focused sub-controls; The interface scaling attribute parameter value and the scaling animation parameter value of each sub-control to be scaled are configured to obtain each scaling sub-control.
5. The method according to claim 3, characterized in that The parameter configuration of the focus attribute of each sub-control to be focused to obtain each focused sub-control specifically includes: Configure each focus parameter value of the combined focus attribute of each sub-control to be focused, to obtain each focused sub-control; The combined focus attribute includes: a first attribute of acquiring focus and a second attribute of acquiring focus by touch.
6. The method according to claim 4, characterized in that The configuring of the interface scaling attribute parameter value and the scaling animation parameter value of each sub-control to be scaled to obtain each scaling sub-control specifically includes: Configure the interface zoom attribute parameters of each sub-control to be zoomed, and obtain the interface zoom sub-control corresponding to each sub-control to be zoomed, wherein the interface zoom attribute includes: a third attribute that focuses the zoom sub-control without being restricted by the parent area and a fourth attribute that focuses the zoom sub-control on the zoom area boundary; Based on the animation tool class of the preset component library, the animation zoom property parameters of each of the interface zoom sub-controls are configured to obtain each of the zoom sub-controls.
7. The method according to claim 5, characterized in that The animation tool class based on the preset component library configures the animation zoom attribute parameters of each of the interface zoom sub-controls to obtain each of the zoom sub-controls, specifically including: The elastic property parameters of each of the interface zoom sub-controls are configured to obtain a first zoom sub-control corresponding to each of the interface zoom sub-controls, wherein the elastic property parameters include: a hardness coefficient parameter and an elastic speed parameter; Configuring the animation property parameters of each of the first zoom sub-controls to obtain each of the second zoom sub-controls; The animation change threshold parameters of each second zoom sub-control are configured to obtain each zoom sub-control.
8. A focus zooming device for a page control, characterized in that: include: Determination module: used to determine the parent area corresponding to the target page and the relative positions of the child controls distributed on the parent area by using the relative layout mode of the preset page controls; Configuration module: used to configure the focus attribute and zoom attribute of each sub-control to obtain each focused sub-control; Focus module: used for obtaining a first key value triggered by a user according to the current display interface, and determining a target focus subcontrol that meets a preset focus condition from each of the focus subcontrols according to the first key value for focusing; Zoom module: used to obtain the first key value triggered by the user's remote control according to the currently displayed target page, and determine the target focus sub-control that meets the preset focus condition from each focus sub-control according to the first key value to focus on.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the focus zooming method of the page control described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: The device at least comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the focus zooming method of the page control according to any one of claims 1 to 7 when executing the computer program in the memory.
Citation Information
Cited By
Display device and display style control method
CN120653162A
