CN111309583A - Interface overdraw detection method and device - Google Patents

Interface overdraw detection method and device Download PDF

Info

Publication number
CN111309583A
CN111309583A CN201811513439.9A CN201811513439A CN111309583A CN 111309583 A CN111309583 A CN 111309583A CN 201811513439 A CN201811513439 A CN 201811513439A CN 111309583 A CN111309583 A CN 111309583A
Authority
CN
China
Prior art keywords
view
type
root
overdraw
interface
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.)
Granted
Application number
CN201811513439.9A
Other languages
Chinese (zh)
Other versions
CN111309583B (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201811513439.9A priority Critical patent/CN111309583B/en
Publication of CN111309583A publication Critical patent/CN111309583A/en
Application granted granted Critical
Publication of CN111309583B publication Critical patent/CN111309583B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention provides an interface overdrawing detection method. The method comprises the following steps: calling an interface to be detected, and acquiring a root view contained in the interface; determining the type of the root view, carrying out over-drawing check according to the type of the root view, and confirming the over-drawing view; and acquiring a view name for drawing the overview. The over-drawing problem can be directly positioned to the view level without opening a switch for checking the over-drawing in a developer option set by the system, and the positioning is accurate. In addition, the embodiment of the invention provides an interface overdrawing detection device.

Description

Interface overdraw detection method and device
Technical Field
The embodiment of the invention relates to the field of view drawing, in particular to an interface overdraw detection method and device.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
The interface is one of four major components of the android system, and is mainly used for interacting with a user, such as making a call, taking a picture, sending a mail, or displaying a map. The user can complete the related operations through interface interaction, and one application program allows a plurality of interfaces. Each interface consists of many controls, which are a special type of view including buttons, text boxes, sliders, and switches. Controls typically use standard system paradigms (such as object-action mode and delegate mode) to notify applications that a user interaction has occurred. If the control has unreasonable layout, excessive drawing is formed, and the condition that the control is drawn for multiple times on one pixel of the screen is called excessive drawing of the interface. Excessive drawing can lead to increased drawing time and unsmooth use of the user, which affects the user experience. For example, if a text control in the interface is followed by a background control, then the pixels displaying the text control are drawn at least twice, once for the background control and once for the text control.
In order to solve the problem, an existing scheme is provided, a developer mode can check excessive drawing, open a mobile phone setting, select a developer option, debug GPU excessive drawing, select and display an excessive drawing area, and distinguish different excessive drawing conditions by different colors. The Debug Bridge command (adb, Android Debug Bridge) may be used to turn on and off overdraw, which may require a restart of the current application after execution of the command. This method requires turning on an overdraw switch in a developer option of system settings and performing a series of manual operations to check for overdraw, which is costly to use.
The other scheme is that overdrawing is checked through a reflection system method, more overdrawing scenes can be found through taking the count of the overdrawing and combining an automatic traversal technology, and the efficiency of finding the overdrawing is improved. However, it is also necessary to turn on the overdraw switch in the developer's option of system setup. The problem level can only be positioned to the interface level, the control level cannot be positioned, and further analysis is still needed as to which control is over-drawn.
Disclosure of Invention
In this context, embodiments of the present invention are intended to provide an interface overdraw detection method and apparatus.
In a first aspect of embodiments of the present invention, a video playback control method is provided, including:
calling an interface to be detected, and acquiring a root view contained in the interface;
determining the type of the root view, and performing over-drawing check according to the type of the root view to confirm that the over-drawing view is drawn;
and acquiring the view name of the over-drawn view.
In a second aspect of the embodiments of the present invention, there is provided a video playback control apparatus including:
the interface root view acquisition module is used for calling an interface to be detected and acquiring a root view contained in the interface;
the over-drawing checking module is used for determining the type of the root view, carrying out over-drawing checking according to the type of the root view and confirming that the over-drawing view is drawn;
and the view name acquisition module is used for acquiring the view name of the over-drawn view.
In a third aspect of embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program for executing, by a processor, the steps of implementing the interface overdraw detection method described above.
In a fourth aspect of embodiments of the present invention, there is provided a computing device comprising: the system comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the steps of the interface overdraw detection method when executing the program.
According to the method and the device for detecting the excessive drawing of the interface, a switch for checking the excessive drawing is not required to be opened in a developer option set by a system, the excessive drawing problem can be directly positioned to the view level, and the positioning is accurate.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
FIG. 1 schematically illustrates a flow diagram of an interface overdraw detection method according to an embodiment of the present invention;
fig. 2 schematically shows a flowchart of an interface overdraw detection method according to another embodiment of the present invention;
FIG. 3 schematically illustrates a flow chart of an interface overdraw detection method according to a further embodiment of the present invention;
FIG. 4 schematically illustrates a flow chart of an interface overdraw detection method according to yet another embodiment of the present invention;
FIG. 5 schematically illustrates a flow chart of an interface overdraw detection method according to yet another embodiment of the present invention;
FIG. 6 schematically illustrates a media diagram of an interface overdraw detection method according to an embodiment of the present invention;
fig. 7 schematically shows a structural view of an interface overdraw detection apparatus according to an embodiment of the present invention;
FIG. 8 schematically shows a structural diagram of a computing device according to an embodiment of the invention.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
The principles and spirit of the present invention will be described with reference to a number of exemplary embodiments. It is understood that these embodiments are given solely for the purpose of enabling those skilled in the art to better understand and to practice the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to the embodiment of the invention, a method and a device for detecting excessive drawing of an interface are provided.
In this document, any number of elements in the drawings is by way of example and not by way of limitation, and any nomenclature is used solely for differentiation and not by way of limitation.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments of the invention.
Summary of The Invention
The inventor finds that the current over-drawing inspection needs to turn on an over-drawing switch in a developer option set by a system, the operation is complex, the problem level can only be positioned to an interface level, the control level cannot be positioned, and the drawing problem positioning is inaccurate.
In view of the above, the present invention provides a method and an apparatus for detecting excessive drawing of an interface, which perform excessive drawing inspection on a view included in the interface by retrieving and inspecting the interface, without turning on a switch for inspecting excessive drawing in a developer option set by a system, optimize the interface, have a wider application scope, and directly position an excessive drawing problem to a view level with accurate positioning.
Having described the general principles of the invention, various non-limiting embodiments of the invention are described in detail below.
Exemplary method
As shown in fig. 1, a video playing control method according to an embodiment of the present invention may include the following steps:
and S11, calling the interface to be detected, and acquiring the root view contained in the interface.
The method of the embodiment can be applied to detection of excessive drawing of the interface of the application program in various electronic devices, such as computers, smart phones, tablet computers, game machines and the like.
In one example, after android system version 4.0, the lifecycle of the interface can be monitored with the activity lifecycle call interface by registering the activity lifecycle call. And calling the interface to be detected in the interface destruction callback, acquiring the width and height of the interface by using an interface window acquiring function (activity.
And S12, determining the type of the root view, performing over-drawing check according to the type of the root view, and confirming the over-drawing view.
In one example, the type of the root view may include an image view type or a view group type, wherein the view group type may be regarded as a container of many views, and the root view may be converted into the view group type according to an activity. Because the over-drawing conditions of different types of root views are different, a corresponding over-drawing checking mode is formulated according to the type of the root view, and the over-drawing positioning accuracy is improved.
And S13, acquiring the view name of the drawing transition view.
The compiling of the android application program comprises two parts of code compiling and resource compiling. In code compilation, views are represented by a data type value (INT value), and in resource compilation, each resource is assigned a resource ID, i.e., a view name, after compilation. The data type value of the over-view drawing is obtained in the application program integrated tool kit, and then the corresponding view name of the over-view drawing is found in the class by using R.java (reflection mechanism of java language).
The interface overdraw detection provided by the embodiment can directly position the overdraw problem to the view level without opening a switch for checking the overdraw in a developer option set by the system, and the positioning is accurate.
In a possible implementation manner, as shown in fig. 2, in the interface overdraw detection method according to another embodiment of the present invention, determining a type of the root view, performing an overdraw check according to the type of the root view, and confirming the overdraw may include:
step S21, determining the type of the root view as the image view type;
and if the foreground picture and the background picture in the image view exist at the same time, confirming that the image view is the drawing over view.
On the basis of the above embodiment, after confirming that the overview is drawn, the method may further include:
and step S22, removing one of the foreground picture or the background picture.
In one example, if the type of the root view is an image view type, it indicates that the current root view is a picture, and the foreground picture and the background picture are checked, and if the current root view and the background picture exist at the same time, it indicates that the current root view has an over-rendering problem. The problem of eliminating over-rendering may be to remove the foreground picture and retain the background picture, or to remove the background picture and retain the foreground picture.
In a possible implementation manner, as shown in fig. 3, in the interface overdraw detection method according to another embodiment of the present invention, determining a type of the root view, performing an overdraw check according to the type of the root view, and determining a view that is overdrawn may include:
step S23, determining the type of the root view as the image view type;
and if the original picture pixels in the image view are larger than the picture pixels displayed on the screen, the image view is the over-drawn view.
On the basis of the above embodiment, after confirming that the overview is drawn, the method may further include:
step S24, the pixels of the original picture are compressed to be equal to the picture pixels displayed on the screen.
In one example, if the type of the root view is an image view type, it indicates that the current root view is a picture, and the original picture size and the picture size finally displayed on the screen are obtained, and if the picture pixel displayed on the screen is smaller than the original picture pixel, it indicates that the current root view has an over-drawing problem. The problem of eliminating overdrawing may be to compress the pixels of the original picture to be equal to the picture pixels displayed on the screen.
In a possible implementation manner, as shown in fig. 4, in the interface overdraw detection method according to another embodiment of the present invention, determining a type of the root view, performing an overdraw check according to the type of the root view, and confirming the overdraw may include:
step S25, confirming that the type of the root view is a view group type, wherein the view group comprises a parent view and a plurality of child views;
and if the pixel of the child view is equal to the pixel of the parent view, confirming that the image view is the overdraw view.
On the basis of the above embodiment, after confirming that the overview is drawn, the method may further include:
and step S26, removing one of the parent view and the child view.
In one example, a view group type may be considered a container for many views, a view group including a parent view and a number of child views. The number of the child views can be obtained through a child view count function (getchild count), then traversal check is performed on the child views, if the pixels of the child views are the same as those of the parent views, it is indicated that the layout size of the parent views is the same, and it is determined that the image view is an over-drawn view. The problem of eliminating overdrawing may be to remove the parent view, leave the child view, or remove the child view, leave the parent view.
In a possible implementation, as shown in fig. 5, before invoking the interface to be detected, the method further includes:
step S09, obtaining the data type value of the code in the tool kit of the application program integration;
step S10, in the interface compiling process, indexing in the class by using a reflection mechanism and calling the view name corresponding to the data type value, and constructing the mapping relation between the data type value and the view name.
On the basis of the above embodiment, obtaining the view name of the overdraw includes:
and step S31, confirming the view name of the over-drawn view according to the data type value and the mapping relation of the over-drawn view.
In one example, the mapping relationship between the data type value and the view name in the compilation of code may be constructed by reflecting the r.java class in an SDK (Software Development kit). Each resource is compiled, a resource ID (identity identification number) is allocated in R.java, when the code refers to the resource, the resource is searched through a unique resource ID data type value, the unique resource ID value of the view is found in the SDK to search for the corresponding mapping, and then the ID name set for the view in the layout file xml can be obtained. The SDK is a set of development tools used when creating application software, such as a specific software package, a software framework, a hardware platform, and an operating system. The user does not need to open an over-drawing check switch in the system setting developer option, and the application range is wider. By carrying out recursive check on the root view and reflecting the R.java class, the corresponding relation between the data type value of the view and the view name is found, once excessive drawing is found, the problem can be positioned to the control level, and the positioning is more accurate.
Exemplary Medium
Having described the method of the exemplary embodiment of the present invention, the medium of the exemplary embodiment of the present invention will be described next with reference to fig. 6.
In some possible embodiments, aspects of the present invention may also be implemented as a computer-readable medium on which a program is stored, the program, when executed by a processor, being for implementing the steps in the video playback control method according to various exemplary embodiments of the present invention described in the above section "exemplary method" of this specification.
Specifically, the processor, when executing the program, is configured to implement the following steps:
calling an interface to be detected, and acquiring a root view contained in the interface;
determining the type of the root view, and performing over-drawing check according to the type of the root view to confirm that the over-drawing view is drawn;
and acquiring the view name of the over-drawn view.
In a possible embodiment, determining the type of the root view, performing an over-rendering check according to the type of the root view, and confirming the over-rendering view includes:
determining that the type of the root view is an image view type;
and if the foreground picture and the background picture in the image view exist at the same time, confirming that the image view is the over-drawing view.
In a possible implementation, after confirming that the image view is the overdraw view, the method further includes:
and removing one of the foreground picture or the background picture.
In a possible embodiment, determining the type of the root view, performing an over-rendering check according to the type of the root view, and confirming the over-rendered view includes:
determining that the type of the root view is an image view type;
if the original picture pixels in the image view are larger than the picture pixels displayed on the screen,
confirming the image view as the overdraw view.
In a possible implementation, after confirming that the image view is the overdraw view, the method further includes:
compressing pixels of the original picture to be equal to picture pixels displayed on a screen.
In a possible embodiment, determining the type of the root view, performing an over-rendering check according to the type of the root view, and confirming the over-rendering view includes:
confirming that the type of the root view is a view group type, the view group including a parent view and a plurality of child views;
and if the pixels of the child view and the parent view are equal, confirming that the view group is the overdraw view.
In a possible implementation, after confirming that the view group is the overdraw, the method further includes:
removing one of the parent view and the child view.
In a possible implementation manner, before invoking the interface to be detected, the method further includes:
in a tool kit for integrating application programs, acquiring a data type value of a code;
in the interface compiling process, indexing in a class by using a reflection mechanism and calling the view name corresponding to the data type value to construct a mapping relation between the data type value and the view name.
In one possible implementation, obtaining the view name of the overdraw includes:
and confirming the view name of the over-drawn view according to the data type value of the over-drawn view and the mapping relation.
It should be noted that: the above-mentioned medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
As shown in fig. 6, a medium 90 according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include a program, and may be run on a device. However, the invention is not limited in this respect, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take a variety of forms, including, but not limited to: an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN).
Exemplary devices
Having described the media of an exemplary embodiment of the present invention, the apparatus of an exemplary embodiment of the present invention is next described with reference to FIG. 7.
As shown in fig. 7, the interface overdraw detection apparatus according to the embodiment of the present invention may include:
the interface root view acquisition module 101 is used for calling an interface to be detected and acquiring a root view contained in the interface;
an over-rendering checking module 102, configured to determine a type of the root view, perform over-rendering checking according to the type of the root view, and confirm that the over-rendering view is rendered;
a view name obtaining module 103, configured to obtain a view name for drawing the overview.
In one possible implementation, the overdraw check module 102 includes:
a first over-rendering confirmation unit 1021, configured to determine that the type of the root view is an image view type, and if a foreground picture and a background picture in the image view exist at the same time, confirm that the image view is the over-rendering view.
In one possible implementation, the overdraw check module 102 further includes:
a first picture deleting unit 1022, configured to delete one of the foreground picture and the background picture.
In one possible implementation, the overdraw check module 102 includes:
the second drawing over-confirmation unit 1023 is configured to determine that the type of the root view is an image view type, and if an original picture pixel in the image view is larger than a picture pixel displayed on the screen, confirm that the image view is an over-drawing view.
In one possible implementation, the overdraw check module 102 further includes:
a picture compressing unit 1024, configured to compress pixels of the original picture to be equal to picture pixels displayed on the screen.
In one possible implementation, the overdraw check module 102 includes:
and a third drawing over confirmation unit 1025 for confirming that the type of the root view is a view group type, the view group including a parent view and a plurality of child views, and confirming that the view group is the drawing over view if the pixels of the child views are equal to the pixels of the parent view.
In one possible implementation, the overdraw check module 102 further includes:
a second picture deleting unit 1026 configured to delete one of the parent view and the child view.
In a possible embodiment, the apparatus further comprises:
the mapping construction module 100 is configured to obtain a data type value of a code in an application integration toolkit, index and call the view name corresponding to the data type value in a class by using a reflection mechanism in the interface compiling process, and construct a mapping relationship between the data type value and the view name.
Exemplary computing device
Having described the method, medium, and apparatus of exemplary embodiments of the present invention, a computing device of exemplary embodiments of the present invention is described next with reference to FIG. 8.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible implementations, a computing device according to an embodiment of the invention may include at least one processing unit, and at least one memory unit. Wherein the storage unit stores program code that, when executed by the processing unit, causes the processing unit to perform the steps in the video playback control method according to various exemplary embodiments of the present invention described in the above section "exemplary method" of this specification.
A computing device 110 according to this embodiment of the invention is described below with reference to FIG. 8. The computing device 110 shown in FIG. 8 is only one example and should not be taken to limit the scope of use and functionality of embodiments of the present invention.
As shown in fig. 8, computing device 110 is embodied in the form of a general purpose computing device. Components of computing device 110 may include, but are not limited to: the at least one processing unit 1101, the at least one storage unit 1102, and a bus 1103 connecting different system components (including the processing unit 1101 and the storage unit 1102).
The bus 1103 includes a data bus, a control bus, and an address bus.
The storage unit 1102 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)11021 and/or cache memory 11022, and may further include readable media in the form of non-volatile memory, such as Read Only Memory (ROM) 11023.
The memory unit 1102 may also include a program/utility 11025 having a set (at least one) of program modules 11024, such program modules 11024 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Computing device 110 may also communicate with one or more external devices 1104 (e.g., keyboard, pointing device, etc.). Such communication may occur via input/output (I/O) interfaces 1105. Also, the computing device 110 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 1106. As shown, the network adapter 1106 communicates with other modules of the computing device 110 over the bus 1103. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the computing device 110, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the video playback control apparatus are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
While the spirit and principles of the invention have been described with reference to several particular embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, nor is the division of aspects, which is for convenience only as the features in such aspects may not be combined to benefit. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. An interface overdraw detection method, comprising:
calling an interface to be detected, and acquiring a root view contained in the interface;
determining the type of the root view, and performing over-drawing check according to the type of the root view to confirm that the over-drawing view is drawn;
and acquiring the view name of the over-drawn view.
2. The method of claim 1, wherein determining the type of the root view, performing an overdraw check based on the type of the root view, and confirming the overdraw comprises:
determining that the type of the root view is an image view type;
and if the foreground picture and the background picture in the image view exist at the same time, confirming that the image view is the over-drawing view.
3. The method of claim 1, wherein determining the type of the root view, performing an overdraw check based on the type of the root view, and confirming the overdraw view comprises:
determining that the type of the root view is an image view type;
and if the original picture pixels in the image view are larger than the picture pixels displayed on the screen, determining that the image view is the over-drawn view.
4. The method of claim 1, wherein determining the type of the root view, performing an overdraw check based on the type of the root view, and confirming the overdraw comprises:
confirming that the type of the root view is a view group type, the view group including a parent view and a plurality of child views;
and if the pixels of the child view and the parent view are equal, confirming that the view group is the overdraw view.
5. The method of any one of claims 1 to 4, wherein prior to retrieving the interface to be detected, further comprising:
in a tool kit for integrating application programs, acquiring a data type value of a code;
in the interface compiling process, indexing in a class by using a reflection mechanism and calling the view name corresponding to the data type value to construct a mapping relation between the data type value and the view name.
6. An interface overdraw detection apparatus, comprising:
the interface root view acquisition module is used for calling an interface to be detected and acquiring a root view contained in the interface;
the over-drawing checking module is used for determining the type of the root view, carrying out over-drawing checking according to the type of the root view and confirming that the over-drawing view is drawn;
and the view name acquisition module is used for acquiring the view name of the over-drawn view.
7. The apparatus of claim 6, wherein the overdraw check module comprises:
and the first over-rendering confirmation unit is used for determining that the type of the root view is an image view type, and if a foreground picture and a background picture in the image view exist at the same time, confirming that the image view is the over-rendering view.
8. The apparatus of claim 6, wherein the overdraw check module comprises:
and the second over-drawing confirming unit is used for confirming that the type of the root view is an image view type, and if the original picture pixel in the image view is larger than the picture pixel displayed on the screen, confirming that the image view is the over-drawing view.
9. The apparatus of claim 6, wherein the overdraw check module comprises:
and a third overdraw confirmation unit, configured to confirm that the type of the root view is a view group type, where the view group includes a parent view and a plurality of child views, and if a pixel of the child view is equal to a pixel of the parent view, confirm that the view group is the overdraw.
10. The apparatus of claim 6, wherein the apparatus further comprises:
and the mapping construction module is used for acquiring a data type value of a code in an application program integrated tool kit, indexing in a class by using a reflection mechanism and calling the view name corresponding to the data type value in the interface compiling process, and constructing the mapping relation between the data type value and the view name.
CN201811513439.9A 2018-12-11 2018-12-11 Interface overdrawing detection method, device, medium and computing equipment Active CN111309583B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811513439.9A CN111309583B (en) 2018-12-11 2018-12-11 Interface overdrawing detection method, device, medium and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811513439.9A CN111309583B (en) 2018-12-11 2018-12-11 Interface overdrawing detection method, device, medium and computing equipment

Publications (2)

Publication Number Publication Date
CN111309583A true CN111309583A (en) 2020-06-19
CN111309583B CN111309583B (en) 2023-07-11

Family

ID=71157881

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811513439.9A Active CN111309583B (en) 2018-12-11 2018-12-11 Interface overdrawing detection method, device, medium and computing equipment

Country Status (1)

Country Link
CN (1) CN111309583B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113961280A (en) * 2020-07-21 2022-01-21 北京字节跳动网络技术有限公司 View display method and device, electronic equipment and computer-readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106033334A (en) * 2015-03-11 2016-10-19 腾讯科技(深圳)有限公司 An interface element drawing method and device
US9513783B1 (en) * 2014-03-17 2016-12-06 Amazon Technologies, Inc. Determining available screen area
CN106227649A (en) * 2016-07-08 2016-12-14 北京奇虎科技有限公司 A kind of test the application method and apparatus that excessively renders of the page
CN106648602A (en) * 2016-10-18 2017-05-10 江西博瑞彤芸科技有限公司 Page loading method
CN107203383A (en) * 2017-05-25 2017-09-26 努比亚技术有限公司 A kind of user interface method of adjustment and mobile terminal
CN108345485A (en) * 2018-01-30 2018-07-31 口碑(上海)信息技术有限公司 identification method and device for interface view
CN108536582A (en) * 2018-03-08 2018-09-14 挖财网络技术有限公司 The method and device of quantitative analysis is excessively drawn in Android applications

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9513783B1 (en) * 2014-03-17 2016-12-06 Amazon Technologies, Inc. Determining available screen area
CN106033334A (en) * 2015-03-11 2016-10-19 腾讯科技(深圳)有限公司 An interface element drawing method and device
CN106227649A (en) * 2016-07-08 2016-12-14 北京奇虎科技有限公司 A kind of test the application method and apparatus that excessively renders of the page
CN106648602A (en) * 2016-10-18 2017-05-10 江西博瑞彤芸科技有限公司 Page loading method
CN107203383A (en) * 2017-05-25 2017-09-26 努比亚技术有限公司 A kind of user interface method of adjustment and mobile terminal
CN108345485A (en) * 2018-01-30 2018-07-31 口碑(上海)信息技术有限公司 identification method and device for interface view
CN108536582A (en) * 2018-03-08 2018-09-14 挖财网络技术有限公司 The method and device of quantitative analysis is excessively drawn in Android applications

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113961280A (en) * 2020-07-21 2022-01-21 北京字节跳动网络技术有限公司 View display method and device, electronic equipment and computer-readable storage medium
CN113961280B (en) * 2020-07-21 2023-11-24 抖音视界有限公司 View display method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN111309583B (en) 2023-07-11

Similar Documents

Publication Publication Date Title
US11650910B2 (en) Automated testing method and apparatus, storage medium and electronic device
CN111881019B (en) User interface testing method and device
US9612837B2 (en) Trace method and information processing apparatus
CN111124371A (en) Game-based data processing method, device, equipment and storage medium
US11144437B2 (en) Pre-populating continuous delivery test cases
CN112748923A (en) Method and device for creating visual billboard, electronic equipment and storage medium
CN108460161B (en) Hierarchical sampling method and device and computer equipment
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN112579187A (en) Optimization method and device for cold start of application program
CN114003269A (en) Component processing method and device, electronic equipment and storage medium
CN111309583B (en) Interface overdrawing detection method, device, medium and computing equipment
CN109460234B (en) Application slimming method and device, terminal and storage medium
CN111258875A (en) Interface test method and system, electronic device and storage medium
CN109948251B (en) CAD-based data processing method, device, equipment and storage medium
CN114461214A (en) Page display method and device, electronic equipment and storage medium
CN113342431A (en) Function call stack backtracking and program exception handling method, device, equipment and medium
CN111124423A (en) Multi-platform-based compiling detection method, device, server and medium
US20200310791A1 (en) Error checking of notebook code blocks
CN112506592A (en) Method, device, equipment and storage medium for determining page loading duration
CN109657086B (en) Image preview method, device, equipment and storage medium
CN114579235B (en) Language type-based icon display method, device, equipment and storage medium
CN113590225B (en) Mapping detection method and device, electronic equipment and storage medium
CN117688266A (en) Full embedded point method, device and equipment for single-page application page and storage medium
CN117311838A (en) File processing method, device, equipment and storage medium based on dynamic plug-in
CN117472738A (en) Test script generation method and device, readable storage medium and electronic equipment

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