WO2020168790A1 - 应用窗口的焦点刷新方法、装置、存储介质及终端 - Google Patents

应用窗口的焦点刷新方法、装置、存储介质及终端 Download PDF

Info

Publication number
WO2020168790A1
WO2020168790A1 PCT/CN2019/124564 CN2019124564W WO2020168790A1 WO 2020168790 A1 WO2020168790 A1 WO 2020168790A1 CN 2019124564 W CN2019124564 W CN 2019124564W WO 2020168790 A1 WO2020168790 A1 WO 2020168790A1
Authority
WO
WIPO (PCT)
Prior art keywords
focus
application window
window
application
refreshing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/124564
Other languages
English (en)
French (fr)
Inventor
杨蒙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shizhen Information Technology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Publication of WO2020168790A1 publication Critical patent/WO2020168790A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • This application provides a method for refreshing the focus of an application window, including:
  • This application also provides a device for refreshing the focus of an application window, including:
  • a window display module configured to display a first application window monitored by a target application, the first application window being in a focused state
  • the second window output module is configured to receive an interactive operation input for the target application, and output a second application window based on the interactive operation, the second application window is an interactive window, and the second application window is preset to be lost Focal state
  • the first window refresh module is configured to receive a focus operation input for the second application window, and refresh the second application window to a focused state.
  • the present application also provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above method steps.
  • Figure 2a is a schematic diagram of an interface of a second application window provided by an embodiment of the present application.
  • FIG. 6a is a schematic diagram of the effect of a focus operation control provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a method for refreshing the focus of an application window according to an embodiment of the present application
  • FIG. 8 is a schematic structural diagram of a focus refresh device for an application window provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a focus refresh device for an application window provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a second window refresh module provided by an embodiment of the present application.
  • the first application window refers to the window displayed by the application on the display interface when the user opens the application through the terminal.
  • the application can be any application in the set of related applications. When there are multiple open applications, each application corresponds to a window, and the window selected by the user is the first application window.
  • an application A, an application B, and an application C are displayed on the current display interface. If the user selects the application A, the display window corresponding to the application A is the first application window.
  • the display window corresponding to the application with the opening time closest to the current time can be determined as the first application window, that is, multiple display windows are opened, and the display window opened last The window is the first application window.
  • the window itself does not have any visible content, it provides a basic container for the view of the application.
  • the view refers to the content filled in the container, for example, displaying images, text, shapes or a combination thereof.
  • a window can be understood as a display window containing a view, and then the operation input to the window is the operation input to the view in the window.
  • Target application refers to a specified application (such as an annotation application) opened by the user, which is used to monitor the focus of the first application window and form a link path with the first application window.
  • the target application is covered on the first application window in the form of a transparent window, and the transparent window does not obtain the focus of the current display interface, and at the same time, the target application runs in a background service mode.
  • the window of the target application is overlaid on the first application window, which can be understood as the first application window opened first, and the window of the target application opened later.
  • the two windows can overlap completely or partially. A feasible way of displaying the two windows on the display interface is shown in Figure 1.
  • the second application window refers to the interactive window that pops up when the user operates the target application, and the second application window is preset to be in the out-of-focus state (NOT FOCUS).
  • NOT FOCUS out-of-focus state
  • the second application window may be a child window of the target application (such as the view of the annotation application), or may be a display window of a third-party application.
  • the second application window can have many forms, such as a text input box (as shown in Figure 2a), a selection input box (as shown in Figure 2b), and so on.
  • the third application window refers to the non-interactive window that pops up when the user operates the target application, and the second application window is preset to be out of focus (NOT FOCUS).
  • NOT FOCUS out of focus
  • the third application window may be a child window of the target application (such as the view of the annotation application), or may be a display window of a third-party application.
  • the third application window may be an information prompt box (as shown in Figure 2c).
  • Interactive operation refers to the instruction generated by the user operating on the terminal display interface and executed by the terminal. The emphasis is on the interaction between the user and the terminal. There are many ways of interaction, such as touch operation, voice control operation, gesture control operation, etc., which are not specifically limited here.
  • the user is required to enter "username or email address” and "password” in the input box, and click "Enter System” to complete the interactive operation instructions, and the terminal Verify the entered information and enter the system after the verification is passed, so as to realize the system login operation.
  • the terminal returns to the information input interface after receiving the operation.
  • this window does not require any input operation from the user, but only prompts, and the window will also be hidden or closed after a set duration.
  • Out-of-focus operation refers to the operation that triggers the terminal to no longer assign focus to the corresponding window through user input. For example, move the cursor from the input box of the second application window to the outside of the input box, or click the input completion confirmation key, etc., after the terminal detects this operation, the second application window no longer assigns the focus.
  • Focus state including focus state (FOCUS) and out of focus state (NOT FOCUS).
  • Focus state refers to a state in which the focus is assigned to the window to activate the corresponding function of the window, for example, a soft keyboard is awakened so that information can be input.
  • the node information is the elements contained in the window and element attribute information, such as element identification, style, position on the window, and so on.
  • Out-of-focus state refers to a state in which the focus is no longer assigned to the window, and the window is operated without responding, for example, the soft keyboard is not activated and information cannot be input.
  • the target application is only used to monitor the focus information of the first application window, and for the focus or out-of-focus operation of the second application window, the terminal adopts a reflection method (that is, this solution).
  • the execution method for restoring the focus of the second application window) is executed.
  • FIG. 3 is a schematic diagram of a system architecture provided by an embodiment of this application.
  • the system architecture may include a terminal 1000, a first application window 2000, and a display window 3000 of the target application.
  • the first application window 2000 and the display window 3000 of the target application are overlapped and displayed on the current terminal 1000.
  • the interface is displayed, and the display window 3000 of the target application is transparently covered on the first application window 2000.
  • the display window 3000 of the target application is a window corresponding to the specified application, and the window does not get the focus of the current display interface.
  • the focus of the display interface is focused on the first application window 2000, and after the display window 3000 of the target application is opened, the focus of the display interface will still be focused on the first application window 2000.
  • the node information of the first application window is monitored through the target application. If the node information of the first application window can be monitored, it indicates that the application corresponding to the first application window and the target application are established A communication link, and the communication link is in a path state;
  • the terminal 1000 detects the interactive operation and pops up the second application Window 4000 (as shown on the right in Figure 3). Since the second application window 4000 is preset to be out of focus, the focus is still on the first application window, and what is monitored through the target application is still the node information of the first application window, that is, the target application and the first application window The link path between is still in the path state.
  • the focus of the display interface will automatically be focused on the second application window 4000, causing the first application window 2000 to lose focus. Coke.
  • the second application window 4000 is preset to be out of focus, so that the focus of the display interface is always focused on the first application window 2000;
  • the second application window 4000 covers the first application window 3000.
  • the second application window 4000 and the first application window 3000 may partially overlap or completely overlap.
  • the target application is only used to monitor the focus state of the first application window 2000, the focus cannot be obtained after the second application window 4000 is preset to be out of focus, which affects the normal use of the second application window 4000.
  • the application window can be used normally, you need to monitor the focus change of the second application window.
  • the terminal 1000 monitors the focusing operation and determines that the user has an intention to operate the second application window.
  • the focus state of the second application window 4000 is refreshed, so that the second application window 4000 is in a focused state (that is, from the NOT FOCUS state to the FOCUS state), and then the soft keyboard can be invoked to perform operations such as information input.
  • the terminal 1000 can obtain the root node view of the second application window 4000, and obtain the layout attribute parameter of the root node view and the attribute manager, and then use the attribute manager to adjust the attribute value of the layout attribute parameter to the in-focus state. And refresh the second application window 4000 to adjust the focus state of the second application window 4000.
  • the terminal 1000 first obtains the focus state of the second application window 4000 and determines whether the second application window 4000 is in the focused state. If it is in the focused state, no adjustment is needed. If it is out of focus, Make adjustments again.
  • the terminal 1000 detects the out-of-focus operation and no longer The focus is allocated to the second application window 4000, so that the second application window changes from the focused state to the out-of-focus state (that is, changes from the FOCUS state to the NOT FOCUS state).
  • the terminal may include terminal devices with information processing functions, such as a tablet computer, a personal computer (PC), a smart phone, a palmtop computer, and a mobile Internet device (MID).
  • terminal devices with information processing functions such as a tablet computer, a personal computer (PC), a smart phone, a palmtop computer, and a mobile Internet device (MID).
  • the second application window since the second application window is preset to the out-of-focus state, it can be ensured that the first application window is always in focus. At the same time, the second application window can be quickly restored by focusing only on the second application window. The focus of the window, and when the second application window does not need to be focused, the focus is recovered and turned into an out-of-focus state. Without affecting the normal use of the second application window, the window focus recovery time is saved, and the window focus recovery efficiency can be improved. In this way, the target application can always monitor the first application window when the target application is open.
  • Window node information if the communication link between the target application and the first application window is not interrupted, the focus and defocus at a certain time only occur on the second application window that pops up, and does not affect the target window
  • the focus is out of focus, the scope of focus out of focus is small, and the time it takes to restore the focus of the second application window is relatively short. On the one hand, it can shield the user from operating the first application window without responding, on the other hand, it does not need to re Restore the focus of the first application window.
  • the focus refresh method of the application window provided by the embodiment of the present application will be described in detail below in conjunction with FIG. 4 to FIG. 7.
  • the device for refreshing the focus of the application window in the embodiment of the present application may be the terminal shown in FIG. 3.
  • FIG. 4 provides a schematic flowchart of a method for refreshing the focus of an application window according to an embodiment of this application.
  • the method of the embodiment of the present application may include the following steps:
  • S101 Display a first application window monitored by a target application, where the first application window is in a focused state;
  • the display window corresponding to the application is the first application window.
  • the display window corresponding to the application selected by the user is taken as the first application window.
  • the display window corresponding to the application currently in use is determined as the first application window. For example, if the user is currently playing ppt, the display window of ppt is the first application window.
  • the target application After the target application is opened, its corresponding display window is transparently covered on the first application window. Based on the properties of the target application, the transparent window does not request to assign focus. Therefore, regardless of whether the target application is opened or not, the first application window is always in focus ( FOCUS) status.
  • FOCUS focus
  • the application corresponding to the first application window and the target application are different applications, the target application may be an annotated application, and the application corresponding to the first application window may be any application except an annotated application Controllable application. Used to monitor the first application window and run as a background service.
  • the annotation application is a timely writing program intended to supplement and extend certain information.
  • functions such as pen, eraser, share, close, and page up and down.
  • For PowerPoint (PPT) turning pages up and down and closing playback are functions to control PPT, and other information is writing-related information, for example, pen: writing; eraser: clear; sharing: save the content locally, etc.; close: close comments .
  • the corresponding display interface is shown in Figure 5. After opening the annotation, the display interface displays "You are already in the annotation mode", and the corresponding function icon is suspended on the PPT.
  • the terminal may use the accessibility services of the target application to dynamically monitor the window focus of the first application window. It can be periodic monitoring or real-time monitoring.
  • the user can input an operation on the display window (transparent window) of the target application, and the terminal responds after receiving the operation, thereby realizing the interaction between the user and the terminal.
  • S102 Receive an interactive operation input for the target application, and output a second application window based on the interactive operation, where the second application window is an interactive window, and the second application window is preset to an out-of-focus state;
  • the second application window is the window that pops up when the user operates the target application, and is preset to be in an out-of-focus state, thereby preventing the window from preempting the focus of the first application window when the second application window pops up, thereby causing the target
  • the communication link between the application and the first application window is interrupted. Therefore, the node information of the first application window cannot be monitored, which causes the first application window to lose focus.
  • the view focus monitor of the terminal can be triggered to monitor the focus change, and the second application window can be monitored.
  • S103 Receive a focus operation input for the second application window, and refresh the second application window to a focused state.
  • the focusing operation may include multiple modes such as cursor moving in operation, voice control operation, gesture control operation, etc.
  • the terminal obtains the cursor moving in operation input by the user for the second application window, and obtains the first cursor position indicated by the cursor moving in operation, when the first cursor position When it is within the focus position range of the second application window, refresh the focus state of the second application window to the focus state.
  • the first cursor position refers to the position where the cursor finally stays when moving in the second application window.
  • the user clicks the cursor with a finger to move it.
  • the terminal confirms that the user needs to input information, and refreshes the current focus state of the second application window to In the focused state, various functions such as the keyboard can be activated, and the second application window can be operated normally.
  • the terminal parses the voice control operation and extracts keywords in it, if the keywords match the keywords in the instruction library, or If the expressed meaning is consistent, the focus state of the second application window is refreshed to the focus state.
  • the user inputs "move the cursor to the "username or email address” input box" through the voice operation transceiver interface of the terminal, and the terminal moves the cursor from the current position to the input box and confirms that the user needs Inputting information will refresh the current focus state of the second application window to the focus state, so that various functions such as the keyboard can be activated.
  • the terminal parses the collected gesture actions and matches them with the gesture actions pre-stored in the gesture library. If the matching is successful in the gesture library The gesture action is to perform the focus operation corresponding to the gesture action, thereby refreshing the focus state of the second application window to the focus state.
  • the user enters a gesture sliding motion through the camera of the terminal.
  • the cursor On the display interface of the terminal, the cursor also moves synchronously with the movement of the finger.
  • the terminal confirms that the user needs to input information, and refreshes the current focus state of the second application window to the focused state, so that various functions such as the keyboard can be activated.
  • gesture control operations can also be preset gesture actions. As shown in Table 1, when the gesture action is “left thumb” or “left index finger”, the corresponding window focus state is “focus state”. When the gesture action is “right thumb” or “right index finger”, the corresponding window focus state is "out of focus”. Then, when the gesture action currently collected by the terminal camera is "left thumb”, the first 2. The current focus state of the application window is refreshed to the focused state.
  • Another optional gesture action can also be as shown in Table 2.
  • the gesture action is “1 finger”
  • the corresponding window focus state is "focus state”
  • the gesture action is “2 fingers”
  • the corresponding window focus state is "out of focus state”
  • the gesture action currently collected by the terminal camera is “1 finger”
  • the current focus state of the second application window is refreshed to the focused state.
  • the specific refresh method can be: reflectively obtain the root node view of the second application window and the attribute manager of the second application window; use the root node view to obtain the layout attribute parameters; set the attributes of the layout attribute parameters based on the monitored focus distribution, and Dynamically update the view of the second application window.
  • the terminal responds to the interactive operation instruction for the target application, and based on the interactive operation instruction, outputs the second application window whose preset focus state is out of focus.
  • the first focus change operation of the second application window is monitored Refresh the focus state of the second application window to the focus state. Since the second application window is preset to be out of focus, it can be ensured that when the second application window pops up, the link path between the first application window and the target application is not interrupted, thereby ensuring that the first application window is always in focus
  • the focus can be assigned to the second application window only by focusing on the second application window. Therefore, the focus of the second application window can be quickly restored while ensuring that the first application window is always in focus. In the case of affecting the normal use of the second application window, the window focus recovery time is saved, and the window focus recovery efficiency can be improved.
  • FIG. 7 provides a schematic flowchart of a method for refreshing the focus of an application window according to an embodiment of this application.
  • the focus refresh method of the application window is applied to the terminal as an example.
  • the focus refresh method of the application window may include the following steps:
  • S201 Display a first application window monitored by the target application, where the first application window is in a focused state;
  • the terminal before displaying the first application window monitored by the target application, obtains a window opening operation input for the target application on the display interface, and opens a transparent window based on the window opening instruction, the transparent window covering the On the first application window of the display interface.
  • the window opening operation is the operation of opening a transparent window.
  • the user input window opening operation can include opening the annotation application, such as double-clicking the annotation application icon, selecting the annotation application icon and then clicking the right mouse button, then clicking the "Open” option, and clicking the keyboard shortcut "Ctrl+ O" and so on, thus opening the comment window.
  • the terminal may use annotated Accessibility Services to dynamically monitor the window focus of the first application window. It can be monitored periodically or in real time.
  • S202 Receive an interactive operation input for the target application, and output a second application window based on the interactive operation, the second application window is an interactive window, and the second application window is preset to an out-of-focus state;
  • S203 Receive a cursor movement input operation for the second application window, and obtain a first cursor position indicated by the cursor movement operation;
  • the position of the cursor is constantly changing, and the first cursor position is the final position of the cursor.
  • the coordinates at point s is the first cursor position.
  • the focus position range refers to a range for information input, and may include a text input box and various keys.
  • the focus position range includes areas corresponding to the "username or email address” input box, the "password” input box, and the "enter system” control key.
  • the focus position range includes the area corresponding to the "OK" control key.
  • Detect the current focus state before adjusting the focus state If the detected focus state is the focus state that needs to be adjusted, no adjustment is required; if the detected focus state is not the focus state that needs to be adjusted, then Make adjustments.
  • the specific judgment method may be: by querying whether the window node information of the second application window exists in the view focus listener, if it contains the window node information of the second application window, it indicates that the second application window is in the focused state, if not included, It indicates that the second application window is out of focus.
  • the window node is the element contained in the window, each window can include multiple nodes, and each node contains multiple attributes. These attributes include nodeName (node name), nodeValue (node value), nodeType (node type).
  • the root node view is included in each window.
  • the root node view DecorView of the second application window can be obtained by calling the statement getWindow().getDecorView().findViewById(android.R.id.content).
  • DecorView contains layout attribute parameters (LayoutParams).
  • LayoutParams stores the attributes of the window. Through this variable, you can assign various attributes to the window. You can also change its attribute values to perform various operations, such as dragging and stretching the floating window.
  • the LayoutParams also contains the focus attribute flag (Flag), and the focus state of the window can be changed by changing the value of Flag.
  • Flag focus attribute flag
  • WindowManager is an interface class, which can realize the management of views in the window, including adding, updating and deleting.
  • S208 Use the attribute manager to adjust the attribute value of the layout attribute parameter to the focus attribute value indicated by the focus state, and refresh the second application window.
  • Flag Set the value of Flag and set it to the focus attribute value indicated by the focus state. For example, if 1 means focus and 0 means out of focus, then Flag is set to 1.
  • receiving an out-of-focus operation input for the second application window and refreshing the second application window to an out-of-focus state.
  • the second focus change signal may include a cursor moving out signal, an input completion signal, a confirmation signal or a cancellation signal, etc., in multiple ways.
  • the terminal receives a cursor moving out operation input for the second application window, and acquiring the second cursor position indicated by the cursor moving out operation, When the second cursor position is outside the focus position range of the second application window, it indicates that the user does not need to operate on the second application window, and the focus state of the second application window is refreshed to the out-of-focus state .
  • the second cursor position refers to the position where the cursor finally stays when it is far away from the second application window.
  • the terminal obtains the input completion signal input by the user (such as clicking the OK control key), and directly refreshes the focus state of the second application window to the out-of-focus state .
  • the refresh mode is the same as the refresh mode of the focus state described above, and will not be repeated here.
  • the focus state of the second application window before refreshing the focus state of the second application window to the out-of-focus state, it may be judged whether the second application window is currently in the out-of-focus state, if so, no adjustment is required, otherwise, the focus state is adjusted.
  • a specific application scenario is that the first application window corresponds to the PPT application, the target application corresponds to an annotation application (mark), and the second application window is a sub-window of mark.
  • the second application window is not The default is the out-of-focus state, and the obtained focus distribution of the display interface is:
  • rootInActiveWindow android.view.accessibility.AccessibilityNodeInfo@8001b4cf;
  • the second application window is preset to be out of focus, it can ensure that the first application window is always in focus. At the same time, only the second application window needs to be focused to quickly restore the focus of the sub-window, and When the second application window does not need to be focused, the focus is recovered and turned into an out-of-focus state. Without affecting the normal use of the second application window, the window focus recovery time is saved, and the window focus recovery efficiency can be improved. In this way, the target application can always monitor the first application window when the target application is open.
  • FIG. 8 shows a schematic structural diagram of a focus refresh apparatus for an application window provided by an exemplary embodiment of the present application.
  • the device for refreshing the focus of the application window can be implemented as all or a part of the terminal through software, hardware or a combination of the two.
  • the device includes a window display module 11, a first window output module 12, and a first window refresh module 13.
  • the out-of-focus operation includes a cursor moving out operation
  • the second window refresh module 16 includes:
  • the terminal 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002.
  • the processor 1001 may include one or more processing cores.
  • the processor 1001 uses various excuses and lines to connect various parts of the entire terminal 1000, and executes the terminal by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and calling data stored in the memory 1005.
  • Various functions and processing data of 1000 may use at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 1001 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used to render and draw the content that the display needs to display; the modem is used to process wireless communication. It is understandable that the above-mentioned modem may not be integrated into the processor 1001, but may be implemented by a chip alone.
  • the memory 1005 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 1005 includes a non-transitory computer-readable storage medium.
  • the memory 1005 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 1005 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing the operating system and instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), Instructions used to implement the foregoing method embodiments, etc.; the storage data area can store the data involved in the foregoing method embodiments.
  • the memory 1005 may also be at least one storage device located far away from the foregoing processor 1001.
  • the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a focus refresh application program of an application window.
  • the processor 1001 further performs the following operations before performing the refreshing of the second application window to the focused state:
  • the processor 1001 performs the following operations after receiving a focus operation input for the second application window and refreshing the second application window to a focused state:
  • the out-of-focus operation includes a cursor moving out operation.
  • the processor 1001 receives an out-of-focus operation input for the second application window, and refreshes the second application window to an out-of-focus state To perform the following operations:
  • the processor 1001 further performs the following operations:
  • the terminal responds to the interactive operation instruction for the target application, and based on the interactive operation instruction, outputs the second application window whose preset focus state is out of focus.
  • the cursor moves on the second application window and moves to When the focus position is within the range, if the second application window is currently out of focus, by obtaining the layout attribute parameter of the root node view of the second application window and the attribute manager, the attribute manager is used to adjust the attribute value of the layout attribute parameter Then the second application window is dynamically refreshed, so as to realize the focus of the second application window.
  • the same method is adopted to adjust the attribute value of the layout attribute parameter, so as to realize the defocus of the second application window.
  • Window node information if the communication link between the target application and the first application window is not interrupted, the focus and defocus at a certain time only occur on the second application window that pops up, and does not affect the target window
  • the focus is out of focus, the scope of focus out of focus is small, and the time it takes to restore the focus of the second application window is relatively short. On the one hand, it can shield the user from operating the first application window without responding, on the other hand, it does not need to re Restore the focus of the first application window.
  • the program can be stored in a computer readable storage medium. During execution, it may include the procedures of the above-mentioned method embodiments.
  • the storage medium can be a magnetic disk, an optical disc, a read-only storage memory or a random storage memory, etc.

