CN109298909B - Window adjusting method, mobile terminal and computer readable storage medium - Google Patents

Window adjusting method, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN109298909B
CN109298909B CN201811074416.2A CN201811074416A CN109298909B CN 109298909 B CN109298909 B CN 109298909B CN 201811074416 A CN201811074416 A CN 201811074416A CN 109298909 B CN109298909 B CN 109298909B
Authority
CN
China
Prior art keywords
free window
point
window
display interface
free
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.)
Active
Application number
CN201811074416.2A
Other languages
Chinese (zh)
Other versions
CN109298909A (en
Inventor
林志泳
付亮晶
李同喜
敬雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811074416.2A priority Critical patent/CN109298909B/en
Publication of CN109298909A publication Critical patent/CN109298909A/en
Application granted granted Critical
Publication of CN109298909B publication Critical patent/CN109298909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

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

Abstract

The application is applicable to the technical field of mobile terminals, and provides a window adjusting method, a mobile terminal and a computer readable storage medium, wherein the method comprises the following steps: when an application program is displayed on a mobile terminal in a free window mode, whether a preset instruction is received or not is monitored, if the preset instruction is received, a point is selected from the free window, the point selected from the free window is marked as a datum point of the free window, a point is selected from a display interface of the mobile terminal, the point selected from the display interface is marked as a locating point of the display interface, and the free window is zoomed and processed based on the datum point of the free window and the locating point of the display interface, wherein in the zooming and processing process of the free window, the datum point of the free window and the locating point of the display interface are kept coincident, and the problems that the current application program interface is single in display and cannot be freely adjusted can be solved through the application.

Description

Window adjusting method, mobile terminal and computer readable storage medium
Technical Field
The present application belongs to the technical field of mobile terminals, and in particular, to a window adjusting method, a mobile terminal, and a computer-readable storage medium.
Background
Android is a Linux-based operating system with free and open source codes, and is mainly used for mobile devices such as smart phones and tablet computers. Only one foreground running application program interface is displayed at a time based on a display interface in the mobile device before android 7.0.
In order to enable the user to obtain better experience, two application program interfaces can be displayed simultaneously in android 7.0. However, the two application interfaces must be displayed in a split screen form and cannot be freely adjusted. Therefore, the display mode of the current application program interface is single and cannot be freely adjusted.
Disclosure of Invention
In view of this, embodiments of the present application provide a window adjustment method, a mobile terminal, and a computer-readable storage medium, so as to solve the problems that the current application program interface is single in display and cannot be freely adjusted.
A first aspect of an embodiment of the present application provides a method for adjusting a window, including:
when an application program is displayed in a free window mode on the mobile terminal, monitoring whether a preset instruction is received or not;
if a preset instruction is received, determining a free window corresponding to the preset instruction, selecting a point from the free window, marking the point selected from the free window as a reference point of the free window, selecting a point from a display interface of the mobile terminal, and marking the point selected from the display interface as a positioning point of the display interface;
and zooming the free window based on the reference point of the free window and the positioning point of the display interface, wherein in the zooming process of the free window, the reference point of the free window and the positioning point of the display interface are overlapped.
A second aspect of an embodiment of the present application provides a mobile terminal, including:
the monitoring unit is used for monitoring whether a preset instruction is received or not when the application program is displayed in a free window mode on the mobile terminal;
the determining unit is used for determining a free window corresponding to a preset instruction if the preset instruction is received, selecting a point from the free window, marking the point selected from the free window as a reference point of the free window, selecting a point from a display interface of the mobile terminal, and marking the point selected from the display interface as a positioning point of the display interface;
and the scaling unit is used for scaling the free window based on the reference point of the free window and the positioning point of the display interface, wherein in the scaling process of the free window, the reference point of the free window and the positioning point of the display interface are kept coincident.
A third aspect of an embodiment of the present application provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method provided in the first aspect of the embodiment of the present application when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium storing a computer program which, when executed by one or more processors, performs the steps of the method provided by the first aspect of embodiments of the present application.
A fifth aspect of embodiments of the present application provides a computer program product comprising a computer program that, when executed by one or more processors, performs the steps of the method provided by the first aspect of embodiments of the present application.
The embodiment of the application provides a method for adjusting a window, when an application program is displayed in a free window mode on a mobile terminal, whether a preset instruction is received or not is monitored, if the preset instruction is received, a free window corresponding to the preset instruction is determined, one point is selected from the free window and is marked as a reference point of the free window, one point is selected from a display interface of the mobile terminal and is marked as a positioning point of the display interface, and the free window is zoomed and processed based on the reference point of the free window and the positioning point of the display interface, wherein in the process of zooming and processing of the free window, the reference point of the free window and the positioning point of the display interface are kept coincident, the application program can be controlled to be displayed in a Freeform window mode, when the application program is displayed in the free window mode, the free window corresponding to the preset instruction can be zoomed according to the received preset instruction, and the position of the zoomed free window can be determined according to the reference point of the free window and the positioning point of the display interface when the zooming is performed, so that the problems that the display of an application program interface is single and the application program interface cannot be freely adjusted are solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart of an implementation of a method for adjusting a window provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating an implementation of another method for adjusting a window according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of an application scenario provided in an embodiment of the present application;
FIG. 4 is a schematic flow chart illustrating an implementation of another method for adjusting a window according to an embodiment of the present application;
fig. 5 is a schematic diagram of another application scenario provided in an embodiment of the present application;
fig. 6 is a schematic block diagram of a mobile terminal according to an embodiment of the present application;
fig. 7 is a schematic block diagram of another mobile terminal provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In order to describe the technical solution described in the present application, an application scenario of the present application is introduced first, and currently, an interface of one application is usually displayed in a display interface of a mobile terminal such as a mobile phone, or interfaces of two applications are displayed in a split-screen manner, but when the interfaces of two applications are displayed in a split-screen manner, an interface of one application is enlarged, and then an interface of the other application becomes smaller, which is not convenient for freely adjusting a window of the application. Therefore, an embodiment of the present application provides a Freeform Window (Freeform Window or Freeform Window), where the Freeform Window is one of Multi-Window (Multi-Window) modes introduced by Android N, and the Freeform Window mode can implement free scaling, free movement, and the like of a Window. Of course, the multi-window mode includes a split-screen mode (split-screen mode), a Picture-in-Picture mode (Picture-in-Picture mode) in addition to a Free mode (Free form). When the interface of the application is displayed in the form of a Freeform window, the shape, size, or position of the interface of the application (Freeform window) may be adjusted. The following description will be made by way of specific examples.
Fig. 1 is a schematic implementation flowchart of a method for adjusting a window provided in an embodiment of the present application, and as shown in the figure, the method may include the following steps:
step S101, when the application program of the mobile terminal is displayed in a free window mode, whether a preset instruction is received or not is monitored.
In the embodiment of the application, when the mobile terminal has the application program to be displayed in the Freeform window, the size, the shape and the position of the interface of the application program displayed in the Freeform window can be freely adjusted. However, when the application of the mobile terminal is not displayed in the Freeform window, an interface of one application may be displayed in the display interface of the mobile terminal, and the currently displayed interface of the application occupies almost the entire display interface of the mobile terminal. When the application program of the mobile terminal is not displayed in the Freeform window, the interfaces of the two application programs may be displayed in the display interface of the mobile terminal, and the currently displayed interfaces of the two application programs are connected with each other, and the interfaces of the two application programs almost occupy the whole display interface of the mobile terminal.
In the embodiment of the present application, a preset trigger condition may be set, and the application program in the mobile terminal may be switched from another mode (a mode other than the mode in which display is performed in the manner of a Freeform window) to the mode in which display is performed in the manner of the Freeform window by the preset trigger condition. For example, the preset physical keys or the combination of the preset physical keys, the preset gesture information, and the virtual buttons in the visual interface of the mobile terminal may be used.
In the embodiment of the present application, a preset instruction may be set to adjust the Freeform window, for example, set gesture information, set touch information, and the like.
Step S102, if a preset instruction is received, determining a free window corresponding to the preset instruction, selecting a point from the free window, marking the point selected from the free window as a reference point of the free window, selecting a point from a display interface of the mobile terminal, and marking the point selected from the display interface as a positioning point of the display interface;
in this embodiment of the application, if an application of a mobile terminal is displayed in a Freeform window, a plurality of application interfaces may be simultaneously displayed on a display interface of the mobile terminal, and each application interface may be a Freeform window, and when a preset instruction is monitored, the Freeform window corresponding to the preset instruction needs to be determined, for example, when a plurality of Freeform windows are displayed on the display interface of the mobile terminal: the method includes the steps that a Freeform window A, Freeform window B, Freeform window C is provided, a preset instruction is a double-click operation, and when a user performs the double-click operation in a display area corresponding to the Freeform window A, a trigger event meeting preset conditions exists in the Freeform window A; when the user performs double-click operation in the area where the Freeform window is not displayed (the area outside the Freeform window A, Freeform window B and the Freeform window C), it indicates that the preset instruction does not have a corresponding Freeform window (the preset log is double-click operation) or the preset instruction is not monitored (the preset instruction is double-click operation in the display area of the free window).
If the free window corresponding to the preset instruction is determined, a reference point of the Freeform window and a positioning point of the display interface need to be determined, wherein the reference point is actually one point selected from the free window. The positioning point of the display interface is actually a point selected from the display interface, and the reference point of the Freeform window and the positioning point of the display interface of the mobile terminal can be selected by a user in the display interface, for example, by a touch control mode; or determined by the system according to the position relation of the Freeform window displayed in the current display interface and the like. And are not intended to be limiting herein.
Step S103, zooming the free window based on the reference point of the free window and the positioning point of the display interface, wherein in the zooming process of the free window, the reference point of the free window and the positioning point of the display interface are overlapped.
In the embodiment of the present application, the preset instructions are all used to perform scaling processing on the Freeform window. When the Freeform window is scaled, the position of the Freeform window after scaling needs to be defined, and in the embodiment of the present application, the position of the Freeform window after scaling is determined by the reference point of the Freeform window and the positioning point of the display interface. The reference point is a point in the content displayed in the Freeform window, the anchor point is a position in the display interface of the mobile terminal, and the reference point and the anchor point may or may not coincide before zooming, but after zooming, the reference point and the anchor point coincide. For example, the coordinates of the reference point in the display interface of the mobile terminal before the Freeform window is zoomed are (x1, y1), the coordinates in the Freeform window are (20%, 50%), and the coordinates of the anchor point in the display interface are (x2, y2), so that the coordinates of the reference point in the display interface of the mobile terminal after the Freeform window is zoomed become (x2, y2), and the coordinates in the Freeform window are still (20%, 50%). 20% is to be understood as meaning that the reference point occupies 20% of the length of the Freeform window in the horizontal direction of the Freeform window, 50% is to be understood as meaning that the reference point occupies 50% of the width of the Freeform window in the vertical direction of the Freeform window.
The method and the device for displaying the free window can control the application program to be displayed in a Freeform window mode, when the application program is displayed in a free window mode, the free window corresponding to the preset instruction can be zoomed according to the received preset instruction, and when the free window is zoomed, the position of the zoomed free window can be determined according to the reference point of the free window and the positioning point of the display interface, so that the problems that the application program interface is single in display and cannot be freely adjusted are solved.
Fig. 2 is a schematic flowchart of another method for adjusting a window according to an embodiment of the present disclosure, where as shown in the figure, the embodiment of the present disclosure may include the following steps:
step S201, when the application program is displayed in a free window manner on the mobile terminal, monitoring whether a preset instruction is received.
The content of step S201 is the same as the content of step S101, and reference may be made to the description of step S101, which is not repeated herein.
Step S202, if the received preset instruction indicates that two touch points exist on the current display interface of the application program in the free window, at least one piece of sliding information of the touch points exists, and the distance between the two touch points changes, the free window where the initial positions of the two touch points are located is the free window corresponding to the preset instruction, and a central point of a connection line between the initial positions of the two touch points is obtained.
In this embodiment of the application, a plurality of preset instructions may be set, and when the preset instructions indicate that two touch points exist on a current display interface of an application program in the free window, at least one piece of sliding information of the touch points exists, and a distance between the two touch points changes, it indicates that the Freeform window can be scaled. Before the Freeform window is zoomed, however, a free window to be adjusted, a reference point of the free window and a positioning point of a display interface of the mobile terminal need to be determined according to the initial position of the touch point.
The process of determining the reference point of the Freeform window and the location point of the display interface of the mobile terminal may include: and selecting a central point of a connecting line between the initial positions of the two touch points, and determining a reference point of the Freefom window and a positioning point of a display interface of the mobile terminal according to the central point.
If the touch point has the relevant sliding information, the starting point position of the touch point in the sliding information is the initial position of the touch point, and if the touch point does not have the relevant sliding information, the position of the touch point is kept unchanged, and the position of the touch point is the initial position.
Step S203, mark the point in the free window corresponding to the center point as a reference point, and mark the position in the display interface corresponding to the center point as a positioning point.
In this embodiment of the present application, taking a point in the Freeform window corresponding to the center point as a reference point, and taking a position in the display interface corresponding to the center point as an anchor point may be represented as: and taking the coordinate in the Freeform window corresponding to the central point as the coordinate of the reference point, taking the content point of the Freeform window corresponding to the coordinate as the reference point, taking the coordinate in the display interface corresponding to the central point as the coordinate of the positioning point, and taking the point of the display interface corresponding to the coordinate as the positioning point.
Of course, in practical applications, the center point of the Freeform window may also be used as a reference point, and a position in the display interface corresponding to the center point of the connection line between the initial positions of the two touch points is used as a positioning point, so that when scaling is performed, the center point of the Freeform window needs to be translated to the position of the center point of the connection line between the initial positions of the two touch points on the display interface.
For example, as shown in fig. 3, a Freeform window shown by a solid line is a position before processing, and when a user performs a sliding operation on a touch screen of the mobile terminal as shown in fig. 3: and at the moment, if the center point (hollow square frame) of the Freeform window is taken as a reference point and the position in the display interface corresponding to the center point of the connecting line between the initial positions of the two touch points is taken as a positioning point, the position of the center point (solid circle) of the connecting line between the initial positions (hollow circle) of the two touch points in the display interface is taken as the positioning point. Before scaling the Freeform window, the Freeform window needs to be translated, so that the center point (hollow square) of the Freeform window coincides with the center point (solid circle) of the connecting line of the initial positions (hollow circles) of the two touch points. Then, the translated Freeform window is scaled.
Step S204, based on the reference point of the free window and the positioning point of the display interface, zooming the free window, wherein in the zooming process of the free window, the reference point of the free window and the positioning point of the display interface are overlapped.
The content of step S204 is consistent with the content of step S103, and reference may be made to the description of step S103, which is not repeated herein.
As another embodiment of the present application, if the distance between two touch points changes to increase, the Freeform window is controlled to perform an amplification operation, and the amplification factor of the Freeform window is determined by the distance change value between two touch points;
and if the distance change between the two touch points is reduced, controlling the Freefom window to perform reduction operation, wherein the reduction multiple of the Freefom window is determined by the distance change value between the two touch points.
In the embodiment of the present application, when the distance change is an increase, a zoom-in operation is corresponded, and when the distance change is a decrease, a zoom-out operation is corresponded. The positions of the two touch points are monitored in real time, so that the distance change value between the two touch points can be obtained in real time, the amplification factor corresponding to the distance change value can be preset, and then the Freform window is controlled to amplify the corresponding factor according to the determined distance change value. When the Freeform window is enlarged, the following can be set: the form of the content displayed within the Freeform window remains unchanged (e.g., font size is unchanged), enlarging the Freeform window; it may also be arranged that the content displayed within the Freeform window is enlarged (font size changes) as the Freeform window is enlarged. The principle of the zoom-out operation refers to the principle of the zoom-in operation, and is not described in detail.
As another embodiment of the present application, when the scaling processing is a zoom-in processing, the scaling processing on the free window based on the reference point of the free window and the anchor point of the display interface includes:
monitoring the position of a frame line of the free window, wherein the frame line is one edge of the free window;
and if any frame line of the free window is overlapped with any boundary line of the display interface, stopping the amplification processing of the free window, and amplifying the display content in the free window.
In the embodiment of the application, when the Freeform window is magnified, the magnification factor is usually determined by a distance change value between two touch points, after the distance between the two touch points increases to a certain degree, at least one frame line of the Freeform window may coincide with at least one boundary line of the display interface, that is, as long as one frame line of the Freeform window coincides with one boundary line of the display interface, it indicates that the Freeform window is magnified again, and the frame line may exceed the display interface, at this time, the magnification process of the Freeform window may be stopped, and if the user continues to slide, it may be possible to see the display content in the Freeform window clearly, at this time, if the distance between the two touch points continues to increase, the display content in the Freeform window may be magnified.
As another embodiment of the present application, when the scaling process is a reduction process, the scaling process performed on the free window based on the reference point of the free window and the anchor point of the display interface includes:
judging whether the proportion of the display content in the free window and a preset content template is consistent or not;
if the proportion of the display content in the free window is inconsistent with that of the content template, performing reduction processing on the display content in the free window;
and when the display content in the free window is reduced to be consistent with the proportion of the content template, reducing the free window.
In the embodiment of the present application, the process is completely opposite to that of the previous embodiment, for example, a certain font size, that is, a preset content template, is preset for display content in a Freeform window, and if the ratio of the display content in the Freeform window to the preset content template is consistent, when performing reduction processing, it indicates that the display content in the Freeform window does not need to be further reduced, and the Freeform window is directly subjected to reduction processing. If the proportion of the display content in the Freeform window is inconsistent with the preset content template, the display content in the Freeform window is enlarged to be larger than the proportion of the preset content template during enlargement processing, so that the display content in the Freeform window needs to be reduced, and the Freeform window is reduced again when the display content in the Freeform window is reduced to be consistent with the proportion of the content template.
Fig. 4 is a schematic flowchart of another method for adjusting a window according to an embodiment of the present disclosure, where as shown in the drawing, the embodiment of the present disclosure may include the following steps:
step S401, when an application program is displayed in a free window mode on the mobile terminal, monitoring whether a preset instruction is received or not;
the content of step S401 is consistent with the content of step S101, and reference may be made to the description of step S101, which is not repeated herein.
Step S402, if a preset instruction is received, determining a free window corresponding to the preset instruction, selecting a current central point of the free window, and recording the current central point of the free window as a reference point of the free window.
In the embodiment of the present application, the preset instruction may be a double-click operation in the Freeform window area, may be another gesture operation in the Freeform window area, and may also be an operation of a physical key on the mobile terminal, or the like. If trigger events meeting preset conditions exist in Freefom windows, a current central point of the Freefom window corresponding to a preset instruction is obtained, the Freefom window is a rectangular window, namely, a point where two diagonals of the rectangular window intersect is a central point, the central point is used as a reference point of the Freefom window, namely, display contents corresponding to the central point can be used as the reference point of the Freefom window. The free window corresponding to the preset instruction may be determined according to the position of the touch information, or may be selected by the user through other manners, for example, one free window is selected at a time through a preset physical key and a preset virtual button, and the selected free window is the free window corresponding to the preset instruction.
Step S403, recording a position in the display interface corresponding to the current center point of the free window as a positioning point, or recording a center point of a maximum inscribed rectangle of an area not occupied by other free windows in the display interface as a positioning point, where the other free windows are free windows other than the free window currently being subjected to scaling processing.
In the embodiment of the present application, it is further required to determine an anchor point, and a position in the display interface corresponding to the center point may be used as the anchor point, that is, the display content corresponding to the center point of the Freeform window keeps the position unchanged, and the content of other pixels correspondingly enlarges or reduces.
The center point of the maximum inscribed rectangle of the area not occupied by other Freeform windows in the display interface can also be used as an anchor point, namely, the Freeform windows are adjusted to the center area in the area vacant in the display interface.
As an example, as shown in fig. 5, fig. 5 is another application scenario provided in the embodiment of the present application, in which there are 3 Freeform windows: the Freeform window A, Freeform is a window B, Freeform is a window C, the trigger event is a double-click operation, if the user performs the double-click operation in the area where the Freeform window C is located, the Freeform window C needs to be amplified, and the process of the amplification process is as follows: firstly, taking the current center point of the Freeform window C as a reference point, then obtaining a maximum inscribed rectangle of an area which is not occupied by other Freeform windows (Freeform windows other than the Freeform window C, namely, Freeform window a and Freeform windows) in the display interface, then taking the center point of the maximum inscribed rectangle as an anchor point, before performing amplification processing, firstly translating the Freeform window C to make the center point of the Freeform window C coincide with the center point of the maximum inscribed rectangle, for example, the translated Freeform window C shown in the figure. After the translation operation, the Freeform window C is enlarged, of course, the center point of the Freeform window C is coincident with the center point of the maximum inscribed rectangle.
In practical applications, the Freeform window may be enlarged to a maximum ratio of the Freeform window that can be accommodated in an area of the display interface not occupied by other Freeform windows.
Step S404, judging whether the reference point of the free window and the positioning point of the display interface coincide.
Step S405, if the reference point of the free window and the positioning point of the display interface are not overlapped, performing translation processing on the free window to enable the reference point of the free window and the positioning point of the display interface to be overlapped.
In this embodiment of the application, if the current center point of the Freeform window is a reference point, and the position of the current center point of the Freeform window in the display interface is an anchor point, the reference point and the anchor point coincide, and only the Freeform window needs to be scaled. If the current center point of the Freeform window is a reference point, and the center point of the maximum inscribed rectangle of the area not occupied by other Freeform windows in the display interface is used as an anchor point, the reference point and the anchor point may be coincident or not coincident, and because the anchor point and the reference point maintain a coincident state in the zooming process, the Freeform window needs to be translated before the Freeform window is zoomed, so that the reference point of the Freeform window and the anchor point of the display interface coincide.
Step S406, based on the reference point of the free window and the positioning point of the display interface, performing scaling processing on the free window.
In the embodiment of the present application, the trigger event meeting the preset condition may be a double-click operation in the Freeform window area, may be another gesture operation in the Freeform window area, and may also be an operation of a physical key on the mobile terminal, etc. The trigger events of these preset conditions may not indicate whether to perform the zoom-in operation or the zoom-out operation according to the distance change between two touch points as in the embodiment shown in fig. 2, and at this time, the default may be the zoom-in operation, and there is also no method or scale for determining the distance change value between two touch points as in the embodiment shown in fig. 2, and at this time, the Freeform window may be enlarged to the maximum magnification allowed by the default, where the maximum magnification allowed by the default is the maximum magnification allowed in the area not occupied by other Freeform windows in the display interface. I.e. the Freeform window cannot be enlarged to overlap other Freeform windows, beyond the border line of the display interface.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 6 is a schematic block diagram of a mobile terminal according to an embodiment of the present application, and only a portion related to the embodiment of the present application is shown for convenience of description.
The mobile terminal 6 may be a software unit, a hardware unit or a combination of software and hardware unit built in a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, etc., or may be integrated into a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, etc., as an independent pendant.
The mobile terminal 6 includes:
the monitoring unit 61 is used for monitoring whether a preset instruction is received or not when the application program is displayed in a free window mode on the mobile terminal;
a determining unit 62, configured to determine, if a preset instruction is received, a free window corresponding to the preset instruction, select a point from the free window, mark the point selected from the free window as a reference point of the free window, select a point from a display interface of the mobile terminal, and mark the point selected from the display interface as a positioning point of the display interface;
a scaling unit 63, configured to perform scaling processing on the free window based on the reference point of the free window and the positioning point of the display interface, where in the scaling processing of the free window, the reference point of the free window and the positioning point of the display interface are kept coincident.
Optionally, the determining unit 62 includes: a first determining module 621;
the first determining module 621 is configured to:
if the received preset instruction is that two touch points exist on the current display interface of the application program in the free window, at least one piece of sliding information of the touch points exists, and the distance between the two touch points changes, the free window where the initial positions of the two touch points are located is the free window corresponding to the preset instruction, one point is selected from the free window, the point selected from the free window is marked as the reference point of the free window, one point is selected from the display interface of the mobile terminal, and the point selected from the display interface is marked as the positioning point of the display interface.
Optionally, the first determining module 621 is further configured to:
selecting a central point of a connecting line between the initial positions of the two touch points, marking a point in the free window corresponding to the central point as a reference point, and marking a position in the display interface corresponding to the central point as a positioning point.
Optionally, the determining unit 62 further includes: a second determination module 622;
the second determining module 622 includes:
a reference point determining submodule 6221, configured to select a current center point of the free window, and mark the current center point of the free window as a reference point of the free window;
the positioning point determining submodule 6222 is configured to record a position in the display interface corresponding to the current center point of the free window as a positioning point, or record a center point of a maximum inscribed rectangle of an area not occupied by other free windows in the display interface as a positioning point, where the other free windows are free windows other than the free window currently being scaled.
Optionally, the second determining module 622 further includes: a translation submodule 6223;
the translation sub-module 6223 is configured to:
before zooming the free window based on the reference point of the free window and the positioning point of the display interface, judging whether the reference point of the free window and the positioning point of the display interface are coincident;
if the reference point of the free window is not coincident with the positioning point of the display interface, performing translation processing on the free window to enable the reference point of the free window to be coincident with the positioning point of the display interface.
Optionally, the scaling unit 63 includes: an amplification module 631;
the amplification module 631 is configured to:
when the zooming processing is amplifying processing, monitoring the position of a frame line of the free window, wherein the frame line is one edge of the free window;
and if any frame line of the free window is overlapped with any boundary line of the display interface, stopping the amplification processing of the free window, and amplifying the display content in the free window.
Optionally, the scaling unit 63 includes: a shrink module 632;
the zoom-out module 632 is configured to:
when the zooming processing is zooming-out processing, judging whether the proportion of the display content in the free window is consistent with the preset content template;
if the proportion of the display content in the free window is inconsistent with that of the content template, performing reduction processing on the display content in the free window;
and when the display content in the free window is reduced to be consistent with the proportion of the content template, reducing the free window.
It will be apparent to those skilled in the art that, for convenience and simplicity of description, the foregoing functional units and modules are merely illustrated in terms of division, and in practical applications, the foregoing functional allocation may be performed by different functional units and modules as needed, that is, the internal structure of the mobile terminal is divided into different functional units or modules to perform all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the mobile terminal may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Fig. 7 is a schematic block diagram of a mobile terminal according to another embodiment of the present application. As shown in fig. 7, the mobile terminal 7 of this embodiment includes: one or more processors 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processors 70. The processor 70, when executing the computer program 72, implements the steps in the above-described method embodiments of window adjustment, such as steps S101 to S103 shown in fig. 1. Alternatively, the processor 70, when executing the computer program 72, implements the functions of the modules/units in the above-described mobile terminal embodiments, such as the functions of the modules 61 to 63 shown in fig. 6.
Illustratively, the computer program 72 may be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 70 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 72 in the mobile terminal 7. For example, the computer program 72 may be divided into a monitoring unit, a determination unit, a scaling unit.
The monitoring unit is used for monitoring whether a preset instruction is received or not when the application program is displayed in a free window mode on the mobile terminal;
the determining unit is used for determining a free window corresponding to a preset instruction if the preset instruction is received, selecting a point from the free window, marking the point selected from the free window as a reference point of the free window, selecting a point from a display interface of the mobile terminal, and marking the point selected from the display interface as a positioning point of the display interface;
and the scaling unit is used for scaling the free window based on the reference point of the free window and the positioning point of the display interface, wherein in the scaling process of the free window, the reference point of the free window and the positioning point of the display interface are kept coincident.
Other units or modules can be referred to the description of the embodiment shown in fig. 6, and are not described again here.
The mobile terminal includes, but is not limited to, a processor 70, a memory 71. It will be appreciated by those skilled in the art that fig. 7 is only one example of a mobile terminal 7 and does not constitute a limitation of the mobile terminal 7, and that it may comprise more or less components than those shown, or some components may be combined, or different components, e.g. the mobile terminal may further comprise input devices, output devices, network access devices, buses, etc.
The Processor 70 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 71 may be an internal storage unit of the mobile terminal 7, such as a hard disk or a memory of the mobile terminal 7. The memory 71 may also be an external storage device of the mobile terminal 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the mobile terminal 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the mobile terminal 7. The memory 71 is used for storing the computer program and other programs and data required by the mobile terminal. The memory 71 may also be used to temporarily store data that has been output or is to be output.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed mobile terminal and method may be implemented in other ways. For example, the above-described embodiments of the mobile terminal are merely illustrative, and for example, the division of the modules or units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (7)

1. A method for adjusting a window is applied to a mobile terminal, and the method comprises the following steps:
when an application program is displayed in a free window mode on the mobile terminal, monitoring whether a preset instruction is received or not;
if a preset instruction is received, determining a free window corresponding to the preset instruction, selecting a point from the free window, marking the point selected from the free window as a reference point of the free window, selecting a point from a display interface of the mobile terminal, and marking the point selected from the display interface as a positioning point of the display interface, wherein the method comprises the following steps: if the received preset instruction is that two touch points exist on a current display interface of an application program in the free window, sliding information of at least one touch point exists, and the distance between the two touch points changes, selecting a central point of a connecting line between initial positions of the two touch points, wherein the free window where the initial positions of the two touch points are located is a free window corresponding to the preset instruction, taking the central point of the free window as a reference point, and taking a position in the display interface corresponding to the central point of the connecting line between the initial positions of the two touch points as a positioning point;
performing scaling processing on the free window based on the reference point of the free window and the positioning point of the display interface, wherein in the scaling processing process of the free window, the reference point of the free window and the positioning point of the display interface are kept coincident;
the scaling processing is carried out on the free window based on the reference point of the free window and the positioning point of the display interface, and comprises the following steps: if the distance between the two touch points is increased, controlling the free window to perform amplification operation; and if the distance between the two touch points is reduced, controlling the free window to perform reduction operation.
2. The method of window adjustment as set forth in claim 1, wherein before the scaling process is performed on the free window based on the reference point of the free window and the anchor point of the display interface, further comprising:
judging whether the reference point of the free window is coincident with the positioning point of the display interface or not;
if the reference point of the free window is not coincident with the positioning point of the display interface, performing translation processing on the free window to enable the reference point of the free window to be coincident with the positioning point of the display interface.
3. The method for adjusting a window according to claim 1 or 2, wherein when the scaling process is a zoom-in process, the scaling process is performed on the free window based on a reference point of the free window and an anchor point of the display interface, and further comprising:
monitoring the position of a frame line of the free window, wherein the frame line is one edge of the free window;
and if any frame line of the free window is overlapped with any boundary line of the display interface, stopping the amplification processing of the free window, and amplifying the display content in the free window.
4. The method for adjusting a window according to claim 3, wherein the scaling process for the free window based on the reference point of the free window and the anchor point of the display interface when the scaling process is a zoom-out process includes:
judging whether the proportion of the display content in the free window and a preset content template is consistent or not;
if the proportion of the display content in the free window is inconsistent with that of the content template, performing reduction processing on the display content in the free window;
and when the display content in the free window is reduced to be consistent with the proportion of the content template, reducing the free window.
5. A mobile terminal, comprising:
the monitoring unit is used for monitoring whether a preset instruction is received or not when the application program is displayed in a free window mode on the mobile terminal;
the determining unit is configured to determine, if a preset instruction is received, a free window corresponding to the preset instruction, select a point from the free window, mark the point selected from the free window as a reference point of the free window, select a point from a display interface of the mobile terminal, and mark the point selected from the display interface as a positioning point of the display interface, and includes: if the received preset instruction is that two touch points exist on a current display interface of an application program in the free window, sliding information of at least one touch point exists, and the distance between the two touch points changes, selecting a central point of a connecting line between initial positions of the two touch points, wherein the free window where the initial positions of the two touch points are located is a free window corresponding to the preset instruction, taking the central point of the free window as a reference point, and taking a position in the display interface corresponding to the central point of the connecting line between the initial positions of the two touch points as a positioning point;
the zooming unit is used for zooming the free window based on the reference point of the free window and the positioning point of the display interface, wherein in the zooming process of the free window, the reference point of the free window and the positioning point of the display interface are overlapped;
the scaling processing is carried out on the free window based on the reference point of the free window and the positioning point of the display interface, and comprises the following steps: if the distance between the two touch points is increased, controlling the free window to perform amplification operation; and if the distance between the two touch points is reduced, controlling the free window to perform reduction operation.
6. A mobile terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by one or more processors, implements the steps of the method according to any one of claims 1 to 4.
CN201811074416.2A 2018-09-14 2018-09-14 Window adjusting method, mobile terminal and computer readable storage medium Active CN109298909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811074416.2A CN109298909B (en) 2018-09-14 2018-09-14 Window adjusting method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811074416.2A CN109298909B (en) 2018-09-14 2018-09-14 Window adjusting method, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109298909A CN109298909A (en) 2019-02-01
CN109298909B true CN109298909B (en) 2021-03-26

Family

ID=65163114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811074416.2A Active CN109298909B (en) 2018-09-14 2018-09-14 Window adjusting method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109298909B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362265B (en) * 2019-07-16 2021-08-31 深圳雷曼光电科技股份有限公司 Display interface control method and device, computer equipment and storage medium
CN111638881A (en) * 2020-05-29 2020-09-08 山东浪潮通软信息科技有限公司 Method for adjusting chart and instrument panel
CN113805748A (en) * 2021-09-18 2021-12-17 湖北亿咖通科技有限公司 Interface display method, device and storage medium
CN114612584B (en) * 2021-12-31 2023-04-28 北京城市网邻信息技术有限公司 Image processing method, device, equipment and storage medium
CN114546204B (en) * 2022-04-21 2022-08-12 广东统信软件有限公司 Window management method, computing device and readable storage medium
CN117331628A (en) * 2022-06-27 2024-01-02 北京小米移动软件有限公司 Page display method and device, electronic equipment and storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5407650B2 (en) * 2009-08-12 2014-02-05 株式会社Jvcケンウッド Display device, program, and display method
CN102270081B (en) * 2010-06-03 2015-09-23 腾讯科技(深圳)有限公司 A kind of method and device adjusting size of list element
US20120304113A1 (en) * 2011-05-27 2012-11-29 Patten Michael J Gesture-based content-object zooming
CN102214101A (en) * 2011-06-30 2011-10-12 中兴通讯股份有限公司 Method and device for displaying Widget window in zooming way
CN103635873B (en) * 2012-09-17 2017-06-20 华为终端有限公司 touch operation processing method and terminal device
CN103294346B (en) * 2013-06-20 2018-03-06 锤子科技(北京)有限公司 The window moving method and its device of a kind of mobile device
CN104965635A (en) * 2015-06-16 2015-10-07 努比亚技术有限公司 Information adjusting method and terminal device
CN105549871B (en) * 2015-10-23 2019-03-22 东莞酷派软件技术有限公司 A kind of interface zone adjusting method and device
CN106446284A (en) * 2016-10-28 2017-02-22 努比亚技术有限公司 Map loading device and method
US10698601B2 (en) * 2016-11-02 2020-06-30 Ptc Inc. Second touch zoom control
CN107179875B (en) * 2017-06-26 2019-12-03 深圳传音通讯有限公司 The method and apparatus of window adjustment

Also Published As

Publication number Publication date
CN109298909A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
CN109298909B (en) Window adjusting method, mobile terminal and computer readable storage medium
US11334210B2 (en) Method for window adjustment, mobile terminal, and computer-readable storage medium
EP4187378A1 (en) Application interface switching method and apparatus, and terminal and storage medium
US20120013645A1 (en) Display and method of displaying icon image
KR20080068782A (en) Electronic device with touch screen and method of displaying information using same
US10628034B2 (en) User terminal device and method for controlling user terminal device thereof
KR20130119129A (en) Method for controlling window size and an electronic device thereof
EP3163423B1 (en) Method and device for setting background of ui control
US20210208740A1 (en) Method, Mobile Terminal, and Non-Transitory Computer-Readable Storage Medium for Controlling Displaying Direction
CN111190677A (en) Information display method, information display device and terminal equipment
CN112099690A (en) Page scaling method, device, terminal and storage medium
CN107770845B (en) mobile hotspot management method and device, terminal and storage medium
CN113867870A (en) Popup management system, popup control method, storage medium, and computer device
CN112596598A (en) Display control method, display control device and electronic equipment
CN109298818B (en) Window adjusting method, mobile terminal and computer readable storage medium
CN109582269B (en) Physical splicing screen display method and device and terminal equipment
CN109739403B (en) Method and apparatus for processing information
CN116107531A (en) Interface display method and device
CN110737417A (en) demonstration equipment and display control method and device of marking line thereof
CN104571791A (en) Information processing method and electronic equipment
CN111694498B (en) Interface display method and device and electronic equipment
CN115617225A (en) Application interface display method and device, electronic equipment and storage medium
CN115357173A (en) Screen control method and device and electronic equipment
CN109085974B (en) Screen control method, system and terminal equipment
CN115129278A (en) Image display control method, system, readable storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant