Interface display method and device, electronic equipment and storage medium

By obtaining the display size on the display screen and modifying the source code of the third-party controls to generate the target control, the problem of unreasonable interface layout caused by the diversified display screen size is solved, and the user experience and adaptability of the controls are improved.

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

Patent Information

Application Number
CN202310590514.6
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

Due to the diversified display sizes of the display screen, the layout of the application interface on the display screen is unreasonable, resulting in poor user experience and third-party controls cannot effectively adapt to display screens of different sizes.

Method used

Before displaying the application interface on the display screen, the display size of the display screen is obtained. If the size is greater than the threshold, the source code of the third-party control is modified to generate the target control to adaptively layout in the application interface and improve the rationality of the interface layout.

Benefits of technology

It realizes the adaptive layout of third-party controls on display screens of different sizes, improves the rationality and user experience of the application interface, and expands the application scope of third-party controls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119031065A_ABST
    Figure CN119031065A_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 software development. The method is applied to the electronic equipment, the electronic equipment comprises a display screen, and the method comprises the steps that before the display screen displays an application interface, the display size of the display screen is obtained, and the application interface comprises a third-party control; if the display size is greater than the size threshold, determining a control display parameter of the third-party control; a target control corresponding to the third-party control is determined based on the control display parameter, and the target control is obtained by modifying a source code corresponding to the third-party control; and loading the target control to display an application interface on a display screen. According to the method, the source code of the third-party control included in the application interface is modified according to the size of the display screen, so that the third-party control can be adaptively arranged in the application interface, and the rationality of the layout of the application interface is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software development technology, 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. They have become one of the necessities in people's daily life. At present, electronic devices equipped with display screens are becoming more and more common, and the display sizes of the display screens included in electronic devices are becoming more and more diversified. In the related art, due to the diversity of the display sizes of the display screens, there is an unreasonable layout problem in the display of the application interface on the display screen. 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, which can modify the source code of third-party controls included in the application interface according to the size of the display screen, so that the third-party controls can be adaptively laid out in the application interface, thereby improving the rationality of the application interface layout.

[0004] In a first aspect, an embodiment of the present application provides an interface display method, which is applied to an electronic device, wherein the electronic device includes a display screen, and the method includes: before the display screen displays an application interface, obtaining a display size of the display screen, wherein the application interface includes a third-party control; if the display size is greater than a size threshold, determining a control display parameter of the third-party control; 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; and loading the target control to display the application interface on the display screen.

[0005] In the second aspect, an embodiment of the present application provides an interface display device, which is applied to an electronic device, wherein the electronic device includes a display screen, and the device includes: a display size acquisition module, a control parameter determination module, a target control determination module, and an interface display module. Among them, the display size acquisition module is used to obtain the display size of the display screen before the display screen displays an application interface, wherein the application interface includes a third-party control; the control parameter determination module is used to determine the control display parameters of the third-party control if the display size is greater than a size threshold; the target control determination module 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; the interface display module is used to load the target control to display the application interface on the display screen.