Landscapes

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

Abstract

一种应用窗口的焦点刷新方法、装置、存储介质及终端,所述方法包括:显示采用目标应用监听的第一应用窗口,所述第一应用窗口为聚焦状态(S101);接收针对所述目标应用输入的交互操作,基于所述交互操作输出第二应用窗口,所述第二应用窗口为交互窗口,所述第二应用窗口预设为失焦状态(S102);接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态(S103)。上述方法在不影响第二应用窗口正常使用的情况下,节省了窗口焦点恢复时间,进而可以提高窗口焦点的恢复效率。

Description

应用窗口的焦点刷新方法、装置、存储介质及终端
本公开要求在2019年02月20日提交中国专利局、申请号为201910126533.7的中国专利申请的优先权,以上申请的全部内容通过引用结合在本公开中。
技术领域
本申请涉及终端技术领域,例如涉及一种应用窗口的焦点刷新方法、装置、存储介质及终端。
背景技术
在播放PPT的过程中,显示界面的焦点聚焦在该PPT的显示窗口上,即通过终端的批注应用的AccessibilityService功能检测到批注与PPT之间的链接通路处于通路状态,而一旦在使用过程中弹出第三方应用的窗口,那么显示界面的焦点就会自动从PPT的窗口转移到该第三方应用的窗口(弹窗)上,因而,用户可以正常操作该弹窗,但却导致批注应用监测不到PPT的窗口节点信息,进而导致批注与PPT之间的链接通路中断,而当关闭该弹窗之后,在不进行焦点恢复的情况下,PPT窗口处于失焦状态。
为解决PPT窗口失焦问题,相关技术中,通过创建一个透明Activity,并利用该Activity的创建与销毁刷新PPT窗口的焦点,触发批注的AccessibilityService进行焦点回调,从而恢复批注与PPT之间的链接通路。但是,该方案存在一个问题,在创建透明Activity后,还需要销毁该Activity,而从Activity的创建到销毁需要大概900ms,在这个900ms期间对目标应用的窗口进行操作都是无效的。因此,相关技术中,在不影响第三方窗口正常使用的前提下,对于窗口焦点的恢复操作比较耗时,进而导致窗口焦点恢复效率低。
发明内容
本申请提供了一种应用窗口的焦点状态刷新方法、装置、存储介质及终端,可以解决在不影响第三方窗口正常使用的前提下,对于窗口焦点的恢复操作比较耗时,进而导致窗口焦点恢复效率低的问题。
本申请提供了一种应用窗口的焦点刷新方法,包括:
显示采用目标应用监听的第一应用窗口,所述第一应用窗口为聚焦状态;
接收针对所述目标应用输入的交互操作,基于所述交互操作输出第二应用窗口,所述第二应用窗口为交互窗口,所述第二应用窗口预设为失焦状态;
接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态。
本申请还提供了一种应用窗口的焦点刷新装置,包括:
窗口显示模块,用于显示采用目标应用监听的第一应用窗口,所述第一应用窗口为聚焦状态;
第二窗口输出模块,用于接收针对所述目标应用输入的交互操作,基于所述交互操作输出第二应用窗口,所述第二应用窗口为交互窗口,所述第二应用窗口预设为失焦状态;
第一窗口刷新模块,用于接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态。
本申请还提供一种计算机存储介质,其中,所述计算机存储介质存储有多条指令,所述指令适于由处理器加载并执行上述的方法步骤。
本申请还提供一种终端,包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行上述的方法步骤。
本申请的方案在执行时,终端显示采用目标应用监听的第一应用窗口,接收针对所述目标应用输入的交互操作,基于所述交互操作输出预设焦点状态为失焦状态的第二应用窗口,接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态。由于将第二应用窗口预设为失焦状态,则可以确保在弹出第二应用窗口时,第一应用窗口与目标应用之间的链接通路不中断,进而可以确保第一应用窗口一直处于聚焦状态,同时,只需要对第二应用窗口进行聚焦操作就可以为第二应用窗口分配焦点,因此,在确保第一应用窗口一直处于聚焦状态下可以快速恢复第二应用窗口的焦点,即在不影响第二应用窗口正常使用的情况下,节省了窗口焦点恢复时间,进而可以提高窗口焦点的恢复效率。
附图说明
图1是本申请实施例提供的一种目标应用的窗口与第一应用窗口的展示效果示意图;
图2a是本申请实施例提供的一种第二应用窗口的界面示意图;
图2b是本申请实施例提供的一种第二应用窗口的界面示意图;
图2c是本申请实施例提供的一种第二应用窗口的界面示意图;
图3是本申请实施例提供的一种系统架构的结构示意图;
图4是本申请实施例提供的一种应用窗口的焦点刷新方法的流程示意图;
图5是本申请实施例提供的一种批注应用的显示效果示意图;
图6a是本申请实施例提供的一种聚焦操作控制的效果示意图;
图6b是本申请实施例提供的一种聚焦操作控制的效果示意图;
图6c是本申请实施例提供的一种聚焦操作控制的效果示意图;
图7是本申请实施例提供的一种应用窗口的焦点刷新方法的流程示意图;
图8是本申请实施例提供的一种应用窗口的焦点刷新装置的结构示意图;
图9是本申请实施例提供的一种第一窗口刷新模块的结构示意图;
图10是本申请实施例提供的一种应用窗口的焦点刷新装置的结构示意图;
图11是本申请实施例提供的一种第二窗口刷新模块的结构示意图;
图12是本申请实施例提供的一种终端的结构示意图。
具体实施方式
下面将结合附图对本申请实施例方式作进一步地详细描述。
下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
在本申请的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。此外,在本申请的描述中,除非另有说明,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
首先,对本申请实施例涉及到的一些名词进行解释:
第一应用窗口:指用户通过终端打开应用程序时,该应用程序在显示界面所显示的窗口。该应用程序可以是相关应用程序集合中的任一应用程序。当打开的应用程序包括多个时,每个应用程序分别对应一个窗口,而用户在其中所选择的窗口即为第一应用窗口。
例如,在当前显示界面显示有A应用程序、B应用程序和C应用程序,若用户选择了A应用程序,那么A应用程序对应的显示窗口即为第一应用窗口。
可选的,也可将用户打开的多个应用程序中,开启时间离当前时间最近的应用程序所对应的显示窗口确定为第一应用窗口,即打开了多个显示窗口,而最后打开的显示窗口为第一应用窗口。
通常,Android系统中的“窗口”类型虽然很多,但只有三大类是经常使用的:一个是由系统进程管理的,称之为“系统窗口”;另一个就是由应用程序产生的,用于显示UI界面的“应用窗口”;还一种是子window,该window不能单独存在,需要依附于父window,如dialog。在本申请实施例中所提及的窗口即为“应用窗口”。
另外,窗口本身不具有任何可见的内容,它对于应用程序的视图提供了一个基本的容器。而视图是指填充在该容器中的内容,例如,显示图像,文本,形状或其组合。在本申请实施例中,可以将窗口理解为包含视图的显示窗口,那么针对窗口输入的操作即为针对窗口中视图输入的操作。
在Android系统显示架构中,每一个要显示的视图所依托的窗口有一个类型区分,不同类型的窗口的视图显示的层次不同,位置不同,显示/销毁的过程不同等等。
目标应用:指用户所开启的指定应用程序(如批注应用程序),用于监听第一应用窗口的焦点情况,并与第一应用窗口形成链接通路。目标应用以透明窗口形式覆盖在第一应用窗口上,且该透明窗口不会获取当前显示界面的焦点,同时,所述目标应用以后台服务方式运行。
目标应用的窗口覆盖在第一应用窗口上,可以理解为,先开启的第一应用窗口,后开启的目标应用的窗口。两窗口可以完全重叠,也可以部分重叠。两窗口在显示界面上一种可行的展示方式如图1所示。
第二应用窗口:指用户操作目标应用时所弹出的交互窗口,且该第二应用窗口预设为失焦状态(NOT FOCUS),当弹出该第二应用窗口时,终端不需要向第二应用窗口分配焦点。第二应用窗口可以是目标应用的子窗口(如批注应用程序的视图),也可以是第三方应用程序的显示窗口。
第二应用窗口可以有多种形式,如文本输入框(如图2a所示)、选择输入框(如图2b所示)等。
第三应用窗口:指用户操作目标应用时所弹出的非交互窗口,且该第二应用窗口预设为失焦状态(NOT FOCUS),当弹出该第三应用窗口时,终端不需要向第三应用窗口分配焦点。第三应用窗口可以是目标应用的子窗口(如批注应用程序的视图),也可以是第三方应用程序的显示窗口。
第三应用窗口可以为信息提示框(如图2c所示)。
交互操作:指用户在终端显示界面进行操作而生成的指令,并由终端执行该指令,所强调的是用户与终端的交互。交互的方式有多种,如触摸操作,语音控制操作,手势控制操作等,此处不作具体限定。
例如,若第二应用窗口为图2a所示的形式,则需要用户在输入框中输入“用户名或邮件地址”以及“密码”,并点击“进入系统”后完成交互操作指令,而终端则对所输入的信息进行验证,并在验证通过后进入系统,从而实现系统登录操作。
又例如,若第二应用窗口为图2b所示的形式,则需要用户点击“确定”按钮而完成交互操作,同时,终端在接收到该操作后,再返回到信息输入界面。
当然,也存在非交互操作的情况。例如,若第二应用窗口为图2c所示的形式,则此窗口不需要用户进行任何输入操作,而只是进行提示,该窗口也会在设定时长后进行隐藏或关闭。
聚焦操作:指通过用户输入的触发终端为相应窗口分配焦点的操作。如,将光标移动到第二应用窗口的输入框中,终端在检测到该操作信号后,将焦点聚焦在第二应用窗口上。
失焦操作:指通过用户输入的触发终端不再为相应窗口分配焦点的操作。如,将光标从第二应用窗口的输入框中移动到该输入框外,或者点击输入完成确认控键等,终端在检测到该操作后,不再为第二应用窗口分配焦点。
焦点状态:包括聚焦状态(FOCUS)和失焦状态(NOT FOCUS)。
聚焦状态:指为窗口分配焦点,从而激活窗口相应功能的一种状态,例如,唤起软键盘从而可以进行信息输入。
其中,所述节点信息即为窗口所包含的元素以及元素属性信息,如元素标识、样式、在窗口上的位置等。
失焦状态:指不再为窗口分配焦点,对该窗口进行操作而不进行响应的一种状态,例如,软键盘未激活而无法进行信息输入。
需要说明的是,在本申请实施例中,目标应用只用于监听第一应用窗口的焦点信息,而针对第二应用窗口的聚焦或失焦操作,则由终端采用反射的方式(即本方案对第二应用窗口的焦点恢复的执行方式)执行。
请参见图3,为本申请实施例提供的一种系统架构的示意图。如图3中左图所示,所述系统架构可以包括终端1000,第一应用窗口2000以及目标应用的显示窗口3000,第一应用窗口2000以及目标应用的显示窗口3000重叠显示在终端1000的当前显示界面,且目标应用的显示窗口3000透明覆盖在第一应用窗口2000上。
目标应用的显示窗口3000为指定应用程序对应的窗口,该窗口不会获取当前显示界面的焦点。在未开启目标应用的显示窗口3000之前,显示界面的焦点聚焦在第一应用窗口2000上,而在开启了目标应用的显示窗口3000后,显示界面的焦点仍然会一直聚焦到第一应用窗口2000上,也就是说,通过目标应用对第一应用窗口的节点信息进行监听,若可以监听到该第一应用窗口的节点信息,则表明第一应用窗口对应的应用程序与目标应用之间建立了通信链路,且该通信链路处于通路状态;
当用户针对目标应用的显示窗口3000输入交互操作(如通过手指触摸第一窗口、通过语音输入控制指令、通过摄像头采集手势控制指令等)时,终端1000检测到该交互操作,则弹出第二应用窗口4000(如图3中右图所示)。由于第二应用窗口4000预设为失焦状态,因此,焦点仍然聚焦在第一应用窗口上,通过目标应用所监听到的仍然是第一应用窗口的节点信息,即目标应用与第一应用窗口之间的链接通路仍然处于通路状态。当然,若未将第一应用窗口3000预设为失焦状态,那么在弹出第二应用窗口4000后,显示界面的焦点就会自动聚焦到第二应用窗口4000,从而导致第一应用窗口2000失焦。而为了保证第一应用窗口2000不失焦,则将第二应用窗口4000预设为失焦状态,从而使得显示界面的焦点一直聚焦在第一应用窗口2000上;
其中,第二应用窗口4000覆盖在第一应用窗口3000上。同样的,第二应用窗口4000与第一应用窗口3000可以部分重叠,也可以完全重叠。
由于目标应用程序仅用于监听第一应用窗口2000的焦点状态,而在第二应用窗口4000预设为失焦状态后无法获取焦点,进而影响第二应用窗口4000的正常使用,为了确保第二应用窗口可以正常使用,则需要监听第二应用窗口的焦点变化情况。
当用户针对该第二应用窗口4000输入聚焦操作(如将光标移动到第二应用窗口的输入区域)时,终端1000监听到该聚焦操作后,确定用户有对第二应用窗口进行操作的意图,则刷新该第二应用窗口4000的焦点状态,从而使得该第二应用窗口4000处于聚焦状态(即从NOT FOCUS状态变为FOCUS状态),进而可以唤起软键盘进行信息输入等操作。
其中,终端1000可获取第二应用窗口4000的根节点视图,并获取该根节点视图的布局属性参数以及属性管理器,再采用该属性管理器将布局属性参数的属性值调整为聚焦状态所指示的焦点属性值,并刷新第二应用窗口4000,实现第二应用窗口4000焦点状态的调节。
可选的,在对焦点状态进行调节前,终端1000先获取第二应用窗口4000的焦点状态,判断该第二应用窗口4000是否为聚焦状态,若是聚焦状态,则无需调整,若是失焦状态,再进行调整。
可选的,当用户针对该第二应用窗口4000输入失焦操作(如将光标移动到第二应用窗口的输入区域外,或者确认输入完成)时,终端1000检测到该失焦操作,不再为该第二应用窗口4000分配焦点,从而使得该第二应用窗口从聚焦状态变为失焦状态(即从FOCUS状态变为NOT FOCUS状态)。
其中,所述终端可以包括平板电脑、个人计算机(PC)、智能手机、掌上电脑以及移动互联网设备(MID)等具备信息处理功能的终端设备。
在本申请实施例中,由于将第二应用窗口预设为失焦状态,则可以确保第一应用窗口一直处于聚焦状态,同时,只需要对第二应用窗口进行聚焦操作就可以快速恢复该子窗口的焦点,并在该第二应用窗口不需要聚焦的时候则进行焦点的回收而转为失焦状态。在不影响第二应用窗口正常使用的情况下,节省了窗口焦点恢复时间,进而可以提高窗口焦点的恢复效率,这样,在目标应用开启的状态下,目标应用可以一直监听到第一应用窗口的窗口节点信息,目标应用与第一应用窗口之间的通信链路在不中断的情况下,某一时间的聚焦和失焦仅仅只是发生在所弹出的第二应用窗口上,并不影响目标窗口的失焦聚焦,聚焦失焦影响范围小,且恢复第二应用窗口的焦点过程所花费的时间较短,一方面可以屏蔽用户操作第一应用窗口而无响应的感知,另一方面不需要重新恢复第一应用窗口的焦点。
下面将结合附图4-附图7,对本申请实施例提供的应用窗口的焦点刷新方法进行详细介绍。其中,本申请实施例中的应用窗口的焦点刷新装置可以是图3所示的终端。
请参见图4,为本申请实施例提供了一种应用窗口的焦点刷新方法的流程示意图。如图4所示,本申请实施例的所述方法可以包括以下步骤:
S101,显示采用目标应用监听的第一应用窗口,所述第一应用窗口为聚焦状态;
当显示界面只打开一个应用程序时,那么该应用程序对应的显示窗口即为第一应用窗口。
当显示界面打开多个应用程序时,将用户在其中所选择的应用程序对应的显示窗口作为第一应用窗口。
无论打开几个应用程序,将当前正在使用的应用程序对应的显示窗口确定为第一应用窗口。例如,用户当前正在播放ppt,那么ppt的显示窗口即为第一应用窗口。
开启目标应用后,其对应的显示窗口透明覆盖在第一应用窗口上,基于目标应用的属性,该透明窗口不会请求分配焦点,因此,无论是否开启目标应用,第一应用窗口一直处于聚焦(FOCUS)状态。
需要说明的是,第一应用窗口所对应的应用程序与目标应用为不同的应用,目标应用可以为批注应用程序,而第一应用窗口所对应的应用程序可以为除了批注应用程序以外的任一可控应用程序。用于监听第一应用窗口,且以后台服务方式运行。
其中,批注应用程序为一个及时书写程序,意在对某些信息进行补充与扩展。在批注程序中,存在笔、橡皮、分享、关闭、上下翻页等功能。针对PowerPoint(PPT)而言,上下翻页以及关闭播放为控制PPT的功能,其他信息为书写相关信息,例如,笔:书写;橡皮:清除;分享:将内容保存到本地等;关闭:关闭批注。其对应的显示界面如图5所示,开启批注后,显示界面显示“你已处于批注模式”,且所对应的功能图标悬浮在PPT上。
可选的,对于安卓(Android)系统,终端可采用目标应用的辅助功能服务(AccessibilityServices)动态监听第一应用窗口的窗口焦点情况。可以是周期性监听,也可以是实时监听。
用户可以针对目标应用的显示窗口(透明窗口)输入操作,而终端在接收到该操作后进行响应,从而实现用户与终端的交互。
其中,用户操作该透明窗口的方式包括多种,例如手指点击透明窗口、通过鼠标点击透明窗口、通过键盘控制透明窗口等。
S102,接收针对所述目标应用输入的交互操作,基于所述交互操作输出第二应用窗口,所述第二应用窗口为交互窗口,所述第二应用窗口预设为失焦状态;
所述第二应用窗口即为用户操作目标应用时所弹出的窗口,且预设为失焦状态,从而可以防止在弹出第二应用窗口时,该窗口抢占第一应用窗口的焦点,进而导致目标应用与第一应用窗口之间的通信链路中断,因而,监测不到第一应用窗口的节点信息,即导致第一应用窗口失焦。
通过将第二应用窗口预设为失焦状态,可以确保目标应用与第一应用窗口的通信链路不中断,但却破坏了系统逻辑,使得第二应用窗口无法正常使用。因此,通过用户针对第二应用窗口进行相关操作可以触发终端的视图焦点监听器进行焦点变化情况的监听,且针对第二应用窗口进行监听。
S103,接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态。
所述聚焦操作可以包括光标移入操作、语音控制操作、手势控制操作等多种方式。
当聚焦操作包括光标移入操作时,一种可行的实现方式为,终端获取用户针对第二应用窗口输入的光标移入操作,并获取该光标移入操作所指示的第一光标位置,当第一光标位置位于第二应用窗口的聚焦位置范围内时,将第二应用窗口的焦点状态刷新至聚焦状态。其中,第一光标位置指光标在第二应用窗口移动时,最终停留的位置。
例如,如图6a所示,用户通过手指点击光标进行移动,当光标移动到“用户名或邮件地址”输入框时,终端确认用户需要输入信息,则将第二应用窗口的当前焦点状态刷新到聚焦状态,从而可以激活键盘等各功能,进而可正常操作第二应用窗口。
当第一焦点变化操作包括语音控制操作时,一种可行的实现方式为,终端对该语音控制操作进行解析,并提取其中的关键词,若关键词与指令库中的关键词相匹配,或者表达的意思一致,则将第二应用窗口的焦点状态刷新至聚焦状态。
例如,如图6b所示,用户通过终端的语音操作收发接口输入“将光标移动到“用户名或邮件地址”输入框”,终端将光标从当前位置移动到该输入框中,并确认用户需要输入信息,则将第二应用窗口的当前焦点状态刷新到聚焦状态,从而可以激活键盘等各功能。
当第一焦点变化操作包括手势控制操作时,一种可行的实现方式为,终端对所采集的手势动作进行解析,并与手势库中预存的手势动作进行匹配,若在手势库存在匹配成功的手势动作,则执行该手势动作对应的聚焦操作,从而将第二应用窗口的焦点状态刷新至聚焦状态。
例如,如图6c所示,用户通过终端的摄像头输入手势滑动动作,在终端的显示界面上,光标也随着手指的移动而同步移动,同样的,当光标移动并停留在“用户名或邮件地址”输入框时,终端确认用户需要输入信息,则将第二应用窗口的当前焦点状态刷新到聚焦状态,从而可以激活键盘等各功能。
当然,手势控制操作还可以是预设的各种手势动作,如表1所示,当手势动作为“左手大拇指”或“左手食指”时,所对应的窗口焦点状态为“聚焦状态”,当手势动作为“右手大拇指”或“右手食指”时,所对应的窗口焦点状态为“失焦状态”,那么,当终端摄像头当前采集到的手势动作为“左手大拇指”时,将第二应用窗口的当前焦点状态刷新到聚焦状态。
表1
Figure PCTCN2019124564-appb-000001
Figure PCTCN2019124564-appb-000002
另一种可选的手势动作还可以如表2所示,当手势动作为“1根手指”时,所对应的窗口焦点状态为“聚焦状态”,当手势动作为“2根手指”时,所对应的窗口焦点状态为“失焦状态”,那么,当终端摄像头当前采集到的手势动作为“1根手指”时,将第二应用窗口的当前焦点状态刷新到聚焦状态。
表2
Figure PCTCN2019124564-appb-000003
仅仅检测到了焦点的变化,系统是不会真正聚焦到该视图上,因此,还需要对第二应用窗口的焦点状态进行刷新。具体刷新方式可以为:反射获取第二应用窗口根节点视图以及第二应用窗口的属性管理器;采用根节点视图获取布局属性参数;基于所监测到的焦点分配情况设置布局属性参数的属性,并动态更新第二应用窗口的视图。
在本申请实施例中,终端响应针对目标应用的交互操作指令,基于该交互操作指令输出预设焦点状态为失焦状态的第二应用窗口,当监听到第二应用窗口的第一焦点变化操作时,将所述第二应用窗口的焦点状态刷新至聚焦状态。由于将第二应用窗口预设为失焦状态,则可以确保在弹出第二应用窗口时,第一应用窗口与目标应用之间的链接通路不中断,进而可以确保第一应用窗口一直处于聚焦状态,同时,只需要对第二应用窗口的进行聚焦操作就可以为第二应用窗口分配焦点,因此,在确保第一应用窗口一直处于聚焦状态下可以快速恢复第二应用窗口的焦点,即在不影响第二应用窗口正常使用的情况下,节省了窗口焦点恢复时间,进而可以提高窗口焦点的恢复效率。
请参见图7,为本申请实施例提供了一种应用窗口的焦点刷新方法的流程示意图。本实施例以应用窗口的焦点刷新方法应用于终端中来举例说明。该应用窗口的焦点刷新方法可以包括以下步骤:
S201,显示采用目标应用监听的第一应用窗口,所述第一应用窗口为聚焦状态;
具体描述可参见S101,此处不再赘述。
可选的,在显示采用目标应用监听的第一应用窗口之前,终端获取针对显示界面上目标应用输入的窗口开启操作,基于所述窗口开启指令开启一透明窗口,所述透明窗口覆盖在所述显示界面的第一应用窗口上。
所述窗口开启操作即为开启透明窗口的操作。用户输入窗口开启操作的方式可以包括开启批注应用程序,如双击批注应用程序的图标、通过选中批注应用程序的图标后点击鼠标右键,再点击“打开”选项、通过点击键盘的快捷键“Ctrl+O”等,从而打开了批注的窗口。
可选的,对于安卓(Android)系统,终端可采用批注的辅助功能服务(AccessibilityServices)动态监听第一应用窗口的窗口焦点情况。可以周期性监听,也可以实时监听。
S202,接收针对所述目标应用输入的交互操作,基于所述交互操作输出第二应用窗口,所述第二应用窗口为交互窗口,所述第二应用窗口预设为失焦状态;
具体可参见S102,此处不再赘述。
S203,接收针对所述第二应用窗口输入的光标移入操作,获取所述光标移入操作所指示的第一光标位置;
将光标向第二应用窗口进行移动的过程中,光标的位置在不断变化,而第一光标位置即为光标最终停留的位置。
例如,如图5a中所示,将光标移动到s点处并停留时,s点处的坐标即为第一光标位置。
S204,当所述第一光标位置位于所述第二应用窗口的聚焦位置范围内时,获取所述第二应用窗口的焦点状态;
所述聚焦位置范围指进行信息输入的范围,可以包括文本输入框以及各种按键。例如,当第二应用窗口为图2a所示的形式时,聚焦位置范围即包括“用户名或邮件地址”输入框、“密码”输入框以及“进入系统”控键分别对应的区域。当第二应用窗口为图2b所示的形式时,聚焦位置范围包括“确定”控键对应的区域。
S205,判断所述第二应用窗口是否为聚焦状态;
对焦点状态进行调整之前对当前的焦点状态进行检测,若所检测到的焦点状态是所需要调整的焦点状态,则无需进行调整;若所检测到的焦点状态不是所需要调整的焦点状态,则进行调整。
具体的判断方式可以是:通过查询视图焦点监听器中是否存在第二应用窗口的窗口节点信息,若其中包含第二应用窗口的窗口节点信息,表明第二应用窗口为聚焦状态,若不包含,表明第二应用窗口为失焦状态。
其中,窗口节点即为窗口所包含的元素,每个窗口可以包括多个节点,每个节点都包含多个属性。这些属性包括nodeName(节点名称)、nodeValue(节点值)、nodeType(节点类型)。
S206,当所述焦点状态为失焦状态时,获取所述第二应用窗口的根节点视图,并获取所述根节点视图的布局属性参数。
在每个窗口中都包含有根节点视图。在安卓系统中,可通过调用语句getWindow().getDecorView().findViewById(android.R.id.content)得到第二应用窗口的根节点视图DecorView。
在DecorView中包含布局属性参数(LayoutParams),LayoutParams里面存放着的是窗口的属性,通过这个变量,可以为窗口赋予各式的属性。也可以改变它的属性值,来进行各种各样的操作,像悬浮窗口的拖动,拉伸等操作。
而在LayoutParams中又包含焦点属性标志位(Flag),通过改变Flag的值可以改变窗口的焦点状态。
S207,获取所述根节点视图的属性管理器。
在安卓系统中,可通过调用wManager=(WindowManager)getApplicationCont
ext().getSystemService(Context.WINDOW_SERVICE);得到DecorView的属性管理器(WindowManager)。
WindowManager是一个接口类,它可以实现对窗口中视图的管理,包括增加,更新和删除等。
如增加视图,调用public void addView(Viewview,ViewGroup.LayoutParams params);更新视图,调用public void updateViewLayout(View view,ViewGroup.LayoutParamsparams);删除视图,调用public void removeView(View view)。
S208,采用所述属性管理器将所述布局属性参数的属性值调整为聚焦状态所指示的焦点属性值,并刷新所述第二应用窗口。
设置Flag的值,并设置为聚焦状态所指示的焦点属性值,例如,若1表示聚焦,0表示失焦,则将Flag设置为1。
在一种具体的执行方式中,可通过layoutParams.flags&=windowManager.Lay
outParams.FLAG_NOT_FOCUSABLE进行设置。并采用WindowManager动态的调用WindowManager.updateViewLayout(decorView,layoutParams)更新第二应用窗口,从而实现第二应用窗口的聚焦。
可选的,接收针对所述第二应用窗口输入的失焦操作,将所述第二应用窗口刷新为失焦状态。
所述第二焦点变化信号可以包括光标移出信号、输入完成信号、确认信号或取消信号等多种方式。
当第二焦点变化信号包括光标移入信号时,一种可行的实现方式为,终端接收针对所述第二应用窗口输入的光标移出操作,并获取所述光标移出操作所指示的第二光标位置,当所述第二光标位置位于所述第二应用窗口的聚焦位置范围外时,表明用户不需要再对第二应用窗口进行操作,则将所述第二应用窗口的焦点状态刷新为失焦状态。
其中,第二光标位置指光标远离第二应用窗口时,最终停留的位置。
当第二焦点变化信号包括输入完成信号时,一种可行的实现方式为,终端获取用户输入的输入完成信号(如点击确定控键),直接将第二应用窗口的焦点状态刷新为失焦状态。刷新方式与上述所描述的聚焦状态的刷新方式相同,此处不再赘述。
可选的,在将第二应用窗口的焦点状态刷新至失焦状态之前,可先判断第二应用窗口当前是否为失焦状态,若是,则无需调整,否则,对焦点状态进行调整。
需要说明的是,本方案适用多种应用场景。一种具体的应用场景为,第一应用窗口对应PPT应用,目标应用对应批注应用程序(mark),第二应用窗口为mark的子窗口,在播放PPT的过程中,若未将第二应用窗口预设为失焦状态,则得到的显示界面的焦点分配情况为:
isPPTPlaying:true
rootInActiveWindow:android.view.accessibility.AccessibilityNodeInfo@8001b4cf;
boundsInParent:Rect(0,0-486,750);
boundsInScreen:Rect(102,259-588,1009);
packageName:com.cvte.maxhub.mark;className:android.widget.FrameLayout;…
此时系统监测到显示界面的焦点信息为第二应用窗口的节点信息(com.cvte.maxhub.mark)。
而采用本方案之后,得到的显示界面的焦点分配情况为:
isPPTPlaying:true
rootInActiveWindow:android.view.accessibility.AccessibilityNodeInfo@80007d46;boundsInParent:Rect(0,0-1920,1080);
boundsInScreen:Rect(0,0-1920,1080);
packageName:com.microsoft.office.powerpoint;className:android.widget.FrameLayout;…
此时,系统监测到显示界面的节点信息为PPT窗口的节点信息(com.microsoft.office.powerpoint)。可见,本方案解决了第一应用窗口的失焦问题。
在本申请实施例中,终端响应针对目标应用的交互操作指令,基于该交互操作指令输出预设焦点状态为失焦状态的第二应用窗口,当光标在该第二应用窗口上移动并移动到聚焦位置范围内时,若该第二应用窗口当前处于失焦状态,则通过获取该第二应用窗口的根节点视图的布局属性参数以及属性管理器,采用属性管理器调整布局属性参数的属性值后对该第二应用窗口进行动态刷新,从而实现第二应用窗口的聚焦。同时,当光标从聚焦位置范围内移走时,采用相同的方法调整布局属性参数的属性值,以实现第二应用窗口的失焦。由于将第二应用窗口预设为失焦状态,则可以确保第一应用窗口一直处于聚焦状态,同时,只需要对第二应用窗口进行聚焦操作就可以快速恢复该子窗口的焦点,并在该第二应用窗口不需要聚焦的时候则进行焦点的回收而转为失焦状态。在不影响第二应用窗口正常使用的情况下,节省了窗口焦点恢复时间,进而可以提高窗口焦点的恢复效率,这样,在目标应用开启的状态下,目标应用可以一直监听到第一应用窗口的窗口节点信息,目标应用与第一应用窗口之间的通信链路在不中断的情况下,某一时间的聚焦和失焦仅仅只是发生在所弹出的第二应用窗口上,并不影响目标窗口的失焦聚焦,聚焦失焦影响范围小,且恢复第二应用窗口的焦点过程所花费的时间较短,一方面可以屏蔽用户操作第一应用窗口而无响应的感知,另一方面不需要重新恢复第一应用窗口的焦点。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参见图8,其示出了本申请一个示例性实施例提供的应用窗口的焦点刷新装置的结构示意图。该应用窗口的焦点刷新装置可以通过软件、硬件或者两者的结合实现成为终端的全部或一部分。该装置包括窗口显示模块11、第一窗口输出模块12和第一窗口刷新模块13。
窗口显示模块11,用于显示采用目标应用监听的第一应用窗口,所述第一应用窗口为聚焦状态;
第一窗口输出模块12,用于接收针对所述目标应用输入的交互操作,基于所述交互操作输出第二应用窗口,所述第二应用窗口为交互窗口,所述第二应用窗口预设为失焦状态;
第一窗口刷新模块13,用于接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态。
可选的,如图9所示,所述聚焦操作包括光标移入操作,所述第一窗口刷新模块13,包括:
位置获取单元131,用于接收针对所述第二应用窗口输入的光标移入操作,获取所述光标移入操作所指示的第一光标位置;
窗口刷新单元132,用于当所述第一光标位置位于所述第二应用窗口的聚焦位置范围内时,将所述第二应用窗口刷新为聚焦状态。
可选的,所述窗口刷新单元132,具体用于:
获取所述第二应用窗口的根节点视图,并获取所述根节点视图的布局属性参数;
基于所述布局属性参数将所述第二应用窗口刷新为聚焦状态。
可选的,所述窗口刷新单元132,还用于:
用于获取所述根节点视图的属性管理器;
采用所述属性管理器将所述布局属性参数的属性值调整为聚焦状态所指示的焦点属性值,并刷新所述第二应用窗口。
可选的,如图10所示,所述装置还包括:
状态获取模块14,用于获取所述第二应用窗口的焦点状态;
状态判断模块15,用于判断所述焦点状态是否为聚焦状态,当所述焦点状态为失焦状态时,触发所述窗口刷新模块将所述第二应用窗口刷新为聚焦状态。
可选的,如图10所示,所述装置还包括:
第二窗口刷新模块16,用于接收针对所述第二应用窗口输入的失焦操作,将所述第二应用窗口刷新为失焦状态。
可选的,如图11所示,所述失焦操作包括光标移出操作,所述第二窗口刷新模块16,包括:
位置获取单元161,用于接收针对所述第二应用窗口输入的光标移出操作,获取所述光标移出操作所指示的第二光标位置;
窗口刷新单元162,用于当所述第二光标位置位于所述第二应用窗口的聚焦位置范围外时,将所述第二应用窗口刷新为失焦状态。
可选的,如图10所示,所述装置还包括:
第二窗口输出模块17,用于接收针对所述目标应用输入的交互操作,基于所述交互操作输出第三应用窗口,所述第三应用窗口为非交互窗口,所述第三应用窗口预设为失焦状态。
需要说明的是,上述实施例提供的应用窗口的焦点刷新装置在执行应用窗口的焦点刷新方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的应用窗口的焦点刷新装置与应用窗口的焦点刷新方法实施例属于同一构思,其体现实现过程详见方法实施例,这里不再赘述。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
在本申请实施例中,终端响应针对目标应用的交互操作指令,基于该交互操作指令输出预设焦点状态为失焦状态的第二应用窗口,当光标在该第二应用窗口上移动并移动到聚焦位置范围内时,若该第二应用窗口当前处于失焦状态,则通过获取该第二应用窗口的根节点视图的布局属性参数以及属性管理器,采用属性管理器调整布局属性参数的属性值后对该第二应用窗口进行动态刷新,从而实现第二应用窗口的聚焦。同时,当光标从聚焦位置范围内移走时,采用相同的方法调整布局属性参数的属性值,以实现第二应用窗口的失焦。由于将第二应用窗口预设为失焦状态,则可以确保第一应用窗口一直处于聚焦状态,同时,只需要对第二应用窗口进行聚焦操作就可以快速恢复该子窗口的焦点,并在该第二应用窗口不需要聚焦的时候则进行焦点的回收而转为失焦状态。在不影响第二应用窗口正常使用的情况下,节省了窗口焦点恢复时间,进而可以提高窗口焦点的恢复效率,这样,在目标应用开启的状态下,目标应用可以一直监听到第一应用窗口的窗口节点信息,目标应用与第一应用窗口之间的通信链路在不中断的情况下,某一时间的聚焦和失焦仅仅只是发生在所弹出的第二应用窗口上,并不影响目标窗口的失焦聚焦,聚焦失焦影响范围小,且恢复第二应用窗口的焦点过程所花费的时间较短,一方面可以屏蔽用户操作第一应用窗口而无响应的感知,另一方面不需要重新恢复第一应用窗口的焦点。
本申请实施例还提供了一种计算机存储介质,所述计算机存储介质可以存储有多条指令,所述指令适于由处理器加载并执行如上述图4-图7所示实施例的方法步骤,具体执行过程可以参见图4-图7所示实施例的具体说明,在此不进行赘述。
本申请还提供了一种计算机程序产品,该计算机程序产品存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如上各个实施例所述的焦点状态刷新方法。
请参见图12,为本申请实施例提供了一种终端的结构示意图。如图12所示,所述终端1000可以包括:至少一个处理器1001,至少一个网络接口1004,用户接口1003,存储器1005,至少一个通信总线1002。
其中,通信总线1002用于实现这些组件之间的连接通信。
其中,用户接口1003可以包括显示屏(Display)、摄像头(Camera),可选用户接口1003还可以包括标准的有线接口、无线接口。
其中,网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。
其中,处理器1001可以包括一个或者多个处理核心。处理器1001利用各种借口和线路连接整个终端1000内的各个部分,通过运行或执行存储在存储器1005内的指令、程序、代码集或指令集,以及调用存储在存储器1005内的数据,执行终端1000的各种功能和处理数据。可选的,处理器1001可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1001可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1001中,单独通过一块芯片进行实现。
其中,存储器1005可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。可选的,该存储器1005包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1005可用于存储指令、程序、代码、代码集或指令集。存储器1005可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等;存储数据区可存储上面各个方法实施例中涉及到的数据等。存储器1005可选的还可以是至少一个位于远离前述处理器1001的存储装置。如图12所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及应用窗口的焦点刷新应用程序。
在图12所示的终端1000中,用户接口1003主要用于为用户提供输入的接口,获取用户输入的数据;而处理器1001可以用于调用存储器1005中存储的应用窗口的焦点刷新应用程序,并具体执行以下操作:
显示采用目标应用监听的第一应用窗口,所述第一应用窗口为聚焦状态;
接收针对所述目标应用输入的交互操作,基于所述交互操作输出第二应用窗口,所述第二应用窗口为交互窗口,所述第二应用窗口预设为失焦状态;
接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态。
在一个实施例中,所述聚焦操作包括光标移入操作,所述处理器1001在执行接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态时,具体执行以下操作:
接收针对所述第二应用窗口输入的光标移入操作,获取所述光标移入操作所指示的第一光标位置;
当所述第一光标位置位于所述第二应用窗口的聚焦位置范围内时,将所述第二应用窗口刷新为聚焦状态。
在一个实施例中,所述处理器1001在执行将所述第二应用窗口刷新为聚焦状态时,具体执行以下操作:
获取所述第二应用窗口的根节点视图,并获取所述根节点视图的布局属性参数;
基于所述布局属性参数将所述第二应用窗口刷新为聚焦状态。
在一个实施例中,所述处理器1001还执行以下操作:
获取所述根节点视图的属性管理器;
所述处理器1001在执行基于所述布局属性参数将所述第二应用窗口刷新为聚焦状态时,具体执行以下操作:
采用所述属性管理器将所述布局属性参数的属性值调整为聚焦状态所指示的焦点属性值,并刷新所述第二应用窗口。
在一个实施例中,所述处理器1001在执行将所述第二应用窗口刷新为聚焦状态之前,还执行以下操作:
获取所述第二应用窗口的焦点状态;
判断所述焦点状态是否为聚焦状态;
所述处理器1001在执行将所述第二应用窗口刷新为聚焦状态时,具体执行以下操作:
当所述焦点状态为失焦状态时,触发执行所述将所述第二应用窗口刷新为聚焦状态的步骤。
在一个实施例中,所述处理器1001在执行接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态之后,还执行以下操作:
接收针对所述第二应用窗口输入的失焦操作,将所述第二应用窗口刷新为失焦状态。
在一个实施例中,所述失焦操作包括光标移出操作,所述处理器1001在执行接收针对所述第二应用窗口输入的失焦操作,将所述第二应用窗口刷新为失焦状态时,具体执行以下操作:
接收针对所述第二应用窗口输入的光标移出操作,获取所述光标移出操作所指示的第二光标位置;
当所述第二光标位置位于所述第二应用窗口的聚焦位置范围外时,将所述第二应用窗口刷新为失焦状态。
在一个实施例中,所述处理器1001还执行以下操作:
接收针对所述目标应用输入的交互操作,基于所述交互操作输出第三应用窗口,所述第三应用窗口为非交互窗口,所述第三应用窗口预设为失焦状态。
在本申请实施例中,终端响应针对目标应用的交互操作指令,基于该交互操作指令输出预设焦点状态为失焦状态的第二应用窗口,当光标在该第二应用窗口上移动并移动到聚焦位置范围内时,若该第二应用窗口当前处于失焦状态,则通过获取该第二应用窗口的根节点视图的布局属性参数以及属性管理器,采用属性管理器调整布局属性参数的属性值后对该第二应用窗口进行动态刷新,从而实现第二应用窗口的聚焦。同时,当光标从聚焦位置范围内移走时,采用相同的方法调整布局属性参数的属性值,以实现第二应用窗口的失焦。由于将第二应用窗口预设为失焦状态,则可以确保第一应用窗口一直处于聚焦状态,同时,只需要对第二应用窗口进行聚焦操作就可以快速恢复该子窗口的焦点,并在该第二应用窗口不需要聚焦的时候则进行焦点的回收而转为失焦状态。在不影响第二应用窗口正常使用的情况下,节省了窗口焦点恢复时间,进而可以提高窗口焦点的恢复效率,这样,在目标应用开启的状态下,目标应用可以一直监听到第一应用窗口的窗口节点信息,目标应用与第一应用窗口之间的通信链路在不中断的情况下,某一时间的聚焦和失焦仅仅只是发生在所弹出的第二应用窗口上,并不影响目标窗口的失焦聚焦,聚焦失焦影响范围小,且恢复第二应用窗口的焦点过程所花费的时间较短,一方面可以屏蔽用户操作第一应用窗口而无响应的感知,另一方面不需要重新恢复第一应用窗口的焦点。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体或随机存储记忆体等。

