WO2022267849A1 - 调整界面尺寸的方法、装置、终端、存储介质及程序产品 - Google Patents

调整界面尺寸的方法、装置、终端、存储介质及程序产品 Download PDF

Info

Publication number
WO2022267849A1
WO2022267849A1 PCT/CN2022/096652 CN2022096652W WO2022267849A1 WO 2022267849 A1 WO2022267849 A1 WO 2022267849A1 CN 2022096652 W CN2022096652 W CN 2022096652W WO 2022267849 A1 WO2022267849 A1 WO 2022267849A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
size
application interface
floating window
interface
Prior art date
Application number
PCT/CN2022/096652
Other languages
English (en)
French (fr)
Inventor
韦家柏
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2022267849A1 publication Critical patent/WO2022267849A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction 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/0488Interaction 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/04883Interaction 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular to a method, device, terminal, storage medium, and program product for adjusting the size of an interface.
  • mobile terminals can run applications supporting various functions.
  • the user interacts with the application through the application interface or the information provided by the application.
  • the mobile terminal when the mobile terminal receives an instruction to open an application, the mobile terminal can acquire a window size corresponding to the instruction, so as to create a window of a specified size for displaying an application interface. The user interacts with the application in this window, and the window can be closed after the interaction is completed.
  • Embodiments of the present application provide a method, device, terminal, and storage medium for adjusting an interface size. Described technical scheme is as follows:
  • a method for adjusting interface size comprising:
  • the multi-finger touch operation is a touch operation including at least three touch points;
  • the size of the application interface is adjusted according to the area ratio of the first area and the second area.
  • a device for adjusting the size of an interface includes:
  • the interface display module is used to display the application interface
  • the first determination module is configured to determine a first area formed by touch points in response to a multi-finger touch operation on the application interface, and the multi-finger touch operation is an area including at least three touch points touch operation;
  • a second determining module configured to determine a second area formed by the touch point in response to a change in the position of the touch point
  • a size adjustment module configured to adjust the size of the application interface according to the area ratio between the first area and the second area.
  • a terminal includes a processor and a memory, at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the Methods for resizing the interface provided by various aspects.
  • a computer-readable storage medium wherein at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to realize the adjustment interface provided by various aspects of the present application size method.
  • a computer program product comprising computer instructions stored in a computer readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method for adjusting the interface size provided in various optional implementation manners of the above aspects.
  • FIG. 1 is a schematic diagram showing an application interface
  • FIG. 2 is another schematic diagram showing an application interface
  • Fig. 3 is a flow chart of a method for adjusting interface size provided by an exemplary embodiment of the present application
  • Fig. 4 is a flowchart of a method for adjusting interface size provided by another exemplary embodiment of the present application.
  • Fig. 5 is a schematic diagram of a method for determining a second area provided by an embodiment of the present application.
  • Fig. 6 is a schematic diagram of a process for adjusting the interface size provided by the embodiment shown in Fig. 4;
  • Fig. 7 is a schematic diagram of a technical framework for adjusting interface size provided by the embodiment shown in Fig. 4;
  • Fig. 8 is a structural block diagram of a device for adjusting interface size provided by an exemplary embodiment of the present application.
  • Fig. 9 is a structural block diagram of a terminal provided by an exemplary embodiment of the present application.
  • the term “if” is optionally interpreted as “when,” “at,” “in response to determining,” or “in response to detecting,” depending on the context. Similarly, the phrase “if determined" or “if (the stated condition or event) is detected” or “in response to detecting (the stated condition or event)” depends on the context.
  • personally identifiable information is subject to privacy policies and practices that are recognized as meeting or exceeding industry or government requirements for maintaining user privacy.
  • personally identifiable information should be managed and processed to clearly explain the nature of authorized use to users, so as to minimize the risk of inadvertent or unauthorized access or use.
  • a mobile device with a touch screen may also be called a touch terminal.
  • the touch terminal if the user needs to start a certain application, the user only needs to click the start icon of the application.
  • the startup icon is located on the desktop, the notification bar, or one screen behind, the application can be directly displayed in full screen.
  • the launch icon if the launch icon is located in the sidebar or other floating sidebars, the application can be displayed in the form of a floating window.
  • FIG. 1 is a schematic diagram of a display application interface.
  • the terminal When the startup icon 110 of the application on the desktop is clicked, the terminal will display the application interface 120 of the application in full screen.
  • FIG. 2 is a schematic diagram of another display application interface.
  • the terminal When the start icon 110 of the application in the sidebar is clicked, the terminal will display the application interface 220 in the floating window 210 . It should be noted that the display area of the application interface 220 is smaller than the display area of the application interface 120 .
  • the size of the application interface has been determined when the application in the embodiment of the present application is opened.
  • the application interface will continue to maintain a full-screen size during the entire display process.
  • the application interface will continue to maintain the size of the floating window during the entire display process.
  • the terminal can only display the application interface in a window of a specified size, which leads to the situation that the application interface displayed in full screen cannot be quickly adjusted to a floating window of other sizes, and the application interface is displayed in the floating window, thus As a result, the efficiency of adjusting the display size of the application interface is low.
  • the embodiment of the present application provides a method for adjusting the size of the interface, which can enable the application interface in the touch terminal to be adjusted under multi-finger touch operation, so that the touch terminal obtains the ability to adjust the size of the application interface.
  • a multi-finger touch operation on the application interface determines a first area formed by touch points, where the multi-finger touch operation is a touch operation including at least three touch points;
  • the size of the application interface is adjusted.
  • display the application interface including:
  • the first size is the size of the full screen
  • adjust the size of the application interface including:
  • a floating window of the second size is created, and the ratio of the first size to the second size is equal to the area ratio;
  • the size of the application interface is adjusted to the second size, so that the application interface is displayed in the floating window.
  • create a floating window of a second size including:
  • display the application interface including:
  • adjust the size of the application interface including:
  • the floating window is reduced to a fourth size according to the area ratio, and the size of the application interface is adjusted to the fourth size, so that the application interface is displayed in the reduced floating window, the third size and the fourth size
  • the ratio of the four dimensions is equal to the area ratio; or
  • the floating window is enlarged to a fifth size according to the area ratio, and the size of the application interface is adjusted to the fifth size, so as to display the application interface in the enlarged floating window, the third size and the fifth size
  • the ratio of the five dimensions is equal to the area ratio.
  • enlarging the floating window according to the area ratio includes:
  • shrinking the floating window according to the area ratio includes:
  • determining the second area formed by the touch point includes:
  • a second area formed by the touch points is determined.
  • the method also includes:
  • the first area is a rectangular area
  • Determining a second area formed by touch points including:
  • any abscissa in the maximum abscissa and the minimum abscissa obtain four second vertices of the second region;
  • a rectangle surrounded by four second vertices is determined as a second area.
  • the method also includes:
  • FIG. 3 is a flowchart of a method for adjusting an interface size provided by an exemplary embodiment of the present application.
  • the method for adjusting the size of the interface can be applied to a touch terminal.
  • a terminal is used to represent a touch terminal to introduce the implementation process of the method for adjusting the size of the interface.
  • the methods for adjusting the size of the interface include:
  • Step 310 displaying the application interface.
  • the terminal can display the application interface on the touch screen.
  • the display manner may include full screen display and floating window display.
  • Full-screen display means that all application interfaces are displayed on the screen of the terminal.
  • full-screen display means that all application interfaces are displayed on one of the screens of the terminal.
  • full-screen display means that when the folding screen terminal is in the unfolded state, the terminal will display the application interface in the entire display area of the screen; when the folding screen terminal is in the folded state, the terminal The application interface will be displayed in the entire display area of the folded split screen.
  • full-screen display refers to displaying all application interfaces on the screen displayed by the scrolling screen terminal.
  • the floating window display means that a floating window is displayed on the touch screen, and the terminal displays an application interface in the floating window.
  • Step 320 Determine a first area formed by touch points in response to a multi-finger touch operation on the application interface, where the multi-finger touch operation is a touch operation including at least three touch points.
  • the touch screen in the terminal is capable of responding to multi-finger touch operations. That is, the terminal can separately recognize the touch data of each touch point in the multi-finger touch operation. Wherein, the touch data includes coordinates. In some possible implementation manners, the terminal can also identify the touch area of the touch point. In another possible implementation manner, if the touch screen is provided with a pressure sensor, the touch data can also include pressure data. In yet another possible implementation manner, if a temperature sensor (including an infrared sensor) is provided in the touch screen, the touch data can also include temperature.
  • a temperature sensor including an infrared sensor
  • the terminal can first identify whether the touch operation received in the application interface is a multi-finger touch operation.
  • the multi-finger touch operation may refer to that the pressing time between any two touch points is smaller than the interval threshold.
  • the interval threshold may be a time value such as 20 milliseconds, 50 milliseconds, or 100 milliseconds, which is not limited in this embodiment of the present application.
  • the multi-finger touch operation is a touch operation including at least three touch points. That is, the multi-finger touch operation shown in this application may be a three-finger touch operation, a four-finger touch operation or a five-finger touch operation. Since humans usually perform multi-finger operations with one hand. Therefore, the embodiment of the present application usually selects a three-finger touch operation, a four-finger touch operation or a five-finger touch operation as the multi-finger touch operation.
  • the terminal can also use six-finger touch operations to ten-finger touch operations as multi-finger touch operations.
  • six-finger touch operation to ten-finger touch operation as the multi-finger touch operation, most misoperations can be avoided, so that the functions of the application interface are not triggered by mistake.
  • the area is determined by touch points.
  • the first area is a closed polygon surrounded by vertices of each touch point.
  • the first area is a rectangular area, and the coordinates of the four vertices of the rectangular area are (minimum abscissa, maximum ordinate), (maximum abscissa, maximum ordinate), (minimum abscissa coordinates, minimum ordinate) and (maximum abscissa, minimum ordinate).
  • the maximum value points of the above-mentioned respective coordinates are the maximum values among the touch points.
  • the coordinates are (x1, y1), (x2, y2) and (x3, y3) respectively.
  • the terminal will determine the minimum value among x1, x2 and x3 as the minimum abscissa, and the maximum value among x1, x2 and x3 as the maximum abscissa.
  • the terminal determines the minimum value among y1, y2 and y3 as the minimum ordinate, and determines the maximum value among y1, y2 and y3 as the maximum ordinate.
  • Step 330 in response to changes in the positions of the touch points, determine a second area formed by the touch points.
  • the terminal when the position of the touch changes, the terminal can determine the second area formed by the touch points in the same way as determining the first area.
  • the second area is also a polygon surrounded by touch points as vertices. If the first area is a rectangle surrounded by vertices determined according to the maximum value of the touch point, then the second region is also a rectangle surrounded by vertices determined according to the maximum value of the touch point.
  • the terminal can continuously acquire the coordinates of the touch point according to a preset period. For example, if the period is 1 millisecond, the terminal can update the coordinates of the touch point once in 1 millisecond.
  • Step 340 adjusting the size of the application interface according to the area ratio of the first area and the second area.
  • the area ratio is the ratio of the area of the first region to the area of the second region. For example, if the area of the first region is 3 square centimeters and the area of the second region is 1.5 square centimeters, the area ratio is 3 square centimeters to 1.5 square centimeters, that is, the area ratio is 2.
  • the terminal will adjust the size of the application interface according to the area ratio. For example, if the area ratio is 2, the terminal may adjust the size of the application interface to 1/2 of the original size. In this example, the ratio of the area of the original application interface to the area of the adjusted application interface is equal to the ratio of the areas of the first area to the second area.
  • the method for adjusting the size of the interface can first display the application interface, and when the application receives a multi-finger touch operation, determine the first area formed by the touch points, wherein the multi-finger touch
  • the operation is a touch operation including at least three touch points; when the position of the touch point changes, determine the second area currently formed by the touch point; at this time, according to the area ratio of the first area and the second area to adjust the size of the application interface. Therefore, when the application interface is displayed, the size of the application interface can be changed by closing and expanding the multi-finger touch, which improves the efficiency of adjusting the size of the application interface by the touch terminal.
  • the terminal can also adjust the change mode of the application interface according to the initial display state of the first application.
  • the initial display state includes two states: full screen display and floating window display. Please refer to the following examples.
  • FIG. 4 is a flowchart of a method for adjusting an interface size provided by another exemplary embodiment of the present application.
  • a terminal is used to represent a touch terminal to introduce the implementation process of the method for adjusting the size of the interface.
  • the method for adjusting the size of the interface includes:
  • Step 401 displaying an application interface of a first size, where the first size is a full screen size.
  • the terminal can directly display the application interface in full screen.
  • the first size is the size of the screen or is approximately equal to the size of the screen.
  • the first size may be 0.99, 0.96 or 0.95 times the size of the screen, which is not limited in this embodiment of the present application.
  • Step 402 Determine a first area formed by touch points in response to a multi-finger touch operation on an application interface.
  • the terminal can recognize multi-finger touch by monitoring global touch events.
  • the time interval between each down event of multiple control operations cannot exceed the specified threshold.
  • the specified threshold may be 2 milliseconds, 3 milliseconds or 5 milliseconds, which is not limited in this embodiment of the present application.
  • the terminal During the monitoring process, if the touch operation is not a multi-finger touch operation, the terminal does not process it. When the touch operation is a multi-finger touch operation, the terminal will determine the first area. Optionally, the terminal can also cancel (cancel) the window-side touch event when determining that the touch operation is a multi-finger touch operation, so as to prevent normal window-side touch events from interfering with the actual logic of the solution.
  • the terminal can record the respective coordinates of the initial touch point of each touch point in the multi-finger touch operation. That is, record the coordinates corresponding to the down event of each touch point.
  • determining the first area formed by the touch points may include step (a1), step (a2) and step (a3).
  • step (a1) the terminal acquires the maximum abscissa and minimum abscissa among the abscissas of each touch point forming the first area, and the maximum ordinate and minimum ordinate among the ordinates of each touch point.
  • the terminal can acquire the coordinates of each touch point forming the first area. And determine the maximum abscissa, the minimum abscissa, the maximum ordinate and the minimum ordinate from each coordinate point.
  • step (a2) the terminal obtains the four first values of the first area according to the combination of any one of the maximum abscissa and the minimum abscissa, and any one of the maximum ordinate and the minimum ordinate. vertex.
  • the terminal can determine four first vertices according to the maximum abscissa, the minimum abscissa, the maximum ordinate, and the minimum ordinate. Specifically, the respective coordinates of the four first vertices are (maximum abscissa, maximum ordinate), (maximum abscissa, minimum ordinate), (minimum abscissa, maximum ordinate) and (minimum abscissa, minimum Y-axis).
  • step (a3) the terminal determines a rectangle surrounded by four first vertices as a first area.
  • the terminal determines the rectangle surrounded by the four first vertices as the first area.
  • step 402 may also be implemented by executing step (b1) and step (b2).
  • Step (b1) in response to the multi-finger touch operation on the application interface, the terminal acquires a rectangle formed by touch points.
  • Step (b2) in response to the aspect ratio of the rectangle being within the width-height threshold range, the terminal determines the first area formed by the touch points.
  • the rectangle formed by the touch points may refer to the rectangle introduced in step 320 .
  • the terminal determines the first area formed by the touch points. It should be noted that since this step avoids situations where multiple fingers are on a straight line or approximately a straight line, the interface adjustment method provided in this case will not be triggered by mistake, and can be popularized and used as a relatively stable interactive method.
  • width and height threshold intervals may be any achievable numerical intervals, which is not limited in this embodiment of the present application.
  • Step 403 in response to changes in the positions of the touch points and the number of the touch points is greater than a fourth threshold, determine a second area formed by the touch points.
  • the terminal determines whether the number of touch points is greater than the fourth threshold.
  • the fourth threshold may be a preset value.
  • the fourth threshold may be a value such as 1 or 2, which is not limited in the present application.
  • the terminal stops adjusting the size of the application interface.
  • an operation of determining the second area formed by the touch point can be implemented by step (c1), step (c2) and step (c3).
  • step (c1) the terminal acquires the maximum abscissa and minimum abscissa among the abscissas of each touch point forming the second area, and, the maximum ordinate and minimum ordinate among the ordinates of each touch point.
  • the terminal can obtain the coordinates of each touch point in the multi-finger touch operation. It should be noted that when multiple touch operations include n touch points, the terminal will obtain the coordinates of the n touch points. Wherein, n is an integer greater than or equal to 3.
  • the terminal can acquire the coordinates of each touch point forming the second area. And determine the maximum abscissa, the minimum abscissa, the maximum ordinate and the minimum ordinate from each coordinate point.
  • step (c2) the terminal obtains four second coordinates of the second area according to any one of the maximum abscissa and the minimum abscissa, and any two-coordinate combination of the maximum ordinate and the minimum ordinate. vertex.
  • the terminal can determine four first vertices according to the maximum abscissa, the minimum abscissa, the maximum ordinate, and the minimum ordinate. Specifically, the respective coordinates of the four first vertices are (maximum abscissa, maximum ordinate), (maximum abscissa, minimum ordinate), (minimum abscissa, maximum ordinate) and (minimum abscissa, minimum Y-axis).
  • step (c3) the terminal determines a rectangle surrounded by four second vertices as a second area.
  • the terminal determines the rectangle surrounded by four vertices as the second area, so as to perform subsequent calculations, and further control the size change of the application interface.
  • FIG. 5 is a schematic diagram of a method for determining a second area provided by an embodiment of the present application.
  • four touch points are included, namely the first touch point A1 (1,1), the second touch point A2 (2,4), the third touch point A3 (4,5) and the third touch point Four touch points A4(5,4).
  • the four vertices of the determined rectangle are B1(1,1), B2(1,5), B3(5,1) and B4(5,5).
  • the rectangle has an aspect ratio of 1.
  • Step 404 Create a floating window of a second size according to the area ratio of the first area and the second area, and the ratio of the first size to the second size is equal to the area ratio.
  • the area ratio is also determined accordingly. If the area ratio is 2:1 and the area of the application interface of the first size is 2, then the second size is 1.
  • the terminal can create a floating window with an area of 1 while keeping the aspect ratio of the application interface itself unchanged.
  • the terminal creates the floating window of the second size in response to the fact that the first area is larger than the second area and the area ratio is greater than a first threshold.
  • the terminal can create a floating window of the second size when the first area is larger than the second area.
  • a first threshold is also set in the terminal, and only when the area ratio is greater than the first threshold, a floating window of the second size is created, so that the visual experience of the user's operation will not be abrupt, but The window animation that follows the hand will only appear when the fingers are closed or expanded to a certain extent.
  • Step 405 adjusting the size of the application interface to a second size, so that the application interface is displayed in the floating window.
  • the terminal adjusts the size of the application interface to the second size, so that the size of the application interface matches the size of the floating window. Therefore, the application interface can be displayed in the floating window.
  • the terminal can control the size of the floating window by adjusting the display parameter of the floating window.
  • the terminal can adjust the application interface through the same display parameters, so that the size of the floating window matches the size of the application interface.
  • Step 411 displaying the application interface in the floating window of the third size.
  • the terminal may first display the application interface in a floating window, and the size of the floating window is the third size.
  • Step 412 in response to the multi-finger touch operation on the application interface, determine the first area formed by the touch points.
  • the terminal determines the first area formed by the touch points in response to the multi-finger touch operation on the application interface displayed in the floating window.
  • Step 413 in response to changes in the positions of the touch points and the number of the touch points is greater than a fourth threshold, determine a second area formed by the touch points.
  • the terminal determines the second area formed by the touch points. It should be noted that the execution process of this step is similar to the execution process of step 403, and will not be repeated here.
  • Step 414a in response to the fact that the first area is larger than the second area, shrink the floating window to a fourth size according to the area ratio, and adjust the size of the application interface to the fourth size, so as to display the application interface in the reduced floating window.
  • the fourth dimension is smaller than the third dimension, and the ratio of the third dimension to the fourth dimension is equal to the area ratio.
  • the terminal can shrink the floating window according to the area ratio when the multi-finger touch performs the folding action, that is, when the first area is larger than the second area, and shrink the floating window to obtain a floating window of the fourth size.
  • the size of the interface is adjusted to the fourth size, so that the terminal displays the application interface in the floating window of the fourth size.
  • the ratio of the third size to the fourth size is equal to the area ratio.
  • the terminal will close the application interface. For example, in a possible manner of shrinking the floating window, the terminal may close the floating window and stop displaying the application interface in response to the area ratio being greater than or equal to the third threshold.
  • the third threshold may be a preset constant value. Among them, the continuous increase of the area ratio indicates that the user expects the display area of the application interface to be smaller and smaller. If the area exceeds a critical value, the floating window control will be closed and the application interface will stop displaying.
  • Step 414b in response to the fact that the first area is smaller than the second area, enlarge the floating window to a fifth size according to the area ratio, and adjust the size of the application interface to the fifth size, so as to display the application interface in the enlarged floating window.
  • the fifth dimension is larger than the third dimension, and the ratio of the third dimension to the fifth dimension is equal to the area ratio.
  • the terminal can expand the floating window to the fifth size according to the area ratio when the multi-finger touch is performed, that is, the first area is smaller than or the second area, and the size of the application interface is adjusted to the fifth size so that the resized overlay matches the app UI, so that the app UI appears normally in a fifth-size air window.
  • the ratio of the third size to the fifth size is equal to the area ratio.
  • the terminal will display the application interface in full screen.
  • the terminal in response to the area ratio being less than or equal to the second threshold, the terminal closes the floating window and displays the application interface in full screen.
  • the continuous shrinking of the area ratio indicates that the user expects the display area of the application interface to be larger and larger. If the area exceeds a critical value, the floating window control is closed and the application interface is directly displayed in full screen.
  • Step 421 when the position of the touch point changes, determine the position change vector of the reference point in the second area.
  • the adjusted application interface is displayed in the floating window, and the terminal can perform step 421 when the position of the touch point changes again.
  • the terminal can first determine the initial position of the reference point when the touch point does not move, and then the terminal can determine the current position of the reference point after the touch point moves, and the position change vector is the initial position of the reference point pointing to the reference point A vector of current positions.
  • the reference point is also the vertex of an orientation in the pre-indicated second area.
  • the second area is a rectangle
  • the upper left vertex of the rectangle is used as a reference point.
  • Step 422 adjust the display position of the floating window according to the position change vector.
  • the terminal can move the second area according to the position change vector, so as to adjust the display position of the floating window accordingly.
  • Step 423 displaying the application interface in the floating window.
  • the terminal can display the application interface in the adjusted floating window.
  • FIG. 6 is a schematic diagram of a process for adjusting the interface size based on the embodiment shown in FIG. 4 .
  • the application interface 610 displayed in full screen changes to the application interface 620 displayed in the floating window under the user's finger pinching operation, and the application interface 620 displayed in the floating window is closed under the continuous finger pinching operation.
  • the present application can also provide technical support for the above-mentioned interface operations from the background of the operating system.
  • the technical principle of the relevant kneading process or the expansion process adjustment application interface is introduced as follows.
  • FIG. 7 is a schematic diagram of a technical framework for adjusting interface size based on the embodiment shown in FIG. 4 . 7 includes a gesture control center 510, a window management module (Window Manager Service, WMS) 520, and a gesture chain (GestureLeash) 530.
  • WMS Window Manager Service
  • GestureLeash GPULeash
  • the gesture control center 510 includes a recognition module 511 and a gesture listener (GestureListener) 512 .
  • the gesture control center 510 is used to recognize three-finger or more multi-finger touch operations, and recognize finger pinching or expanding operations.
  • the gesture listener 512 is used to call back the window management module (WMS) 520 when the recognition module 511 is triggered.
  • WMS window management module
  • the gesture listener 512 calls back the window monitor 521 in the window management module (Window Manager Service, WMS) 520 .
  • the first task item (task) 521 a in the window monitor 521 reparents to the gesture chain 530 .
  • the display controller (SurfaceControl) 531 in the gesture chain 530 includes two action items, namely a matrix coefficient setting action item (setMatrix) 531a and a position setting action item (setPosition) 531b.
  • the matrix coefficient setting action item 531a is used to set the enlargement coefficient or reduction coefficient of the application interface.
  • the position setting action item 531b is used to set the position of the new floating window.
  • the gesture chain (gestureleash) 530 is used to control the scaling and displacement of the top-level window in the display screen according to the gesture.
  • the second task item (task) 521b in the window monitor 521 changes the states of the two objects in the second task item 521b through a visualization operation (makeVisible).
  • the two objects in the second task item 521b are activity object (ActivityRecord) 521b1 and window object (WindowsState) 521b2 respectively.
  • the active object 521b1 is started (Started) after being visualized (Visible).
  • the state of the window object 521b2 changes to display (Show).
  • the gesture listener 512 calls back the window monitor 521 in the window management module (WMS) 520 .
  • the first task 521 a in gesture chain 530 reparents back to window monitor 521 .
  • the first task item (task) 521a sets the window mode (setWindowMode) to the float window mode (zoomWindowMode).
  • setWindowMode the window mode
  • floatWindowMode the float window mode
  • the floating window mode is a window mode customized by this application.
  • the active object 521b1 in the second task item 521b is visualized (Visible) and resumed (Resumed).
  • the state of the window object 521b2 changes to display (Show).
  • the terminal will set the first task item 521a on the stack top of the window monitor 521 in the window management module (WMS) 520 Re-parent to the newly created gesture chain 530, fit the coefficient and position of the multi-finger operation window zooming process through the algorithm, and assign it to the display controller 531 of the newly created gesture chain 530, so as to control the The top-level window is scaled and displaced at will.
  • WMS window management module
  • the terminal After the three-finger and above multi-finger touch operation is successfully recognized in this example, the terminal also needs to change the visibility of the second task item 521b under the first task item 521a on the stack top of the window monitor 521 to visible, Restart the active object 521b1 in the second task item 521b, and display the window object in the active object 521b1.
  • the application In response to a touch up event, the application provides two states. In one possible state, the terminal enters the small window mode, reparents the first task item 521a to the window monitor 521, and applies the current zoom factor and position of the gesture chain 530 to the display controller 531, and at the same time Set the window mode to floating window mode. Finally, the top activity (top activity) in the second task item 521b is restarted (resume).
  • the first task item 521a is also reparented from the gesture chain 530 to the window monitor 521, but the display controller 531 needs to be restored to The default setting and recovery zoom factor are 1, and at the same time, the second task item 521b is reset to the invisible state, and the active object 521b1 in the second task item 521b also needs to re-enter the stop (stop) state.
  • the method for adjusting the size of the interface provided by this embodiment can control the application interface to shrink into a floating window through the multi-finger touch operation when the application interface is displayed in full screen.
  • a floating window is created, making the creation process of the floating window unobtrusive, reducing the possibility of the function of adjusting the interface size being accidentally triggered.
  • the application can follow the user's hand movement after the floating window is created, and display the adjusted application interface at the position where the user lets go, improving the ability of the user to control the display position of the application interface.
  • this application can be directly closed when the application interface is zoomed out beyond a certain threshold, or this application can also be directly displayed in full screen when the application is enlarged from the floating window and exceeds a certain threshold, which improves the application interface in full screen, floating window and closing several times.
  • the ability to change flexibly between states.
  • FIG. 8 is a structural block diagram of an apparatus for adjusting an interface size provided by an exemplary embodiment of the present application.
  • the device for adjusting the size of the interface can be implemented as all or a part of the terminal through software, hardware or a combination of the two.
  • the unit includes:
  • An interface display module 710 configured to display an application interface
  • the first determining module 720 is configured to determine a first area formed by touch points in response to a multi-finger touch operation on the application interface, and the multi-finger touch operation is to include at least three touch points touch operation;
  • the second determination module 730 is configured to determine a second area formed by the touch point in response to a change in the position of the touch point;
  • a size adjustment module 740 configured to adjust the size of the application interface according to the area ratio of the first area and the second area.
  • the interface display module 710 is configured to display the application interface in a first size, and the first size is a full screen size;
  • the size adjustment module 740 is configured to display the application interface according to the The area ratio of the first area and the second area is used to create a floating window of a second size, and the ratio of the first size to the second size is equal to the area ratio; and the size of the application interface is adjusted to the specified area ratio.
  • the second size is selected so that the application interface is displayed in the floating window.
  • the size adjustment module 740 is configured to, in response to the first area being larger than the second area and the area ratio being larger than a first threshold, creating the Describe the floating window.
  • the interface display module 710 is configured to display the application interface in a floating window of a third size; the size adjustment module 740 is configured to respond to the first area being larger than the In the second area, reducing the floating window to a fourth size according to the area ratio, and adjusting the size of the application interface to a fourth size, so as to display the application interface in the reduced floating window, the The ratio between the third size and the fourth size is equal to the area ratio; or, the size adjustment module 740 is configured to enlarge the area according to the area ratio in response to the first area being smaller than the second area.
  • the floating window is adjusted to a fifth size, and the size of the application interface is adjusted to the fifth size, so that the application interface is displayed in the enlarged floating window, the third size and the fifth size
  • the ratio of is equal to the area ratio.
  • the size adjustment module 740 is configured to close the floating window and display the application interface in full screen in response to the area ratio being less than or equal to a second threshold; or, the size adjustment Module 740, configured to close the floating window and stop displaying the application interface in response to the area ratio being greater than or equal to a third threshold.
  • the second determining module 730 is configured to determine that the touch point formed the second region.
  • the device further includes a stop adjusting module, configured to stop adjusting the size of the application interface in response to the number of touch points being less than or equal to the fourth threshold.
  • the first area is a rectangular area
  • the second determination module 730 is configured to obtain the maximum abscissa among the abscissas of the touch points forming the first area and the minimum abscissa, and, the maximum ordinate and the minimum ordinate in the ordinate of each touch point; according to any one of the maximum abscissa and the minimum abscissa, and, the maximum The combination of the ordinate and any ordinate in the minimum ordinate obtains the four first vertices of the first region; the rectangle surrounded by the four first vertices is determined as the first area.
  • the second determination module 730 is configured to obtain the maximum abscissa and the minimum abscissa among the abscissas of each of the touch points forming the second area, and, the ordinate of each of the touch points The maximum ordinate and the minimum ordinate in; According to any abscissa in the maximum abscissa and the minimum abscissa, and, the two of the maximum ordinate and any ordinate in the minimum ordinate Two components, four second vertices of the second area are obtained; the rectangle surrounded by the four second vertices is determined as the second area.
  • the device further includes a following adjustment module, configured to determine a position change vector of the reference point in the second area when the position of the touch point changes; according to the position Change the vector to adjust the display position of the floating window;
  • the device for adjusting the size of the interface provided by this embodiment can control the application interface to shrink into a floating window through the multi-finger touch operation when the application interface is displayed in full screen.
  • the threshold is set, a floating window is created, making the creation process of the floating window unobtrusive, reducing the possibility of the function of adjusting the interface size being accidentally triggered.
  • the application can follow the user's hand movement after the floating window is created, and display the adjusted application interface at the position where the user lets go, improving the ability of the user to control the display position of the application interface.
  • this application can be directly closed when the application interface is zoomed out beyond a certain threshold, or this application can also be directly displayed in full screen when the application is enlarged from the floating window and exceeds a certain threshold, which improves the application interface in full screen, floating window and closing several times.
  • the ability to change flexibly between states.
  • the method for adjusting the size of the interface shown in the embodiment of the present application can be applied to a terminal, and the terminal is equipped with a touch screen and has a function of adjusting the size of the interface.
  • Terminals can include mobile phones, tablet computers, laptop computers, smart watches, digital cameras, MP4 playback terminals, MP5 playback terminals, learning machines, point readers, electronic paper books, electronic dictionaries, vehicle-mounted terminals, virtual reality (Virtual Reality, VR) playback terminal or augmented reality (Augmented Reality, AR) playback terminal, etc.
  • FIG. 9 is a structural block diagram of a terminal provided by an exemplary embodiment of the present application.
  • the terminal includes a processor 820, a memory 840, and a touch screen 860.
  • At least one instruction the instruction is loaded and executed by the processor 820 to implement the method for adjusting the interface size as described in each method embodiment of the present application.
  • the terminal 800 displays an application interface; in response to a multi-finger touch operation on the application interface, a first area formed by touch points is determined, and the multi-finger touch operation is to include at least three of the Touch operation of the touch point; in response to the change of the position of the touch point, determine the second area formed by the touch point; according to the area ratio of the first area and the second area, adjust The dimensions of the application interface.
  • Processor 820 may include one or more processing cores.
  • the processor 820 uses various interfaces and lines to connect various parts of the entire terminal 800, and executes the terminal by running or executing instructions, programs, code sets or instruction sets stored in the memory 840, and calling data stored in the memory 840. 800 various functions and process data.
  • the processor 820 may adopt 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). implemented in the form of hardware.
  • the processor 820 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, and the like.
  • the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used to render and draw the content that needs to be displayed on the display screen; the modem is used to handle wireless communication. It can be understood that the foregoing modem may not be integrated into the processor 820, but may be implemented by a single chip.
  • the memory 840 may include a random access memory (Random Access Memory, RAM), and may also include a read-only memory (Read-Only Memory, ROM).
  • the memory 840 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium).
  • Memory 840 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 840 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like for implementing the following method embodiments; the storage data area can store data and the like involved in the following method embodiments.
  • the touch screen 860 is used for receiving user's touch operation, and can receive multi-touch operation.
  • the embodiment of the present application also provides a computer-readable medium, the computer-readable medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to realize the adjustment of the interface size as described in the above embodiments Methods.
  • the device for adjusting the size of the interface when the device for adjusting the size of the interface provided by the above-mentioned embodiment executes the method for adjusting the size of the interface, it only uses the division of the above-mentioned functional modules as an example for illustration. In practical applications, the above-mentioned functions can be assigned by different The functional modules are completed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the device for adjusting the size of the interface provided by the above embodiment and the embodiment of the method for adjusting the size of the interface belong to the same idea, and its specific implementation process is detailed in the method embodiment, and will not be repeated here.
  • the program can be stored in a computer-readable storage medium.
  • the above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.

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)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请实施例公开了一种调整界面尺寸的方法、装置、终端、存储介质及程序产品,属于计算机技术领域。本申请能够先显示应用界面,在应用接收到多指触控操作时,确定由触控点形成的第一区域,其中,多指触控操作为包含至少三个触控点的触控操作;在触控点的位置发生变化时,确定当前由触控点形成的第二区域;此时,根据第一区域和第二区域的面积比例,调整应用界面的尺寸。从而在应用界面显示时,能够通过多指触控的合拢和扩展来改变应用界面的大小,提高了触控终端调整应用界面的大小的效率。