[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 by the embodiments of the present application obtain the display size of a display screen before displaying an application interface on the display screen, wherein the application interface includes a third-party control; if the display size is greater than a size threshold, the control display parameters of the third-party control are determined; based on the control display parameters, a target control corresponding to the third-party control is determined, wherein the target control is obtained by modifying the source code corresponding to the third-party control; the target control is loaded to display the application interface on the display screen, and then the source code of the third-party control included in the application interface is modified according to the size of the display screen, so that the third-party control can be adaptively laid out in the application interface, thereby improving the rationality of the application interface layout. 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 6A schematic diagram showing a flow chart of an interface display method provided in an embodiment of the present application is shown;

[0016] Figure 7 A schematic diagram of an application interface provided by an embodiment of the present application is shown;

[0017] Figure 8 A schematic diagram of a process of loading an application interface provided by an embodiment of the present application is shown;

[0018] Fig. 9 A schematic diagram of an original interface provided by an embodiment of the present application is shown;

[0019] Fig.10 A schematic diagram of an adaptive interface provided by an embodiment of the present application is shown;

[0020] Fig.11 A schematic diagram showing the difference between an original interface and an adaptive interface provided in an embodiment of the present application;

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

[0022] Fig.13 A structural diagram of a program package provided by an embodiment of the present application is shown;

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

[0024] Fig.15 A schematic diagram of loading an application interface provided by an embodiment of the present application is shown;

[0025] Fig.16 A schematic diagram of loading an application interface provided by 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 schematic diagram showing a flow chart of an interface display method provided in an embodiment of the present application is shown;

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

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

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

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

[0032] Fig.23 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

[0033] 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.

[0034] 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.

[0035] In the related art, due to the diversity of display sizes of display screens included in electronic devices, the open source third-party controls included in the application interface displayed on the display screen cannot be well adapted to the display screen, resulting in an unreasonable layout of the application interface. The unreasonable application interface layout results in fewer visible UI elements in the application interface displayed on the display screen, which also makes the user experience of the application interface poor.

[0036] Therefore, in the related art, due to the diversity of display sizes of display screens, there is a problem of unreasonable layout of the application interface on the display screen.

[0037] In view of 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, which improves the rationality of the layout of the application interface by modifying the source code of the third-party controls included in the application interface according to the size of the display screen so that the third-party controls can be adaptively laid out in the application interface. The specific interface display method will be described in detail in the subsequent embodiments.

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

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

[0040] 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.

[0041] 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.

[0042] 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.

[0043] 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.

[0044] 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.

[0045] 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 3As 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.

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

[0047] See also Figure 6 , Figure 6 The flowchart of the interface display method provided by an embodiment of the present application is shown. The interface display method modifies the source code of the third-party controls included in the application interface according to the size of the display screen, so that the third-party controls can be adaptively laid out in the application interface, thereby improving the rationality of the application interface layout. In a specific embodiment, the interface display method can be applied to Fig.21 The interface display device 400 and the electronic device 500 ( Fig. 22 ). The following will take an electronic device as an example to illustrate the specific process of this embodiment, wherein the electronic device includes a display screen. Of course, it can be understood that the electronic device used in this embodiment may include a smart phone, a tablet computer, a wearable electronic device, 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:

[0048] Step S110: before the display screen displays an application interface, obtaining a display size of the display screen, wherein the application interface includes a third-party control.

[0049] In this embodiment, the electronic device includes a display screen, and the electronic device can display an application interface through the display screen. Among them, the application interface can be generated by the electronic device running a program installation package (Android Package, apk). Among them, the program installation package may include a third-party layout framework and third-party controls provided by a third-party company, such as Facebook's RN framework, Alibaba's Weex framework, Google's AndroidX, Support package, etc. Among them, 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 apk to implement UI.

[0050] In some embodiments, before the display screen included in the electronic device displays the application interface, the electronic device may obtain the display size of the display screen. The application interface may include a third-party control, wherein the third-party control may be understood as an open source third-party control, and may provide a custom control with special capabilities. The special capabilities may include adjusting the columns of the application interface, adjusting the margins of the pages included in the application interface, adjusting the layout of the pages included in the application interface, etc., which are not limited here.

[0051] For example, see Figure 7 , which shows a schematic diagram of an application interface provided by an embodiment of the present application. Wherein, the third-party controls included in the application interface may include a list control RecyclerView and a page control ViewPager, wherein ViewPager is nested in RecyclerView, and RecyclerView may include multiple ViewPagers, and multiple ViewPagers correspond to multiple single pages, or may include one ViewPager, and one ViewPager corresponds to a single page, which is not limited here. Wherein, the layout of the third-party controls can fill the full screen of the display screen horizontally, and can maintain a certain proportion vertically. Wherein, the application interface may also include native controls, wherein the operating system included in the electronic device can adjust the layout of the native controls by modifying the source code of the native controls included in the operating system, thereby optimizing the layout of the application interface and improving the rationality of the layout of the application interface.

[0052] Among them, the RecyclerView in the application interface is presented as a list, such as Figure 7As shown; the application interface may include one or more columns; wherein the subject of each column may be the same or different; wherein the subject of each column may include video content, music, news, etc.; the style of the subject of each column may be the same or different; wherein the style of the subject may include pictures, text content, etc. Exemplarily, the subject of each column is the same, and the styles of the subject of each column are different, namely, pictures and text content.

[0053] Among them, the ViewPager in the application interface is displayed as a single page, such as Figure 7 As shown, the electronic device can receive a sliding operation from a user on a display screen, and slide to display a previous page or a next page.

[0054] In some implementations, the electronic device may obtain the display size of the display screen by obtaining an area of ​​the display screen that displays the application interface, and using the size of the area as the display size of the display screen.

[0055] Step S120: If the display size is greater than the size threshold, determining a control display parameter of the third-party control.

[0056] 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.

[0057] 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. Exemplarily, if the display size is greater than the size threshold, the control display parameters of the third-party control can be determined. Among them, the comparison result of the display size and the size threshold can also be used as a basis for determining whether the display screen included in the electronic device is a large screen. Exemplarily, the electronic device can be determined to be a large-screen electronic device when the display size is greater than the size threshold. Furthermore, after determining that the electronic device is a large-screen electronic device, the layout of the third-party controls included in the application interface can be adjusted, thereby improving the rationality of the layout of the application interface displayed by the electronic device.

[0058] In some embodiments, the electronic device determines the control display parameters corresponding to the third-party control on the display screen by, for example, when the electronic device is pre-set with a display size greater than a size threshold, the control display parameters corresponding to the third-party control on the display screen. For example, when the electronic device is pre-set with a display size greater than a size threshold, the number of columns included in the list control in the third-party control is changed from 1 column to 3 columns, 4 columns, etc., or from 2 columns to 3 columns, 4 columns, etc., in the list included in the application interface to be displayed on the display screen, and is not limited here. For another example, when the electronic device is pre-set with a display size greater than a size threshold, the page control in the third-party control is changed from occupying the entire display screen to being centered in the display screen, and the distance between the page control and the border of the display screen is increased, that is, the page control can be reduced and the position of the page control can be adjusted.

[0059] Optionally, the control display parameters corresponding to the third-party control on the display screen that are pre-set in the electronic device when the display size is greater than the size threshold can be obtained through third-party experimental data or can be set by the user independently, which is not limited here.

[0060] 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.

[0061] In some implementations, after the electronic device determines the control display parameters corresponding to the third-party control on the display screen, 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.

[0062] 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.

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

[0064] 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.

[0065] Step S140: Loading the target control to display the application interface on the display screen.

[0066] In some implementations, after acquiring the target control, the electronic device may load the target control to display the application interface on the display screen, wherein the electronic device may set the loading path of the target control before the third-party control corresponding to the target control.

[0067] It should be noted that when the electronic device is loading the installation package to display the application interface, for the same type of installation packages, the electronic device can preferentially load the installation package with the priority path to display the application interface. Therefore, in the embodiment of the present application, the electronic device can load the target control with the path before the third-party control to display the application interface during the process of loading the installation package to display the application interface.

[0068] In other embodiments, when there is an application interface to be displayed on a display screen, if the electronic device determines that the display size of the display screen is less than or equal to the size threshold, the electronic device can further load a third-party control corresponding to the application interface to display the application interface on the display screen.

[0069] For example, see Figure 8 , which shows a schematic diagram of the process of loading an application interface provided by an embodiment of the present application. Wherein, when the electronic device runs an application, if it is determined that the display size of the display screen is less than or equal to the size threshold, the third-party controls corresponding to the application interface (such as RecyclerView and ViewPager) can be loaded to display the application interface on the display screen, which can be understood as the original interface. Wherein, if the electronic device determines that the display size of the display screen is greater than the size threshold, the third-party controls included in the application interface can be converted into corresponding target controls (such as adaptive RecyclerView and adaptive ViewPager), and the target controls can be loaded to display the application interface on the display screen, which can be understood as an adaptive interface.

[0070] For example, see Fig. 9 and Fig.10 .in, Fig. 9 A schematic diagram of an original interface provided by an embodiment of the present application is shown; Fig.10 A schematic diagram of an adaptive interface provided by an embodiment of the present application is shown. The original interface may include native controls (such as control 1 and control 2) and third-party controls (such as RecyclerView and ViewPager). RecyclerView may include a column (such as Fig. 9 The list control marked at the top of the display screen), RecyclerView can also include two columns (such as Fig. 9 The list control marked at the bottom of the display screen). Among them, the ViewPager single page is nested in the RecyclerView, such as Fig. 9 A page control represented by a page control at the top of the display screen fills the screen of the list control at the top of the display screen horizontally. Fig. 9 The multiple page controls marked in the lower part of the display screen represent multiple single pages.

[0071] The adaptive interface may include native controls (such as control 1 and control 2) and target controls (such as adaptive RecyclerView and adaptive ViewPager). The adaptive RecyclerView may include three columns (such as Fig.10 The adaptive list control marked at the top of the display screen, as Fig.10 The adaptive list control marked at the bottom of the display screen in the middle) has increased the number of columns compared to the original interface. Among them, the adaptive ViewPager single page is nested in the adaptive RecyclerView, such as Fig.10 A single page represented by an adaptive page control in the upper part of the display screen is two-thirds of the upper screen. Fig.10 The multiple page controls marked in the lower part of the middle display screen represent multiple single pages, among which a single page is one-sixth of the lower screen. Compared with the original interface, the proportion of a single page on the display screen is reduced, which enriches the visual UI elements of the application interface and improves the user experience.

[0072] It is understandable that, in the process of loading the target control for displaying the application interface, the electronic device may also load the installation package related to the target control to ensure the integrity of the application operation. In addition, the target control is obtained by modifying the source code corresponding to the third-party control. In the actual application operation, in order to ensure the integrity of the application operation, the source code corresponding to the relevant class of the third-party control may also be modified accordingly in the process of obtaining the target control.

[0073] Please refer to Fig. 9 , Fig.10 and Fig.11 ,in, Fig.11 A schematic diagram showing the difference between the original interface and the adaptive interface provided by an embodiment of the present application is shown. In the application interface displayed by the electronic device, when the display size of the display screen is less than or equal to the size threshold, the list control is 2 columns, and when the display size of the display screen is greater than the size threshold, the list control is 3 columns; when the display size of the display screen is less than or equal to the size threshold, the page control is a single page and horizontally fills the upper part of the display screen, and when the display size of the display screen is greater than the size threshold, the page control can be centered in the upper display screen, that is, the current page is centered, leaving margins on both sides.

[0074] It can be understood that in this embodiment, when the display size of the display screen is greater than the size threshold, the electronic device loads the target control corresponding to the third-party control included in the application interface to display the application interface on the display screen, enriching the visual UI elements of the application interface displayed by the electronic device, improving the rationality of the application interface layout, and improving the user experience. In addition, by modifying the source code of the third-party control to obtain the target control, the application scope of the tripartite framework and the third-party control is expanded.

[0075] An interface display method provided by an embodiment of the present application obtains the display size of a display screen before displaying an application interface on the display screen, wherein the application interface includes a third-party control; if the display size is greater than a size threshold, determines the control display parameters of the third-party control; determines 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; loads the target control to display the application interface on the display screen, and then modifies the source code of the third-party control according to the size of the display screen so that the third-party control can be adaptively laid out in the application interface, thereby improving the rationality of the application interface layout.

[0076] See also Fig.12 , Fig.12 The flowchart of the interface display method provided by an embodiment of the present application is shown in FIG. The method is applied to the above-mentioned electronic device, which includes a display screen. Fig.12 The process shown is described in detail, and the interface display method may specifically include the following steps:

[0077] Step S210: before the display screen displays an application interface, obtaining a display size of the display screen, wherein the application interface includes a third-party control.

[0078] Step S220: If the display size is greater than the size threshold, determining a control display parameter of the third-party control.

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

[0080] Step S230: 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.

[0081] 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.

[0082] For example, see Fig.13 , 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.

[0083] For example, see Fig.14 , 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.

[0084] In this embodiment, after the electronic device determines that the display size of the display screen is greater than the size threshold, it can obtain the initial installation package corresponding to the application interface. 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.

[0085] 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 to obtain the installation package corresponding to the target control.

[0086] 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.

[0087] 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.

[0088] 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.).

