CN109582424B - Interface closing method, system and related device - Google Patents

Interface closing method, system and related device Download PDF

Info

Publication number
CN109582424B
CN109582424B CN201811467080.6A CN201811467080A CN109582424B CN 109582424 B CN109582424 B CN 109582424B CN 201811467080 A CN201811467080 A CN 201811467080A CN 109582424 B CN109582424 B CN 109582424B
Authority
CN
China
Prior art keywords
interface
data
position width
height data
scaling
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
CN201811467080.6A
Other languages
Chinese (zh)
Other versions
CN109582424A (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.)
Zhejiang Nuonuo Network Technology Co ltd
Original Assignee
Zhejiang Nuonuo Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Nuonuo Network Technology Co ltd filed Critical Zhejiang Nuonuo Network Technology Co ltd
Priority to CN201811467080.6A priority Critical patent/CN109582424B/en
Publication of CN109582424A publication Critical patent/CN109582424A/en
Application granted granted Critical
Publication of CN109582424B publication Critical patent/CN109582424B/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

Abstract

The application provides an interface closing method, which comprises the following steps: when the operation behavior of the user is judged to be downward sliding operation, acquiring a sliding distance in real time; when the drawing operation of the interface is completed by using the sliding distance, updating position width and height data of the child controls in the layout container; acquiring the scaling of the interface by using the updated position width and height data of the sub-control; judging whether the scaling is larger than a preset scaling threshold value or not; if so, the interface is closed. Therefore, the method can realize that the interface moves and zooms along with the gesture in the interface closing process, can improve the interactive experience of the user, and further improves the competitiveness of the product. The application also provides an interface closing system, an interface closing device and a computer readable storage medium, which have the beneficial effects.

Description

Interface closing method, system and related device
Technical Field
The application relates to the technical field of self-definition of Android container layout, in particular to an interface closing method, an interface closing system, a layout container and a computer readable storage medium.
Background
Android aims at Layout, an official SDK provides a Layout container class, and a Relative Layout container (Relative Layout) is characterized in that sub-controls in the container can be mutually overlapped, according to the principle of first in and then out (under the overlapping condition, the sub-controls are firstly placed at the lowest layer of an interface and then placed at the upper layer), the positions of the controls in the Relative Layout are calculated according to the Relative positions, and the position of the latter control depends on the position of the former control, so that the adaptive capacity and flexibility of the Layout can be greatly improved by the Relative arrangement.
At present, for equipment of an Android system, touch information of pressing a return key by a user is required to be detected for closing an interface. In the interface closing mode, the interface cannot move and zoom along with the gesture, so that the interactive experience of a user is poor, and the product competitiveness is weak.
Disclosure of Invention
The application aims to provide an interface closing method, an interface closing system, a layout container and a computer readable storage medium, which can improve the interactive experience of users and further improve the competitiveness of products.
In order to solve the above technical problem, the present application provides an interface closing method, including:
when the operation behavior of the user is judged to be downward sliding operation, acquiring a sliding distance in real time;
when the sliding distance is used for completing the drawing operation of the interface, updating position width and height data of the child controls in the layout container;
acquiring the scaling of the interface by using the updated position width and height data of the sub-control;
judging whether the scaling is larger than a preset scaling threshold value or not;
if so, closing the interface.
Preferably, when it is determined that the operation behavior of the user is a downward sliding operation, before acquiring the sliding distance in real time, the method further includes:
acquiring position width and height data of the approach animation and the position width and height data of the sub-control;
and executing the drawing operation of the interface in real time by using the position width and height data of the approach animation and the position width and height data of the sub-control.
Preferably, the performing, in real time, a drawing operation of an interface by using the position width and height data of the approach animation and the position width and height data of the child control includes:
calculating characteristic data required by drawing each frame of interface by using an attribute animation API (application programming interface) according to the position width and height data of the approach animation and the position width and height data of the sub-control; wherein the feature data comprises position data, zoom data and gradient data;
and after the characteristic data is initialized to change data, executing the drawing operation of the interface in real time according to the change data.
Preferably, the updating the position width and height data of the child control in the layout container when the drawing operation of the interface is completed by using the sliding distance includes:
calculating gesture feature data by using the sliding distance; the gesture feature data comprise movement offset data, scaling data and background gradient coefficient data;
according to the gesture feature data, executing the drawing operation of the interface;
when the drawing operation of the interface is completed, updating the position width and height data of the child control in the layout container.
The present application further provides an interface closing system, comprising:
the sliding distance acquisition module is used for acquiring a sliding distance in real time when the operation behavior of the user is judged to be a downward sliding operation;
the position width and height data updating module is used for updating the position width and height data of the child controls in the layout container when the drawing operation of the interface is completed by utilizing the sliding distance;
the scaling obtaining module is used for obtaining the scaling of the interface by using the updated position width and height data of the sub-control;
the judging module is used for judging whether the scaling is larger than a preset scaling threshold value or not;
and the interface closing module is used for closing the interface if the scaling is larger than the scaling threshold.
Preferably, the interface closing system further comprises:
the position width and height data acquisition module is used for acquiring position width and height data of the approach animation and the position width and height data of the sub-control;
and the interface drawing operation execution module is used for executing the drawing operation of the interface in real time by utilizing the position width and height data of the approach animation and the position width and height data of the sub-control.
Preferably, the interface drawing operation executing module includes:
the characteristic data calculation unit is used for calculating characteristic data required by drawing of each frame of interface by utilizing an attribute animation API according to the position width and height data of the approach animation and the position width and height data of the sub-control; wherein the feature data comprises position data, zoom data and gradient data;
and the interface drawing operation execution unit is used for executing the drawing operation of the interface in real time according to the change data after the feature data is initialized to the change data.
Preferably, the location width and height data updating module includes:
the gesture characteristic data calculation unit is used for calculating gesture characteristic data by utilizing the sliding distance; the gesture feature data comprise movement offset data, scaling data and background gradient coefficient data;
the interface drawing unit is used for executing the drawing operation of the interface according to the gesture feature data;
and the position width and height data updating unit is used for updating the position width and height data of the child control in the layout container when the drawing operation of the interface is completed.
The present application further provides a layout container, comprising:
a memory and a processor; the memory is used for storing a computer program, and the processor is used for implementing the steps of the interface closing method when executing the computer program.
The present application further provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the interface closing method described above.
The application provides an interface closing method, which comprises the following steps: when the operation behavior of the user is judged to be downward sliding operation, acquiring a sliding distance in real time; when the sliding distance is used for completing the drawing operation of the interface, updating position width and height data of the child controls in the layout container; acquiring the scaling of the interface by using the updated position width and height data of the sub-control; judging whether the scaling is larger than a preset scaling threshold value or not; if so, closing the interface.
The method comprises the steps of firstly, when the operation behavior of a user is judged to be downward sliding operation, obtaining a sliding distance in real time, then, when drawing operation of an interface is completed by utilizing the sliding distance, updating position width and height data of a sub-control in a layout container, then, obtaining a scaling ratio of the interface by utilizing the updated position width and height data of the sub-control, finally, judging whether the scaling ratio is larger than a preset scaling ratio threshold value or not, and if the scaling ratio is larger than the preset scaling ratio threshold value, closing the interface. Therefore, the method can realize that the interface moves and zooms along with the gesture in the process of closing the interface, can improve the interactive experience of the user, and further improves the competitiveness of the product. The present application further provides an interface closing system, a layout container, and a computer-readable storage medium, all having the above-mentioned advantages, which are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of an interface closing method according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another interface closing method provided in the embodiments of the present application;
FIG. 3 is a flowchart of an approach animation according to an embodiment of the present disclosure;
fig. 4 is a block diagram of an interface closing system according to an embodiment of the present application.
Detailed Description
The core of the application is to provide an interface closing method, which can improve the interactive experience of a user and further improve the competitiveness of a product. At the other core of the application, an interface closing system, a layout container and a computer readable storage medium are provided.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, for equipment of an Android system, touch information of pressing a return key by a user is required to be detected for closing an interface. In the interface closing mode, the interface cannot move and zoom along with the gesture, so that the interactive experience of a user is poor, and the product competitiveness is weak. The interface closing method provided by the embodiment of the application can realize that the interface moves and zooms along with the gesture in the interface closing process, can improve the interactive experience of a user, and further improves the competitiveness of a product. Referring to fig. 1, fig. 1 is a flowchart of an interface closing method according to an embodiment of the present application, where the interface closing method specifically includes:
s101, when the operation behavior of the user is judged to be downward sliding operation, acquiring a sliding distance in real time;
relative Layout containers (Relative Layout) in the Android system Layout container class can be set according to positions (upper, lower, left and right positions) of the controls, a relatively complex interface can be realized by using Relative Layout with fewer hierarchical structures, the performance of a multi-layer nested consumption system is prevented, and the adaptive flexibility of the Layout is improved. However, the gesture dragging operation is undefined in the conventional container with the relative layout, that is, the interface cannot move and zoom along with the gesture, and if the gesture dragging operation is adapted to each control, the processing logic is very complicated. Therefore, on the basis of a traditional Relative Layout container, a novel Layout container (Drag Relative Layout) is customized through rewriting an internal method, the interface can move and zoom along with gestures in the process of closing the interface in the Layout container, secondary development is not needed for internal sub-controls, only the Drag Relative Layout is used as the container for different sub-controls (picture controls, video controls and the like), the functions can be realized only through simple development, the interactive experience of a user can be improved, the competitiveness of a product is further improved, the development efficiency can be improved for developers, and the code repetition and maintenance cost are reduced.
Therefore, the execution subject of the present application is a novel Layout container (Drag Relative Layout) that acquires the sliding distance in real time when it is determined that the operation behavior of the user is the downward sliding operation. The length of the sliding distance is not particularly limited, and should be set by those skilled in the art according to the actual situation. Further, in the embodiment of the present application, the sliding distance is obtained in real time, so a time interval exists between two adjacent sliding distances, and the duration of the time interval is not specifically limited, and a person skilled in the art should make a corresponding setting according to an actual situation. For example, the time interval may be 0 seconds, i.e., the sliding distance is acquired without interruption; the time interval may also be 0.01 seconds, i.e. the sliding distance is taken every 0.01 seconds.
Here, the process of acquiring the sliding distance in real time when it is determined that the operation behavior of the user is the downward sliding operation is not particularly limited as long as the result is that the sliding distance can be acquired in real time. The above process may generally be: capturing a touch point position coordinate of a user on a screen of an Android system device by intercepting a screen touch event by a Drag Relative Layout container, and judging the operation behavior of the user by using the captured touch point position coordinate; when the operation behavior of the user is judged to be downward sliding operation, the Drag Relative Layout container enters a dragging moving state, touch point position coordinates of the user on a screen are continuously acquired, and then the sliding distance is calculated by utilizing the acquired touch point position coordinates. Further, the specific process may be: intercepting a screen touch event through a rewriting system touch event distribution mechanism (dispatch touch event) in a Drag Relative Layout container, and triggering a press-DOWN event (ACTION _ DOWN) when a user finger touches a screen, wherein the XY coordinate of a first position touched by the finger is recorded in the press-DOWN event, and a current interface mark state is set to be an unmoved state (mark isMoved in a code is false) and is used for marking whether a current view starts to enter a dragging state; when a user finger starts to slide, a sliding event (ACTION _ MOVE) is touched, in the sliding event, the current sliding distance (the XY coordinate in the sliding minus the XY coordinate recorded for the first time) is calculated by using the first XY coordinate recorded in the pressing event, in the embodiment of the application, the dragging is triggered by the finger sliding a certain distance, if the user slides left and right or slides upwards, the system processes the sliding (the X-axis moving distance > the Y-axis moving distance is judged to be left and right sliding; Y is a negative value and is an upward sliding, and Y is a positive value and is a downward sliding); if the preset condition is met, the Drag Relative Layout container enters a dragging moving state, touch point position coordinates of a user on a screen are continuously acquired, and then the sliding distance is calculated by using the acquired touch point position coordinates.
S102, when the drawing operation of the interface is completed by utilizing the sliding distance, updating position width and height data of the sub-controls in the layout container;
after the sliding distance is obtained in real time, when the drawing operation of the interface is completed by using the sliding distance, the position width and height data of the child controls in the layout container are updated. The process of step S102, which is not specifically limited herein, generally includes: calculating gesture feature data by using the sliding distance; the gesture feature data comprise movement offset data, scaling data and background gradient coefficient data; according to the gesture feature data, executing drawing operation of an interface; and when the drawing operation of the interface is finished, updating the position width and height data of the child control in the layout container. The drawing operation of the executed interface is usually the drawing operation of moving, zooming and background gradual change of the current interface by using a View related API, and the position width and height data of the child control comprise the position data and the width and height data of the child control.
The method comprises the steps of carrying out left-right movement of a View mainly by calling a setTranslationX method of a system View API, carrying out up-down movement of the View by a setTranslationY method, carrying out scaling and background change by a setScale XY method, dynamically setting two methods of transparency setTranslationX (getX () + offset) and setTranslationY (getY () + offset) of a current interface according to the movement distance of the whole View, obtaining a position after movement according to the finger sliding distance and the current View XY position, carrying out displacement operation, calculating the scaling required by data acquisition of a Y-axis position after movement and a Y-axis position before movement according to Math.abs (getY ()/mExitReight), carrying out setScale XY (scaleXY) scaling operation, passing through (255-Math.abs (getY ()/mExitReight)) according to the Y-axis movement distance, and obtaining required transparency data, and setting the page data to the page.
When the drawing operation of the interface is completed by using the sliding distance, that is, it is described that the downward sliding operation of the user has been completed, a process of updating the position width and height data of the child control in the layout container is not specifically limited, and the process generally includes: and when the layout container judges that the downward sliding operation of the user is finished by intercepting the lifting or canceling event touched by the screen, acquiring the position data and the width and height data of the current interface and updating the position data and the width and height data of the sub-control to the position data and the width and height data of the sub-control.
S103, acquiring the scaling of the interface by using the updated position width and height data of the sub-control;
according to the embodiment of the application, after the position width and height data of the sub-control in the layout container are updated, the scaling of the interface is obtained by utilizing the updated position width and height data of the sub-control. The size of the scaling is not particularly limited, and is mainly determined by the sliding distance of the user. The method for obtaining the interface scaling in the embodiment of the present application is not particularly limited, and as can be seen from the above, the scaling can be obtained by calculating the data of the Y-axis position after the movement and the Y-axis position before the movement according to math.
S104, judging whether the scaling is larger than a preset scaling threshold value or not;
after the zoom ratio of the interface is obtained, whether the zoom ratio is larger than a preset zoom ratio threshold value is judged. The size of the preset scaling threshold is not specifically limited herein, and should be set by those skilled in the art according to the actual situation, for example, the preset scaling threshold is 0.5 f. This step determines whether the scaling is greater than a preset scaling threshold, so there are two situations: the scaling is larger than a preset scaling threshold value; the scaling is not greater than a preset scaling threshold.
And S105, if the scaling is larger than a preset scaling threshold, closing the interface.
After judging whether the scaling is larger than the preset scaling threshold value or not, if the scaling is larger than the preset scaling threshold value, the interface is closed. Further, the subsequent operation in the case where the scaling is not larger than the preset scaling threshold is not particularly limited, and the rebound operation is usually performed. The specific process of executing the operation comprises the following steps: executing a method (backOriginalPosition method) for returning to the original position preset in the Drag Relative Layout container to enter a rebound recovery flow of the view, simultaneously carrying out zooming, displacement and transparency animation from the current data to the initial data by utilizing the attribute animation, and realizing the rebound by continuously displacing and zooming according to the change value. Referring to fig. 2 in detail, fig. 2 is a flowchart of another interface closing method according to an embodiment of the present disclosure. As can be seen from the figure, after judging whether the zoom ratio is greater than the preset zoom ratio threshold, if the zoom ratio is greater than the preset zoom ratio threshold, the interface is closed; and if the scaling is not larger than the preset scaling threshold value, executing the rebound operation.
The method includes the steps that firstly, when the operation behavior of a user is judged to be downward sliding operation, the sliding distance is obtained in real time, then when the drawing operation of an interface is completed by the aid of the sliding distance, position width and height data of a sub control in a layout container are updated, then the updated position width and height data of the sub control are used for obtaining the scaling of the interface, finally, whether the scaling is larger than a preset scaling threshold value or not is judged, and if the scaling is larger than the preset scaling threshold value, the interface is closed. Therefore, the method can realize that the interface moves and zooms along with the gesture, can improve the interactive experience of the user, and further improves the competitiveness of the product.
Based on the foregoing embodiment, in this embodiment, before acquiring the sliding distance in real time when it is determined that the operation behavior of the user is the downward sliding operation, the method further includes: acquiring position width and height data of the approach animation and position width and height data of the sub-control; and executing the drawing operation of the interface in real time by using the position width and height data of the approach animation and the position width and height data of the child control. As can be seen from the above, the position width height data of the child control includes position data and width height data of the child control, and accordingly, the position width height data of the approach animation includes position data and width height data of the approach animation.
The process of acquiring the position width and height data of the approach animation and the process of acquiring the position width and height data of the sub-control are not particularly limited. The process of acquiring the position width and height data of the approach animation is as follows: before entering a page, acquiring a thumbnail control View in a Drag Relative Layout container by calling a preset method, and obtaining position and width and height data (defined as mEnterRect in code) required by the approach animation according to the Rect attribute of the thumbnail control View. The process of obtaining the position width and height data of the child control is: after entering the page where the Drag Relative Layout container is located, the Drag Relative Layout container intercepts the system drawing process by rewriting the dispatch Layout method, so that the position data and the width and height data of the child control in the Layout container can be obtained before drawing, that is, the data required by the approach ending animation can be obtained.
The process of executing the drawing operation of the interface in real time by using the position width and height data of the approach animation and the position width and height data of the child control is also not specifically limited, and the process generally includes: calculating characteristic data required by drawing each frame of interface by using an attribute animation API according to the position width and height data of the approach animation and the position width and height data of the sub-control; the characteristic data comprises position data, zooming data and gradient data; after the feature data is initialized to the change data (the mChangeRect is used as a record in the code), the drawing operation of the interface is executed in real time according to the change data. Referring to fig. 3, fig. 3 is a flowchart of an approach animation provided in an embodiment of the present application. The method comprises the steps of utilizing an attribute animation API provided by an official to complete calculation work, obtaining each frame of data in the attribute animation execution process through an onantiationupdate callback, updating mChangeRect to be the latest data in time, calling an invalid method to enter an interface drawing process when each frame changes, and presenting various animation effects, namely the effects of scaling and background gradual change in the displacement process.
After entering an interface drawing process by calling an invalid method, judging whether change data exists or not, if not, initializing feature data to the change data; if the animation is existed, drawing the interface by using the API related to the canvas according to the change data, and waiting for the animation execution to be completed, so that the approach effect is realized. Specifically, the position and the scale of the current interface are updated according to the change data in the drawing method, the drawing area is mainly set by an API translate (canvas displacement method) and a clipRect (set drawing range) method of canvas, and the effects of scaling and moving are realized by setScale (set scaling) and postTranslate (set content moving) of Matrix API.
The above has been explained in detail for the approach animation, and further, the effect of the approach animation can be realized when the interface is closed, that is, the above-mentioned inverse process of the approach animation is performed when the interface is closed. Specifically, when the zoom ratio of the interface is greater than a preset zoom ratio threshold, a method (change zoom method) for updating the latest position change data preset in the Drag Relative Layout container is adopted to update the starting position data object to the current latest position data (the position released by the finger dragging the last time), then the reverse process of the approach animation is executed again, and finally the interface is closed.
According to the embodiment, the layout outer layer framework is mainly suitable for picture browsing and video browsing, the picture in-out zooming can be quickly realized through simple calling at a plurality of positions, the effect of closing the picture in-out zooming along with the gesture dragging movement is achieved, any secondary development of the internal sub-control is not needed, the development efficiency is improved, and the code maintenance cost is reduced.
The following describes an interface closing system, a layout container, and a computer-readable storage medium provided in an embodiment of the present application, and the interface closing system, the layout container, and the computer-readable storage medium described below may be referred to the above-described interface closing method.
Referring to fig. 4, fig. 4 is a block diagram illustrating an interface closing system according to an embodiment of the present disclosure; the interface closing system includes:
a sliding distance obtaining module 401, configured to obtain a sliding distance in real time when it is determined that the operation behavior of the user is a downward sliding operation;
a position width and height data updating module 402, configured to update position width and height data of a child control in the layout container when the drawing operation of the interface is completed by using the sliding distance;
a scaling obtaining module 403, configured to obtain a scaling of the interface by using the updated position width and height data of the sub-control;
a determining module 404, configured to determine whether a scaling ratio is greater than a preset scaling ratio threshold;
an interface closing module 405, configured to close the interface if the scaling is greater than the scaling threshold.
Based on the above embodiment, the interface closing system in this embodiment generally further includes:
the position width and height data acquisition module is used for acquiring position width and height data of the approach animation and position width and height data of the sub-control;
and the interface drawing operation execution module is used for executing the drawing operation of the interface in real time by utilizing the position width and height data of the approach animation and the position width and height data of the sub-control.
Based on the foregoing embodiment, the interface drawing operation execution module in this embodiment generally includes:
the characteristic data calculation unit is used for calculating characteristic data required by drawing each frame of interface by utilizing the attribute animation API according to the position width and height data of the approach animation and the position width and height data of the sub-control; the characteristic data comprises position data, zooming data and gradient data;
and the interface drawing operation execution unit is used for executing the drawing operation of the interface in real time according to the change data after the feature data is initialized to the change data.
Based on the foregoing embodiment, the location width and height data updating module 402 in this embodiment generally includes:
the gesture characteristic data calculation unit is used for calculating gesture characteristic data by utilizing the sliding distance; the gesture feature data comprise movement offset data, scaling data and background gradient coefficient data;
the interface drawing unit is used for executing the drawing operation of the interface according to the gesture feature data;
and the position width and height data updating unit is used for updating the position width and height data of the child control in the layout container when the drawing operation of the interface is completed.
The present application further provides a layout container, comprising: a memory and a processor; the memory is used for storing a computer program, and the processor is used for implementing the steps of the interface closing method of any of the above embodiments when executing the computer program.
The present application further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the interface closing method according to any of the above embodiments.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system provided by the embodiment, the description is relatively simple because the system corresponds to the method provided by the embodiment, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. 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 invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
An interface closing method, system, layout container and computer readable storage medium provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. An interface closing method, comprising:
when the operation behavior of the user is judged to be downward sliding operation, acquiring a sliding distance in real time;
when the sliding distance is used for completing the drawing operation of the interface, updating position width and height data of the child controls in the layout container;
acquiring the scaling of the interface by using the updated position width and height data of the sub-control;
judging whether the scaling is larger than a preset scaling threshold value or not;
if so, closing the interface.
2. The interface closing method according to claim 1, wherein before acquiring the sliding distance in real time when it is determined that the operation behavior of the user is a downward sliding operation, the method further comprises:
acquiring position width and height data of the approach animation and the position width and height data of the sub-control;
and executing the drawing operation of the interface in real time by using the position width and height data of the approach animation and the position width and height data of the sub-control.
3. The interface closing method according to claim 2, wherein the performing, in real time, a drawing operation of an interface using the position width and height data of the approach animation and the position width and height data of the child control includes:
calculating characteristic data required by drawing each frame of interface by using an attribute animation API (application programming interface) according to the position width and height data of the approach animation and the position width and height data of the sub-control; wherein the feature data comprises position data, zoom data and gradient data;
and after the characteristic data is initialized to change data so that the change data is the characteristic data, executing the drawing operation of the interface in real time according to the change data.
4. The interface closing method according to claim 1, wherein the updating the position width and height data of the child control in the layout container when the drawing operation of the interface is completed by using the sliding distance comprises:
calculating gesture feature data by using the sliding distance; the gesture feature data comprise movement offset data, scaling data and background gradient coefficient data;
according to the gesture feature data, executing the drawing operation of the interface;
when the drawing operation of the interface is completed, updating the position width and height data of the child control in the layout container.
5. An interface closure system, comprising:
the sliding distance acquisition module is used for acquiring a sliding distance in real time when the operation behavior of the user is judged to be a downward sliding operation;
the position width and height data updating module is used for updating the position width and height data of the child controls in the layout container when the drawing operation of the interface is completed by utilizing the sliding distance;
the scaling obtaining module is used for obtaining the scaling of the interface by using the updated position width and height data of the sub-control;
the judging module is used for judging whether the scaling is larger than a preset scaling threshold value or not;
and the interface closing module is used for closing the interface if the scaling is larger than the scaling threshold.
6. The interface closing system of claim 5, further comprising:
the position width and height data acquisition module is used for acquiring position width and height data of the approach animation and the position width and height data of the sub-control;
and the interface drawing operation execution module is used for executing the drawing operation of the interface in real time by utilizing the position width and height data of the approach animation and the position width and height data of the sub-control.
7. The interface closing system according to claim 6, wherein the interface drawing operation execution module comprises:
the characteristic data calculation unit is used for calculating characteristic data required by drawing of each frame of interface by utilizing an attribute animation API according to the position width and height data of the approach animation and the position width and height data of the sub-control; wherein the feature data comprises position data, zoom data and gradient data;
and the interface drawing operation execution unit is used for initializing the characteristic data to change data so as to enable the change data to be the characteristic data, and then executing the drawing operation of the interface in real time according to the change data.
8. The interface shutdown system of claim 5, wherein the location width and height data update module comprises:
the gesture characteristic data calculation unit is used for calculating gesture characteristic data by utilizing the sliding distance; the gesture feature data comprise movement offset data, scaling data and background gradient coefficient data;
the interface drawing unit is used for executing the drawing operation of the interface according to the gesture feature data;
and the position width and height data updating unit is used for updating the position width and height data of the child control in the layout container when the drawing operation of the interface is completed.
9. An interface closing device, comprising:
a memory and a processor; wherein the memory is configured to store a computer program, and the processor is configured to implement the steps of the interface closing method according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the steps of the interface closing method according to any one of claims 1 to 4.
CN201811467080.6A 2018-12-03 2018-12-03 Interface closing method, system and related device Active CN109582424B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811467080.6A CN109582424B (en) 2018-12-03 2018-12-03 Interface closing method, system and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811467080.6A CN109582424B (en) 2018-12-03 2018-12-03 Interface closing method, system and related device