Description

调整界面尺寸的方法、装置、终端、存储介质及程序产品
本申请要求于2021年06月25日提交的申请号为202110710076.3、发明名称为“调整界面尺寸的方法、装置、终端及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机技术领域,特别涉及一种调整界面尺寸的方法、装置、终端、存储介质及程序产品。
背景技术
随着移动终端技术的快速发展,移动终端能够运行支持各种功能的应用。用户通过应用界面或者应用提供的信息,与应用完成交互。
相关技术中,当移动终端接收到打开应用的指令时,移动终端能够获取指令对应的窗口大小,从而创建一个指定大小的窗口用于显示应用界面。用户在该窗口中与应用进行交互,交互完成之后可以关闭该窗口。
发明内容
本申请实施例提供了一种调整界面尺寸的方法、装置、终端及存储介质。所述技术方案如下:
根据本申请的一方面内容,提供了一种调整界面尺寸的方法,所述方法包括:
显示应用界面;
响应于对所述应用界面的多指触控操作,确定由触控点形成的第一区域,所述多指触控操作为包含至少三个所述触控点的触控操作;
响应于所述触控点的位置发生变化,确定由所述触控点形成的第二区域;
根据所述第一区域和所述第二区域的面积比例,调整所述应用界面的尺寸。
根据本申请的另一方面内容,提供了一种调整界面尺寸的装置,所述装置包括:
界面显示模块,用于显示应用界面;
第一确定模块,用于响应于对所述应用界面的多指触控操作,确定由触控点形成的第一区域,所述多指触控操作为包含至少三个所述触控点的触控操作;
第二确定模块,用于响应于所述触控点的位置发生变化,确定由所述触控点形成的第二区域;
尺寸调整模块,用于根据所述第一区域和所述第二区域的面积比例,调整所述应用界面的尺寸。
根据本申请的另一方面内容,提供了一种终端,所述终端包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现如本申请各个方面提供的调整界面尺寸的方法。
根据本申请的另一方面内容,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如本申请各个方面提供的调整界面尺寸的方法。
根据本申请的一个方面,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面各种可选实现方式中提供的调整界面尺寸的方法。
附图说明
图1是一种显示应用界面的示意图;
图2是另一种显示应用界面的示意图;
图3是本申请一个示例性实施例提供的一种调整界面尺寸的方法的流程图;
图4是本申请另一个示例性实施例提供的一种调整界面尺寸的方法流程图;
图5是本申请实施例提供的一种第二区域的确定方法的示意图;
图6是基于图4所示实施例提供的一种调整界面尺寸的过程示意图;
图7是基于图4所示实施例提供的一种调整界面尺寸的技术框架的示意图;
图8是本申请一个示例性实施例提供的一种调整界面尺寸的装置的结构框图;
图9是本申请一个示例性实施例提供的一种终端的结构框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
在本申请的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。在本申请的描述中,需要说明的是,除非另有明确的规定和限定,术语“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。此外,在本申请的描述中,除非另有说明,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
如本文中所使用,根据上下文,术语“如果”任选地被解释为“当......时”、“在……时”、“响应于确定”或“响应于检测”。类似地,根据上下文,短语“如果确定……”或“如果检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。
需要说明的是,使用个人可识别信息应遵循公认为满足或超过维护用户隐私的行业或政府要求的隐私政策和做法。具体地,个人可识别信息在管理和处理的过程中应当向用户明确说明授权使用的性质,以使无意或未经授权的访问或使用的风险最小化。
近些年,用户日常使用的电子设备逐步小型化,人们使用时间较多的电子设备从个人电脑(Personal Computer,PC),逐步变化为移动设备。在移动设备智能化的较早的时期,移动设备通过机械按键作为输入组件。随着触控技术的发展,现阶段的移动设备绝大多数通过触摸屏作为输入组件。其中,具备触摸屏的移动设备又可称为触控终端。
在触控终端中,若用户需要启动某一应用,则用户点击该应用的启动图标即可。在一种可能的方式中,若启动图标位于桌面、通知栏或者负一屏等位置,则应用可以直接全屏显示。在另一种可能的方式中,若启动图标位于侧边栏或其它浮动边栏中,则应用可以以浮窗的形式显示。
请参见图1,图1是一种显示应用界面的示意图。当桌面中的应用的启动图标110被点击时,终端将全屏显示应用的应用界面120。
请参见图2,图2是另一种显示应用界面的示意图。当侧边栏中的应用的启动图标110 被点击时,终端将在浮窗210中显示应用界面220。需要说明的是,显示应用界面220的显示面积小于应用界面120的显示面积。
通过图1和图2所示的示意图可以知晓,本申请实施例中的应用在开启时就已经确定了应用界面的尺寸。例如,在图1所示的全屏显示的场景中,应用界面在显示的全程中将持续保持全屏的尺寸。在图2所示的浮窗的场景中,应用界面在显示的全程中将持续保持浮窗大小的尺寸。
相关技术中,终端仅可以在指定大小的窗口中显示应用界面,这就导致了无法快速的将全屏显示的应用界面快速调整到其它尺寸的浮窗,在浮窗中显示应用界面的情况,从而导致调整应用界面的显示大小的效率较低。
为了解决上述问题,本申请实施例提供了一种调整界面尺寸的方法,能够令触控终端中的应用界面能够在多指触控操作下进行调整,使得触控终端获得了调整应用界面尺寸的能力,进而提高了用户自由控制应用界面大小的能力,具体实现过程可见如下介绍。
本申请实施例提供的调整界面尺寸的方法包括:
显示应用界面;
响应于对应用界面的多指触控操作,确定由触控点形成的第一区域,多指触控操作为包含至少三个触控点的触控操作;
响应于触控点的位置发生变化,确定由触控点形成的第二区域;
根据第一区域和第二区域的面积比例,调整应用界面的尺寸。
可选的,显示应用界面,包括:
显示第一尺寸的应用界面,第一尺寸是全屏的尺寸;
根据第一区域和第二区域的面积比例,调整应用界面的尺寸,包括:
根据第一区域和第二区域的面积比例,创建第二尺寸的浮窗,第一尺寸和第二尺寸的比例等于面积比例;
将应用界面的尺寸调整为第二尺寸,以便应用界面在浮窗中显示。
可选的,创建第二尺寸的浮窗,包括:
响应于第一区域大于第二区域,且面积比例大于第一阈值,创建第二尺寸的浮窗。
可选的,显示应用界面,包括:
在第三尺寸的浮窗中显示应用界面;
根据第一区域和第二区域的面积比例,调整应用界面的尺寸,包括:
响应于第一区域大于第二区域,根据面积比例缩小浮窗至第四尺寸,并将应用界面的尺寸调整为第四尺寸,以便在缩小后的浮窗中显示应用界面,第三尺寸和第四尺寸的比例等于面积比例;或
响应于第一区域小于第二区域,根据面积比例放大浮窗至第五尺寸,并将应用界面的尺寸调整为第五尺寸,以便在放大后的浮窗中显示应用界面,第三尺寸和第五尺寸的比例等于面积比例。
可选的,响应于第一区域小于第二区域,根据面积比例放大浮窗,包括:
响应于面积比例小于或等于第二阈值,关闭浮窗并全屏显示应用界面;
响应于第一区域大于第二区域,根据面积比例缩小浮窗,包括:
响应于面积比例大于或等于第三阈值,关闭浮窗并停止显示应用界面。
可选的,响应于触控点的位置发生变化,确定由触控点形成的第二区域,包括:
响应于触控点的位置发生变化且触控点的数量大于第四阈值,确定由触控点形成的第二区域。
可选的,方法还包括:
响应于触控点的数量小于或等于第四阈值,停止调整应用界面的尺寸。
可选的,第一区域为矩形区域;
确定由触控点形成的第一区域,包括:
获取各个形成第一区域的触控点的横坐标中的最大横坐标和最小横坐标,和,各个触控点的纵坐标中的最大纵坐标和最小纵坐标;
根据最大横坐标和最小横坐标中的任一横坐标,和,最大纵坐标和最小纵坐标中的任一纵坐标的两两组成,得到第一区域的四个第一顶点;
将四个第一顶点围成的矩形确定为第一区域;
确定由触控点形成的第二区域,包括:
获取各个形成第二区域的触控点的横坐标中的最大横坐标和最小横坐标,和,各个触控点的纵坐标中的最大纵坐标和最小纵坐标;
根据最大横坐标和最小横坐标中的任一横坐标,和,最大纵坐标和最小纵坐标中的任一纵坐标的两两组成,得到第二区域的四个第二顶点;
将四个第二顶点围成的矩形确定为第二区域。
可选的,方法还包括:
当触控点的位置发生变化,确定第二区域中的参考点的位置变化向量;
根据位置变化向量,调整浮窗的显示位置。
请参考图3,图3是本申请一个示例性实施例提供的一种调整界面尺寸的方法的流程图。该调整界面尺寸的方法可以应用在触控终端中。在本例中,以终端表示触控终端,用以介绍调整界面尺寸的方法的实现流程。在图3中,调整界面尺寸的方法包括:
步骤310,显示应用界面。
在本申请实施例中,终端能够在触摸屏中显示应用界面。其中,显示方式可以包括全屏显示和浮窗显示。
全屏显示是指终端的屏幕中全部显示应用界面。可选的,全屏显示指终端的其中一块屏幕中全部显示应用界面。
在一种可能的方式中,若终端是折叠屏终端,全屏显示是指在折叠屏终端处于展开状态时,终端将在屏幕全部显示区域中显示应用界面;在折叠屏终端处于折叠状态时,终端将在折叠后的分屏的全部显示区域中显示应用界面。
在另一种可能的方式中,若终端是卷轴屏终端,全屏显示是指在卷轴屏终端向外展示的屏幕中,全部显示应用界面。
需要说明的是,浮窗显示是指触摸屏中显示一个浮窗,终端在浮窗中显示应用界面。
步骤320,响应于对应用界面的多指触控操作,确定由触控点形成的第一区域,多指触控操作为包含至少三个触控点的触控操作。
在本例中,终端中的触摸屏能够响应多指触控操作。也即,终端能够分别识别出多指触控操作中的每一个触摸点的触摸数据。其中,触摸数据包括坐标。在一些可能的实现方式中,终端还能够识别触摸点的触摸面积。在另一种可能的实现方式中,若触摸屏中设置有压力传感器,则触摸数据还能够包括压力数据。在又一种可能的实现方式中,若触摸屏中设置有温度传感器(包括红外传感器),则触摸数据还能够包括温度。
终端能够首先识别出应用界面中接收到的触控操作是否是多指触控操作。其中,多指触控操作可以是指任意两个触控点之间按下时刻小于间隔阈值。其中,间隔阈值可以是20毫秒、50毫秒或者100毫秒等时间数值,本申请实施例对此不作限定。
需要说明的是,多指触控操作是包含至少三个触控点的触控操作。也即,本申请中所示的多指触控操作可以是三指触控操作、四指触控操作或五指触控操作。由于人类通常通过一只手进行多指操作。因此,本申请中的实施例通常选择三指触控操作、四指触控操作或五指触控操作作为多指触控操作。
然而,作为一种可能的实现方式,终端还能够将六指触控操作至十指触控操作作为多 指触控操作。当本申请采用上述六指触控操作至十指触控操作作为多指触控操作,能够避免绝大多数的误操作,使得应用界面的功能不被误触发。
针对本申请所示的第一区域,该区域由触控点确定。一种可能的方式中,该第一区域是由各个触控点为顶点所围成的封闭多边形。另一种可能的方式中,该第一区域是一个矩形区域,矩形区域的四个顶点的坐标分别是(最小横坐标,最大纵坐标)、(最大横坐标,最大纵坐标)、(最小横坐标,最小纵坐标)和(最大横坐标,最小纵坐标)。其中,上述各个坐标的最值点都是各个触控点中的最值。
例如,触控点是三个,坐标分别为(x1,y1)、(x2,y2)和(x3,y3)。终端将将x1、x2和x3中的最小值确定为最小横坐标,将x1、x2和x3中的最大值确定为最大横坐标。终端将y1、y2和y3中的最小值确定为最小纵坐标,将y1、y2和y3中的最大值确定为最大纵坐标。
步骤330,响应于触控点的位置发生变化,确定由触控点形成的第二区域。
在本例中,终端能够在触控的位置发生变化时,按照确定第一区域相同的方法,确定由触控点形成的第二区域。
例如,若第一区域是以触控点为顶点围成的多边形,则第二区域也是以触控点为顶点围成的多边形。若第一区域是根据触控点的最值确定的顶点围成的矩形,则第二区域也是根据触控点的最值确定的顶点围成的矩形。
在本例中,终端能够按照预设周期持续获取触控点的坐标。比如,周期是1毫秒,则终端能够1毫秒更新一次触控点的坐标。
步骤340,根据第一区域和第二区域的面积比例,调整应用界面的尺寸。
在本例中,面积比例是第一区域的面积与第二区域的面积之比。比如,第一区域的面积是3平方厘米,第二区域的面积是1.5平方厘米,则面积比例是3平方厘米比1.5平方厘米,也即面积比例是2。
在本申请中,终端将按照面积比例来调整应用界面的尺寸。例如,面积比例是2,则终端可以将应用界面的尺寸调整为原本尺寸的1/2。在本例中,原本的应用界面的面积与调整后的应用界面的面积之比,等于,第一区域与第二区域的面积之比。
综上所述,本实施例提供的调整界面尺寸的方法,能够先显示应用界面,在应用接收到多指触控操作时,确定由触控点形成的第一区域,其中,多指触控操作为包含至少三个触控点的触控操作;在触控点的位置发生变化时,确定当前由触控点形成的第二区域;此时,根据第一区域和第二区域的面积比例,调整应用界面的尺寸。从而在应用界面显示时,能够通过多指触控的合拢和扩展来改变应用界面的大小,提高了触控终端调整应用界面的大小的效率。
基于上一个实施例所公开的方案,终端还能够按照第一应用的初始的显示状态来调整应用界面的变化方式,初始的显示状态包括全屏显示和在浮窗中显示两种状态。请参考如下实施例。
请参见图4,图4是本申请另一个示例性实施例提供的一种调整界面尺寸的方法流程图。在本例中,以终端表示触控终端,用以介绍调整界面尺寸的方法的实现流程。在图4中,该调整界面尺寸的方法包括:
步骤401,显示第一尺寸的应用界面,第一尺寸是全屏的尺寸。
在本例中,终端能够直接全屏显示应用界面。当终端全屏显示应用界面时,第一尺寸是屏幕的尺寸或者近似等于屏幕的尺寸。当第一尺寸近似等于屏幕的尺寸时,第一尺寸可以是0.99、0.96或0.95倍的屏幕的尺寸,本申请实施例对此不作限定。
步骤402,响应于对应用界面的多指触控操作,确定由触控点形成的第一区域。
在本例中,终端可以通过监听全局触控事件来识别多指触控。其中,多只操控操作每 次的down事件之间的时间间隔不能超过指定阈值。例如,该指定阈值可以是2毫秒、3毫秒或者5毫秒,本申请实施例对此不作限定。
在监听过程中,若触摸操作不是多指触控操作,则终端不作处理。当触摸操作是多指触控操作,终端将确定第一区域。可选的,终端还能够在确定触摸操作是多指触控操作时取消(cancel)窗口端触摸事件,避免正常的窗口端触摸事件对本方案事实逻辑形成干扰。
在本例中,终端能够记录多指触控操作中的各个触摸点的起始触摸点各自的坐标。也即,记录每个触摸点的down事件对应的坐标。
在本例中,确定由触控点形成的第一区域可以由步骤(a1)、步骤(a2)和步骤(a3)。
步骤(a1),终端获取各个形成第一区域的触控点的横坐标中的最大横坐标和最小横坐标,和,各个触控点的纵坐标中的最大纵坐标和最小纵坐标。
在本申请实施例中,终端能够获取形成第一区域的各个触控点的坐标。并从各个坐标点中确定出最大横坐标、最小横坐标、最大纵坐标和最小纵坐标。
步骤(a2),终端根据最大横坐标和最小横坐标中的任一横坐标,和,最大纵坐标和最小纵坐标中的任一纵坐标的两两组成,得到第一区域的四个第一顶点。
在本申请实施例中的,终端能够根据最大横坐标、最小横坐标、最大纵坐标和最小纵坐标,确定出四个第一顶点。具体而言,四个第一顶点各自的坐标分别是(最大横坐标,最大纵坐标)、(最大横坐标,最小纵坐标)、(最小横坐标,最大纵坐标)和(最小横坐标,最小纵坐标)。
步骤(a3),终端将四个第一顶点围成的矩形确定为第一区域。
在本例中,终端将上述四个第一顶点为围成的矩形确定为第一区域。
可选的,步骤402还可以通过执行步骤(b1)和步骤(b2)实现。
步骤(b1),响应于对应用界面的多指触控操作,终端获取由触控点组成的矩形。
步骤(b2),响应于矩形的宽高比位于宽高阈值区间内,终端确定由触控点形成的第一区域。
需要说明的是,触控点组成的矩形可以参见步骤320中介绍的矩形。当该矩形的宽与高的比值位于宽高阈值区间内时,终端确定由触控点形成的第一区域。需要说明的是,由于本步骤避免了多个手指在一条直线或者近似一条直线上等情形,使得本案提供的界面调整方法不会被误触发,能够作为一种较稳定的交互方式得到推广使用。
需要说明的是,宽高阈值区间可以是任意能够实现的数值区间,本申请实施例对此不作限定。
步骤403,响应于触控点的位置发生变化且触控点的数量大于第四阈值,确定由触控点形成的第二区域。
在本例中,终端在触控点的位置发生变化时,终端确定触控点的数量是否大于第四阈值。其中,第四阈值可以是预先设定的数值。在本例中,第四阈值可以是1或2等数值,本申请对此不作限定。
相对的,响应于触控点的数量小于或等于第四阈值,终端停止调整应用界面的尺寸。
在本例中,一种确定由触控点形成的第二区域的操作可以由步骤(c1)、步骤(c2)和步骤(c3)来实现。
步骤(c1),终端获取各个形成第二区域的触控点的横坐标中的最大横坐标和最小横坐标,和,各个触控点的纵坐标中的最大纵坐标和最小纵坐标。
在本例中,终端能够获得多指触控操作中的各个触控点的坐标。需要说明的是,当多种触控操作中包括n个触控点时,终端将获得n个触控点的坐标。其中,n为大于或等于3的整数。
在本申请实施例中,终端能够获取形成第二区域的各个触控点的坐标。并从各个坐标点中确定出最大横坐标、最小横坐标、最大纵坐标和最小纵坐标。
步骤(c2),终端根据最大横坐标和最小横坐标中的任一横坐标,和,最大纵坐标和最小纵坐标中的任一纵坐标的两两组成,得到第二区域的四个第二顶点。
在本申请实施例中的,终端能够根据最大横坐标、最小横坐标、最大纵坐标和最小纵坐标,确定出四个第一顶点。具体而言,四个第一顶点各自的坐标分别是(最大横坐标,最大纵坐标)、(最大横坐标,最小纵坐标)、(最小横坐标,最大纵坐标)和(最小横坐标,最小纵坐标)。
步骤(c3),终端将四个第二顶点围成的矩形确定为第二区域。
在本例中,终端将四个顶点围成的矩形确定为第二区域,从而进行后续的运算,进而控制应用界面的大小变化。
请参见图5,图5是本申请实施例提供的一种第二区域的确定方法的示意图。在图5中,包括四个触控点,分别是第一触控点A1(1,1)、第二触控点A2(2,4)第三触控点A3(4,5)和第四触控点A4(5,4)。依据本例所提供的方法,确定出的矩形的四个顶点分别是B1(1,1)、B2(1,5)、B3(5,1)和B4(5,5)。该矩形的宽高比是1。
步骤404,根据第一区域和第二区域的面积比例,创建第二尺寸的浮窗,第一尺寸和第二尺寸的比例等于面积比例。
在本例中,当第一区域的面积和第二区域的面积均确定时,面积比例也随之确定。若面积比例是2:1且第一尺寸的应用界面的面积是2,则第二尺寸为1。终端能够在保持应用界面自身的宽高比不变的情况下,创建面积为1的浮窗。
在一种可能的创建第二尺寸的浮窗的方式中,终端响应于第一区域大于第二区域,且面积比例大于第一阈值,创建第二尺寸的浮窗。
在本例中,终端能够在第一区域大于第二区域时,创建第二尺寸的浮窗。但在一种可能的场景中,终端中还设置一个第一阈值,仅当面积比例大于第一阈值时才创建第二尺寸的浮窗,使得用户再操作的视觉感受上不会突兀,而是会在手指合拢或者扩张到一定程度时才出现跟手的窗口动画。
步骤405,将应用界面的尺寸调整为第二尺寸,以便应用界面在浮窗中显示。
在本例中,终端将在创建第二尺寸的浮窗之后,调整应用界面的尺寸至第二尺寸,以便应用界面的尺寸与浮窗的尺寸匹配。从而,能够令应用界面显示在浮窗中。
需要说明的是,在一种可能的方式中,终端通过调整浮窗的显示参数,能够通过显示参数控制浮窗的尺寸。在该实现方式中,终端可以通过同样的显示参数调整应用界面,使得浮窗的尺寸和应用界面的尺寸相适配。
步骤411,在第三尺寸的浮窗显示应用界面。
在本申请提供的另一种可能的方式中,终端可以先在浮窗中显示应用界面,该浮窗的尺寸是第三尺寸。
步骤412,响应于对应用界面的多指触控操作,确定由触控点形成的第一区域。
在本例中,终端响应于对于显示在浮窗中的应用界面的多指触控操作,确定由触控点形成的第一区域。
步骤413,响应于触控点的位置发生变化且触控点的数量大于第四阈值,确定由触控点形成的第二区域。
在本例中,终端在触控点的位置发生变化且触控点的数量大于第四阈值时,确定由触控点形成的第二区域。需要说明的是,该步骤的执行过程与步骤403的执行过程类似,本处不再赘述。
步骤414a,响应于第一区域大于第二区域,根据面积比例缩小浮窗至第四尺寸,并将应用界面的尺寸调整为第四尺寸,以便在缩小后的浮窗中显示应用界面。
其中,第四尺寸小于第三尺寸,第三尺寸和第四尺寸的比例等于面积比例。
在本例中,终端能够在多指触控进行合拢的动作时,也即第一区域大于第二区域时, 根据面积比例缩小浮窗,缩小浮窗得到第四尺寸的浮窗,同时将应用界面的尺寸调整为第四尺寸,以便终端在第四尺寸的浮窗中显示应用界面。为保证缩小的尺寸能够得到用户的手势的有效控制,则第三尺寸和第四尺寸的比例等于面积比例。
在此基础上,如果面积比例持续增长到一个临界值,则终端将关闭应用界面。比如,在一种可能的缩小浮窗的方式中,终端可以响应于面积比例大于或等于第三阈值,关闭浮窗并停止显示应用界面。第三阈值可以是预先设置的一个常数值。其中,面积比例持续增大说明用户期望应用界面显示的面积越来越小,超过临界值的话即关闭浮窗控件并停止显示应用界面。
步骤414b,响应于第一区域小于第二区域,根据面积比例放大浮窗至第五尺寸,并将应用界面的尺寸调整为第五尺寸,以便在放大后的浮窗中显示应用界面。
其中,第五尺寸大于第三尺寸,第三尺寸和第五尺寸的比例等于面积比例。
在本例中,终端能够在多指触控进行扩张的动作时,也即第一区域小于或第二区域,根据面积比例扩大浮窗至第五尺寸,并将应用界面的尺寸调整为第五尺寸,以便调整尺寸后的浮窗和应用界面相匹配,从而在第五尺寸的浮窗中正常显示应用界面。为保证扩大的尺寸能够得到用户的手势的有效控制,则第三尺寸和第五尺寸的比例等于面积比例。
在此基础上,如果面积比例持续缩小到一个临界值,则终端将全屏显示应用界面。在一种可能的放大浮窗的方式中,响应于面积比例小于或等于第二阈值,终端关闭浮窗并且全屏显示应用界面。其中,面积比例持续缩小说明用户期望应用界面显示的面积越来越大,超过临界值的话即关闭浮窗控件并直接全屏显示该应用界面。
步骤421,当触控点的位置发生变化,确定第二区域中的参考点的位置变化向量。
其中,调整后应用界面显示在浮窗中,终端能够在触控点的位置再次发生变化时,执行步骤421。
在本例中,终端能够先确定触控点没有移动时参考点的初始位置,随后,终端能够再确定触控点移动后参考点的当前位置,位置变化向量是参考点的初始位置指向参考点的当前位置的向量。
在本例中,参考点也是预先指示的第二区域中的一个方位的顶点。比如在第二区域是矩形时,将该矩形的左上顶点作为参考点。
步骤422,根据位置变化向量,调整浮窗的显示位置。
在本例中,终端能够根据位置变化向量移动第二区域,从而相应地调整浮窗的显示位置。
步骤423,在浮窗中显示应用界面。
在本例中,终端能够在调整后的浮窗中显示应用界面。
请参见图6,图6是基于图4所示实施例提供的一种调整界面尺寸的过程示意图。在图6中,全屏显示的应用界面610在用户手指并拢的操作下变化为在浮窗中显示的应用界面620,浮窗中显示的应用界面620在继续在手指并拢的操作下关闭。
需要说明的是,本申请还能够从操作系统的后台提供上述界面操作的技术支持。相关的捏合过程或扩展过程调整应用界面的技术原理介绍如下。
请参见图7,图7是基于图4所示实施例提供的一种调整界面尺寸的技术框架的示意图。在图7包括手势控制中心510、窗口管理模块(Window Manager Service,WMS)520、手势链(GestureLeash)530。
其中,手势控制中心510包括识别模块511和手势监听器(GestureListener)512。手势控制中心510用于识别三指及以上的多指触控操作,以及,识别手指捏合或扩张的操作。手势监听器512用于在识别模块511被触发时回调(callback)窗口管理模块(WMS)520。
需要说明的是,图7中的两个窗口管理模块(WMS)520是同一个容器在不同的事件下的状态。
响应于触摸按下(down)事件,手势监听器512回调窗口管理模块(Window Manager Service,WMS)520中的窗口监视器521。窗口监视器521中的第一任务项(task)521a重定父级(reparent)到手势链530。手势链530中的显示控制器(SurfaceControl)531中包括两个行动项,分别是矩阵系数设置行动项(setMatrix)531a和位置设置行动项(setPosition)531b。矩阵系数设置行动项531a用于设置应用界面的放大系数或缩小系数。位置设置行动项531b用于设置新的浮窗的位置。示意性的,手势链(gestureleash)530用于根据手势控制显示屏中的顶层的窗口的缩放和位移。窗口监视器521中的第二任务项(task)521b通过可视化操作(makeVisible)改变第二任务项521b中的两个对象的状态。第二任务项521b中的两个对象分别是活动对象(ActivityRecord)521b1和窗口对象(WindowsState)521b2。其中,活动对象521b1可视化(Visible)后启动(Started)。窗口对象521b2的状态变为显示(Show)。
响应于触摸抬起(up)事件,手势监听器512回调窗口管理模块(WMS)520中的窗口监视器521。手势链530中的第一任务项(task)521a重定父级(reparent)回到窗口监视器521。同时,第一任务项(task)521a设置窗口模式(setWindowMode)为浮窗窗口模式(zoomWindowMode)。需要说明的是,浮窗窗口模式是本申请自定义的一种窗口模式。第二任务项521b中活动对象521b1可视化(Visible)后重新开始(Resumed)。窗口对象521b2的状态变为显示(Show)。
在另一种说明方式中,本例中的三指及以上的多指触控操作识别成功之后,终端将窗口管理模块(WMS)520中的窗口监视器521的栈顶的第一任务项521a重定父级到新创建的手势链530下,通过算法拟合出多指操作的捏合过程窗口缩放的系数和位置,赋值给新创建的手势链530的显示控制器531,达到控制显示屏中的顶层窗口随手缩放和位移的目的。
在本例中的三指及以上的多指触控操作识别成功之后,终端还需要将窗口监视器521的栈顶的第一任务项521a下的第二任务项521b的可见性变为可见,重新开始第二任务项521b中的活动对象521b1,并将活动对象521b1中的窗口对象显示。
在响应于触摸抬起(up)事件时,本申请提供两种状态。在一种可能的状态中,终端进入小窗模式,将第一任务项521a重定父级到窗口监视器521下,并且将手势链530当前的缩放系数和位置应用到显示控制器531中,同时设置窗口模式为浮窗窗口模式。最后把第二任务项521b中的顶层活动(top activity)重新开始(resume)。
在另一种可能的状态中,手指捏合最后取消进入小窗模式,此时也将第一任务项521a从手势链530重定父级到窗口监视器521下,但需要把显示控制器531恢复为默认设置以及恢复缩放系数为1,同时将第二任务项521b重新设置为不可见状态,且第二任务项521b中的活动对象521b1也需要重新进入停止(stop)状态。
综上所述,本实施例提供的调整界面尺寸的方法,能够在应用界面全屏显示时,通过多指触控操作并拢来控制应用界面缩小为浮窗,其中,终端能够在面积比例大于第一阈值时,创建浮窗,使得浮窗的创建过程不突兀,降低了调整界面尺寸的功能被误触发的可能性。
可选的,本申请能够在浮窗创建之后跟随用户的手移动,在用户放手的位置显示调整后的应用界面,提高了用户控制应用界面的显示位置的能力。
可选的,本申请能够在应用界面缩小超过一定阈值时直接关闭,或者,本申请也能够在应用从浮窗放大超过一定阈值时直接全屏显示,提高了应用界面在全屏、浮窗和关闭几个状态之间的灵活变化能力。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参考图8,图8是本申请一个示例性实施例提供的一种调整界面尺寸的装置的结构框图。该调整界面尺寸的装置可以通过软件、硬件或者两者的结合实现成为终端的全部或一部分。该装置包括:
界面显示模块710,用于显示应用界面;
第一确定模块720,用于响应于对所述应用界面的多指触控操作,确定由触控点形成的第一区域,所述多指触控操作为包含至少三个所述触控点的触控操作;
第二确定模块730,用于响应于所述触控点的位置发生变化,确定由所述触控点形成的第二区域;
尺寸调整模块740,用于根据所述第一区域和所述第二区域的面积比例,调整所述应用界面的尺寸。
在一个可选的实施例中,所述界面显示模块710,用于显示第一尺寸的所述应用界面,所述第一尺寸是全屏的尺寸;所述尺寸调整模块740,用于根据所述第一区域和所述第二区域的面积比例,创建第二尺寸的浮窗,所述第一尺寸和所述第二尺寸的比例等于所述面积比例;将所述应用界面的尺寸调整为所述第二尺寸,以便所述应用界面在所述浮窗中显示。
在一个可选的实施例中,所述尺寸调整模块740,用于响应于所述第一区域大于所述第二区域,且所述面积比例大于第一阈值,创建所述第二尺寸的所述浮窗。
在一个可选的实施例中,所述界面显示模块710,用于在第三尺寸的浮窗显示所述应用界面;所述尺寸调整模块740,用于响应于所述第一区域大于所述第二区域,根据所述面积比例缩小所述浮窗至第四尺寸,并将应用界面的尺寸调整为第四尺寸,以便在在缩小后的所述浮窗中显示所述应用界面,所述第三尺寸和所述第四尺寸的比例等于所述面积比例;或,所述尺寸调整模块740,用于响应于所述第一区域小于所述第二区域,根据所述面积比例放大所述浮窗至第五尺寸,并将所述应用界面的尺寸调整为所述第五尺寸,以便在放大后的所述浮窗中显示所述应用界面,所述第三尺寸和所述第五尺寸的比例等于所述面积比例。
在一个可选的实施例中,所述尺寸调整模块740,用于响应于所述面积比例小于或等于第二阈值,关闭所述浮窗并全屏显示所述应用界面;或,所述尺寸调整模块740,用于响应于所述面积比例大于或等于第三阈值,关闭所述浮窗并停止显示所述应用界面。
在一个可选的实施例中,所述第二确定模块730,用于响应于所述触控点的位置发生变化且所述触控点的数量大于第四阈值,确定由所述触控点形成的第二区域。
在一个可选的实施例中,所述装置还包括停止调整模块,用于响应于所述触控点的数量小于或等于所述第四阈值,停止调整所述应用界面的尺寸。
在一个可选的实施例中,所述第一区域为矩形区域;所述第二确定模块730,用于获取各个形成所述第一区域的所述触控点的横坐标中的最大横坐标和最小横坐标,和,各个所述触控点的纵坐标中的最大纵坐标和最小纵坐标;根据所述最大横坐标和所述最小横坐标中的任一横坐标,和,所述最大纵坐标和所述最小纵坐标中的任一纵坐标的两两组成,得到所述第一区域的四个第一顶点;将所述四个第一顶点围成的矩形确定为所述第一区域。或者,所述第二确定模块730,用于获取各个形成所述第二区域的所述触控点的横坐标中的最大横坐标和最小横坐标,和,各个所述触控点的纵坐标中的最大纵坐标和最小纵坐标;根据所述最大横坐标和所述最小横坐标中的任一横坐标,和,所述最大纵坐标和所述最小纵坐标中的任一纵坐标的两两组成,得到所述第二区域的四个第二顶点;将所述四个第二顶点围成的矩形确定为所述第二区域。
在一个可选的实施例中,所述装置还包括跟随调整模块,用于当所述触控点的位置发生变化,确定所述第二区域中的参考点的位置变化向量;根据所述位置变化向量,调整所述浮窗的显示位置;。
综上所述,本实施例提供的调整界面尺寸的装置,能够在应用界面全屏显示时,通过多指触控操作并拢来控制应用界面缩小为浮窗,其中,终端能够在面积比例大于第一阈值时,创建浮窗,使得浮窗的创建过程不突兀,降低了调整界面尺寸的功能被误触发的可能性。
可选的,本申请能够在浮窗创建之后跟随用户的手移动,在用户放手的位置显示调整后的应用界面,提高了用户控制应用界面的显示位置的能力。
可选的,本申请能够在应用界面缩小超过一定阈值时直接关闭,或者,本申请也能够在应用从浮窗放大超过一定阈值时直接全屏显示,提高了应用界面在全屏、浮窗和关闭几个状态之间的灵活变化能力。
示例性地,本申请实施例所示的调整界面尺寸的方法,可以应用在终端中,该终端具备触摸屏且具备调整界面尺寸的功能。终端可以包括手机、平板电脑、膝上型电脑、智能手表、数码相机、MP4播放终端、MP5播放终端、学习机、点读机、电纸书、电子词典、车载终端、虚拟现实(Virtual Reality,VR)播放终端或增强现实(Augmented Reality,AR)播放终端等。
请参考图9,图9是本申请一个示例性实施例提供的一种终端的结构框图,如图9所示,该终端包括处理器820、存储器840和触摸屏860,所述存储器840中存储有至少一条指令,所述指令由所述处理器820加载并执行以实现如本申请各个方法实施例所述的调整界面尺寸的方法。
在本申请中,终端800显示应用界面;响应于对所述应用界面的多指触控操作,确定由触控点形成的第一区域,所述多指触控操作为包含至少三个所述触控点的触控操作;响应于所述触控点的位置发生变化,确定由所述触控点形成的第二区域;根据所述第一区域和所述第二区域的面积比例,调整所述应用界面的尺寸。
处理器820可以包括一个或者多个处理核心。处理器820利用各种接口和线路连接整个终端800内的各个部分,通过运行或执行存储在存储器840内的指令、程序、代码集或指令集,以及调用存储在存储器840内的数据,执行终端800的各种功能和处理数据。可选的,处理器820可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器820可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器820中,单独通过一块芯片进行实现。
存储器840可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选的,该存储器840包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器840可用于存储指令、程序、代码、代码集或指令集。存储器840可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储下面各个方法实施例中涉及到的数据等。
触摸屏860用于接收用户的触控操作,能够接收多点触控操作。
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如上各个实施例所述的调整界面尺寸的方法。
需要说明的是:上述实施例提供的调整界面尺寸的装置在执行调整界面尺寸的方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的调整界面尺寸的装置与调整界面尺寸的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的能够实现的示例性的实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种调整界面尺寸的方法,所述方法由终端执行,所述方法包括:
    显示应用界面;
    响应于对所述应用界面的多指触控操作,确定由触控点形成的第一区域,所述多指触控操作为包含至少三个所述触控点的触控操作;
    响应于所述触控点的位置发生变化,确定由所述触控点形成的第二区域;
    根据所述第一区域和所述第二区域的面积比例,调整所述应用界面的尺寸。
  2. 根据权利要求1所述的方法,所述显示应用界面,包括:
    显示第一尺寸的所述应用界面,所述第一尺寸是全屏的尺寸;
    所述根据所述第一区域和所述第二区域的面积比例,调整所述应用界面的尺寸,包括:
    根据所述第一区域和所述第二区域的面积比例,创建第二尺寸的浮窗,所述第一尺寸和所述第二尺寸的比例等于所述面积比例;
    将所述应用界面的尺寸调整为所述第二尺寸,以便所述应用界面在所述浮窗中显示。
  3. 根据权利要求2所述的方法,所述创建第二尺寸的浮窗,包括:
    响应于所述第一区域大于所述第二区域,且所述面积比例大于第一阈值,创建所述第二尺寸的所述浮窗。
  4. 根据权利要求1所述的方法,所述显示应用界面,包括:
    在第三尺寸的浮窗中显示所述应用界面;
    所述根据所述第一区域和所述第二区域的面积比例,调整所述应用界面的尺寸,包括:
    响应于所述第一区域大于所述第二区域,根据所述面积比例缩小所述浮窗至第四尺寸,并将所述应用界面的尺寸调整为所述第四尺寸,以便在缩小后的所述浮窗中显示所述应用界面,所述第三尺寸和所述第四尺寸的比例等于所述面积比例;或
    响应于所述第一区域小于所述第二区域,根据所述面积比例放大所述浮窗至第五尺寸,并将所述应用界面的尺寸调整为所述第五尺寸,以便在放大后的所述浮窗中显示所述应用界面,所述第三尺寸和所述第五尺寸的比例等于所述面积比例。
  5. 根据权利要求4所述的方法,所述响应于所述第一区域小于所述第二区域,根据所述面积比例放大所述浮窗,包括:
    响应于所述面积比例小于或等于第二阈值,关闭所述浮窗并全屏显示所述应用界面;
    所述响应于所述第一区域大于所述第二区域,根据所述面积比例缩小所述浮窗,包括:
    响应于所述面积比例大于或等于第三阈值,关闭所述浮窗并停止显示所述应用界面。
  6. 根据权利要求1至5任一所述的方法,所述响应于所述触控点的位置发生变化,确定由所述触控点形成的第二区域,包括:
    响应于所述触控点的位置发生变化且所述触控点的数量大于第四阈值,确定由所述触控点形成的第二区域。
  7. 根据权利要求6所述的方法,所述方法还包括:
    响应于所述触控点的数量小于或等于所述第四阈值,停止调整所述应用界面的尺寸。
  8. 根据权利要求1至5任一所述的方法,所述第一区域为矩形区域;
    所述确定由触控点形成的第一区域,包括:
    获取各个形成所述第一区域的所述触控点的横坐标中的最大横坐标和最小横坐标,和,各个所述触控点的纵坐标中的最大纵坐标和最小纵坐标;
    根据所述最大横坐标和所述最小横坐标中的任一横坐标,和,所述最大纵坐标和所述最小纵坐标中的任一纵坐标的两两组成,得到所述第一区域的四个第一顶点;
    将所述四个第一顶点围成的矩形确定为所述第一区域;
    所述确定由所述触控点形成的第二区域,包括:
    获取各个形成所述第二区域的所述触控点的横坐标中的最大横坐标和最小横坐标,和,各个所述触控点的纵坐标中的最大纵坐标和最小纵坐标;
    根据所述最大横坐标和所述最小横坐标中的任一横坐标,和,所述最大纵坐标和所述最小纵坐标中的任一纵坐标的两两组成,得到所述第二区域的四个第二顶点;
    将所述四个第二顶点围成的矩形确定为所述第二区域。
  9. 根据权利要求1所述的方法,所述方法还包括:
    当所述触控点的位置发生变化,确定所述第二区域中的参考点的位置变化向量;
    根据所述位置变化向量,调整所述浮窗的显示位置。
  10. 一种调整界面尺寸的装置,所述装置包括:
    界面显示模块,用于显示应用界面;
    第一确定模块,用于响应于对所述应用界面的多指触控操作,确定由触控点形成的第一区域,所述多指触控操作为包含至少三个所述触控点的触控操作;
    第二确定模块,用于响应于所述触控点的位置发生变化,确定由所述触控点形成的第二区域;
    尺寸调整模块,用于根据所述第一区域和所述第二区域的面积比例,调整所述应用界面的尺寸。
  11. 根据权利要求10所述的装置,所述界面显示模块,用于:
    显示第一尺寸的所述应用界面,所述第一尺寸是全屏的尺寸;
    所述尺寸调整模块,用于:
    根据所述第一区域和所述第二区域的面积比例,创建第二尺寸的浮窗,所述第一尺寸和所述第二尺寸的比例等于所述面积比例;
    将所述应用界面的尺寸调整为所述第二尺寸,以便所述应用界面在所述浮窗中显示。
  12. 根据权利要求11所述的装置,所述尺寸调整模块,用于:
    响应于所述第一区域大于所述第二区域,且所述面积比例大于第一阈值,创建所述第二尺寸的所述浮窗。
  13. 根据权利要求10所述的方法,所述界面显示模块,用于:
    在第三尺寸的浮窗中显示所述应用界面;
    所述尺寸调整模块,用于:
    响应于所述第一区域大于所述第二区域,根据所述面积比例缩小所述浮窗至第四尺寸,并将所述应用界面的尺寸调整为所述第四尺寸,以便在缩小后的所述浮窗中显示所述应用界面,所述第三尺寸和所述第四尺寸的比例等于所述面积比例;或,
    所述尺寸调整模块,用于:
    响应于所述第一区域小于所述第二区域,根据所述面积比例放大所述浮窗至第五尺寸,并将所述应用界面的尺寸调整为所述第五尺寸,以便在放大后的所述浮窗中显示所述 应用界面,所述第三尺寸和所述第五尺寸的比例等于所述面积比例。
  14. 根据权利要求13所述的装置,所述尺寸调整模块,用于:
    响应于所述面积比例小于或等于第二阈值,关闭所述浮窗并全屏显示所述应用界面;
    所述尺寸调整模块,用于:
    响应于所述面积比例大于或等于第三阈值,关闭所述浮窗并停止显示所述应用界面。
  15. 根据权利要求10至14任一所述的装置,所述第二确定模块,用于:
    响应于所述触控点的位置发生变化且所述触控点的数量大于第四阈值,确定由所述触控点形成的第二区域。
  16. 根据权利要求15所述的装置,所述装置还包括:
    停止调整模块,用于响应于所述触控点的数量小于或等于所述第四阈值,停止调整所述应用界面的尺寸。
  17. 根据权利要求10至14任一所述的装置,所述第一区域为矩形区域;
    所述第二确定模块,用于:
    获取各个形成所述第一区域的所述触控点的横坐标中的最大横坐标和最小横坐标,和,各个所述触控点的纵坐标中的最大纵坐标和最小纵坐标;
    根据所述最大横坐标和所述最小横坐标中的任一横坐标,和,所述最大纵坐标和所述最小纵坐标中的任一纵坐标的两两组成,得到所述第一区域的四个第一顶点;
    将所述四个第一顶点围成的矩形确定为所述第一区域;
    所述第二确定模块,用于:
    获取各个形成所述第二区域的所述触控点的横坐标中的最大横坐标和最小横坐标,和,各个所述触控点的纵坐标中的最大纵坐标和最小纵坐标;
    根据所述最大横坐标和所述最小横坐标中的任一横坐标,和,所述最大纵坐标和所述最小纵坐标中的任一纵坐标的两两组成,得到所述第二区域的四个第二顶点;
    将所述四个第二顶点围成的矩形确定为所述第二区域。
  18. 一种终端,所述终端包括处理器、和与所述处理器相连的存储器,以及存储在所述存储器上的程序指令,所述处理器执行所述程序指令时实现如权利要求1至9任一所述的调整界面尺寸的方法。
  19. 一种计算机可读存储介质,所述存储介质中存储有程序指令,所述程序指令被处理器执行时实现如权利要求1至9任一所述的调整界面尺寸的方法。
  20. 一种计算机程序产品,所述计算机程序产品包括程序指令,所述程序指令被终端的处理器执行,使得所述终端执行如权利要求1至9任一所述的调整界面尺寸的方法。