[0089] 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.

[0090] 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.

[0091] 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 the 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 that when the display size of the display screen is less than or equal to the size threshold, the electronic device displays the application interface reasonably, thereby improving the user experience.

[0092] 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.

[0093] 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.

[0094] In some embodiments, the third-party control may include at least one of a list control and a page control. Further, the process of the electronic device modifying the source code corresponding to the third-party control and obtaining the installation package corresponding to the target control may be that, if the third-party control includes a list control, the insertion bytecode may 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 the number of columns of the list control; or if the third-party control includes a page control, the insertion bytecode may be inserted into the source code corresponding to the page control to obtain the installation package corresponding to the modified page control, wherein the margin of the modified page control is greater than the margin of the page control.

[0095] Step S240: loading the installation package corresponding to the target control to display the application interface on the display screen.

[0096] 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 display the application interface on the display screen. Optionally, the process of the electronic device loading the installation package corresponding to the target control to display the application interface on the display screen can be to obtain the target installation package corresponding to the application interface displayed on the display screen before specifying the path for loading 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 display the application interface on the display screen. 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.

[0097] 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, obtaining the target installation package corresponding to the application interface displayed on the display screen can be based on a class loader (such as ClassLoader, etc.) 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, obtaining the target installation package corresponding to the application interface displayed on the display screen. The class loader can specify the order in which the classes included in the target installation package are loaded.

[0098] For example, see Fig.15 and Fig.16 , Fig.15 A schematic diagram of loading an application interface provided by an embodiment of the present application is shown. Fig.16A schematic diagram of application interface loading provided by an embodiment of the present application is shown. Among them, when the display size of the display screen of the electronic device is less than or equal to the size threshold, the order of program loading classes specified by the class loader (such as ClassLoader, etc.) when the operating system runs the program can be to first load the function class package Framework.jar, and then load the Android application installation package Base.apk. Among them, Framework.jar may include installation packages of native classes of the Android system, and Base.apk may include installation packages of classes built into third-party applications. Furthermore, when the electronic device program is running, it can be based on Fig.15 The classes are loaded in the order shown in the loading sequence to display the application interface; among them, if there are the same classes in Framework.jar and Base.apk, the classes in Framework.jar are loaded first.

[0099] Among them, when the display size of the electronic device is larger than the size threshold, the electronic device can specify the path of the installation package (that is, the new installation package apk) corresponding to the target control to be loaded before the path of the Base.apk based on ClassLoader, and then the electronic device program can be based on the following when running. Fig.16 The classes are loaded in the order shown in the loading sequence to display the application interface. In the process of program running, when the electronic device loads the third-party control class, the class of the target control corresponding to the third-party control class in the new apk will be loaded first.

[0100] Compared with the interface display method provided in an embodiment of the present application, Figure 6 The interface display method shown in this embodiment can also load the installation package corresponding to the target control to display the application interface on the display screen. By modifying the source code of the third-party control according to the size of the display screen, the adaptability of the third-party control is improved. By loading the installation package corresponding to the target control for displaying the application interface, the third-party control can be reasonably laid out in the application interface, thereby optimizing the user experience.

[0101] See also Fig.17 , Fig.17 The flowchart of the interface display method provided by an embodiment of the present application is shown. The method is applied to the above-mentioned electronic device, wherein the electronic device includes a display screen. Fig.17 The process shown is described in detail, and the interface display method may specifically include the following steps:

[0102] Step S310: before the display screen displays an application interface, obtaining a display size of the display screen, wherein the application interface includes a third-party control.

[0103] For the specific description of step S310, please refer to the specific description of step S110 above, which will not be repeated here.

[0104] Step S320: If the display size is greater than the size threshold, determining a control display parameter of the third-party control based on the display size.

[0105] In some embodiments, after the electronic device obtains the display size of the display screen, the display size can be compared with the size threshold, and the comparison result can be used as a basis for determining whether to perform an operation of determining the control display parameters corresponding to the third-party control on the display screen based on the display size. Exemplarily, if the display size is greater than the size threshold, the control display parameters corresponding to the third-party control on the display screen are determined based on the display size.

[0106] Optionally, the electronic device may be pre-set with a corresponding relationship between the display size and the control display parameters corresponding to the third-party control on the display screen, such as a mapping relationship table between the display size and the control display parameters corresponding to the third-party control on the display screen, a calculation formula between the display size and the control display parameters corresponding to the third-party control on the display screen, etc., which are not limited here. Among them, in the mapping relationship table between the display size and the control display parameters corresponding to the third-party control on the display screen, the control display parameters corresponding to the third-party control on the display screen may correspond to one display size or multiple display sizes, which are not limited here.

[0107] Optionally, a control display parameter calculation model (such as a convolutional neural network, a recurrent neural network, etc.) may be pre-set in the electronic device. When the display size is greater than a size threshold, the electronic device may input the display size into the control display parameter calculation model to obtain the control display parameters corresponding to the third-party control on the display screen output by the control display parameter calculation model and corresponding to the display size.

[0108] Step S330: determining 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.

[0109] Step S340: Load the target control to display the application interface on the display screen.

[0110] For the detailed description of step S330 to step S340, please refer to the detailed description of step S130 to step S140 above, which will not be repeated here.

[0111] Compared with the interface display method provided in an embodiment of the present application, Figure 6The interface display method shown in this embodiment can also determine the control display parameters of the third-party control based on the display size if the display size is greater than the size threshold, and then modify the source code of the third-party control according to the size of the display screen so that the third-party control can be adaptively laid out in the application interface, thereby improving the rationality of the application interface layout, increasing the application scope of the third-party control, and improving the user experience.

[0112] See also Fig.18 , Fig.18 The flowchart of the interface display method provided by an embodiment of the present application is shown. The method is applied to the above-mentioned electronic device, wherein the electronic device includes a display screen. Fig.18 The process shown is described in detail, and the interface display method may specifically include the following steps:

[0113] Step S410: before the display screen displays an application interface, obtaining a display size of the display screen, wherein the application interface includes a third-party control.

[0114] For the specific description of step S410, please refer to the previous specific description of step S410, which will not be repeated here.

[0115] Step S420: If the display size is greater than the size threshold, determining a control display parameter of the third-party control based on the input display instruction.

[0116] In some embodiments, the electronic device may receive a display instruction input by a user, wherein the display instruction may carry a control display parameter corresponding to the third-party control on the display screen. Further, when the electronic device determines that the display size of the display screen is greater than a size threshold, the electronic device may determine the control display parameter corresponding to the third-party control on the display screen based on the input display instruction.

[0117] As an implementable manner, the electronic device may generate a first prompt message when the display size is greater than a size threshold, so that the user can input a display instruction based on the first prompt message. Further, the electronic device may receive and parse the display instruction to determine the control display parameters corresponding to the third-party control on the display screen. The first prompt message may include interface prompt message, text prompt message, audio prompt message, indicator light prompt message, etc., which are not limited here.

[0118] In some other embodiments, the electronic device may be pre-set with control display parameters corresponding to the third-party control on the display screen. Further, the electronic device may obtain the pre-set control display parameters corresponding to the third-party control on the display screen when receiving a display instruction input by the user.

[0119] As an implementable method, the electronic device can generate a second prompt message when the display size is greater than a size threshold, so that the user can input a display instruction based on the second prompt message. Accordingly, when the electronic device receives the display instruction, it can determine that the application interface layout needs to be adjusted. Further, the electronic device can obtain the control display parameters corresponding to the pre-set third-party control, and can perform subsequent operations to adjust the application interface layout based on the control display parameters. Among them, the second prompt message can include interface prompt information, text prompt information, audio prompt information, indicator light prompt information, etc., which are not limited here.

[0120] The input display instruction may be a display instruction sent by the user touching the display screen, or may be a voice instruction of the user obtained by the electronic device. In this embodiment, the manner in which the electronic device obtains the display instruction is not limited.

[0121] Step S430: 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.

[0122] Step S440: Load the target control to display the application interface on the display screen.

[0123] For the detailed description of step S430 to step S440, please refer to the detailed description of step S130 to step S140 above, which will not be repeated here.