Publications (2)

Publication Number Publication Date
CN109582424A CN109582424A (en) 2019-04-05
CN109582424B true CN109582424B (en) 2022-03-18

Family

ID=65926466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811467080.6A Active CN109582424B (en) 2018-12-03 2018-12-03 Interface closing method, system and related device

Country Status (1)

Country Link
CN (1) CN109582424B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737376B (en) * 2019-09-30 2021-06-22 维沃移动通信有限公司 Application control method and terminal
CN112286427A (en) * 2020-09-25 2021-01-29 浪潮金融信息技术有限公司 Multimedia material display and interaction method and system based on Android operating system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436351A (en) * 2011-12-22 2012-05-02 优视科技有限公司 Method and device for controlling application interface through dragging gesture
CN103809852A (en) * 2014-02-14 2014-05-21 北京君正集成电路股份有限公司 Method and device for displaying multiple application programs on same screen at same time
CN103984492A (en) * 2013-02-07 2014-08-13 高德软件有限公司 Method and device for scaling display picture of mobile terminal and mobile terminal
CN104423781A (en) * 2013-08-29 2015-03-18 中兴通讯股份有限公司 Interface processing method, device and terminal
CN104461232A (en) * 2014-09-30 2015-03-25 小米科技有限责任公司 Method and device for determining reduction scale in screen display process
US20160041749A1 (en) * 2014-08-11 2016-02-11 Fu Tai Hua Industry (Shenzhen) Co., Ltd. Operating method for user interface
CN105677224A (en) * 2016-01-06 2016-06-15 广州市动景计算机科技有限公司 Drop-down gesture processing method, device and equipment
CN105867782A (en) * 2015-11-06 2016-08-17 乐视移动智能信息技术(北京)有限公司 Interface zooming method and apparatus as well as terminal device
CN106412232A (en) * 2016-08-26 2017-02-15 珠海格力电器股份有限公司 Scaling method and device for controlling operation interface, and electronic device
CN107168618A (en) * 2017-03-27 2017-09-15 努比亚技术有限公司 A kind of device for zooming of screen display interface, terminal and method
CN107357504A (en) * 2017-07-23 2017-11-17 刘慧� A kind of electronic map for by scaling gesture show scaling

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436351A (en) * 2011-12-22 2012-05-02 优视科技有限公司 Method and device for controlling application interface through dragging gesture
CN106648434A (en) * 2011-12-22 2017-05-10 优视科技有限公司 Method and device for controlling application interfaces through dragging gesture
CN103984492A (en) * 2013-02-07 2014-08-13 高德软件有限公司 Method and device for scaling display picture of mobile terminal and mobile terminal
CN104423781A (en) * 2013-08-29 2015-03-18 中兴通讯股份有限公司 Interface processing method, device and terminal
CN103809852A (en) * 2014-02-14 2014-05-21 北京君正集成电路股份有限公司 Method and device for displaying multiple application programs on same screen at same time
US20160041749A1 (en) * 2014-08-11 2016-02-11 Fu Tai Hua Industry (Shenzhen) Co., Ltd. Operating method for user interface
CN104461232A (en) * 2014-09-30 2015-03-25 小米科技有限责任公司 Method and device for determining reduction scale in screen display process
CN105867782A (en) * 2015-11-06 2016-08-17 乐视移动智能信息技术(北京)有限公司 Interface zooming method and apparatus as well as terminal device
CN105677224A (en) * 2016-01-06 2016-06-15 广州市动景计算机科技有限公司 Drop-down gesture processing method, device and equipment
CN106412232A (en) * 2016-08-26 2017-02-15 珠海格力电器股份有限公司 Scaling method and device for controlling operation interface, and electronic device
CN107168618A (en) * 2017-03-27 2017-09-15 努比亚技术有限公司 A kind of device for zooming of screen display interface, terminal and method
CN107357504A (en) * 2017-07-23 2017-11-17 刘慧� A kind of electronic map for by scaling gesture show scaling

Also Published As

Publication number Publication date
CN109582424A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
KR101541928B1 (en) visual feedback display
TWI569171B (en) Gesture recognition
JP6427559B6 (en) Permanent synchronization system for handwriting input
KR20160058117A (en) Systems and methods for providing response to user input using information about state changes predicting future user input
US20120216141A1 (en) Touch gestures for text-entry operations
JP5664147B2 (en) Information processing apparatus, information processing method, and program
CN104238887B (en) The icon lookup method and device of conventional application program
US20130246975A1 (en) Gesture group selection
KR102205283B1 (en) Electro device executing at least one application and method for controlling thereof
CN110928475B (en) Page interaction method, device, equipment and storage medium of intelligent interaction panel
JP5464903B2 (en) Information processing apparatus, control method, and program
CN109582424B (en) Interface closing method, system and related device
KR101768897B1 (en) Touch screen device for moving or copying of an object based on the touch input and operating method thereof
JP2015114978A (en) Display device and program
CN112540713B (en) Video preview progress bar scaling method, system, device and storage medium
CN109254823A (en) A kind of method, memory and the terminal of the paging view elements of changing multi-stage nesting
CN106293426A (en) Screenshotss method and apparatus based on browser of mobile terminal
TWI671675B (en) Information display method and device
JP6176907B2 (en) Information processing apparatus, control method therefor, and program
CN110795015A (en) Operation prompting method, device, equipment and storage medium
CN106990900A (en) One kind writing implementation method and device
WO2018176843A1 (en) Method and apparatus for searching for focus across boundary, intelligent device and readable storage medium
CN113311981A (en) Erasing method and device, intelligent terminal and computer readable storage medium
KR102509976B1 (en) Method for panning image
JP6711616B2 (en) Graphic element selection

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