Claims (18)

  1. 一种应用窗口的焦点刷新方法,包括:
    显示采用目标应用监听的第一应用窗口,所述第一应用窗口为聚焦状态;
    接收针对所述目标应用输入的交互操作,基于所述交互操作输出第二应用窗口,所述第二应用窗口为交互窗口,所述第二应用窗口预设为失焦状态;
    接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态。
  2. 根据权利要求1所述的应用窗口的焦点刷新方法,其中,所述聚焦操作包括光标移入操作,所述接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态,包括:
    接收针对所述第二应用窗口输入的光标移入操作,获取所述光标移入操作所指示的第一光标位置;
    当所述第一光标位置位于所述第二应用窗口的聚焦位置范围内时,将所述第二应用窗口刷新为聚焦状态。
  3. 根据权利要求2所述的应用窗口的焦点刷新方法,其中,所述将所述第二应用窗口刷新为聚焦状态,包括:
    获取所述第二应用窗口的根节点视图,并获取所述根节点视图的布局属性参数;
    基于所述布局属性参数将所述第二应用窗口刷新为聚焦状态。
  4. 根据权利要求3所述的应用窗口的焦点刷新方法,还包括:
    获取所述根节点视图的属性管理器;
    所述基于所述布局属性参数将所述第二应用窗口刷新为聚焦状态,包括:
    采用所述属性管理器将所述布局属性参数的属性值调整为聚焦状态所指示的焦点属性值,并刷新所述第二应用窗口。
  5. 根据权利要求1所述的应用窗口的焦点刷新方法,其中,所述将所述第二应用窗口刷新为聚焦状态之前,还包括:
    获取所述第二应用窗口的焦点状态;
    判断所述焦点状态是否为聚焦状态;
    所述将所述第二应用窗口刷新为聚焦状态,包括:
    当所述焦点状态为失焦状态时,触发执行所述将所述第二应用窗口刷新为聚焦状态的步骤。
  6. 根据权利要求1所述的应用窗口的焦点刷新方法,其中,所述接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态之后,还包括:
    接收针对所述第二应用窗口输入的失焦操作,将所述第二应用窗口刷新为失焦状态。
  7. 根据权利要求6所述的应用窗口的焦点刷新方法,其中,所述失焦操作包括光标移出操作,所述接收针对所述第二应用窗口输入的失焦操作,将所述第二应用窗口刷新为失焦状态,包括:
    接收针对所述第二应用窗口输入的光标移出操作,获取所述光标移出操作所指示的第二光标位置;
    当所述第二光标位置位于所述第二应用窗口的聚焦位置范围外时,将所述第二应用窗口刷新为失焦状态。
  8. 根据权利要求1所述的应用窗口的焦点刷新方法,还包括:
    接收针对所述目标应用输入的交互操作,基于所述交互操作输出第三应用窗口,所述第三应用窗口为非交互窗口,所述第三应用窗口预设为失焦状态。
  9. 一种应用窗口的焦点刷新装置,包括:
    窗口显示模块,用于显示采用目标应用监听的第一应用窗口,所述第一应用窗口为聚焦状态;
    第一窗口输出模块,用于接收针对所述目标应用输入的交互操作,基于所述交互操作输出第二应用窗口,所述第二应用窗口为交互窗口,所述第二应用窗口预设为失焦状态;
    第一窗口刷新模块,用于接收针对所述第二应用窗口输入的聚焦操作,将所述第二应用窗口刷新为聚焦状态。
  10. 根据权利要求9所述的应用窗口的焦点刷新装置,其中,所述聚焦操作包括光标移入操作,所述第一窗口刷新模块,包括:
    位置获取单元,用于接收针对所述第二应用窗口输入的光标移入操作,获取所述光标移入操作所指示的第一光标位置;
    窗口刷新单元,用于当所述第一光标位置位于所述第二应用窗口的聚焦位置范围内时,将所述第二应用窗口刷新为聚焦状态。
  11. 根据权利要求10所述的应用窗口的焦点刷新装置,其中,所述窗口刷新单元,具体用于:
    获取所述第二应用窗口的根节点视图,并获取所述根节点视图的布局属性参数;
    基于所述布局属性参数将所述第二应用窗口刷新为聚焦状态。
  12. 根据权利要求11所述的应用窗口的焦点刷新装置,其中,所述窗口刷新单元,还用于:
    管理器获取单元,用于获取所述根节点视图的属性管理器;
    采用所述属性管理器将所述布局属性参数的属性值调整为聚焦状态所指示的焦点属性值,并刷新所述第二应用窗口。
  13. 根据权利要求9所述的应用窗口的焦点刷新装置,还包括:
    状态获取模块,用于获取所述第二应用窗口的焦点状态;
    状态判断模块,用于判断所述焦点状态是否为聚焦状态,当所述焦点状态为失焦状态时,触发所述窗口刷新模块将所述第二应用窗口刷新为聚焦状态。
  14. 根据权利要求9所述的应用窗口的焦点刷新装置,还包括:
    第二窗口刷新模块,用于接收针对所述第二应用窗口输入的失焦操作,将所述第二应用窗口刷新为失焦状态。
  15. 根据权利要求14所述的应用窗口的焦点刷新装置,其中,所述失焦操作包括光标移出操作,所述第二窗口刷新模块,包括:
    位置获取单元,用于接收针对所述第二应用窗口输入的光标移出操作,获取所述光标移出操作所指示的第二光标位置;
    窗口刷新单元,用于当所述第二光标位置位于所述第二应用窗口的聚焦位置范围外时,将所述第二应用窗口刷新为失焦状态。
  16. 根据权利要求9所述的应用窗口的焦点刷新装置,还包括:
    第二窗口输出模块,用于接收针对所述目标应用输入的交互操作,基于所述交互操作输出第三应用窗口,所述第三应用窗口为非交互窗口,所述第三应用窗口预设为失焦状态。
  17. 一种计算机存储介质,其中,所述计算机存储介质存储有多条指令,所述指令适于由处理器加载并执行如权利要求1~8任意一项的方法步骤。
  18. 一种终端,包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行如权利要求1~8任意一项的方法步骤。
PCT/CN2019/124564 2019-02-20 2019-12-11 应用窗口的焦点刷新方法、装置、存储介质及终端 Ceased WO2020168790A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910126533.7A CN109828820B (zh) 2019-02-20 2019-02-20 一种应用窗口的焦点刷新方法、装置、存储介质及终端
CN201910126533.7 2019-02-20

Publications (1)

Publication Number Publication Date
WO2020168790A1 true WO2020168790A1 (zh) 2020-08-27

Family

ID=66863900

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/124564 Ceased WO2020168790A1 (zh) 2019-02-20 2019-12-11 应用窗口的焦点刷新方法、装置、存储介质及终端

Country Status (2)

Country Link
CN (1) CN109828820B (zh)
WO (1) WO2020168790A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109828820B (zh) * 2019-02-20 2021-08-20 广州视源电子科技股份有限公司 一种应用窗口的焦点刷新方法、装置、存储介质及终端
CN112256372B (zh) * 2020-10-20 2023-12-26 北京字跳网络技术有限公司 信息处理方法、装置和电子设备
CN113127056B (zh) * 2021-05-17 2022-03-29 马上消费金融股份有限公司 一种信息处理方法、装置、设备及可读存储介质
CN116467037B (zh) * 2023-06-09 2023-09-22 成都融见软件科技有限公司 一种图形用户界面工作状态的恢复方法

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101639755A (zh) * 2009-09-10 2010-02-03 腾讯科技(深圳)有限公司 一种支持图片输入的方法和设备
CN103440193A (zh) * 2013-09-12 2013-12-11 广东电子工业研究院有限公司 一种快速记录选中信息的方法
CN106339174A (zh) * 2015-07-17 2017-01-18 阿里巴巴集团控股有限公司 多窗口显示键盘光标的方法及装置
CN107484024A (zh) * 2017-08-17 2017-12-15 四川长虹电器股份有限公司 基于webos智能电视系统利用热键实现全局悬浮菜单的方法
CN108628650A (zh) * 2018-03-20 2018-10-09 广州视源电子科技股份有限公司 触摸事件的处理方法、装置和智能交互设备
CN108924029A (zh) * 2018-04-11 2018-11-30 阿里巴巴集团控股有限公司 一种客服数据发送的方法及装置
CN109828820A (zh) * 2019-02-20 2019-05-31 广州视源电子科技股份有限公司 一种应用窗口的焦点刷新方法、装置、存储介质及终端

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455234A (zh) * 2012-06-01 2013-12-18 腾讯科技(深圳)有限公司 显示应用程序界面的方法及装置
US8443297B1 (en) * 2012-06-15 2013-05-14 Google Inc. Dimming a window that is out of focus
CN103513857B (zh) * 2012-06-28 2017-12-19 北京奇虎科技有限公司 不规则窗口中的消息处理方法及装置
CN107301009A (zh) * 2017-06-15 2017-10-27 深圳市金立通信设备有限公司 一种移除Toast消息框的方法、终端及计算机可读存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101639755A (zh) * 2009-09-10 2010-02-03 腾讯科技(深圳)有限公司 一种支持图片输入的方法和设备
CN103440193A (zh) * 2013-09-12 2013-12-11 广东电子工业研究院有限公司 一种快速记录选中信息的方法
CN106339174A (zh) * 2015-07-17 2017-01-18 阿里巴巴集团控股有限公司 多窗口显示键盘光标的方法及装置
CN107484024A (zh) * 2017-08-17 2017-12-15 四川长虹电器股份有限公司 基于webos智能电视系统利用热键实现全局悬浮菜单的方法
CN108628650A (zh) * 2018-03-20 2018-10-09 广州视源电子科技股份有限公司 触摸事件的处理方法、装置和智能交互设备
CN108924029A (zh) * 2018-04-11 2018-11-30 阿里巴巴集团控股有限公司 一种客服数据发送的方法及装置
CN109828820A (zh) * 2019-02-20 2019-05-31 广州视源电子科技股份有限公司 一种应用窗口的焦点刷新方法、装置、存储介质及终端

Also Published As

Publication number Publication date
CN109828820B (zh) 2021-08-20
CN109828820A (zh) 2019-05-31

Similar Documents

Publication Publication Date Title
JP7366976B2 (ja) コンピューティング装置の通知のための通知チャネル
US9965039B2 (en) Device and method for displaying user interface of virtual input device based on motion recognition
US20210349566A1 (en) Device, Method, and User Interface for Processing Intensity of Touch Contacts
US12353798B2 (en) Condensed spoken utterances for automated assistant control of an intricate application GUI
US9646145B2 (en) Method and system for dynamically assignable user interface
KR102033198B1 (ko) 제스처 또는 터치를 통해 사용자 인터페이스를 제어하는 최적화 기법
US20110115814A1 (en) Gesture-controlled data visualization
US20170010771A1 (en) Systems, Devices, and Methods for Dynamically Providing User Interface Controls at a Touch-Sensitive Secondary Display
US9857955B2 (en) Dynamic, optimized placement of computer-based windows
WO2020168790A1 (zh) 应用窗口的焦点刷新方法、装置、存储介质及终端
CN117270746A (zh) 多显示器设备中的应用启动
US9804767B2 (en) Light dismiss manager
TW201502960A (zh) 用於在鎖定螢幕上的動作之使用者定義式捷徑
CN107077287A (zh) 启动和切换界面的应用
US20240385692A1 (en) Two-handed gesture interpretation
US11237699B2 (en) Proximal menu generation
US9037958B2 (en) Dynamic creation of user interface hot spots
CN113282213A (zh) 界面显示方法及装置
CN113934501B (zh) 翻译方法、装置、存储介质及电子设备
CN115562544A (zh) 一种显示设备及撤销方法
CN119166004A (zh) 信息交互方法、装置、电子设备、存储介质和程序产品
US10747403B2 (en) Adaptable user input interface
CN113360074B (zh) 软键盘显示方法、相关装置及计算机程序产品
US11543932B1 (en) Rule-based prioritization and activation of overlapping screen areas using pointing device
BR112020024441A2 (pt) método, dispositivo de computação local e mídia legível por computador não transitória para compartilhamento de área de trabalho através de uma conexão de soquete da web em um espaço de trabalho de colaboração em rede

Legal Events

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

Ref document number: 19915927

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19915927

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19915927

Country of ref document: EP

Kind code of ref document: A1

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

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 24/02/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19915927

Country of ref document: EP

Kind code of ref document: A1