[0124] Compared with the interface display method provided in an embodiment of the present application, Figure 6 The interface display method shown in this embodiment can also determine the control display parameters of the third-party control based on the input display instruction if the display size is greater than the size threshold, and then when the display size of the display screen is greater than the size threshold, modify the source code of the third-party control according to the input display instruction, so that the third-party control can be adaptively laid out in the application interface, thereby improving the rationality of the application interface layout, increasing the application scope of the third-party control, and also improving the user experience.

[0125] See also Fig.19 , Fig.19 The flowchart of the interface display method provided by an embodiment of the present application is shown. The method is applied to the above-mentioned electronic device, the electronic device includes a display screen, and the display screen is a foldable display screen. Fig.19 The process shown is described in detail, and the interface display method may specifically include the following steps:

[0126] Step S510: Acquire status information of the foldable display screen, wherein the status information of the foldable display screen includes an unfolded status or a folded status.

[0127] In some embodiments, the display screen included in the electronic device is a folding display screen. Optionally, the electronic device can receive an application running instruction, and when the electronic device receives the application running instruction, it can be determined that the electronic device needs to perform application interface layout. Further, the electronic device can obtain state information of the folding display screen, so that the electronic device performs application interface layout according to the state information of the folding display screen. The state information of the folding display screen includes an unfolded state or a folded state.

[0128] Step S520: If the state information of the foldable display screen is the unfolded state, determining that the display size of the foldable display screen is greater than the size threshold.

[0129] In some embodiments, after determining the status information of the folding display screen, the electronic device can determine the size relationship between the display size of the folding display screen and the size threshold according to the status information, and determine whether to adjust the layout of the third-party controls in the application interface according to the size relationship.

[0130] Exemplarily, if the state information of the foldable display screen is an unfolded state, it can be determined that the display size of the foldable display screen is greater than the size threshold, and further, the electronic device can execute step S530.

[0131] Step S530: Determine the control display parameters corresponding to the third-party control.

[0132] Step S540: 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.

[0133] Step S550: Load the target control to display the application interface on the display screen.

[0134] For the detailed description of step S530 to step S550, please refer to the detailed description of step S120 to step S140 above, which will not be repeated here.

[0135] Compared with the interface display method provided in an embodiment of the present application, Figure 6The interface display method shown in the embodiment can also obtain the status information of the folding display screen, wherein the status information of the folding display screen includes the unfolded state or the folded state; if the status information of the folding display screen is the unfolded state, it is determined that the display size of the folding display screen is greater than the size threshold, and then the source code of the third-party control is modified in the unfolded state of the folding display screen, so that the third-party control can be adaptively laid out in the application interface, thereby improving the rationality of the application interface layout, increasing the application scope of the third-party control, and also improving the user experience.

[0136] See also Fig. 20 , Fig. 20 The flowchart of the interface display method provided by an embodiment of the present application is shown. The method is applied to the above-mentioned electronic device, the electronic device includes a scroll display screen, and the display screen is a scroll display screen. Fig. 20 The process shown is described in detail, and the interface display method may specifically include the following steps:

[0137] Step S610: Acquire the status information of the scroll display screen, wherein the status information of the scroll display screen includes a stretched state or a contracted state.

[0138] In some embodiments, the display screen included in the electronic device is a scroll display screen. Optionally, the electronic device can receive an application running instruction, and when the electronic device receives the application running instruction, it can be determined that the electronic device needs to perform application interface layout. Further, the electronic device can obtain state information of the scroll display screen, so that the electronic device performs application interface layout according to the state information of the scroll display screen. The state information of the folding display screen includes a stretched state or a contracted state.

[0139] Step S620: If the state information of the scroll display screen is the stretched state, determining that the display size of the scroll display screen is greater than the size threshold.

[0140] In some embodiments, after determining the status information of the scroll display screen, the electronic device can determine the size relationship between the display size of the scroll display screen and a size threshold 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.

[0141] 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, and further, the electronic device can execute step S630.

[0142] Step S630: Determine the control display parameters of the third-party control.

[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: Load the target control to display the application interface on the display screen.

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

[0146] Compared with the interface display method provided in an embodiment of the present application, Figure 6 The interface display method shown in this embodiment can also obtain the status information of the scroll display screen, wherein the status information of the scroll display screen includes a stretched state or a contracted state; if the status information of the scroll display screen is a stretched state, it is determined that the display size of the scroll display screen is greater than the size threshold, and then the source code of the third-party control is modified in the stretched state of the scroll display screen, so that the third-party control can be adaptively laid out in the application interface, thereby improving the rationality of the application interface layout, increasing the application scope of the third-party control, and also improving the user experience.

[0147] See also Fig.21 , Fig.21 The module block diagram of the interface display device provided by an embodiment of the present application is shown. The interface display device 400 is applied to an electronic device, and the electronic device includes a display screen. Fig.21 The process shown in the figure is described in detail. The interface display device 400 includes: a display size acquisition module 410, a control parameter determination module 420, a target control determination module 430 and an interface display module 440, wherein:

[0148] The display size acquisition module 410 is used to acquire the display size of the display screen before the display screen displays the application interface, wherein the application interface includes a third-party control.

[0149] The control parameter determination module 420 is used to determine the control display parameters of the third-party control if the display size is greater than the size threshold.

[0150] The target control determination module 430 is used 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.

[0151] The interface display module 440 is used to load the target control to display the application interface on the display screen.

[0152] Furthermore, the interface display device 400 may also include: a program package acquisition module, a program package parsing module and a source code modification module, wherein:

[0153] The program package acquisition module is used to acquire 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.

[0154] The package parsing module is used to parse the package of the built-in class of the third-party application to obtain the source code corresponding to the third-party control.

[0155] The source code modification module is used to modify the source code corresponding to the third-party control and obtain the installation package corresponding to the target control.

[0156] Furthermore, the package parsing module may include: a bytecode obtaining unit and a source code determining unit, wherein:

[0157] 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.

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

[0159] Further, the bytecode obtaining unit may include: a conversion data packet obtaining unit and a conversion data packet parsing unit, wherein:

[0160] The converted data package obtaining unit 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.

[0161] The conversion data packet parsing unit 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.

[0162] Furthermore, the source code modification module may include: a bytecode insertion unit, wherein:

[0163] The bytecode insertion unit is used to insert the insertion bytecode 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.

[0164] Furthermore, the third-party control includes at least one of a list control and a page control, and the source code modification module may include: a list control modification unit or a page control modification unit, wherein:

[0165] A list control modification unit is used to insert the insertion bytecode into the source code corresponding to the list control if the third-party control includes the list control, and obtain an installation package corresponding to the modified list control, wherein the number of columns included in the modified list control is greater than the number of columns of the list control.

[0166] A page control modification unit is used to insert the insertion bytecode into the source code corresponding to the page control if the third-party control includes the page control, and obtain an installation package corresponding to the modified page control, wherein the margin of the modified page control is greater than the margin of the page control.

[0167] Furthermore, the interface display module 440 may include: an installation package loading unit corresponding to the target control, wherein:

[0168] The installation package loading unit corresponding to the target control is used to load the installation package corresponding to the target control to display the application interface on the display screen.

[0169] Furthermore, the installation package loading unit corresponding to the target control may include: a target control path specifying unit and a target installation package loading unit, wherein:

[0170] The target control path specifying unit is used to obtain the target installation package corresponding to the application interface displayed on the display screen 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.

[0171] The target installation package loading unit is used to load the target installation package to display the application interface on the display screen.

[0172] Furthermore, the target control path specifying unit may include: a class loader specifying path unit, wherein:

[0173] The class loader specifies a path unit, which is used to obtain the target installation package corresponding to the application interface displayed on the display screen before the class loader specifies the path for loading 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.

[0174] Furthermore, the control parameter determination module 420 may include: a control parameter determination unit based on the display size, wherein:

[0175] The control parameter determination unit based on the display size is used to determine the control display parameter of the third-party control based on the display size if the display size is greater than the size threshold.

[0176] Further, the control parameter determination module 420 may include: a control parameter determination unit based on a display instruction, wherein:

[0177] The control parameter determination unit based on the display instruction is used to determine the control display parameters of the third-party control based on the input display instruction if the display size is greater than the size threshold.

[0178] Furthermore, the display screen is a folding display screen, and the interface display device 400 may include: a state information acquisition module of the folding display screen and a state information determination module of the display size of the folding screen, wherein:

[0179] The foldable display screen state information acquisition module is used to acquire the state information of the foldable display screen, wherein the state information of the foldable display screen includes an unfolded state or a folded state.

[0180] The module for determining the display size of the folding screen based on the status information is used to determine that the display size of the folding display screen is greater than the size threshold if the status information of the folding display screen is the unfolded state.

[0181] Furthermore, the display screen is a scroll display screen, and the interface display device 400 may include: a state information acquisition module of the scroll display screen and a state information determination module of the display size of the scroll screen, wherein:

[0182] The state information acquisition module of the scroll display screen is used to acquire the state information of the scroll display screen, wherein the state information of the scroll display screen includes a stretched state or a contracted state.

[0183] The module for determining the display size of the scroll screen based on the status information is used to determine that the display size of the scroll screen is greater than the size threshold if the status information of the scroll screen is the stretched state.

[0184] 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.

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

[0186] 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.

[0187] See also Fig. 22, which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 500 can be an electronic device capable of running applications, such as a smart phone, a tablet computer, an e-book, etc. The electronic device 500 in the present application may include one or more of the following components: a display screen 510, a processor 520, a memory 530, and one or more applications, wherein one or more applications may be stored in the memory 530 and configured to be executed by one or more processors 520, and one or more programs are configured to execute the method described in the aforementioned method embodiment.

[0188] The display screen 510 may be a foldable display screen, a scroll display screen, a straight display screen, etc., which are not limited here. The material of the display screen 510 may be a thin film field effect transistor (TFT), a super twisted nematic liquid crystal display (STN), an organic light emitting display (OLED), etc., which are not limited here. The electronic device 500 may display an application interface for an application running on the processor 520 based on the display screen 510.

[0189] The processor 520 may include one or more processing cores. The processor 520 uses various interfaces and lines to connect various parts of 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 530, and calling data stored in the memory 530. Optionally, the processor 520 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 520 can integrate one or a combination of a central processing unit (CPU), a 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 520, but may be implemented separately through a communication chip.

[0190] The memory 530 may include a random access memory (RAM) or a read-only memory (ROM). The memory 530 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 530 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 at least one function (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.

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

[0192] The computer readable storage medium 600 can 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 steps 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.

[0193] In summary, the interface display method, device, electronic device and storage medium provided by the embodiments of the present application obtain the display size of the display screen before the display screen displays the application interface, wherein the application interface includes a third-party control; if the display size is greater than a size threshold, the control display parameters of the third-party control are determined; based on the control display parameters, a target control corresponding to the third-party control is determined, wherein the target control is obtained by modifying the source code corresponding to the third-party control; the target control is loaded to display the application interface on the display screen, and then the source code of the third-party control included in the application interface is modified according to the size of the display screen, so that the third-party control can be adaptively laid out in the application interface, thereby improving the rationality of the application interface layout.

[0194] 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: Applied to an electronic device, the electronic device includes a display screen, and the method includes: Before the display screen displays an application interface, obtaining a display size of the display screen, wherein the application interface includes a third-party control; If the display size is greater than the size threshold, determining a control display parameter of the third-party control; 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; The target control is loaded to display the application interface on the display screen.

2. The method according to claim 1, characterized in that The method further comprises: 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; Modify the source code corresponding to the third-party control and obtain the 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: After converting the program package of the third-party application built-in class, the program package is parsed to obtain the bytecode of the executable file included in the program package of the third-party application 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 by 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 modifying the source code corresponding to the third-party control to obtain the installation package corresponding to the target control includes: The insertion bytecode is inserted 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.

6. The method according to claim 5, characterized in that The third-party control includes at least one of a list control and a page control, and the modifying the source code corresponding to the third-party control to obtain the installation package corresponding to the target control includes: If the third-party control includes the list control, inserting the insertion bytecode into the source code corresponding to the list control to obtain an installation package corresponding to the modified list control, wherein the number of columns included in the modified list control is greater than the number of columns of the list control; or If the third-party control includes the page control, the insertion bytecode is inserted into the source code corresponding to the page control to obtain an installation package corresponding to the modified page control, wherein the margin of the modified page control is greater than the margin of the page control.

7. The method according to claim 2, characterized in that The loading of the target control to display the application interface on the display screen includes: The installation package corresponding to the target control is loaded to display the application interface on the display screen.

8. The method according to claim 7, characterized in that The step of loading the installation package corresponding to the target control to display the application interface on the display screen 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 displayed on the display screen; The target installation package is loaded to display the application interface on the display screen.

9. The method according to claim 8, characterized in that Before 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 built-in class, obtaining the target installation package corresponding to the application interface displayed on the display screen includes: Before the class loader specifies 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, the target installation package corresponding to the application interface displayed on the display screen is obtained.

10. The method according to any one of claims 1 to 9, characterized in that: If the display size is greater than a size threshold, determining a control display parameter of the third-party control includes: If the display size is greater than the size threshold, a control display parameter corresponding to the third-party control on the display screen is determined based on the display size.

11. The method according to any one of claims 1 to 9, characterized in that: If the display size is greater than a size threshold, determining a control display parameter of the third-party control includes: If the display size is greater than the size threshold, a control display parameter corresponding to the third-party control on the display screen is determined based on the input display instruction.

12. The method according to any one of claims 1 to 9, characterized in that: The display screen is a foldable display screen, and the method further includes: Acquiring state information of the folding display screen, wherein the state information of the folding display screen includes an unfolded state or a folded state; If the state information of the folding display screen is the unfolded state, it is determined that the display size of the folding display screen is greater than the size threshold.

13. The method according to any one of claims 1 to 9, characterized in that: The display screen is a scroll display screen, and the method further includes: Acquire state information of the scroll display screen, wherein the state information of the scroll display screen includes a stretched state or a contracted state; If the state information of the scroll display screen is the stretched state, it is determined that the display size of the scroll display screen is greater than the size threshold.

14. An interface display device, characterized in that: Applied to an electronic device, the electronic device includes a display screen, and the device includes: A display size acquisition module, used to acquire the display size of the display screen before the display screen displays an application interface, wherein the application interface includes a third-party control; A control parameter determination module, configured to determine a control display parameter of the third-party control if the display size is greater than a size threshold; A target control determination module, used to determine 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; An interface display module is used to load the target control to display the application interface on the display screen.

15. An electronic device, characterized in that: include: Folding screen; one or more processors; Memory; One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1-13.

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