Interface display method and device, electronic equipment and storage medium

By allowing third-party controls to rearrange and modify their source code, the problem of poor universality of electronic device interface display control in the prior art is solved, and system-level interface display control is realized, which improves the universality and user experience of interface display.

CN119031066APending Publication Date: 2024-11-26GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310590530.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

When existing electronic devices support control arrangement adjustment, they are poor in versatility. Each application needs to adapt to modify the code, and lack system-level interface display control capabilities.

Method used

By allowing third-party controls to be rearranged, the control display parameters are determined based on the control rearrangement instructions, and by modifying the source code of the third-party controls, the control reordering in the interface is realized, thereby improving the system-level control capability of interface display.

Benefits of technology

It realizes system-level control rearrangement of the application interface, improving the versatility and user experience of interface display control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119031066A_ABST
    Figure CN119031066A_ABST
Patent Text Reader

Abstract

The invention discloses an interface display method and device, electronic equipment and a storage medium, and relates to the technical field of electronic equipment. The method comprises the steps that an application interface is displayed, the application interface comprises a third-party control, the third-party control is allowed to be rearranged, in response to a control rearrangement instruction, control display parameters corresponding to the third-party control are determined based on the control rearrangement instruction, and a target control corresponding to the third-party control is determined based on the control display parameters, the target control is obtained by modifying a source code corresponding to the third-party control, the application interface is updated and displayed based on the target control, and the updated and displayed application interface comprises the target control. For the third-party control allowed to be rearranged, when the control rearrangement instruction is received, control rearrangement in the interface is achieved by modifying the source code corresponding to the third-party control, system-level control of interface display can be achieved, and universality of interface display control is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic devices, and more specifically, to an interface display method, device, electronic device and storage medium. Background Art

[0002] With the development of science and technology, electronic devices are used more and more widely and have more and more functions, becoming one of the necessities in people's daily life. At present, electronic devices can be used to display application interfaces, and application interfaces support the arrangement and adjustment of controls. However, when electronic devices support the arrangement and adjustment of controls, they are all implemented through the application itself, which has poor versatility. Summary of the invention

[0003] In view of the above problems, the present application proposes an interface display method, device, electronic device and storage medium to solve the above problems.

[0004] In a first aspect, an embodiment of the present application provides an interface display method, the method comprising: displaying an application interface, wherein the application interface includes a third-party control, and the third-party control is allowed to be rearranged; in response to a control rearrangement instruction, determining a control display parameter corresponding to the third-party control based on the control rearrangement instruction; determining a target control corresponding to the third-party control based on the control display parameters, wherein the target control is obtained by modifying the source code corresponding to the third-party control; updating and displaying the application interface based on the target control, wherein the updated and displayed application interface includes the target control.

[0005] In a second aspect, an embodiment of the present application provides an interface display device, comprising: an application interface display module, for displaying an application interface, wherein the application interface includes a third-party control, and the third-party control is allowed to be rearranged; a control display parameter determination module, for responding to a control rearrangement instruction, and determining a control display parameter corresponding to the third-party control based on the control rearrangement instruction; a target control determination module, for determining a target control corresponding to the third-party control based on the control display parameters, wherein the target control is obtained by modifying the source code corresponding to the third-party control; an application interface update module, for updating and displaying the application interface based on the target control, wherein the application interface after update and display includes the target control.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor executes the above method.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored, and the program code can be called by a processor to execute the above method.

[0008] The interface display method, device, electronic device and storage medium provided in the embodiments of the present application display an application interface, wherein the application interface includes a third-party control that allows rearrangement, and in response to a control rearrangement instruction, determines a control display parameter corresponding to the third-party control based on the control rearrangement instruction, and determines a target control corresponding to the third-party control based on the control display parameter, wherein the target control is obtained by modifying the source code corresponding to the third-party control, and updates and displays the application interface based on the target control, wherein the updated application interface includes the target control, so that by modifying the source code corresponding to the third-party control for the third-party control that is allowed to be rearranged when the control rearrangement instruction is received, the controls in the interface are rearranged, thereby achieving system-level control of the interface display and improving the versatility of the interface display control. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0010] Figure 1 A schematic diagram of the structure of an electronic device including a foldable display screen provided by an embodiment of the present application is shown;

[0011] Figure 2 A schematic diagram of the structure of an electronic device with a foldable display screen provided in one embodiment of the present application is shown;

[0012] Figure 3 A schematic structural diagram of an electronic device including a scroll display screen provided by an embodiment of the present application is shown;

[0013] Figure 4 A schematic structural diagram of an electronic device including a scroll display screen provided by an embodiment of the present application is shown;

[0014] Figure 5 A schematic diagram of the structure of an electronic device including a straight-panel display screen provided in one embodiment of the present application is shown;

[0015] Figure 6 A schematic diagram showing a flow chart of an interface display method provided in an embodiment of the present application is shown;

[0016] Figure 7A schematic diagram showing a flow chart of an interface display method provided in an embodiment of the present application is shown;

[0017] Figure 8 A structural diagram of a program package provided by an embodiment of the present application is shown;

[0018] Fig. 9 A structural block diagram of a program package class file provided by an embodiment of the present application is shown;

[0019] Fig.10 A schematic diagram showing a flow chart of an interface display method provided in an embodiment of the present application is shown;

[0020] Fig.11 A first schematic diagram of an application interface provided in an embodiment of the present application is shown;

[0021] Fig.12 A second schematic diagram of the application interface provided in the embodiment of the present application is shown;

[0022] Fig.13 A third schematic diagram of the application interface provided in the embodiment of the present application is shown;

[0023] Fig.14 A schematic diagram showing a flow chart of an interface display method provided in an embodiment of the present application is shown;

[0024] Fig.15 A schematic diagram showing a flow chart of an interface display method provided in an embodiment of the present application is shown;

[0025] Fig.16 A schematic diagram showing a flow chart of an interface display method provided in an embodiment of the present application is shown;

[0026] Fig.17 A schematic diagram showing a flow chart of an interface display method provided in an embodiment of the present application is shown;

[0027] Fig.18 A module block diagram of an interface display device provided by an embodiment of the present application is shown;

[0028] Fig.19 A block diagram of an electronic device for executing an interface display method according to an embodiment of the present application is shown;

[0029] Fig. 20 A storage unit for storing or carrying program codes for implementing the interface display method according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0031] With the development of science and technology, electronic devices including display screens are becoming more and more common. Electronic devices can display application interfaces based on display screens to improve user experience. Among them, the installation package corresponding to the application interface can integrate a third-party layout framework or a third-party control. For example, the open source user interface (UI) framework native component library (React Native, RN) provided by Facebook, the open source UI framework Weex provided by Alibaba, AndroidX provided by Google, the Android Support package provided by Google, the list control RecyclerView provided by Android, the page control ViewPager provided by Android, etc.

[0032] In the related art, the application interface supports the arrangement adjustment of third-party controls. However, when electronic devices support the arrangement adjustment of controls, they are all implemented through the application itself, requiring each application to adapt and modify the code separately, which has poor universality.

[0033] In response to the above problems, the inventors have discovered after long-term research and proposed the interface display method, device, electronic device and storage medium provided in the embodiments of the present application. By receiving a control rearrangement instruction for a third-party control that is allowed to be rearranged, the controls in the interface are rearranged by modifying the source code corresponding to the third-party control. This can achieve system-level control of the interface display and improve the versatility of the interface display control.

[0034] The following describes an application environment for the method for displaying the interface provided in the embodiment of the present application.

[0035] See also Figure 1 The electronic device 100 may be, but is not limited to, a mobile phone, a tablet computer, a game console, a smart wearable device, a vehicle-mounted device, or other electronic devices. The electronic device 100 of this embodiment is described by taking a mobile phone as an example.

[0036] The electronic device 100 includes a foldable housing assembly 110, a foldable display screen 120, and an electronic component (not shown in the figure), wherein the electronic component is disposed in the foldable housing assembly 110, and the foldable display screen 120 is laid on the foldable housing assembly 110. The foldable housing assembly 110 is used to carry the foldable display screen 120 and protect the electronic component. The electronic component may include, but is not limited to, a central processing unit, a memory, a camera, a receiver, a fingerprint module, etc., and the specific electronic component may not be limited in the embodiment of the present application.

[0037] The foldable housing assembly 110 includes a first housing 111, a second housing 112 and a hinge mechanism 113, wherein the first housing 111 and the second housing 112 are respectively connected to the two sides of the hinge mechanism 113. The second housing 112 can be folded or unfolded relative to the first housing 111 through the hinge mechanism 113, so that the foldable housing assembly 110 drives the foldable display screen 120 to fold or unfold. When the foldable housing assembly 110 and the foldable display screen 120 are in a folded state, the volume of the electronic device 100 is relatively small, which is convenient for storage and carrying. When the foldable housing assembly 110 and the foldable display screen 120 are in an unfolded state, the volume of the electronic device 100 is relatively large, and the display size of the display screen is large, which is convenient for displaying information.

[0038] See also Figure 2 In this embodiment, the folding display screen 120 includes a first display portion 121 connected to the first shell 111, a second display portion 122 connected to the second shell 112, and a bent display portion 123 connected to the first display portion 121 and the second display portion 122. The first display portion 121, the second display portion 122, and the bent display portion 123 can form a plurality of display areas (for example, two display areas, three display areas, four display areas...N display areas) correspondingly. The first display portion 121 and the second display portion 122 are folded or unfolded relative to the first shell 111 and the second shell 112, respectively. The bent display portion 123 is bent or flattened as the first display portion 121 and the second display portion 122 are folded or unfolded.

[0039] In some embodiments, the first display portion 121, the second display portion 122 and the bending display portion 123 may be an integral structure, so that the folding display screen 120 is a whole-piece folding display screen; or, in some other embodiments, the bending display portion 123 is a flexible portion that can be bent, and the first display portion 121 and the second display portion 122 may be non-flexible portions, and the first display portion 121 and the second display portion 122 are relatively folded or unfolded through the bending display portion 123. In this embodiment, when the first housing 111 and the second housing 112 are in a superimposed state, the first display portion 121 and the second display portion 122 are separated, so that the electronic device 100 presents a structure of an outward folding screen, so that the user can also observe the display content of the folding display screen 120 when it is folded, thereby improving the convenience of using the electronic device 100. In some other embodiments, when the first shell 111 and the second shell 112 are overlapped, the first display portion 121 and the second display portion 122 are close to each other, so that the electronic device 100 presents an inward folding screen structure to prevent the folding display screen 120 from being scratched and damaged.

[0040] It should be understood that the naming of the above-mentioned first display portion 121, the second display portion 122 and the bent display portion 123 is only provided for the convenience of description and does not serve as a structural limitation of the folding display screen 120. In actual application scenarios, the first display portion 121, the second display portion 122 and the bent display portion 123 may have no obvious boundaries, or the folding display screen 120 may appear in other division structures. For example, the folding display screen 120 includes a first display portion 121 and a second display portion 122 connected to the first display portion 121, and the first display portion 121 and the second display portion 122 can rotate relative to each other to be folded or unfolded.

[0041] See also Figure 3 and Figure 4 , Figure 3 A schematic diagram showing a scroll display screen of an electronic device provided by an embodiment of the present application in a stretched state is shown, Figure 4 FIG. 1 is a schematic diagram showing a retracted state of a scroll display screen of an electronic device provided by an embodiment of the present application. Figure 3 As shown, Figure 3 A push-pull electronic device 200 is shown, and the electronic device 200 includes a scroll display screen 230 and a drive motor 240 for driving the screen to expand or close. The scroll display screen 230 includes a first display area 231 and a second display area 232, and the second display area 232 is selectively hidden or expanded relative to the first display area 231, so that the first display area 231 and the second display area 232 are selectively displayed simultaneously or non-simultaneously. Figure 3 As shown, when the scroll display screen 230 is unfolded, the second display area 232 is unfolded relative to the first display area 231. At this time, the first display area 231 and the second display area 232 are displayed at the same time; Figure 4 As shown, when the scroll display screen 230 is folded, the second display area 232 is hidden relative to the first display area 231. At this time, the first display area 231 and the second display area 232 are not displayed simultaneously. The scroll display screen 230 may be a flexible display screen.

[0042] See also Figure 5 , Figure 5 The structure diagram of the electronic device including the straight display screen provided by the present application is shown. The display screen 310 included in the electronic device 300 is a straight display screen, which can be understood as the display screen 310 is a non-flexible display screen, and can also be understood as the display size of the display screen 310 cannot be changed.

[0043] See also Figure 6 , Figure 6The flowchart of the interface display method provided by an embodiment of the present application is shown. The interface display method is used to achieve the control rearrangement in the interface by modifying the source code corresponding to the third-party control when a control rearrangement instruction is received for the third-party control that is allowed to be rearranged, so as to achieve system-level control of the interface display and improve the versatility of the interface display control. In a specific embodiment, the interface display method is applied to Fig.18 The interface display device 400 and the electronic device 500 ( Fig.19 ). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment may include a smart phone, a tablet computer, a car computer, etc., which is not limited here. Figure 6 The process shown is described in detail, and the interface display method may specifically include the following steps:

[0044] Step S110: displaying an application interface, wherein the application interface includes third-party controls, and the third-party controls are allowed to be rearranged.

[0045] In this embodiment, the electronic device can display an application interface. Optionally, the electronic device can display the application interface in full screen or in non-full screen. When the electronic device displays the application interface in non-full screen, it can display the application interface in half screen or in a quarter screen, etc., which is not limited here.

[0046] The application interface can be generated by running an Android Package (apk) on an electronic device. The program installation package can include third-party layout frameworks and third-party controls provided by third-party companies, such as Facebook's RN framework, Alibaba's Weex framework, Google's AndroidX, Support package, etc. The third-party layout framework can implement its free layout system and controls, and the third-party controls can provide custom controls with special capabilities. Application developers can integrate these frameworks and controls into the apk to implement the UI.

[0047] Optionally, the third-party control allows rearrangement, for example, the third-party control allows increasing the number of columns, the third-party control allows reducing the number of columns, the third-party control allows increasing the margin, the third-party control allows reducing the margin, the third-party control allows increasing the display size, the third-party control allows reducing the display size, etc., which are not limited here. Among them, the third-party control can include a list control RecyclerView, which allows increasing or reducing the number of columns.

[0048] Step S120: In response to the control rearrangement instruction, determine the control display parameter corresponding to the third-party control based on the control rearrangement instruction.

[0049] In this embodiment, during the process of displaying the application interface, it can be determined whether a control rearrangement instruction is received. Optionally, if it is determined that a control rearrangement instruction is received, the display parameters corresponding to the third-party control can be determined based on the control rearrangement instruction in response to the control rearrangement instruction. Optionally, if it is determined that no control rearrangement instruction is received, the application interface can continue to be displayed.

[0050] In some embodiments, the electronic device may determine that a control re-arrangement instruction has been received when the target voice information is received as input; the electronic device may determine that a control re-arrangement instruction has been received when the target touch operation acting on the electronic device is detected; the electronic device may determine that a control re-arrangement instruction has been received when the target shake operation acting on the electronic device is detected; the electronic device may determine that a control re-arrangement instruction has been received when the current time meets the preset time; the electronic device may determine that a control re-arrangement instruction has been received when the current location meets the preset location; the electronic device may determine that a control re-arrangement instruction has been received when the current environment meets the preset environment, etc., without limitation here.

[0051] In some embodiments, determining control display parameters corresponding to a third-party control based on a control re-arrangement instruction includes: determining control display parameters corresponding to the third-party control based on the control re-arrangement instruction through a preset mapping relationship, wherein the preset mapping relationship may include multiple instructions, multiple control display parameters, and a correspondence between multiple instructions and multiple control display parameters. Therefore, in this embodiment, when a control re-arrangement instruction is received, the control display parameters that have a correspondence with the control re-arrangement instruction can be determined through the preset mapping relationship as the control display parameters corresponding to the third-party control.

[0052] For example, assuming that the instruction includes a first instruction and a second instruction, the control display parameter includes the first control display parameter and the second control display parameter, and there is a corresponding relationship between the first instruction and the first control display parameter, and there is a corresponding relationship between the second instruction and the second control display parameter. Then, in the case of receiving a control rearrangement instruction, if the control rearrangement instruction matches the first instruction, the first control display parameter can be determined as the control display parameter corresponding to the third-party control, and if the control rearrangement instruction matches the second instruction, the second control display parameter can be determined as the control display parameter corresponding to the third-party control.

[0053] Optionally, the control reordering instruction can be used to instruct the shrinking of a third-party control, the control reordering instruction can be used to instruct the expansion of a third-party control, the control reordering instruction can be used to instruct the changing of the display size of a third-party control, the control reordering instruction can be used to instruct the changing of the display position of a third-party control, etc., which are not limited here.

[0054] Optionally, the control display parameter may include the number of display columns of the third-party control, the control display parameter may include the display size of the third-party control, the control display parameter may include the display position of the third-party control, etc., which are not limited here.

[0055] Step S130: determining a target control corresponding to the third-party control based on the control display parameter, wherein the target control is obtained by modifying a source code corresponding to the third-party control.

[0056] In some implementations, after the electronic device determines the control display parameters corresponding to the third-party control, it can determine the target control corresponding to the third-party control based on the control display parameters. The target control can be obtained by modifying the source code corresponding to the third-party control.

[0057] As an implementable method, after the electronic device determines the control display parameters corresponding to the third-party control on the display screen, it can generate an insertion bytecode corresponding to the source code of the third-party control based on the control display parameters, and insert the insertion bytecode into the source code of the third-party control to obtain the target code. Further, the electronic device can load the target code to determine the target control corresponding to the third-party control.

[0058] As another implementation, the electronic device may be pre-set with a target control corresponding to the control display parameter corresponding to the third-party control. Further, after the electronic device determines the control display parameter corresponding to the third-party control, it may obtain the target control corresponding to the control display parameter corresponding to the third-party control.

[0059] Optionally, the modification of the source code corresponding to the third-party control may include modifying the source code corresponding to the position of the third-party control in the source code corresponding to the third-party control, or modifying the source code corresponding to the proportion of the display screen occupied by the third-party control in the source code corresponding to the third-party control, or modifying the source code corresponding to the number of columns included in the third-party control in the source code corresponding to the third-party control, or modifying the source code corresponding to the layout margin of the page included in the third-party control in the source code corresponding to the third-party control. In this embodiment, the content of the modified source code corresponding to the third-party control is not limited here. Among them, the method of modifying the source code corresponding to the third-party control can be to delete the bytecode of the source code corresponding to the third-party control, insert the bytecode, etc., which is not limited here.

[0060] Step S140: updating and displaying the application interface based on the target control, wherein the updated and displayed application interface includes the target control.

[0061] In this embodiment, when it is determined that the application interface includes a target control, the application interface can be updated and displayed based on the target control, wherein the updated and displayed application interface includes the target control, thereby adjusting the arrangement of controls in the application interface in a system-level manner. It is understandable that there may be a difference in the arrangement of controls between an application interface including a target control and an application interface including a third-party control, for example, an application interface including a target control has more control columns than an application interface including a third-party control; an application interface including a target control has fewer control columns than an application interface including a third-party control; an application interface including a target control has a larger control size than an application interface including a third-party control; an application interface including a target control has a smaller control size than an application interface including a third-party control, etc., which are not limited here.

[0062] An interface display method provided by an embodiment of the present application displays an application interface, wherein the application interface includes a third-party control, and the third-party control is allowed to be rearranged. In response to a control rearrangement instruction, a control display parameter corresponding to the third-party control is determined based on the control rearrangement instruction, and a target control corresponding to the third-party control is determined based on the control display parameter, wherein the target control is obtained by modifying the source code corresponding to the third-party control, and the application interface is updated and displayed based on the target control, wherein the updated and displayed application interface includes the target control, so that for the third-party control that is allowed to be rearranged, when the control rearrangement instruction is received, the source code corresponding to the third-party control is modified to achieve control rearrangement in the interface, thereby achieving system-level control of the interface display and improving the versatility of the interface display control.

[0063] See also Figure 7 , Figure 7 The following is a flow chart of the interface display method provided by an embodiment of the present application. Figure 7 The process shown is described in detail, and the interface display method may specifically include the following steps:

[0064] Step S210: displaying an application interface, wherein the application interface includes third-party controls, and the third-party controls are allowed to be rearranged.

[0065] Step S220: In response to the control rearrangement instruction, determine the control display parameter corresponding to the third-party control based on the control rearrangement instruction.

[0066] For the detailed description of step S210 to step S220, please refer to step S110 to step S120, which will not be repeated here.

[0067] Step S230: obtaining an initial installation package corresponding to the application interface, wherein the initial installation package includes a program package of a built-in class of a third-party application.

[0068] In some implementations, the third-party control can be understood as an open source third-party control, and the electronic device can copy the source code corresponding to the third-party control or the Java file package corresponding to the third-party control to the project, and package the source code corresponding to the third-party control into the apk corresponding to the application interface during the display of the application interface. The apk may include a program package of a class built into the third-party application.

[0069] For example, see Figure 8 , which shows a structural diagram of the program package provided by an embodiment of the present application. Among them, the program package base.apk includes the class file Classes.dex, the dynamic function library so, the resource folder assets, etc. Among them, the Classes.dex file is a class file generated by compiling the Java code, which contains the source code of third-party controls, such as the source code of RecyclerView and ViewPager. Among them, the apk structure is fixed when the third-party application manufacturer releases it, and it cannot be modified externally; if it needs to be modified, it can be repackaged and released using the key of the third-party application.

[0070] For example, see Fig. 9 , which shows a structural block diagram of a package class file provided by an embodiment of the present application. Among them, the Classes.dex file is a collection of multiple executable Dex files, a single Dex file defines multiple classes Class, and a single Class defines multiple methods Method, member variables Field, etc. Among them, each Class is a complete Java class, Field is a member variable in the class, and Method is a method in the class.

[0071] In this embodiment, the initial installation package corresponding to the application interface can be obtained. The initial installation package Base.apk may include a program package of a third-party application built-in class. The electronic device may be pre-set with the initial installation package corresponding to the application interface, and the electronic device may also obtain the initial installation package corresponding to the application interface from an associated cloud or electronic device.

[0072] Step S240: parsing the program package of the built-in class of the third-party application to obtain the source code corresponding to the third-party control.

[0073] Step S250: modifying the source code corresponding to the third-party control based on the control display parameter, and obtaining the installation package corresponding to the target control.

[0074] Furthermore, the electronic device can parse the third-party application built-in class package included in the initial installation package to obtain the source code corresponding to the third-party control included in the application interface. Furthermore, the electronic device can modify the source code corresponding to the third-party control based on the control display parameter to obtain the installation package corresponding to the target control.

[0075] It is understandable that in the process of modifying the source code corresponding to the third-party control, in order to ensure the integrity of the application interface displayed by the electronic device when running the application, the source code of the class related to the third-party control in the initial installation package can also be modified. Further, the installation package corresponding to the target control obtained by the electronic device can also include the modified source code of the class related to the third-party control, and further, the installation package corresponding to the target control can be understood as a new apk.

[0076] In some embodiments, the process of an electronic device parsing the program package of the built-in class of the third-party application to obtain the source code corresponding to the third-party control may be to convert the program package of the built-in class of the third-party application and then parse it to obtain the bytecode of the executable file included in the program package of the built-in class of the third-party application, and determine the source code corresponding to the third-party control from the bytecode of the executable file.

[0077] It should be noted that, since the Android virtual machine is different from the Java virtual machine, Dex is a product running on the Android virtual machine, while Class runs on the Java virtual machine. In this embodiment, the electronic device can convert Dex and Class through a class file compiler (such as a dx tool, etc.). Among them, the Class file can parse the bytecode in the Class file through a bytecode enhancement tool (such as an ASM tool, etc.).

[0078] As an implementable manner, the electronic device converts the program package of the third-party application built-in class and then parses it to obtain the bytecode of the executable file included in the program package of the third-party application built-in class. The process may be to convert the program package of the third-party application built-in class through a file compilation tool to obtain a converted data packet, and then parse the converted data packet through a bytecode enhancement tool to obtain the bytecode of the executable file included in the program package of the third-party application built-in class. For example, the electronic device may parse the bytecode of Dex in apk through an ASM tool combined with a dx tool.

[0079] Furthermore, after the electronic device obtains the bytecode of the executable file included in the program package of the built-in class of the third-party application, it can determine the source code corresponding to the third-party control from the bytecode of the executable file. Exemplarily, the third-party controls include RecyclerView and ViewPager. When the electronic device uses the ASM tool in combination with the dx tool to parse the bytecode of Dex in the apk, it can determine the control class corresponding to RecyclerView and ViewPager in the process of loop parsing the Class in the apk, use the control class as the source code corresponding to the third-party control, and modify the source code corresponding to the third-party control to obtain the installation package corresponding to the target control. Then, the electronic device can generate the installation package corresponding to the target control in real time when the program is running.

[0080] It can be understood that in this embodiment, the electronic device inserts the bytecode into the original Class corresponding to the third-party control by bytecode encoding, and generates an installation package corresponding to the target control, which can be understood as a new apk. That is, the electronic device can generate a new apk through a bytecode enhancement tool, wherein the new apk can include the target control class. It can be understood that the new apk only contains the modified Class, thereby ensuring the rationality of the electronic device's display of the application interface and improving the user experience.

[0081] In some implementations, the electronic device modifies the source code corresponding to the third-party control and obtains the installation package corresponding to the target control by inserting an insertion bytecode into the source code corresponding to the third-party control through a bytecode enhancement tool to obtain the installation package corresponding to the target control. The insertion bytecode is used to adjust the layout of the third-party control in the application interface.

[0082] Exemplarily, the electronic device can insert bytecode into the source code corresponding to the third-party control based on the ASM tool to modify the logic of the control class corresponding to the third-party control in the program package of the built-in class of the third-party application, and then adjust the layout of the application interface on the display screen, so that the layout of the application interface is more reasonable and the user experience is improved.

[0083] Step S260: loading the installation package corresponding to the target control to update and display the application interface, wherein the updated application interface includes the target control.

[0084] In some embodiments, after obtaining the installation package corresponding to the target control, the electronic device can load the installation package corresponding to the target control to update the display of the application interface. Optionally, the process of the electronic device loading the installation package corresponding to the target control to update the display of the application interface can be to obtain the target installation package corresponding to the application interface before specifying the path of the installation package corresponding to the target control to the path of the program package of the built-in class of the third-party application. Further, the electronic device can load the target installation package to update the display of the application interface. Among them, the target installation package can include installation packages of functional classes, installation packages corresponding to target controls, program packages of built-in classes of third-party applications, etc., which are not limited here.

[0085] As an implementable manner, before the electronic device specifies the path of the installation package corresponding to the target control to be loaded to the path of the program package of the third-party application's built-in class, the target installation package corresponding to the application interface can be obtained by specifying the path of the installation package corresponding to the target control to be loaded to the path of the program package of the third-party application's built-in class based on a class loader (such as ClassLoader, etc.), and obtaining the target installation package corresponding to the application interface. The class loader can specify the order in which the classes included in the target installation package are loaded.

[0086] Among them, based on the class loader (such as ClassLoader, etc.), the path of the installation package corresponding to the target control (that is, the new installation package apk) can be specified before the path of loading Base.apk, and then the electronic device program can load the class according to the set loading order when it is running, and preferentially load the program package Framework.jar of the functional class, and then load the new apk to update the display application interface. Among them, when the electronic device loads a third-party control class during program operation, it will preferentially load the class of the target control corresponding to the third-party control class in the new apk.

[0087] An interface display method provided by an embodiment of the present application displays an application interface, wherein the application interface includes a third-party control, and the third-party control is allowed to be rearranged. In response to a control rearrangement instruction, the control display parameters corresponding to the third-party control are determined based on the control rearrangement instruction, and an initial installation package corresponding to the application interface is obtained, wherein the initial installation package includes a program package of a third-party referenced built-in class, the program package of the third-party application built-in class is parsed, the source code corresponding to the third-party control is obtained, the source code corresponding to the third-party control is modified based on the control display parameters, the installation package corresponding to the target control is obtained, and the installation package corresponding to the target control is loaded to update the displayed application interface, wherein the updated application interface includes the target control. Compared to Figure 6 The interface display method shown in the figure, this embodiment also modifies the source code of the third-party control by inserting bytecode into the source code of the third-party control and integrates it into the installation package, so as to realize system-level control of the third-party control.

[0088] See also Fig.10 , Fig.10 The flowchart of the interface display method provided by an embodiment of the present application is shown in FIG. In this embodiment, the third-party control includes a list control. Fig.10 The process shown is described in detail, and the interface display method may specifically include the following steps:

[0089] Step S310: displaying an application interface, wherein the application interface includes third-party controls, and the third-party controls are allowed to be rearranged.

[0090] Step S320: In response to the control rearrangement instruction, determine the control display parameter corresponding to the third-party control based on the control rearrangement instruction.

[0091] Step S330: If the control rearrangement instruction indicates to shrink the third-party control, a first target list control corresponding to the list control is determined based on the control display parameters, wherein the number of columns included in the first target list control is greater than the number of columns of the list control.

[0092] Among them, the third-party control may include a list control (RecyclerView control).

[0093] Optionally, the electronic device modifies the source code corresponding to the third-party control, and the process of obtaining the installation package corresponding to the target control can be, if the third-party control includes a list control, the insertion bytecode can be inserted into the source code corresponding to the list control to obtain the installation package corresponding to the modified list control, wherein the number of columns included in the modified list control is greater than or less than the number of columns of the list control.

[0094] In some embodiments, the control re-arrangement instruction can be used to instruct the contraction of the third-party control, and can also be used to instruct the expansion of the third-party control. For example, if the control re-arrangement instruction is generated by a two-finger pinch operation, it can be determined that the control re-arrangement instruction is used to instruct the contraction of the third-party control. If the control re-arrangement instruction is generated by a two-finger expand operation, it can be determined that the control re-arrangement instruction is used to instruct the expansion of the third-party control.

[0095] As a method, if it is determined that the control rearrangement instruction indicates to shrink the third-party control, a first target list control corresponding to the list control can be determined based on the control display parameter, wherein the number of columns included in the first target list control is greater than the list of the list control. That is, if the control rearrangement instruction indicates to shrink the third-party control of the application interface, the number of columns of the third-party control is increased in the application interface.

[0096] See also Fig.11 , Fig.11A first schematic diagram of the application interface provided in the embodiment of the present application is shown, Fig.11 As shown, the electronic device displays an application interface A, which may include a list control B, wherein the list control B is displayed in an initial arrangement. Optionally, six list controls B are included in the application interface A at this time.

[0097] See also Fig.12 , Fig.12 A second schematic diagram of the application interface provided in the embodiment of the present application is shown, Fig.12 As shown, the electronic device displays an application interface A, which may include a first target list control C, wherein the first target list control C is obtained by adjusting based on a control adjustment instruction indicating to shrink the list control B. Optionally, at this time, the application interface A includes eight first target list controls C. That is, Fig.12 The application interface A shown is compared to Fig.11 The application interface A shown has the number of control columns increased.

[0098] Step S340: If the control rearrangement instruction indicates to expand the third-party control, a second target list control corresponding to the list control is determined based on the control display parameters, wherein the number of columns included in the second target list control is smaller than the number of columns of the list control.

[0099] As a method, if it is determined that the rearrangement instruction indicates to expand the third-party control, a second target list control corresponding to the list control can be determined based on the control display parameter, wherein the number of columns included in the second target list control is less than the number of columns of the list control. That is, if the control rearrangement instruction indicates to expand the third-party control of the application interface, the number of columns of the third-party control is reduced in the application interface.

[0100] See also Fig.13 , Fig.13 A third schematic diagram of the application interface provided in the embodiment of the present application is shown. Fig.13 As shown, the electronic device displays an application interface A, which may include a second target list control D, wherein the second target list control D is obtained by adjusting the control adjustment instruction indicating to expand the list control B. Optionally, at this time, the application interface A includes three second target list controls D. That is, Fig.12 The application interface A shown is compared to Fig.11 The application interface A shown reduces the number of control columns.

[0101] Step S350: updating and displaying the application interface based on the target control, wherein the updated and displayed application interface includes the target control.

[0102] For the detailed description of step S350, please refer to step S140, which will not be repeated here.

[0103] An interface display method provided by an embodiment of the present application displays an application interface, wherein the application interface includes a third-party control, and the third-party control is allowed to be rearranged. In response to a control rearrangement instruction, a control display parameter corresponding to the third-party control is determined based on the control rearrangement instruction. If the control rearrangement instruction indicates to shrink the third-party control, a first target list control corresponding to the list control is determined based on the control display parameters, wherein the number of columns included in the first target list control is greater than the number of columns of the list control. If the control rearrangement instruction indicates to expand the third-party control, a second target list control corresponding to the list control is determined based on the control display parameters, wherein the number of lists included in the second target list control is less than the number of columns of the list control. The application interface is updated and displayed based on the target control, wherein the updated application interface includes the target control. Compared to Figure 6 The interface display method shown in this embodiment also controls the number of columns of the list control to increase or decrease in response according to the different scaling or expansion instructions of the control rearrangement instruction, thereby improving the user's interactive experience.

[0104] See also Fig.14 , Fig.14 The following is a flow chart of the interface display method provided by an embodiment of the present application. Fig.14 The process shown is described in detail, and the interface display method may specifically include the following steps:

[0105] Step S410: displaying an application interface, wherein the application interface includes third-party controls, and the third-party controls are allowed to be rearranged.

[0106] For the detailed description of step S410, please refer to step S110, which will not be repeated here.

[0107] Step S420: If a first sliding operation on the third-party control is detected, a control rearrangement instruction for instructing to shrink the third-party control is generated, wherein the first sliding operation includes an operation of sliding multiple fingers in directions approaching each other.

[0108] In this embodiment, during the process of displaying the application interface (including the third-party control), the touch operation acting on the third-party control can be detected. Among them, the touch operation acting on the third-party control can be detected in real time, the touch operation acting on the third-party control can be detected at a preset time interval, the touch operation acting on the third-party control can be detected at a preset time point, the touch operation acting on the third-party control can be detected according to other preset rules, etc., which are not limited here.

[0109] In some embodiments, if a first sliding operation acting on a third-party control is detected, a control rearrangement instruction for instructing to shrink the third-party control may be generated. The first sliding operation may include an operation of sliding multiple fingers in directions approaching each other, for example, the first sliding operation may include an operation of sliding two fingers in directions approaching each other (such as a two-finger pinch operation); the first sliding operation may include an operation of sliding three fingers in directions approaching each other (such as a three-finger pinch operation); the first sliding operation may include an operation of sliding four fingers in directions approaching each other (such as a four-finger pinch operation), etc., which are not limited here.

[0110] Step S430: If a second sliding operation on the third-party control is detected, a control rearrangement instruction for instructing to expand the third-party control is generated, wherein the second sliding operation includes an operation of sliding multiple fingers in directions away from each other.

[0111] In some embodiments, if a second sliding operation acting on a third-party control is detected, a control rearrangement instruction for instructing to expand the third-party control may be generated. The second sliding operation may include an operation of sliding multiple fingers in directions away from each other, for example, the second sliding operation may include an operation of sliding two fingers in directions away from each other (such as a two-finger expansion operation); the second sliding operation may include an operation of sliding three fingers in directions away from each other (such as a three-finger expansion operation); the second sliding operation may include an operation of sliding four fingers in directions away from each other (such as a four-finger expansion operation), etc., which are not limited here.

[0112] Step S440: In response to the control rearrangement instruction, determine the control display parameter corresponding to the third-party control based on the control rearrangement instruction.

[0113] Step S450: determining a target control corresponding to the third-party control based on the control display parameter, wherein the target control is obtained by modifying a source code corresponding to the third-party control.

[0114] Step S460: updating and displaying the application interface based on the target control, wherein the updated and displayed application interface includes the target control.

[0115] For the detailed description of step S440 to step S460, please refer to step S120 to step S140, which will not be repeated here.

[0116] An interface display method provided by an embodiment of the present application displays an application interface, wherein the application interface includes a third-party control, and the third-party control is allowed to be rearranged. If a first sliding operation acting on the third-party control is detected, a control rearrangement instruction for instructing the contraction of the third-party control is generated, wherein the first sliding operation includes an operation of sliding multiple fingers in directions approaching each other. If a second sliding operation acting on the third-party control is detected, a control rearrangement instruction for instructing the expansion of the third-party control is generated, wherein the second sliding operation includes an operation of sliding multiple fingers in directions away from each other. In response to the control rearrangement instruction, a control display parameter corresponding to the third-party control is determined based on the control rearrangement instruction, and a target control corresponding to the third-party control is determined based on the control display parameter, wherein the target control is obtained by modifying the source code corresponding to the third-party control, and the application interface is updated and displayed based on the target control, wherein the updated and displayed application interface includes the target control. Compared to Figure 6 The interface display method shown in the figure, this embodiment also generates a control rearrangement instruction indicating the contraction or expansion of the third-party control according to different sliding operations acting on the third-party control, thereby improving the user's interactive experience.

[0117] See also Fig.15 , Fig.15 The flowchart of the interface display method provided by an embodiment of the present application is shown in FIG. In this embodiment, the application interface includes a first button and a second button. Fig.15 The process shown is described in detail, and the interface display method may specifically include the following steps:

[0118] Step S510: displaying an application interface, wherein the application interface includes third-party controls, and the third-party controls are allowed to be rearranged.

[0119] For the detailed description of step S510, please refer to step S110, which will not be repeated here.

[0120] Step S520: if a touch operation on the first button is detected, a control rearrangement instruction for instructing to shrink the third-party control is generated.

[0121] In this embodiment, the application interface may include a first button and a second button, wherein the shapes of the first button and the second button may be the same or different; the sizes of the first button and the second button may be the same or different, and the first button and the second button may be arranged vertically or horizontally, etc., which are not limited here.

[0122] In this embodiment, during the process of displaying the application interface (including the third-party control, the first button, and the second button), the touch operation on the first button or the second button can be detected. Among them, the touch operation on the first button or the second button can be detected in real time, the touch operation on the first button or the second button can be detected at a preset time interval, the touch operation on the first button or the second button can be detected at a preset time point, the touch operation on the first button or the second button can be detected according to other preset rules, etc., which are not limited here.

[0123] In some embodiments, if a touch operation on the first button is detected, a control rearrangement instruction for instructing to shrink the third-party control is generated. The touch operation on the first button may include: a single-finger click operation on the first button, a multi-finger click operation on the first button, a single-finger continuous click operation on the first button, a multi-finger continuous click operation on the first button, etc., which are not limited here.

[0124] Step S530: if a touch operation on the second button is detected, a control rearrangement instruction for instructing to expand the third-party control is generated.

[0125] In some embodiments, if a touch operation on the second button is detected, a control rearrangement instruction for instructing to expand the third-party control is generated. The touch operation on the second button may include: a single-finger click operation on the second button, a multi-finger click operation on the second button, a single-finger continuous click operation on the second button, a multi-finger continuous click operation on the second button, etc., which are not limited here.

[0126] Step S540: In response to the control rearrangement instruction, determine the control display parameter corresponding to the third-party control based on the control rearrangement instruction.

[0127] Step S550: determining a target control corresponding to the third-party control based on the control display parameter, wherein the target control is obtained by modifying a source code corresponding to the third-party control.

[0128] Step S560: updating and displaying the application interface based on the target control, wherein the updated and displayed application interface includes the target control.

[0129] For the detailed description of step S540 to step S560, please refer to step S120 to step S140, which will not be repeated here.

[0130] An interface display method provided by an embodiment of the present application displays an application interface, wherein the application interface includes a third-party control, and the third-party control is allowed to be rearranged. If a touch operation acting on a first button is detected, a control rearrangement instruction for instructing the contraction of the third-party control is generated. If a touch operation acting on a second button is detected, a control rearrangement instruction for instructing the expansion of the third-party control is generated. In response to the control rearrangement instruction, control display parameters corresponding to the third-party control are determined based on the control rearrangement instruction. A target control corresponding to the third-party control is determined based on the control display parameters, wherein the target control is obtained by modifying the source code corresponding to the third-party control. The application interface is updated and displayed based on the target control, wherein the updated and displayed application interface includes the target control. Compared to Figure 6 The interface display method shown in the figure, this embodiment also generates a control rearrangement instruction indicating the contraction or expansion of a third-party control according to the touch operation acting on different buttons, thereby improving the user's interactive experience.

[0131] See also Fig.16 , Fig.16 The following is a flow chart of the interface display method provided by an embodiment of the present application. Fig.16 The process shown is described in detail, and the interface display method may specifically include the following steps:

[0132] Step S610: displaying an application interface, wherein the application interface includes third-party controls, and the third-party controls are allowed to be rearranged.

[0133] For the detailed description of step S610 , please refer to step S110 , which will not be repeated here.

[0134] Step S620: In response to the control rearrangement instruction, determine the display size of the display screen corresponding to the application interface.

[0135] In this embodiment, when the electronic device receives a control rearrangement instruction, it can respond to the control rearrangement instruction and determine the display size of the display screen corresponding to the application interface.

[0136] Optionally, the electronic device may obtain a display area of ​​the display screen corresponding to the application interface, determine a size of the display area, and determine a display size of the display screen corresponding to the application interface based on the size of the display area.

[0137] Optionally, the display size of the display screen corresponding to the application interface can be fixed and pre-set and stored locally on the electronic device. Based on this, when the electronic device receives a control rearrangement instruction, it can respond to the control rearrangement instruction and obtain the display size of the display screen corresponding to the application interface from the local electronic device.

[0138] Step S630: If the display size is greater than the size threshold, determining a control display parameter corresponding to the third-party control based on the control rearrangement instruction.

[0139] In some embodiments, the size threshold may be pre-set in the electronic device, and the electronic device may also obtain the size threshold from the associated cloud or electronic device through wireless communication technology (such as Bluetooth, WiFi, Zigbee, etc.). The size threshold may be obtained through third-party experimental data or may be set by the user, which is not limited here.

[0140] In this embodiment, after the electronic device obtains the display size of the display screen, it can compare the display size with the size threshold, and use the comparison result as a basis for determining whether to perform an operation to determine the control display parameters corresponding to the third-party control on the display screen. Optionally, if it is determined that the display size is greater than the size threshold, it can be determined that the display size of the display screen of the electronic device is large enough, and even if the third-party control is adjusted and arranged, the content can still be clearly visible. Therefore, the control display parameters corresponding to the third-party control can be determined based on the control rearrangement instruction. If it is determined that the display size is less than or equal to the size threshold, it can be determined that the display size of the display screen of the electronic device is small, and adjusting the arrangement of the third-party control may cause the content to be unclear. Therefore, it is possible not to respond to the control rearrangement instruction and keep the arrangement of the third-party control for display.

[0141] In some embodiments, the display screen included in the electronic device may be a folding display screen. Optionally, the electronic device may obtain status information of the folding display screen upon receiving a control rearrangement instruction, so that the electronic device can determine the relationship between the display size of the folding display screen and a size threshold value based on the status information of the folding display screen. The status information of the folding display screen includes an expanded state or a folded state. Optionally, after determining the status information of the folding display screen, the electronic device may determine the size relationship between the display size of the folding display screen and a size threshold value based on the status information, and determine whether to adjust the layout of third-party controls in the application interface based on the size relationship. Exemplarily, if the status information of the folding display screen is an expanded state, it can be determined that the display size of the folding display screen is greater than the size threshold value.

[0142] In some embodiments, the display screen included in the electronic device may be a scroll display screen. Optionally, the electronic device may obtain status information of the scroll display screen when receiving a control rearrangement instruction, so that the electronic device can determine the relationship between the display size of the scroll display screen and a size threshold value according to the status information of the scroll display screen. Among them, the status information of the folding display screen includes a stretched state or a contracted state. Optionally, after determining the status information of the scroll display screen, the electronic device may determine the size relationship between the display size of the scroll display screen and a size threshold value according to the status information, and determine whether to adjust the layout of third-party controls in the application interface according to the size relationship. Exemplarily, if the status information of the scroll display screen is an expanded state, it can be determined that the display size of the scroll display screen is greater than the size threshold value.

[0143] Step S640: determining a target control corresponding to the third-party control based on the control display parameter, wherein the target control is obtained by modifying a source code corresponding to the third-party control.

[0144] Step S650: updating and displaying the application interface based on the target control, wherein the updated and displayed application interface includes the target control.

[0145] For the detailed description of step S640 to step S650, please refer to step S130 to step S140, which will not be repeated here.

[0146] An interface display method provided by an embodiment of the present application displays an application interface, wherein the application interface includes a third-party control, and the third-party control is allowed to be rearranged. In response to a control rearrangement instruction, the display size of the display screen corresponding to the application interface is determined. If the display size is greater than a size threshold, the control display parameters corresponding to the third-party control are determined based on the control rearrangement instruction. The target control corresponding to the third-party control is determined based on the control display parameters, wherein the target control is obtained by modifying the source code corresponding to the third-party control, and the application interface is updated and displayed based on the target control, wherein the updated application interface includes the target control. Compared to Figure 6 The interface display method shown, this embodiment also performs subsequent interface update display when the display size of the display screen corresponding to the application interface is greater than the size threshold, which can ensure the normal display size of the control and enhance the user's visual experience.

[0147] See also Fig.17 , Fig.17 The following is a flow chart of the interface display method provided by an embodiment of the present application. Fig.17 The process shown is described in detail, and the interface display method may specifically include the following steps:

[0148] Step S710: displaying an application interface, wherein the application interface includes third-party controls, and the third-party controls are allowed to be rearranged.

[0149] For the detailed description of step S710, please refer to step S110, which will not be repeated here.

[0150] Step S720: registering event monitoring at the framework layer.

[0151] In some implementations, event monitoring can be distributed at the framework layer of the electronic device, and a system-level listener can be set up, which does not conflict with the final application response event. When the system-level listener monitors the target event (such as continuous touch events), the corresponding control rearrangement instructions (such as two-finger pinch / two-finger expand) can be simulated.

[0152] Step S730: If the control rearrangement instruction is monitored, determine the control display parameters corresponding to the third-party control based on the control rearrangement instruction.

[0153] Step S740: determining a target control corresponding to the third-party control based on the control display parameter, wherein the target control is obtained by modifying a source code corresponding to the third-party control.

[0154] Step S750: updating and displaying the application interface based on the target control, wherein the updated and displayed application interface includes the target control.

[0155] For the detailed description of step S730 to step S750, please refer to step S120 to step S140, which will not be repeated here.

[0156] An interface display method provided by an embodiment of the present application displays an application interface, wherein the application interface includes a third-party control, the third-party control is allowed to be rearranged, and an event listener is registered at the framework layer. If a control rearrangement instruction is listened to, the control display parameters corresponding to the third-party control are determined based on the control rearrangement instruction, and the target control corresponding to the third-party control is determined based on the control display parameters, wherein the target control is obtained by modifying the source code corresponding to the third-party control, and the application interface is updated and displayed based on the target control, wherein the updated application interface includes the target control. Compared to Figure 6 In the interface display method shown, this embodiment also registers event monitoring at the framework layer to implement system-level display control.

[0157] See also Fig.18 , Fig.18 The module block diagram of the interface display device provided by an embodiment of the present application is shown below. Fig.18The interface display device 400 includes: an application interface display module 410, a control display parameter determination module 420, a target control determination module 430 and an application interface update module 440, wherein:

[0158] The application interface display module 410 is used to display the application interface, wherein the application interface includes third-party controls, and the third-party controls are allowed to be rearranged.

[0159] The control display parameter determination module 420 is used to respond to the control rearrangement instruction and determine the control display parameter corresponding to the third-party control based on the control rearrangement instruction.

[0160] Furthermore, the control display parameter determination module 420 includes: a display size determination submodule and a control display parameter determination submodule, wherein:

[0161] The display size determination submodule is used to determine the display size of the display screen corresponding to the application interface in response to the control rearrangement instruction.

[0162] The first control display parameter determination submodule is used to determine the control display parameter corresponding to the third-party control based on the control rearrangement instruction if the display size is greater than a size threshold.

[0163] Furthermore, the control display parameter determination module 420 includes: an event monitoring registration submodule and a second control display parameter determination submodule, wherein:

[0164] The event listener registration submodule is used to register event listeners at the framework layer.

[0165] The second control display parameter determination submodule is used to determine the control display parameter corresponding to the third-party control based on the control rearrangement instruction if the control rearrangement instruction is monitored.

[0166] The target control determination module 430 is used to determine the target control corresponding to the third-party control based on the control display parameters, wherein the target control is obtained by modifying the source code corresponding to the third-party control.

[0167] Furthermore, the target control determination module 430 includes: an initial installation package acquisition submodule, a source code acquisition submodule, and a source code modification submodule, wherein:

[0168] The initial installation package acquisition submodule is used to acquire the initial installation package corresponding to the application interface, wherein the initial installation package includes a program package of a built-in class of a third-party application.

[0169] The source code acquisition submodule is used to parse the program package of the built-in class of the third-party application and obtain the source code corresponding to the third-party control.

[0170] Furthermore, the source code acquisition submodule includes: a bytecode acquisition unit and a source code acquisition unit, wherein:

[0171] The bytecode obtaining unit is used to convert and parse the program package of the third-party application built-in class to obtain the bytecode of the executable file included in the program package of the third-party application built-in class.

[0172] Furthermore, the bytecode obtaining unit includes:

[0173] The converted data package obtaining subunit is used to convert the program package of the built-in class of the third-party application through a file compilation tool to obtain a converted data package.

[0174] The bytecode obtaining subunit is used to parse the conversion data packet through a bytecode enhancement tool to obtain the bytecode of the executable file included in the program package of the third-party application built-in class.

[0175] The source code obtaining unit is used to determine the source code corresponding to the third-party control from the bytecode of the executable file.

[0176] The source code modification submodule is used to modify the source code corresponding to the third-party control based on the control display parameters to obtain the installation package corresponding to the target control.

[0177] Furthermore, the source code modification submodule includes: a source code modification unit, wherein:

[0178] A source code modification unit is used to insert the insertion bytecode corresponding to the control display parameter into the source code corresponding to the third-party control through the bytecode enhancement tool to obtain the installation package corresponding to the target control, wherein the insertion bytecode is used to adjust the layout of the third-party control in the application interface.

[0179] Furthermore, the third-party control includes a list control, and the target control determination module 230 includes: a first target list control determination submodule and a second target list control determination submodule, wherein:

[0180] The first target list control determination submodule is used to determine a first target list control corresponding to the list control based on the control display parameters if the control rearrangement instruction indicates to shrink the third-party control, wherein the number of columns included in the first target list control is greater than the number of columns of the list control.

[0181] The second target list control determination submodule is used to determine a second target list control corresponding to the list control based on the control display parameters if the control rearrangement instruction indicates to expand the third-party control, wherein the number of columns included in the second target list control is less than the number of columns of the list control.

[0182] The application interface updating module 440 is used to update and display the application interface based on the target control, wherein the application interface after update and display includes the target control.

[0183] Furthermore, the application interface update module 440 includes: an installation package loading submodule, wherein:

[0184] The installation package loading submodule is used to load the installation package corresponding to the target control to update and display the application interface.

[0185] Furthermore, the installation package loading submodule includes: a path setting unit and an installation package loading unit, wherein:

[0186] The path setting unit is used to obtain the target installation package corresponding to the application interface before specifying the path of the installation package corresponding to the target control to the path of the program package of the built-in class of the third-party application.

[0187] The installation package loading unit is used to load the target installation package to update and display the application interface.

[0188] Further, the installation package loading unit includes: an installation package loading subunit, wherein:

[0189] The installation package loading subunit is used to load the target installation package based on the class loader to update and display the application interface.

[0190] Furthermore, the interface display device 400 further includes: a first control rearrangement instruction determination module and a second control rearrangement instruction determination module, wherein:

[0191] The first control rearrangement instruction determination module is used to generate a control rearrangement instruction for instructing to shrink the third-party control if a first sliding operation acting on the third-party control is detected, wherein the first sliding operation includes an operation of sliding multiple fingers in directions approaching each other.

[0192] The second control rearrangement instruction determination module is used to generate a control rearrangement instruction for instructing to expand the third-party control if a second sliding operation acting on the third-party control is detected, wherein the second sliding operation includes an operation of sliding multiple fingers in directions away from each other.

[0193] Furthermore, the interface display device 400 further includes: a third control rearrangement instruction determination module and a fourth control rearrangement instruction determination module, wherein:

[0194] a third control rearrangement instruction determining module, configured to generate a control rearrangement instruction for instructing to shrink the third-party control if a touch operation acting on the first button is detected; or

[0195] The fourth control rearrangement instruction determining module is configured to generate a control rearrangement instruction for instructing to expand the third-party control if a touch operation acting on the second button is detected.

[0196] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0197] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0198] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0199] See also Fig.19 , which shows a structural block diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 500 may include the above-mentioned electronic device 100, electronic device 200 and electronic device 300, which are not limited here. The electronic device 500 in the present application may include one or more of the following components: a processor 510, a memory 520 and one or more application programs, wherein one or more application programs may be stored in the memory 520 and configured to be executed by one or more processors 510, and one or more programs are configured to execute the method described in the aforementioned method embodiment.

[0200] Among them, the processor 510 may include one or more processing cores. The processor 510 uses various interfaces and lines to connect various parts within the entire electronic device 500, and executes various functions and processes data of the electronic device 500 by running or executing instructions, programs, code sets or instruction sets stored in the memory 520, and calling data stored in the memory 520. Optionally, the processor 510 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 510 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 510, but may be implemented separately through a communication chip.

[0201] The memory 520 may include a random access memory (RAM) or a read-only memory (ROM). The memory 520 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 520 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing functions (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 500 during use.

[0202] See also Fig. 20 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 600 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0203] The computer readable storage medium 600 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer readable storage medium 600 has storage space for program code 610 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 610 can be compressed, for example, in an appropriate form.

[0204] In summary, the interface display method, device, electronic device and storage medium provided in the embodiments of the present application display an application interface, wherein the application interface includes a third-party control, and the third-party control is allowed to be rearranged. In response to a control rearrangement instruction, a control display parameter corresponding to the third-party control is determined based on the control rearrangement instruction, and a target control corresponding to the third-party control is determined based on the control display parameter, wherein the target control is obtained by modifying the source code corresponding to the third-party control, and the application interface is updated and displayed based on the target control, wherein the updated application interface includes the target control, so that for the third-party control that is allowed to be rearranged, when a control rearrangement instruction is received, the controls in the interface are rearranged by modifying the source code corresponding to the third-party control, thereby achieving system-level control of the interface display and improving the versatility of the interface display control.

[0205] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An interface display method, characterized in that: The method comprises: Displaying an application interface, wherein the application interface includes a third-party control, and the third-party control is allowed to be rearranged; In response to a control rearrangement instruction, determining a control display parameter corresponding to the third-party control based on the control rearrangement instruction; Determining a target control corresponding to the third-party control based on the control display parameter, wherein the target control is obtained by modifying source code corresponding to the third-party control; The application interface is updated and displayed based on the target control, wherein the updated application interface includes the target control.

2. The method according to claim 1, characterized in that The determining a target control corresponding to the third-party control based on the control display parameter includes: Obtaining an initial installation package corresponding to the application interface, wherein the initial installation package includes a program package of a built-in class of a third-party application; Parsing the program package of the built-in class of the third-party application to obtain the source code corresponding to the third-party control; The source code corresponding to the third-party control is modified based on the control display parameter to obtain an installation package corresponding to the target control.

3. The method according to claim 2, characterized in that The parsing of the program package of the built-in class of the third-party application to obtain the source code corresponding to the third-party control includes: Converting and parsing the program package of the third-party application's built-in class to obtain the bytecode of the executable file included in the program package of the third-party application's built-in class; The source code corresponding to the third-party control is determined from the bytecode of the executable file.

4. The method according to claim 3, characterized in that The converting and parsing of the program package of the third-party application built-in class to obtain the bytecode of the executable file included in the program package of the third-party application built-in class includes: Convert the program package of the built-in class of the third-party application using a file compilation tool to obtain a converted data package; The conversion data packet is parsed by a bytecode enhancement tool to obtain the bytecode of the executable file included in the program package of the third-party application built-in class.

5. The method according to claim 4, characterized in that The step of modifying the source code corresponding to the third-party control based on the control display parameter to obtain the installation package corresponding to the target control includes: The bytecode enhancement tool is used to insert the insertion bytecode corresponding to the control display parameters into the source code corresponding to the third-party control to obtain the installation package corresponding to the target control, wherein the insertion bytecode is used to adjust the layout of the third-party control in the application interface.

6. The method according to claim 2, characterized in that The updating and displaying of the application interface based on the target control, wherein the updated and displayed application interface includes the target control, comprises: Load the installation package corresponding to the target control to update and display the application interface.

7. The method according to claim 6, characterized in that The loading of the installation package corresponding to the target control to update and display the application interface includes: Before assigning the path of the installation package corresponding to the target control to the path of the program package of the third-party application built-in class, obtaining the target installation package corresponding to the application interface; The target installation package is loaded to update and display the application interface.

8. The method according to claim 7, characterized in that The loading of the target installation package to update and display the application interface includes: The target installation package is loaded based on the class loader to update and display the application interface.

9. The method according to any one of claims 1 to 8, characterized in that The third-party control includes a list control, and determining a target control corresponding to the third-party control based on the control display parameter includes: If the control rearrangement instruction indicates to shrink the third-party control, determining a first target list control corresponding to the list control based on the control display parameter, wherein the number of columns included in the first target list control is greater than the number of columns of the list control; or If the control rearrangement instruction indicates to expand the third-party control, a second target list control corresponding to the list control is determined based on the control display parameter, wherein the number of columns included in the second target list control is smaller than the number of columns of the list control.

10. The method according to any one of claims 1 to 8, characterized in that The method further comprises: If a first sliding operation acting on the third-party control is detected, generating a control rearrangement instruction for instructing to shrink the third-party control, wherein the first sliding operation includes sliding multiple fingers in directions approaching each other; or If a second sliding operation acting on the third-party control is detected, a control rearrangement instruction for instructing to expand the third-party control is generated, wherein the second sliding operation includes an operation of sliding multiple fingers in directions away from each other.

11. The method according to any one of claims 1 to 8, characterized in that The application interface includes a first button and a second button, and the method further includes: If a touch operation on the first button is detected, generating a control rearrangement instruction for instructing to shrink the third-party control; or If a touch operation on the second button is detected, a control rearrangement instruction for instructing expansion of the third-party control is generated.

12. The method according to any one of claims 1 to 8, characterized in that The step of responding to the control rearrangement instruction and determining the control display parameter corresponding to the third-party control based on the control rearrangement instruction includes: In response to the control rearrangement instruction, determining a display size of a display screen corresponding to the application interface; If the display size is greater than a size threshold, a control display parameter corresponding to the third-party control is determined based on the control rearrangement instruction.

13. The method according to any one of claims 1 to 8, characterized in that The step of responding to the control rearrangement instruction and determining the control display parameter corresponding to the third-party control based on the control rearrangement instruction includes: Register event listeners at the framework level; If the control rearrangement instruction is monitored, the control display parameter corresponding to the third-party control is determined based on the control rearrangement instruction.

14. An interface display device, characterized in that: The device comprises: An application interface display module, configured to display an application interface, wherein the application interface includes third-party controls that are allowed to be rearranged; a control display parameter determination module, configured to respond to a control rearrangement instruction and determine a control display parameter corresponding to the third-party control based on the control rearrangement instruction; a target control determining module, configured to determine a target control corresponding to the third-party control based on the control display parameters, wherein the target control is obtained by modifying the source code corresponding to the third-party control; An application interface updating module is used to update and display the application interface based on the target control, wherein the application interface after update and display includes the target control.

15. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory is coupled to the processor, and the memory stores instructions. When the instructions are executed by the processor, the processor performs the method according to any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 13.