PCT/CN2022/096652 2021-06-25 2022-06-01 调整界面尺寸的方法、装置、终端、存储介质及程序产品 WO2022267849A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110710076.3 2021-06-25
CN202110710076.3A CN113342445A (zh) 2021-06-25 2021-06-25 调整界面尺寸的方法、装置、终端及存储介质

Publications (1)

Publication Number Publication Date
WO2022267849A1 true WO2022267849A1 (zh) 2022-12-29

Family

ID=77478716

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/096652 WO2022267849A1 (zh) 2021-06-25 2022-06-01 调整界面尺寸的方法、装置、终端、存储介质及程序产品

Country Status (2)

Country Link
CN (1) CN113342445A (zh)
WO (1) WO2022267849A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527165A (zh) * 2020-12-16 2021-03-19 Oppo广东移动通信有限公司 界面显示状态的调整方法及装置、设备、存储介质
CN113342445A (zh) * 2021-06-25 2021-09-03 Oppo广东移动通信有限公司 调整界面尺寸的方法、装置、终端及存储介质
CN114722447B (zh) * 2022-06-09 2022-11-01 广东时谛智能科技有限公司 多指触控展示鞋子模型方法、装置、设备及存储介质
CN117666766A (zh) * 2022-08-26 2024-03-08 荣耀终端有限公司 应用卡片调整方法、装置、终端设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102736769A (zh) * 2011-03-31 2012-10-17 比亚迪股份有限公司 多点缩放动作的识别方法和装置
US20130283206A1 (en) * 2012-04-23 2013-10-24 Samsung Electronics Co., Ltd. Method of adjusting size of window and electronic device therefor
CN104571791A (zh) * 2013-10-28 2015-04-29 联想(北京)有限公司 一种信息处理方法及电子设备
CN109254707A (zh) * 2018-09-14 2019-01-22 Oppo广东移动通信有限公司 一种窗口调节的方法、移动终端及计算机可读存储介质
CN111399720A (zh) * 2020-03-24 2020-07-10 北京小米移动软件有限公司 一种显示应用界面的方法、装置及存储介质
CN113342445A (zh) * 2021-06-25 2021-09-03 Oppo广东移动通信有限公司 调整界面尺寸的方法、装置、终端及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140062917A1 (en) * 2012-08-29 2014-03-06 Samsung Electronics Co., Ltd. Method and apparatus for controlling zoom function in an electronic device
CN103677721B (zh) * 2013-12-27 2016-01-06 腾讯科技(深圳)有限公司 对终端显示界面进行缩放的方法及终端设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102736769A (zh) * 2011-03-31 2012-10-17 比亚迪股份有限公司 多点缩放动作的识别方法和装置
US20130283206A1 (en) * 2012-04-23 2013-10-24 Samsung Electronics Co., Ltd. Method of adjusting size of window and electronic device therefor
CN104571791A (zh) * 2013-10-28 2015-04-29 联想(北京)有限公司 一种信息处理方法及电子设备
CN109254707A (zh) * 2018-09-14 2019-01-22 Oppo广东移动通信有限公司 一种窗口调节的方法、移动终端及计算机可读存储介质
CN111399720A (zh) * 2020-03-24 2020-07-10 北京小米移动软件有限公司 一种显示应用界面的方法、装置及存储介质
CN113342445A (zh) * 2021-06-25 2021-09-03 Oppo广东移动通信有限公司 调整界面尺寸的方法、装置、终端及存储介质

Also Published As

Publication number Publication date
CN113342445A (zh) 2021-09-03

Similar Documents

Publication Publication Date Title
WO2022267849A1 (zh) 调整界面尺寸的方法、装置、终端、存储介质及程序产品
US11706521B2 (en) User interfaces for capturing and managing visual media
US11770601B2 (en) User interfaces for capturing and managing visual media
EP3680766B1 (en) Split screen display method, apparatus, terminal, and storage medium
AU2019100488B4 (en) Devices, methods, and graphical user interfaces for navigating between user interfaces, displaying a dock, and displaying system user interface elements
US11567644B2 (en) Cursor integration with a touch screen user interface
US10133396B2 (en) Virtual input device using second touch-enabled display
US11543928B2 (en) Method for displaying input method interface of improved accuracy of input, device, and terminal
WO2019114828A1 (zh) 用户界面显示方法、装置、设备及存储介质
WO2019174546A1 (zh) 用户界面显示方法、装置、设备及存储介质
US8701000B2 (en) Carousel user interface for document management
US11797150B2 (en) Devices, methods, and graphical user interfaces for navigating between user interfaces, displaying a dock, and displaying system user interface elements
TW201617837A (zh) 一種螢幕顯示視窗的處理方法以及移動終端
WO2019047147A1 (zh) 图标移动方法及装置
JP2009503742A (ja) オンザフライのコントロール機能を有する仮想拡大鏡
CN117501234A (zh) 用于与多个显示设备交互的系统和方法
CN112162685B (zh) 属性调节方法、装置和电子设备
KR102662244B1 (ko) 사용자 인터페이스들 사이를 내비게이팅하고 도크를 디스플레이하며 시스템 사용자 인터페이스 요소들을 디스플레이하기 위한 디바이스들, 방법들, 및 그래픽 사용자 인터페이스들
WO2022242515A1 (zh) 界面显示方法及装置
WO2024093456A1 (zh) 一种信息展示方法、装置、计算机设备及存储介质
US20240045564A1 (en) Devices, Methods, and Graphical User Interfaces for Navigating Between User Interfaces, Displaying a Dock, and Displaying System User Interface Elements
WO2022218111A1 (zh) 应用界面的显示方法、装置、终端及存储介质
US20220091736A1 (en) Method and apparatus for displaying page, graphical user interface, and mobile terminal
CN111124246A (zh) 界面交互方法、设备及存储介质
WO2024032139A1 (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: 22827346

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE