WO2019041779A1 - 终端界面切换、移动、手势处理的方法、装置及终端 - Google Patents
终端界面切换、移动、手势处理的方法、装置及终端 Download PDFInfo
- Publication number
- WO2019041779A1 WO2019041779A1 PCT/CN2018/078059 CN2018078059W WO2019041779A1 WO 2019041779 A1 WO2019041779 A1 WO 2019041779A1 CN 2018078059 W CN2018078059 W CN 2018078059W WO 2019041779 A1 WO2019041779 A1 WO 2019041779A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- screen
- gesture
- action
- touch
- screens
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/16—Constructional details or arrangements
- G06F1/1613—Constructional details or arrangements for portable computers
- G06F1/1633—Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
- G06F1/1637—Details related to the display arrangement, including those related to the mounting of the display in the housing
- G06F1/1647—Details related to the display arrangement, including those related to the mounting of the display in the housing including at least an additional display
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/1423—Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display
- G06F3/1431—Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display using a single graphics controller
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04808—Several contacts: gestures triggering a specific function, e.g. scrolling, zooming, right-click, when the user establishes several contacts with the surface simultaneously; e.g. using several fingers or a combination of fingers and pen
Definitions
- the present application relates to the field of terminal technologies, for example, to a terminal interface switching, moving, gesture processing method, device, and terminal.
- dual-screen terminals with two physical independent screens such as dual-screen mobile phones
- the dual-screen mobile phone can make the mobile phone adapt to more usage scenarios and is more portable, which will bring a better user experience than a single-screen mobile phone.
- the screen is sometimes simply referred to as a screen.
- the inventors of the present application have found through research that terminal touch technologies are mostly designed based on single-screen terminals, and there is still a deficiency in the interactive experience mode unique to dual-screen terminals.
- the embodiment of the invention provides a method for switching a terminal interface, including:
- gesture action includes simultaneously performing a relative sliding motion on the first screen and the second screen;
- the embodiment of the invention further provides a method for moving a terminal interface, including:
- gesture action includes simultaneously performing an action of sliding from the first screen to the second screen direction to the same side on the two screens;
- the embodiment of the invention further provides a terminal interface switching device, including:
- a gesture detection module configured to detect a gesture
- the gesture execution module is configured to switch the display content of the first screen and the second screen when the gesture detection module detects a gesture motion of simultaneously sliding on the first screen and the second screen.
- the embodiment of the invention further provides a terminal interface mobile device, including:
- a gesture detection module configured to detect a gesture
- a gesture execution module configured to move the display content of the first screen when the gesture detection module detects a gesture motion of sliding to the same side from the first screen to the second screen simultaneously on the two screens Displayed to the second screen.
- An embodiment of the present invention further provides a terminal, including a memory, a processor, and a computer program stored on the memory and operable on the processor, where the processor executes the computer program as described above Any of the terminal interface switching or moving methods.
- An embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements any of the terminal interface switching or moving methods as described above.
- the embodiment of the foregoing terminal interface switching or moving enables the user to conveniently switch or move the screen content, which can effectively improve the interactive experience.
- the embodiment of the invention further provides a method for terminal gesture processing, including:
- Determining, according to the touch event that is monitored, the touch action performed on the two screens is a gesture action, and performing interactive processing of the gesture.
- An embodiment of the present invention further provides a terminal gesture processing apparatus, including
- Touch monitoring module configured to monitor touch events on two screens and report them
- the gesture processing module is configured to determine, according to the touch event reported by the touch monitoring module, that the touch action performed on the two screens is a gesture action, and perform interaction processing of the gesture.
- An embodiment of the present invention further provides a terminal, including a memory, a processor, and a computer program stored on the memory and operable on the processor, where the processor executes the computer program as described above Any of the terminal gesture processing methods.
- An embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement any of the methods of terminal gesture processing as described above.
- the foregoing embodiment of the terminal gesture processing enables the terminal to effectively enhance the interactive experience in response to the gesture action of the user on the two screens.
- FIG. 1 is a flowchart of a terminal gesture processing method according to an embodiment of the present invention.
- FIG. 2 is a block diagram of a terminal gesture processing apparatus according to an embodiment of the present invention.
- FIG. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
- FIG. 4 is a flowchart of a terminal interface switching method according to an embodiment of the present invention.
- FIG. 5 is a schematic diagram of an action of an exemplary first gesture according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of switching a dual-screen foreground application according to a first gesture according to an embodiment of the present invention
- FIG. 7 is a schematic diagram of switching a dual-screen foreground application stack according to a first gesture according to an embodiment of the present invention.
- FIG. 8 is a block diagram of a terminal interface switching apparatus according to an embodiment of the present invention.
- FIG. 9 is a schematic diagram of a display layout of switching a dual screen display interface according to a first gesture according to an embodiment of the present invention.
- FIG. 10 is a flowchart of a method for moving a terminal interface according to an embodiment of the present invention.
- FIG. 11 is a schematic diagram of an action of an exemplary second gesture provided by an embodiment of the present invention.
- FIG. 12 is a schematic diagram of implementing terminal interface movement by changing an application according to a second gesture according to an embodiment of the present invention
- FIG. 13 is a schematic diagram of a task stack changing according to a second gesture according to an embodiment of the present invention.
- This embodiment provides a method for processing gestures of a terminal. As shown in FIG. 1 , the method provided in this embodiment includes: step 110, listening to touch events on two screens; and step 120, according to the touch events that are monitored, Determining that the touch action performed on the two screens is a gesture action, and performing interactive processing of the gesture.
- ACTION_MOVE will trigger multiple times as the finger moves.
- the tracking of the same touch point between different events is achieved by the finger ID (PointID) generated when the finger is pressed, the finger is raised or the event is cancelled and disappeared.
- ACTION_POINTER_UP indicating that in the case of a finger press, a finger is raised
- ACTION_2TP (Touch Panel) _POINTER_DOWN indicates an event in which one screen has a touch action and the other screen has a finger press.
- ACTION_2TP_POINTER_UP indicates that there is a touch action on one screen (ie, the touch is not released), and the other screen has a finger raised event.
- a screen has a touch action sometimes it can also be described as "a screen has a finger press", which indicates a state in which a screen has not been lifted after a finger is pressed.
- a touch event can be defined with a 32-bit int type value, with the lowest 8 bits (0x000000ff) used to represent the event type and the next 8 bits (0x0000ff00) used to represent the event number, which is used for Distinguish which finger is the finger. Using this, you can define the encoding of the two new touch events that are expanded.
- the event after adding the event number (finger index) information is defined as follows:
- 0x00000120 indicates that while one screen (also referred to as the first screen) has a touch action, the other screen (also referred to as a second screen) has the first finger pressed.
- the event, 0x00000121 represents an event in which one screen has a touch action while the other screen is lifted by the first finger. It is also possible to further define 0x00000220, 0x00000221 to represent the touch event of the second finger of the other screen, 0x00000320, 0x00000321 represents the touch event of the third finger of the second screen. This expands more touch events and completes more complex gesture recognition.
- this embodiment introduces the following gestures and interaction processing:
- the first gesture the simultaneous sliding action on the first screen and the second screen.
- the opposite-sliding action described here refers to the action of sliding the finger to the right on the left screen and the finger sliding to the left on the right screen when the first screen and the second screen are arranged side by side. If the terminal detects the action of the first gesture, switching the display content of the first screen and the second screen.
- the second gesture is to simultaneously perform an action of sliding to the same side from the first screen to the second screen on the two screens.
- the first screen and the second screen mentioned here are not fixed screens, but are associated with the sliding direction.
- the first screen and the second screen are arranged side by side, if the fingers on the left and right screens are from the left Slide to the right, the left screen is the first screen and the right screen is the second screen. If the left and right screens are swiped from right to left, the right screen is the first screen and the left screen is the second screen. If the terminal detects the action of the second gesture, moving the display content of the first screen to the second screen display.
- the embodiment further provides a terminal gesture processing device. As shown in FIG. 2, the device provided in this embodiment includes:
- the touch monitoring module 10 is configured to monitor touch events on the two screens and report them;
- the gesture processing module 20 is configured to determine, according to the touch event reported by the touch monitoring module, that the touch action performed on the two screens is a gesture action, and perform interaction processing of the gesture.
- the touch events on the two screens monitored by the touch monitoring module 10 include at least one of the following events: an event indicating that one screen has a touch action while another screen has a finger press; and Indicates that there is a touch action on one screen and another object has a finger lift event.
- the gesture processing module 10 is configured to:
- Determining, according to the touch event reported by the touch monitoring module, the touch action performed on the two screens is an action of simultaneously sliding from the first screen to the second screen direction on the two screens. In case, the display content of the first screen is moved to the second screen display.
- FIG. 3 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
- the terminal 30 provided in this embodiment includes a memory 31, a processor 32, and a computer program stored on the memory 31 and executable on the processor 32, and the processor 32 executes the Any method of the embodiment is implemented in a computer program.
- the embodiment further provides a computer readable storage medium having stored thereon a computer program, the computer program being executed by the processor to implement any of the methods of the embodiment.
- the solution of the terminal gesture processing in this embodiment enables the terminal to effectively enhance the interactive experience in response to the gesture action of the user on the two screens.
- This embodiment provides a method and apparatus for performing terminal interface switching.
- the method for switching the terminal interface in this embodiment includes: Step 210: detecting an action of the first gesture, where the action of the first gesture includes simultaneously sliding on the first screen and the second screen
- the action of step 220 is to switch the display content of the first screen and the second screen.
- step 210 an action of simultaneously sliding the first screen and the second screen is detected, for example, a motion of the finger sliding to the right on the left screen and a motion of sliding the finger to the left on the right screen.
- An example of detection is given below, but the present application is not limited to this example.
- For the sliding action of a finger to a certain side on a certain screen other detection methods in the related art may be employed.
- the dual-screen terminal such as the dual-screen mobile phone
- the dual-screen terminal has two independent physical screens, which can be folded and unfolded through the rotating shaft, and can be spliced into a large display after being expanded.
- the dual-screen terminal monitors the ACTION_DOWN touch event, it can be known that there is a touch point P1 pressed on the left screen. If the ACTION_2TP_POINTER_DOWN touch event is monitored again, it can be known that the right screen has another touch point P2 pressed. .
- the two screens have their own coordinate system xOy, and the left screen finger slides from P 1 (x 1 , y 1 ) to P' 1 (x' 1 , y' 1 ), while the right-screen finger is from P 2 (x 2 , y 2 ) slide to P' 2 (x' 2 , y' 2 ), if the action defined by the first gesture is met, that is, the finger on the left screen slides to the right and the finger on the right screen slides to the left, the following conditions are required :
- this example adds the anti-shake margin for control: the movement distance defined in the x-axis direction is greater than the threshold D (eg, 300 pixels), and the finger swipe is effective.
- D eg, 300 pixels
- the requirement of the moving speed in the x-axis direction may be added: the absolute value of the moving speed in the x-axis direction is defined to be greater than the threshold value V (for example, 400 pixels/second), and the finger sliding is effective.
- V for example, 400 pixels/second
- the movement of the first screen finger from P 1 (x 1 , y 1 ) to P′ 1 (x′ 1 , y′ 1 ) is v 1
- the second screen finger slides from P 2 (x 2 , y 2 )
- the moving speed to P' 2 (x' 2 , y' 2 ) is v 2 .
- the action of detecting the first gesture may be determined.
- step 220 the display contents of the first screen and the second screen are switched.
- a single-screen mobile phone usually manages the display order of the interface through a foreground task stack. Since the dual-screen terminal needs to display two screen contents at the same time, the dual-screen terminal can be designed as a dual foreground task stack, and each foreground task stack is responsible for managing the content display of one screen.
- the dual screen terminal detects the action of the first gesture, the dual screen terminal performs the exchange of the dual foreground task stack to switch the display content of the first screen and the second screen.
- an application (APP: application software) interactive interface is composed of several interface components (activity), one interface corresponds to an activity, and mutual calls between different activities constitute a complete interaction process. Tasks are used to store and manage these activities. Its characteristic is last in, first out, the currently displayed activity is always at the top of the stack, and the rest of the activity will be pushed onto the stack according to the order of the call. Based on the task stack, you can implement jump and fallback from one interface to another.
- an application corresponds to a task stack. Which application is switched to the foreground, then the task stack corresponding to the application becomes the foreground task stack, and the task stack corresponding to the application switched to the background becomes the background task stack.
- the foreground application of the first screen is the application A
- the second screen for example, the right screen in FIG. 6
- the foreground application is Application B.
- the foreground task stack corresponding to application A is task stack 1 in FIG. 7, and the stored interface components include activity1 (interface component 1), activity2 (interface component 2), and activity3 (interface component 3), and the foreground task stack corresponding to application B.
- the stored interface components include activity4 (interface component 4), activity5 (interface component 5), and activity6 (interface component 6).
- the foreground application that switches the first screen and the second screen also exchanges the foreground task stack of the first screen and the second screen.
- the foreground application of the first screen becomes the application B ( This means that the foreground task stack of the first screen becomes the stack 2)
- the foreground application of the second screen becomes the application A (which means that the foreground task stack of the second screen becomes the task stack 1);
- the display content of the first screen and the second screen is switched. This does not mean that only the first gesture can switch the display content of the first screen and the second screen. In order to satisfy different usage habits, other gestures can be defined to implement the first screen and the second screen. The display of the content is switched.
- the present embodiment switches the display content of the first screen and the second screen, and should not be understood to switch the first screen when the first gesture is detected in any case.
- the display content of the second screen For example, when the foreground application of one screen or two screens in the first screen and the second screen is a desktop, the terminal may not switch between the two screen display contents. That is to say, for the switching of the display content of the first screen and the second screen, the terminal configuration information or the user may set some restriction conditions to limit the handover, and if the current scene meets the restriction conditions, that is, the scene that belongs to the restricted handover, even if the detection The switching to the dual screen display content is also not performed until the first gesture. Therefore, the present application switches the display content of the first screen and the second screen when the first gesture is detected, and should be understood that the first screen and the second screen can be implemented in other scenarios, except for the scene that is restricted to be switched. Display the switching of content.
- the embodiment further provides a terminal interface switching device, as shown in FIG. 8, comprising:
- the gesture detection module 40 is configured to detect an action of the gesture
- the gesture execution module 50 is configured to switch the display content of the first screen and the second screen when the gesture detection module detects a gesture motion of simultaneously sliding on the first screen and the second screen.
- the gesture execution module 50 is configured to: when the gesture detection module detects a gesture motion of simultaneously sliding on the first screen and the second screen, switching the first screen and the second The front panel of the screen applies and redraws the display contents of the first screen and the second screen to switch the display contents of the first screen and the second screen.
- the terminal provided in this embodiment may also refer to FIG. 3.
- the terminal 30 includes a memory 31, a processor 32, and a computer program stored on the memory 31 and operable on the processor 32. When the processor 32 executes the computer program, any method provided by the embodiment is implemented. .
- the embodiment further provides a computer readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor, any method provided by the embodiment is implemented.
- the display content of the two screens can be exchanged by simple gesture movement, thereby improving the user experience.
- This embodiment proposes another method and apparatus for terminal interface switching.
- the display content of the first screen and the second screen is realized by switching the foreground application of the first screen and the second screen and redrawing the display content of the first screen and the second screen. exchange. This applies to the scene where the first screen and the second screen respectively display different applications.
- the display interface of one application occupies two screens, how to switch the display contents of the two screens is detected if the first gesture is detected.
- a certain interface of the application A is designed to be dual-screen display, and the action of the first gesture, that is, the touch action of sliding on the first screen and the second screen, and then the display content on the two screens
- the exchange location is displayed.
- the gallery application is designed to display thumbnails on the first screen, and the second screen displays an enlarged view of the focus image.
- the user may want to put the magnified image on the first screen for habit or other reasons. At this time, only a simple gesture action is needed, and the interface exchange can be easily realized.
- the method for switching the terminal interface in this embodiment is to switch the display layout of the interface of the first screen and the second screen by switching the display layout of the interface displayed on the first screen and the second screen, and to implement the switching.
- the display content of the first screen and the second screen is to switch the display layout of the interface of the first screen and the second screen by switching the display layout of the interface displayed on the first screen and the second screen, and to implement the switching.
- an Activity corresponds to a layout file.
- the double layout design of the Activity can be performed, that is, two layout files Layout1 and Layout2 need to be designed, and two display layouts corresponding to one display interface, one of which is a layout file loaded by default.
- this embodiment does not require all activities to have two display layouts.
- a dual layout design may be performed for a portion of the first screen and the second screen corresponding to different types of display content, such as displaying a thumbnail on the first screen, displaying a magnified image on the second screen, or displaying a list on the first screen, the second screen Show details and more.
- the present application does not require that the dual-screen display content be switched when the first gesture is detected.
- the first gesture can be detected by using the method in the second embodiment.
- the interface for performing dual screen display uses the layout of the layout
- the layout is reloaded and the display content of the dual screen is redrawed. If the interface uses the Layout2 layout at this time, reloading the Layout1 and redrawing the display content of the dual screen can achieve the effect of switching the dual screen display content shown in FIG.
- the terminal interface switching device of this embodiment may be referred to FIG. 8 , including: a gesture detection module 40 configured to detect a gesture; and a gesture execution module 50 configured to detect the first screen and the second at the gesture detection module When the gestures of the opposite sliding are simultaneously performed on the screen, the display contents of the first screen and the second screen are switched.
- the gesture execution module 50 is configured to switch between the first screen and the second screen when the gesture detection module detects a gesture motion that simultaneously slides toward the first screen and the second screen. Displaying the display layout of the interface of the dual screen display and redrawing the display content of the first screen and the second screen to switch the display content of the first screen and the second screen.
- the terminal provided in this embodiment may also refer to FIG. 3.
- the terminal 30 includes a memory 31, a processor 32, and a computer program stored on the memory 31 and operable on the processor 32. When the processor 32 executes the computer program, any method provided by the embodiment is implemented. .
- the embodiment further provides a computer readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor, any method provided by the embodiment is implemented.
- the method for moving the terminal interface in this embodiment includes: Step 310: detecting an action of a gesture, wherein the action of the gesture includes simultaneously performing a direction from the first screen to the second screen on two screens. The action of sliding to the same side; step 320, moving the display content of the first screen to the second screen display.
- step 310 it is necessary to detect whether the two screens are simultaneously slid to the same side.
- the first screen and the second screen in the definition of the second gesture are not fixed screens, but are associated with the sliding direction, when the first screen and the second screen are arranged side by side, If the fingers on the left and right screens slide from left to right, the left screen is the first screen and the right screen is the second screen. If the fingers on the left and right screens slide from right to left, the right screen The first screen is the first screen and the left screen is the second screen.
- the detection method in the related art can be adopted, and only one example is given here.
- the two screens have their own coordinate system xOy, and the first screen (such as the left screen in Figure 11) slides the finger from P 1 (x 1 , y 1 ) to P' 1 (x' 1 , y ' 1 ), the moving speed is v 1 ; at the same time the second screen (such as the right screen in Figure 11) slides the finger from P 2 (x 2 , y 2 ) to P' 2 (x' 2 , y' 2 ), the moving speed For v 2 . It is also defined that the x-axis moving distance is greater than D, and the moving speed absolute value is greater than V. Then, the judgment condition of whether there is an action of the second gesture on the two screens can be defined as the following inequality group:
- the inequality group (2-1) is used to determine whether there is a left-to-left sliding motion on the two screens, and the inequality (2-2) is used to determine whether there is a right-to-left sliding motion on the two screens, as long as the above is satisfied.
- One of the inequalities that is, the action of detecting the second gesture.
- step 320 the display content of the first screen needs to be moved to the second screen display.
- the foreground application of the first screen such as the left screen in FIG. 12
- the foreground application of the second screen (right screen in FIG. 12) is application B
- there is a paused application D in the background Normally, after the application A is terminated by the return operation on the first screen, the application C is displayed to the foreground. Similarly, after the application B is ended by the return operation on the second screen, the application D is displayed to the foreground.
- the application change means the change of the corresponding task stack of the application.
- the foreground application of the first screen is application A
- the background application is application C
- the two applications respectively correspond to two task stacks, namely task stacks 1 and 2, wherein task stack 1 is a foreground task.
- the stack contains interface components activity1 (interface component 1), activity2 (interface component 2), and activity3 (interface component 3).
- Task stack 2 is a background task stack, which includes interface components activity4 (interface component 4), activity5 (interface component 5), and activity6 (interface component 6).
- the foreground application of the second screen is that the application B corresponds to the foreground task stack 3, the background application is the application D corresponding to the background task stack 4, and the task stack 3 includes the interface components activity7 (interface component 7), activity8 (interface component 8), and activity9 (interface Component 9).
- the task stack 4 includes interface components activity 10 (interface component 10), activity 11 (interface component 11), and activity 12 (interface component 12).
- the terminal changes the foreground task stack of the first screen to the foreground task stack of the second screen.
- the foreground task stack of the second screen is the task stack 1.
- the terminal changes the background task stack of the first screen to the foreground task stack of the first screen, and changes the foreground task stack of the second screen to the background task stack of the second screen.
- the foreground task stack of the first screen is Task stack 2
- the second screen has two background task stacks, namely task stack 3 and task stack 4. Finally, redraw the display content of the two screens to complete the movement of the dual-screen display content. If there are multiple background applications on the first screen, you can determine which background application to change to the foreground application according to the principle of last in, first out.
- the embodiment moves the display content of the first screen to the second screen display, and should not be understood as detecting the second gesture in any case.
- the potential does not move the display content of the first screen to the second screen display.
- the interaction processing after detecting the second gesture should be understood as being applicable to scenes other than the restriction conditions.
- the embodiment also provides a terminal interface mobile device.
- the module can be seen in FIG. 8 and includes:
- the gesture detection module 40 is configured to detect an action of the gesture
- the gesture execution module 50 is configured to display the display content of the first screen when the gesture detection module detects a gesture motion of sliding to the same side from the first screen to the second screen simultaneously on the two screens. Move to the second screen display.
- the gesture execution module 50 is configured to: when the gesture detection module detects a gesture motion that slides from the first screen to the second screen simultaneously on the two screens, Changing the foreground application of the first screen to the foreground application of the second screen and redrawing the display content of the first screen and the second screen to move the display content of the first screen to the second Screen display.
- the gesture execution module 50 is further configured to: after the gesture detection module detects the gesture action, change the background application of the first screen to the foreground application of the first screen, and The foreground application of the second screen is changed to the background application of the second screen.
- the terminal provided in this embodiment may also refer to FIG. 3.
- the terminal 30 includes a memory 31, a processor 32, and a computer program stored on the memory 31 and operable on the processor 32. When the processor 32 executes the computer program, any method provided by the embodiment is implemented. .
- the embodiment further provides a computer readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor, any method provided by the embodiment is implemented.
- the display content of one screen can be moved to another screen display by a simple gesture, thereby improving the user experience.
- the above embodiment can also be used in terminals of more than three screens for implementing display content switching of any two screens.
- a physically independent dual-screen terminal can simultaneously detect the touch actions of the two screens, and when the gesture action based on the dual-screen definition is detected, the switching or moving of the two screen interfaces is implemented.
- the interactive action enriches the interaction mode of the dual-screen terminal and improves the user experience.
- Such software may be distributed on a computer readable medium, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
- computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media.
- Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer.
- communication media typically includes computer readable instructions, data structures, program modules or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
- the embodiment of the invention can realize the simultaneous detection of the touch actions of the two screens by the physically independent dual-screen terminal, and realize the interaction between the two screen interfaces when detecting the gesture action based on the dual-screen definition, enriching the dual-screen terminal.
- the interactive way enhances the user experience.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computer Graphics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
一种终端界面切换、手势处理的方法、装置及终端,终端检测到在第一屏和第二屏上同时进行相向滑动的动作时,切换第一屏和第二屏的显示内容。在检测到两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的动作时,将第一屏的显示内容移动到第二屏显示。
Description
本申请涉及终端技术领域,例如涉及一种终端界面切换、移动、手势处理的方法、装置及终端。
经过多年的快速发展,终端(如智能手机)的触控技术已相当成熟了。从电阻屏发展到电容屏,再到压力屏等,有关终端屏幕触控的新技术不断的涌现出来,为用户带来了越来越好的操作体验。
随着终端技术的快速发展与部件成本的下降,有2块物理独立屏幕的双屏终端如双屏手机将成为流行的趋势。双屏手机可以使手机能够适应更多的使用场景,并更加便于携带,相对单屏手机会带来更好的用户体验效果。本申请中,有时将屏幕简称为屏。
本申请的发明人经研究发现,终端触控技术大多是基于单屏终端而设计,针对双屏终端特有的交互体验方式仍然存在不足。
因而,基于双屏终端与单屏终端结构上的差别,对触控操作提出了更高的要求,如何针对双屏终端的特点,有针对性的提出新的触控操作技术,将是一个崭新的研究课题。
发明内容
本发明实施例提供了一种终端界面切换的方法,包括:
检测到一手势的动作,其中,该手势的动作包括在第一屏和第二屏上同时进行相向滑动的动作;
切换所述第一屏和第二屏的显示内容。
本发明实施例还提供了一种终端界面移动的方法,包括:
检测到一手势的动作,其中,该手势的动作包括在两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的动作;
将所述第一屏的显示内容移动到所述第二屏显示。
本发明实施例还提供了一种终端界面切换装置,包括:
手势检测模块,设置为检测手势的动作;
手势执行模块,设置为在所述手势检测模块检测到在第一屏和第二屏上同时进行相向滑动的手势动作时,切换所述第一屏和第二屏的显示内容。
本发明实施例还提供了一种终端界面移动装置,包括:
手势检测模块,设置为检测手势的动作;
手势执行模块,设置为在所述手势检测模块检测到在两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的手势动作时,将所述第一屏的显示内容移动到所述第二屏显示。
本发明实施例还提供了一种终端,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上所述的任意一种终端界面切换或移动方法。
本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的任意一种终端界面切换或移动方法。
上述终端界面切换或移动的实施例方案,使得用户可以方便的进行屏幕内容的切换或移动,可以有效提升交互体验。
本发明实施例还提供了一种终端手势处理的方法,包括:
监听两个屏上的触摸事件;
根据监听到的所述触摸事件,确定所述两个屏上进行的触摸动作是一手势的动作,并执行该手势的交互处理。
本发明实施例还提供了一种终端手势处理装置,包括
触摸监听模块,设置为监听两个屏上的触摸事件并上报;
手势处理模块,设置为根据所述触摸监听模块上报的所述触摸事件,确定所述两个屏上进行的触摸动作是一手势的动作,并执行该手势的交互处理。
本发明实施例还提供了一种终端,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上所述的任意一种终端手势处理方法。
本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的任意一种终端手势处理的方法。
上述终端手势处理的实施例方案,使得终端可以响应用户在两个屏幕上的手势动作,有效提升交互体验。
图1是本发明实施例提供的一种终端手势处理方法的流程图;
图2是本发明实施例提供的一种终端手势处理装置的模块图;
图3是本发明实施例提供的一种终端的结构示意图;
图4是本发明实施例提供的一种终端界面切换方法的流程图;
图5是本发明实施例提供的一个示例性的第一手势的动作的示意图;
图6是本发明实施例提供的一种根据第一手势切换双屏前台应用的示意图;
图7是本发明实施例提供的一种根据第一手势切换双屏前台应用栈的示意图;
图8是本发明实施例提供的一种终端界面切换装置的模块图;
图9是本发明实施例提供的一种根据第一手势切换双屏显示界面的显示布局的示意图;
图10是本发明实施例提供的一种终端界面移动方法的流程图;
图11是本发明实施例提供的一个示例性的第二手势的动作的示意图;
图12是本发明实施例提供的一种根据第二手势,通过变更应用实现终端界面移动的示意图;
图13是本发明实施例提供的一种根据第二手势变更任务栈示意图。
下文中将结合附图对本发明的实施例进行说明。
实施例一
本实施例提出一种终端手势处理的方法,如图1所示,本实施例提供的方法包括:步骤110,监听两个屏上的触摸事件;步骤120,根据监听到的所述触摸事件,确定所述两个屏上进行的触摸动作是一手势的动作,并执行该手势的 交互处理。
对于支持多点触摸的终端,比如Android手机,手指在屏幕上进行触摸操作,一般会生成如下事件:
ACTION_DOWN,表示手指开始触摸;
ACTION_MOVE,表示手指在移动;
ACTION_UP,表示手指抬起;
ACTION_MOVE会随着手指的移动多次触发。不同事件之间对同一个触摸点的追踪是通过手指标识(PointID)来实现的,PointId在手指按下时产生,手指抬起或者事件被取消后消失。
为了支持多点触控,还有如下事件被引入:
ACTION_POINTER_DOWN,表示又有一根手指按下了;
ACTION_POINTER_UP,表示在还有手指按下的情况下,有手指抬起了;
通过监控以上事件,可以实现诸如通过双指捏合进行缩放等操作,但是这仅仅限于具有单个物理屏的手机。相关技术中缺少可针对双屏同时发生的触控事件的处理技术,对于拥有2个独立物理屏的双屏终端来说,通过上述事件,无法同时监控双屏触摸动作并实现相应交互操作,因此,拥有2个独立物理屏的双屏终端可分别显示不同应用或显示同一应用的不同显示内容,但缺乏便捷的交互方式让用户较方便地切换两个屏的显示内容。
本实施例引入以下事件:
ACTION_2TP(Touch Panel:触控屏)_POINTER_DOWN,表示在一个屏有触摸动作的同时,另一个屏有手指按下的事件。
ACTION_2TP_POINTER_UP,表示在一个屏有触摸动作(即触摸未释放)的同时,另一个屏有手指抬起的事件。
再结合已有的事件,就可以同时监控两块屏幕上的触摸动作并实时做出反应。“一个屏有触摸动作”,有时也可以描述为“一个屏有手指按下”,表示的是一个屏有手指按下后还未抬起的状态。
在一个示例中,一个触摸事件可以用一个32位的int类型的数值来定义,其中最低8位(0x000000ff)用来表示事件类型,次8位(0x0000ff00)用来表示事件编号,也就是用于区分是哪根手指的。利用这一点,可以定义扩展出的2个新 触摸事件的编码。
标准的事件定义如下:
| 触摸事件 | 详细定义 |
| ACTION_DOWN | 0x00000000 |
| ACTION_POINTER_DOWN | 0x00000005 |
| ACTION_POINTER_UP | 0x00000006 |
| ACTION_2TP_POINTER_DOWN | 0x00000020 |
| ACTION_2TP_POINTER_UP | 0x00000021 |
加入事件编号(手指索引)信息后的事件定义如下:
以上表中略去了ACTION_MOVE和ACTION_UP两个事件的编码。在加入手指索引后的编码中,0x00000120表示在一个屏(也可称为第一个屏)有触摸动作的同时,另一个屏(也可称为第二个屏)第一根手指按下的事件,0x00000121表示在一个屏有触摸动作的同时,另一个屏第一根手指抬起的事件。还可以进一步定义0x00000220,0x00000221来表示另一个屏第二根手指的触摸事件,0x00000320,0x00000321表示第二个屏第三根手指的触摸事件。从而扩展出更多的触摸事件,完成更复杂手势识别。
以上编码仅仅是示例性的,容易理解的是,可以采用其他编码方式,只要 能够识别不同的触摸事件就可以。
基于以上事件定义,本实施例引入如下的手势及交互处理:
第一手势:在第一屏和第二屏上同时进行相向滑动的动作。此处所说的相向滑动的动作,在第一屏和第二屏呈左右排列时,即指左屏上有手指向右滑动的动作同时右屏上有手指向左滑动的动作。如果终端检测到第一手势的动作,则切换所述第一屏和第二屏的显示内容。
第二手势:在两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的动作。此处所说的第一屏和第二屏并不是固定的哪个屏,而是与滑动方向关联,在第一屏和第二屏呈左右排列时,如果左屏和右屏上的手指均从左向右滑动,则左屏为第一屏而右屏为第二屏,如果左屏和右屏上的手指均从右向左滑动,则右屏为第一屏而左屏为第二屏。如果终端检测到第二手势的动作,则将所述第一屏的显示内容移动到所述第二屏显示。
本实施例还提供一种终端手势处理装置,如图2所示,本实施例提供的装置包括:
触摸监听模块10,设置为监听两个屏上的触摸事件并上报;
手势处理模块20,设置为根据所述触摸监听模块上报的所述触摸事件,确定所述两个屏上进行的触摸动作是一手势的动作,并执行该手势的交互处理。
本实施例中,所述触摸监听模块10监听的所述两个屏上的触摸事件包括以下事件至少之一:表示在一个屏有触摸动作的同时,另一个屏有手指按下的事件;和,表示在一个屏有触摸动作的同时,另一个屏有手指抬起的事件。
本实施例中,手势处理模块10是设置为:
根据所述触摸监听模块上报的所述触摸事件,在确定所述两个屏上进行的触摸动作是在第一屏和第二屏上同时进行相向滑动的动作的情况下,切换所述第一屏和第二屏的显示内容;或
根据所述触摸监听模块上报的所述触摸事件,在确定所述两个屏上进行的触摸动作是在两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的动作的情况下,将所述第一屏的显示内容移动到所述第二屏显示。
图3为本实施例提供的一种终端的结构示意图。如图3所示,本实施例提供的终端30包括存储器31、处理器32及存储在所述存储器31上并可在所述处 理器32上运行的计算机程序,所述处理器32执行所述计算机程序时实现本实施例的任意方法。本实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现本实施例的任意方法。
本实施例终端手势处理的方案,使得终端可以响应用户在两个屏幕上的手势动作,有效提升交互体验。
实施例二
本实施例提出一种进行终端界面切换的方法和装置。
本实施例终端界面切换的方法如图4所示,包括:步骤210,检测到第一手势的动作,其中,所述第一手势的动作包括在第一屏和第二屏上同时进行相向滑动的动作;步骤220,切换所述第一屏和第二屏的显示内容。
在步骤210中要检测在第一屏和第二屏上同时进行相向滑动的动作,例如左屏上有手指向右滑动的动作同时右屏上有手指向左滑动的动作。下面给出一个检测的示例,但本申请并不局限于该示例,对于某一个屏上是否存在手指向某一侧的滑动动作,可以采用相关技术中的其他检测方式。
下面我们看看同时检测到两个屏幕上相反方向的滑动动作如何实现。如图5所示,双屏终端如双屏手机具有2块独立的物理屏幕,通过转轴可以折叠和展开,展开后可拼接成一个大显示屏。双屏终端监听到ACTION_DOWN触摸事件后,可以得知此时左屏有一个触摸点P1按下了,如果再监听到ACTION_2TP_POINTER_DOWN触摸事件,可以得知此时右屏又有一个触摸点P2按下了。
两个屏幕分别有自己的坐标系xOy,左屏手指从P
1(x
1,y
1)滑动到P′
1(x′
1,y′
1),同时右屏手指从P
2(x
2,y
2)滑动到P′
2(x′
2,y′
2),如果符合第一手势定义的动作,即左屏上的手指向右滑动而右屏上的手指向左滑动,需要满足如下条件:
由于手指微弱的抖动可能会使得上述条件满足,从而产生误判。所以,本示例加入防抖余量来进行控制:定义x轴方向的移动距离大于阈值D(如300像素),手指滑动才有效。这样不等式组(1-1)就演变为:
上述条件中还可以加入x轴方向移动速度的要求:定义x轴方向的移动速度绝对值大于阈值V(如400像素/秒),手指滑动才有效。第一屏手指从P
1(x
1,y
1)滑动到P′
1(x′
1,y′
1)的移动速度为v
1,第二屏手指从P
2(x
2,y
2)滑动到P′
2(x′
2,y′
2)的移动速度为v
2。
这样不等式组(1-2)就演变为:
如果获取的两个屏上的触摸动作满足不等式组(1-3),则可以确定检测到第一手势的动作。
在步骤220中要切换第一屏和第二屏的显示内容,一般的单屏手机通常是通过一个前台任务栈来管理界面的显示顺序。双屏终端因为要同时显示两屏内容,因此,双屏终端可以被设计为双前台任务栈,每一个前台任务栈负责管理一个屏的内容显示。当双屏终端检测到第一手势的动作时,双屏终端执行双前台任务栈的交换,来切换第一屏和第二屏的显示内容。
下面给出一个示例性的实现方法。以Android系统为例,一个应用(APP:application software)的交互界面是由若干个界面组件(activity)组成的,一个界面对应一个activity,不同activity之间的相互调用就构成了完整的交互流程。任务栈(task)用来存储和管理这些activity。它的特点是后进先出,当前显示的activity永远处于栈顶位置,其余activity则会根据调用的先后顺序被压入栈中。基于任务栈,可以实现一个界面到另外一个界面的跳转和后退。通常一个应用对应一个任务栈。哪个应用被切换到前台,那么该应用对应的任务栈就成了前台任务栈,被切换到后台的应用对应的任务栈就变成了后台任务栈。
如图6、图7所示,在本示例中,假定在初始状态下,第一屏(例如图6中的左屏)的前台应用是应用A,第二屏(例如图6中的右屏)的前台应用是应用B。应用A对应的前台任务栈为图7中的任务栈1,存储的界面组件包括activity1(界面组件1),activity2(界面组件2),以及activity3(界面组件3),应用B对应的前台任务栈为图7中的任务栈2,存储的界面组件包括activity4(界面组件4),activity5(界面组件5),以及activity6(界面组件6)。当检测到第一手势的动作时,切换第一屏和第二屏的前台应用也即交换第一屏和第二屏的前台任务栈,切换后,第一屏的前台应用变为应用B(这意味着第一屏的前台任 务栈变成栈2),第二屏的前台应用变为应用A(这意味着第二屏的前台任务栈变成任务栈1);重新绘制两个屏幕的显示内容,即可实现第一屏和第二屏的显示内容的切换。
需要说明的是,本实施例在检测到第一手势时,切换所述第一屏和第二屏的显示内容。这并不意味着只有第一手势可以切换所述第一屏和第二屏的显示内容,为了满足不同的使用习惯,也可以再定义其他的手势,来实现所述第一屏和第二屏的显示内容的切换。
此外,本实施例在检测到第一手势时,切换所述第一屏和第二屏的显示内容,并不应理解为在任何情况下检测到第一手势时,都切换所述第一屏和第二屏的显示内容。例如,当第一屏和第二屏中有一个屏或两个屏的前台应用是桌面(Launcher)时,终端可以不进行两个屏幕显示内容的切换。也就是说,对于第一屏和第二屏显示内容的切换,终端配置信息中或者用户可以设置一些限制条件来限制切换,如果当前场景符合这些限制条件即属于被限制切换的场景,则即使检测到第一手势也不进行双屏显示内容的切换。因而本申请在检测到第一手势时切换所述第一屏和第二屏的显示内容,应理解为除被限制切换的场景之外,在其他场景下可以实现第一屏和第二屏的显示内容的切换。
本实施例还提供了一种终端界面切换装置,如图8所示,包括:
手势检测模块40,设置为检测手势的动作;
手势执行模块50,设置为在所述手势检测模块检测到在第一屏和第二屏上同时进行相向滑动的手势动作时,切换所述第一屏和第二屏的显示内容。
本实施例中,所述手势执行模块50是设置为:在所述手势检测模块检测到在第一屏和第二屏上同时进行相向滑动的手势动作时,切换所述第一屏和第二屏的前台应用并重绘所述第一屏和第二屏的显示内容,以实现切换所述第一屏和第二屏的显示内容。
本实施例还提供了一种终端,本实施例提供的终端也可以参考图3所示。终端30包括存储器31、处理器32及存储在所述存储器31上并可在所述处理器32上运行的计算机程序,所述处理器32执行所述计算机程序时实现本实施例提供的任意方法。
本实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现本实施例提供的任意方法。
通过本实施例的上述方案,可以通过简单的手势移动实现交换两个屏幕的显示内容,提升用户体验。
实施例三
本实施例提出另一种终端界面切换的方法和装置。
实施例二中检测到第一手势的动作时,通过切换第一屏和第二屏的前台应用并重绘第一屏和第二屏的显示内容,来实现第一屏和第二屏显示内容的交换。这适用于第一屏和第二屏分别显示不同应用的场景。本实施例则是针对一个应用的显示界面占用了两个屏幕时,如果检测到第一手势,如何切换两个屏幕的显示内容。
如图9所示,应用A的某一界面被设计为双屏显示,通过第一手势的动作,即在第一屏和第二屏进行相向滑动的触摸动作,然后两个屏幕上的显示内容交换位置显示。比如,默认情况下把图库应用设计为第一屏显示缩略图,第二屏显示焦点图片的放大图。但是用户在实际体验中,可能出于习惯或其他原因想把放大图放到第一屏显示,这个时候只需要一个简单的手势动作,就可以轻松实现界面的交换。
本实施例的终端界面切换方法是通过切换在所述第一屏和第二屏上进行双屏显示的界面的显示布局并重绘所述第一屏和第二屏的显示内容,实现切换所述第一屏和第二屏的显示内容。
一个界面组件(Activity)对应的界面如何显示,是靠它的布局文件来定义的,一般一个Activity对应一个布局文件。本实施例中可以对Activity进行双布局设计,即需要设计2个布局文件Layout1,Layout2,对应一个显示界面的两种显示布局,其中一个作为默认情况下加载的布局文件。需要说明的是,本实施例并不要求所有的Activity都具有两种显示布局。例如,可以针对第一屏和第二屏对应不同类型的显示内容的部分界面做双布局设计,比如第一屏显示缩略图,第二屏显示放大图;或者第一屏显示列表,第二屏显示详细内容等等。基于上述原因,在一个应用的显示界面占用了两个屏幕的场景下,本申请也不要求检 测到第一手势时必须做双屏显示内容的切换。
本实施例可以采用实施例二中的方法来检测第一手势,当检测到第一手势时,如果此时进行双屏显示的界面使用Layout1布局,则重新加载Layout2并重绘双屏的显示内容。如果此时该界面使用Layout2布局,则重新加载Layout1并重绘双屏的显示内容,就能实现图9所示的双屏显示内容切换的效果。
本实施例的终端界面切换装置可参见图8,包括:手势检测模块40,设置为检测手势的动作;及手势执行模块50,设置为在所述手势检测模块检测到在第一屏和第二屏上同时进行相向滑动的手势动作时,切换所述第一屏和第二屏的显示内容。
在一实施例中,手势执行模块50是设置为在所述手势检测模块检测到在第一屏和第二屏上同时进行相向滑动的手势动作时,切换在所述第一屏和第二屏上进行双屏显示的界面的显示布局并重绘所述第一屏和第二屏的显示内容,以实现切换所述第一屏和第二屏的显示内容。
本实施例还提供了一种终端,本实施例提供的终端也可以参考图3所示。终端30包括存储器31、处理器32及存储在所述存储器31上并可在所述处理器32上运行的计算机程序,所述处理器32执行所述计算机程序时实现本实施例提供的任意方法。
本实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现本实施例提供的任意方法。
实施例四
本实施例提出一种进行终端界面移动的方法和装置。本实施例终端界面移动的方法如图10所示,包括:步骤310,检测到一手势的动作,其中,所述手势的动作包括在两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的动作;步骤320,将所述第一屏的显示内容移动到所述第二屏显示。
在步骤310中,需要检测两个屏上是否同时进行了向同侧滑动的动作。如上文所述,对第二手势的定义中所说的第一屏和第二屏并不是固定的哪个屏,而是与滑动方向关联,在第一屏和第二屏呈左右排列时,如果左屏和右屏上的手指均从左向右滑动,则左屏为第一屏而右屏为第二屏,如果左屏和右屏上的 手指均从右向左滑动,则右屏为第一屏而左屏为第二屏。对于某一个屏上是否存在手指向某一侧的滑动动作,可以采用相关技术中的检测方式,这里仅仅给出一个示例。
如图11所示,两个屏幕分别有自己的坐标系xOy,第一屏(如图11中左屏)手指从P
1(x
1,y
1)滑动到P′
1(x′
1,y′
1),移动速度为v
1;同时第二屏(如图11中右屏)手指从P
2(x
2,y
2)滑动到P′
2(x′
2,y′
2),移动速度为v
2。同样定义x轴移动距离大于D,移动速度绝对值大于V。那么两个屏上是否存在第二手势的动作的判断条件可以定义为如下不等式组:
不等式组(2-1)用于判断两个屏上是否存在从左向右的滑动动作,不等式(2-2)用于判断两个屏上是否存在从右向左的滑动动作,只要满足以上不等式组中的一个,即检测到第二手势的动作。
在步骤320中,需要将第一屏的显示内容移动到第二屏显示。如图12、图13所示,假定在初始状态下(做第二手势之前),第一屏(如图12中左屏)的前台应用为应用A,且后台还有一个暂停的应用C。第二屏(如图12中右屏)的前台应用为应用B,且后台还有一个暂停的应用D。正常情况下,在第一屏上通过返回操作结束应用A后,则应用C会显示到前台。同样,在第二屏上通过返回操作结束应用B后,则应用D会显示到前台。如果检测到第二手势的动作,则将第一屏的前台应用变更为第二屏的前台应用并重绘第一屏和第二屏的显示内容,以实现将所述第一屏的显示内容移动到所述第二屏显示。本实施例还将第一屏的后台应用变更为第一屏的前台应用,将第二屏的前台应用变更为第二屏的后台应用。和实施例二相同的,应用的变更意味着应用对应的任务栈的变更。
上述将第一屏的前台应用变更为第二屏的前台应用,以及前台应用和后台应用之间的变更,将通过以下的示例予以说明。如图13所示,在初始状态下, 第一屏的前台应用为应用A,后台应用为应用C,两个应用分别对应两个任务栈即任务栈1和2,其中任务栈1为前台任务栈,包含界面组件activity1(界面组件1),activity2(界面组件2),以及activity3(界面组件3)。任务栈2为后台任务栈,包含界面组件activity4(界面组件4),activity5(界面组件5),以及activity6(界面组件6)。第二屏的前台应用即应用B对应前台任务栈3,后台应用即应用D对应后台任务栈4,任务栈3包含界面组件activity7(界面组件7),activity8(界面组件8),以及activity9(界面组件9)。任务栈4包含界面组件activity10(界面组件10),activity11(界面组件11),以及activity12(界面组件12)。
当检测到第二手势的动作时,终端将第一屏的前台任务栈变更为第二屏的前台任务栈,变更后,第二屏的前台任务栈为任务栈1。同时,终端将第一屏的后台任务栈变更为第一屏的前台任务栈,将第二屏的前台任务栈变更为第二屏的后台任务栈,变更后,第一屏的前台任务栈为任务栈2,第二屏的后台任务栈有两个,即任务栈3和任务栈4。最后,重绘两个屏幕的显示内容,即可完成双屏显示内容的移动动作。如果第一屏的后台应用有多个时,可以按照后进先出的原则确定将哪一个后台应用变更为前台应用。
与实施例二类似的,本实施例在检测到第二手势时,将第一屏的显示内容移动到第二屏显示,也不应理解为在任何情况下检测到第二手势,都将第一屏的显示内容移动到第二屏显示。例如,如果第一屏只启动了一个应用如桌面,那么第一屏只有前台任务栈,没有后台任务栈,在这种情况下可以限制显示内容的移动,也就是说,即使检测到第二手势,也不将第一屏的显示内容移动到第二屏显示。终端配置信息中或者用户可以设置一些限制条件来限制显示内容的移动。因而检测到第二手势后的交互处理,应理解为适用于除限制条件之外的场景。
本实施例还提供了一种终端界面移动装置,其模块可参见图8,包括:
手势检测模块40,设置为检测手势的动作;
手势执行模块50,设置为在所述手势检测模块检测到在两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的手势动作时,将所述第一屏的显示内容移动到所述第二屏显示。
本实施例中,所述手势执行模块50是设置为:在所述手势检测模块检测到在两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的手势动作时,将所述第一屏的前台应用变更为所述第二屏的前台应用并重绘所述第一屏和第二屏的显示内容,以实现将所述第一屏的显示内容移动到所述第二屏显示。
本实施例中,所述手势执行模块50还设置为:在所述手势检测模块检测到所述手势动作之后,将所述第一屏的后台应用变更为所述第一屏的前台应用,将所述第二屏的前台应用变更为所述第二屏的后台应用。
本实施例还提供了一种终端,本实施例提供的终端也可以参考图3所示。终端30包括存储器31、处理器32及存储在所述存储器31上并可在所述处理器32上运行的计算机程序,所述处理器32执行所述计算机程序时实现本实施例提供的任意方法。
本实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现本实施例提供的任意方法。
通过本实施例的上述方案,可以通过简单的手势实现将一个屏幕的显示内容移动到另一个屏幕显示,提升用户体验。
以上实施例也可用于3个以上屏幕的终端中,用于实现任意两个屏的显示内容切换。
通过本申请上述实施例的方案,可以实现物理上独立的双屏终端同时检测两个屏的触摸动作,并在检测到基于双屏定义的手势动作时,实现两个屏界面的切换或移动等交互动作,丰富了双屏终端的交互方式,提升了用户体验。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布 在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
本发明实施例可以实现物理上独立的双屏终端同时检测两个屏的触摸动作,并在检测到基于双屏定义的手势动作时,实现两个屏界面的交互动作,丰富了双屏终端的交互方式,提升了用户体验。
Claims (18)
- 一种终端手势处理的方法,包括:监听两个屏上的触摸事件;根据监听到的所述触摸事件,确定所述两个屏上进行的触摸动作是一手势的动作,并执行该手势的交互处理。
- 如权利要求1所述的方法,其中:所述两个屏上的触摸事件包括以下事件至少之一:表示在一个屏有触摸动作的同时,另一个屏有手指按下的事件;和表示在一个屏有触摸动作的同时,另一个屏有手指抬起的事件。
- 如权利要求1所述的方法,其中:所述确定所述两个屏上进行的触摸动作是一手势的动作,并执行该手势的交互处理,包括:在确定所述两个屏上进行的触摸动作是在第一屏和第二屏上同时进行相向滑动的动作的情况下,切换所述第一屏和第二屏的显示内容;或在确定所述两个屏上进行的触摸动作是在两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的动作的情况下,将所述第一屏的显示内容移动到所述第二屏显示。
- 一种终端界面切换的方法,包括:检测到一手势的动作,其中,所述手势的动作包括在第一屏和第二屏上同时进行相向滑动的动作;切换所述第一屏和第二屏的显示内容。
- 如权利要求4所述的方法,其中:切换所述第一屏和第二屏的显示内容,包括:切换所述第一屏和第二屏的前台应用并重绘所述第一屏和第二屏的显示内容,以实现切换所述第一屏和第二屏的显示内容。
- 如权利要求4所述的方法,其中:切换所述第一屏和第二屏的显示内容,包括:切换在所述第一屏和第二屏上进行双屏显示的界面的显示布局并重绘所述第一屏和第二屏的显示内容,以实现切换所述第一屏和第二屏的显示内容。
- 一种终端界面移动的方法,包括:检测到一手势的动作,其中,所述手势的动作包括在两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的动作;将所述第一屏的显示内容移动到所述第二屏显示。
- 如权利要求7所述的方法,其中:将所述第一屏的显示内容移动到所述第二屏显示,包括:通过将所述第一屏的前台应用变更为所述第二屏的前台应用并重绘所述第一屏和第二屏的显示内容,实现将所述第一屏的显示内容移动到所述第二屏显示。
- 如权利要求8所述的方法,其中:检测到该手势的动作之后,所述方法还包括:将所述第一屏的后台应用变更为所述第一屏的前台应用,将所述第二屏的前台应用变更为所述第二屏的后台应用。
- 一种终端手势处理装置,包括:触摸监听模块,设置为监听两个屏上的触摸事件并上报;手势处理模块,设置为根据所述触摸监听模块上报的所述触摸事件,确定所述两个屏上进行的触摸动作是一手势的动作,并执行该手势的交互处理。
- 如权利要求10所述的装置,其中:所述触摸监听模块监听的所述两个屏上的触摸事件包括以下事件至少之一:表示在一个屏有触摸动作的同时,另一个屏有手指按下的事件;和表示在一个屏有触摸动作的同时,另一个屏有手指抬起的事件。
- 如权利要求10或11所述的装置,其中,手势处理模块是设置为:根据所述触摸监听模块上报的所述触摸事件,在确定所述两个屏上进行的触摸动作是在第一屏和第二屏上同时进行相向滑动的动作的情况下,切换所述第一屏和第二屏的显示内容;或根据所述触摸监听模块上报的所述触摸事件,在确定所述两个屏上进行的触摸动作是在两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的动作的情况下,将所述第一屏的显示内容移动到所述第二屏显示。
- 一种终端界面切换装置,包括:手势检测模块,设置为检测手势的动作;手势执行模块,设置为在所述手势检测模块检测到在第一屏和第二屏上同时进行相向滑动的手势动作时,切换所述第一屏和第二屏的显示内容。
- 如权利要求13所述的装置,其中,所述手势执行模块是设置为::在所述手势检测模块检测到在第一屏和第二屏上同时进行相向滑动的手势动作时,切换所述第一屏和第二屏的前台应用并重绘所述第一屏和第二屏的显 示内容,以实现切换所述第一屏和第二屏的显示内容;或者在所述手势检测模块检测到在第一屏和第二屏上同时进行相向滑动的手势动作时,切换在所述第一屏和第二屏上进行双屏显示的界面的显示布局并重绘所述第一屏和第二屏的显示内容,以实现切换所述第一屏和第二屏的显示内容。
- 一种终端界面移动装置,包括:手势检测模块,设置为检测手势的动作;手势执行模块,设置为在所述手势检测模块检测到在两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的手势动作时,将所述第一屏的显示内容移动到所述第二屏显示。
- 如权利要求15所述的装置,其中,所述手势执行模块是设置为:在所述手势检测模块检测到在两个屏上同时进行从第一屏到第二屏方向的向同侧滑动的手势动作时,将所述第一屏的前台应用变更为所述第二屏的前台应用并重绘所述第一屏和第二屏的显示内容,以实现将所述第一屏的显示内容移动到所述第二屏显示;所述手势执行模块还设置为:在所述手势检测模块检测到所述手势动作之后,将所述第一屏的后台应用变更为所述第一屏的前台应用,将所述第二屏的前台应用变更为所述第二屏的后台应用。
- 一种终端,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如权利要求1至9中任一权项所述的方法。
- 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1至9中任一权项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710753319.5 | 2017-08-28 | ||
| CN201710753319.5A CN107678664A (zh) | 2017-08-28 | 2017-08-28 | 一种终端界面切换、手势处理的方法、装置及终端 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019041779A1 true WO2019041779A1 (zh) | 2019-03-07 |
Family
ID=61134756
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/078059 Ceased WO2019041779A1 (zh) | 2017-08-28 | 2018-03-05 | 终端界面切换、移动、手势处理的方法、装置及终端 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107678664A (zh) |
| WO (1) | WO2019041779A1 (zh) |
Families Citing this family (22)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107678664A (zh) * | 2017-08-28 | 2018-02-09 | 中兴通讯股份有限公司 | 一种终端界面切换、手势处理的方法、装置及终端 |
| CN108710477B (zh) * | 2018-02-25 | 2021-12-14 | 北京珠穆朗玛移动通信有限公司 | 显示方法、移动终端及存储介质 |
| CN108536357B (zh) * | 2018-04-19 | 2020-01-14 | Oppo广东移动通信有限公司 | 应用显示方法、装置、存储介质及电子设备 |
| CN108762645A (zh) * | 2018-05-18 | 2018-11-06 | Oppo广东移动通信有限公司 | 内容切换方法、装置、移动终端及存储介质 |
| CN108881617B (zh) * | 2018-05-24 | 2021-04-06 | 维沃移动通信有限公司 | 一种显示切换方法及移动终端 |
| CN108900695B (zh) * | 2018-05-29 | 2021-04-02 | 维沃移动通信有限公司 | 一种显示处理方法、终端设备及计算机可读存储介质 |
| CN108897486B (zh) * | 2018-06-28 | 2021-04-13 | 维沃移动通信有限公司 | 一种显示方法及终端设备 |
| CN108919955B (zh) * | 2018-07-02 | 2021-05-28 | 中北大学 | 一种基于多体感设备的虚拟沙画交互结合方法 |
| CN108984067B (zh) * | 2018-07-23 | 2021-01-08 | 维沃移动通信有限公司 | 一种显示控制方法及终端 |
| CN110858116A (zh) * | 2018-08-24 | 2020-03-03 | 深圳市布谷鸟科技有限公司 | 一种基于手势移动的屏幕交换的控制方法及终端 |
| CN109213416B (zh) * | 2018-08-31 | 2021-07-30 | 维沃移动通信有限公司 | 一种显示信息处理方法及移动终端 |
| CN109379484B (zh) | 2018-09-19 | 2020-09-25 | 维沃移动通信有限公司 | 一种信息处理方法及终端 |
| CN109597553A (zh) * | 2018-11-28 | 2019-04-09 | 维沃移动通信(杭州)有限公司 | 一种显示控制方法及终端 |
| CN109710130B (zh) * | 2018-12-27 | 2020-11-17 | 维沃移动通信有限公司 | 一种显示方法和终端 |
| CN109857307A (zh) * | 2019-01-08 | 2019-06-07 | 东软医疗系统股份有限公司 | 一种图像的显示交换方法、装置、电子设备及存储介质 |
| WO2020220154A1 (zh) * | 2019-04-28 | 2020-11-05 | 深圳市大疆创新科技有限公司 | 屏幕显示切换方法、显示设备、可移动平台 |
| CN111752430A (zh) * | 2020-06-03 | 2020-10-09 | 上海博泰悦臻电子设备制造有限公司 | 应用界面移动方法及相关设备 |
| CN114089902A (zh) * | 2020-07-30 | 2022-02-25 | 华为技术有限公司 | 手势交互方法、装置及终端设备 |
| CN112905004B (zh) * | 2021-01-21 | 2023-05-26 | 浙江吉利控股集团有限公司 | 一种用于车载显示屏的手势控制方法、装置和存储介质 |
| CN116302225A (zh) * | 2021-12-21 | 2023-06-23 | Oppo广东移动通信有限公司 | 应用分屏显示的方法、装置、终端设备及存储介质 |
| CN114995693B (zh) * | 2021-12-31 | 2023-03-31 | 荣耀终端有限公司 | 显示屏窗口切换方法及电子设备 |
| CN115964010A (zh) * | 2022-12-29 | 2023-04-14 | 维沃移动通信有限公司 | 显示方法、装置、电子设备及可读存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102147679A (zh) * | 2010-02-25 | 2011-08-10 | 微软公司 | 多屏幕保持并拖动手势 |
| CN103477314A (zh) * | 2011-02-10 | 2013-12-25 | 三星电子株式会社 | 具有至少两个触摸屏的信息显示装置及其信息显示方法 |
| US20140184526A1 (en) * | 2012-12-31 | 2014-07-03 | Lg Electronics Inc. | Method and apparatus for dual display |
| CN107678664A (zh) * | 2017-08-28 | 2018-02-09 | 中兴通讯股份有限公司 | 一种终端界面切换、手势处理的方法、装置及终端 |
-
2017
- 2017-08-28 CN CN201710753319.5A patent/CN107678664A/zh active Pending
-
2018
- 2018-03-05 WO PCT/CN2018/078059 patent/WO2019041779A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102147679A (zh) * | 2010-02-25 | 2011-08-10 | 微软公司 | 多屏幕保持并拖动手势 |
| CN103477314A (zh) * | 2011-02-10 | 2013-12-25 | 三星电子株式会社 | 具有至少两个触摸屏的信息显示装置及其信息显示方法 |
| US20140184526A1 (en) * | 2012-12-31 | 2014-07-03 | Lg Electronics Inc. | Method and apparatus for dual display |
| CN107678664A (zh) * | 2017-08-28 | 2018-02-09 | 中兴通讯股份有限公司 | 一种终端界面切换、手势处理的方法、装置及终端 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107678664A (zh) | 2018-02-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019041779A1 (zh) | 终端界面切换、移动、手势处理的方法、装置及终端 | |
| US11675618B2 (en) | Method and apparatus for switching tasks | |
| JP7114633B2 (ja) | 画面ミラーリング方法、装置、端末及び記憶媒体 | |
| CN106775313B (zh) | 分屏操作控制方法及移动终端 | |
| CN112947840B (zh) | 包括触敏显示器的电子装置及操作该电子装置的方法 | |
| KR101229699B1 (ko) | 애플리케이션 간의 콘텐츠 이동 방법 및 이를 실행하는 장치 | |
| EP4610850A1 (en) | Method and apparatus for content presentation, device, and storage medium | |
| CN108475172B (zh) | 一种信息展示方法、装置及终端设备 | |
| CN108829314A (zh) | 截图选区界面选择方法、装置、设备及存储介质 | |
| CN105183287A (zh) | 显示处理方法及电子设备 | |
| CN108984093A (zh) | 触控操作方法、装置、存储介质及电子设备 | |
| CN110442263A (zh) | 触控显示屏处理方法、装置、存储介质及电子设备 | |
| CN108614655A (zh) | 分屏显示方法、装置、存储介质及电子设备 | |
| CN108121493A (zh) | 显示控制方法及相关产品 | |
| CN108710457A (zh) | 一种交互方法及终端设备 | |
| CN113268182A (zh) | 应用图标的管理方法和电子设备 | |
| US8610682B1 (en) | Restricted carousel with built-in gesture customization | |
| CN105739771B (zh) | 一种显示界面管理方法、装置及终端 | |
| CN112269501A (zh) | 图标移动方法、装置及电子设备 | |
| CN111638828A (zh) | 界面显示方法及装置 | |
| US12014019B2 (en) | Display method, apparatus and computer readable storage medium | |
| CN112764862A (zh) | 应用程序的控制方法、装置及电子设备 | |
| CN117971367A (zh) | 内容显示方法、装置、电子设备及计算机可读介质 | |
| CN111782381B (zh) | 任务管理方法、装置、移动终端及存储介质 | |
| CN115079877B (zh) | 窗口控制方法、终端及存储介质 |
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: 18849632 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: 18849632 Country of ref document: EP Kind code of ref document: A1 |