Display method, electronic equipment and readable storage medium

By detecting and adjusting the display parameters after changing the area of ​​the electronic equipment display area, the application interface display interface display interfaces on different devices are solved, and the visual coordination and user experience of the interface are improved.

CN119376833AActive Publication Date: 2025-01-28HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411304142.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-28
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

Applications running on different types of electronic devices have different display sizes, resulting in inconsistent interface display, affecting the user experience.

Method used

By detecting the display area changes, the default display parameters that are obtained in the new area are obtained, and the display parameters are adjusted according to the preset adjustment conditions to achieve visual coordination.

Benefits of technology

When changing events in the display area, actively adjust the display parameters of the application interface to ensure that the interface has good coordination and user experience in different display areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376833A_ABST
    Figure CN119376833A_ABST
Patent Text Reader

Abstract

The invention discloses a display method, electronic equipment and a readable storage medium. The display method is applied to the electronic equipment, and comprises the following steps: detecting information of occurrence of a display area change event of a first target application; the display area change event is used for representing that an interface of the first target application is changed from a first area to a second area; obtaining a first display parameter of the interface displayed by the first target application in the second area; obtaining a second display parameter corresponding to the first display parameter under the condition of determining that a preset adjustment condition is met according to at least one of the first display parameter and the second area; the second display parameter is a preset reference display parameter when the interface of the first target application is displayed in the second area; and displaying an interface of the first target application in the second area according to the second display parameter. According to the embodiment of the invention, the harmony of the display picture can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a display method, an electronic device, and a readable storage medium. Background Art

[0002] With the development of computer technology, many different types of electronic devices have also appeared in people's lives. For example, users can choose electronic devices such as mobile phones, tablets, desktop computers, or smart watches to receive or send network information, and these electronic devices have different types of display screens. When an application is displayed on electronic devices with different display screens, the different sizes of the display screens may cause the application display interface to be inconsistent. Summary of the invention

[0003] The present application provides a display method, an electronic device, and a readable storage medium, which can avoid improving the visual coordination of the interface when providing a variety of display modes. The technical solution is as follows:

[0004] In a first aspect, a display method is provided, which is applied to an electronic device, comprising: detecting information on a display area change event of a first target application; the display area change event is used to indicate that the interface of the first target application is changed from a first area to a second area; obtaining a first display parameter of the first target application for displaying the interface in the second area; upon determining that a preset adjustment condition is met based on at least one of the first display parameter and the second area, obtaining a second display parameter corresponding to the first display parameter; the second display parameter is a preset reference display parameter when the interface of the first target application is displayed in the second area; and displaying the interface of the first target application in the second area based on the second display parameter.

[0005] In an embodiment of the present application, the interface of the first target application is changed from the first area to the second area, which may include: the interface of the first target application is not displayed in the first area, and the interface of the first target application is displayed in the second area; a new interface is generated on the original interface of the first target application to cover the original interface, and the collection of the display area where the new interface and the original interface are located is the second area; a new interface of the first target application is generated outside the first area, and the original interface and the new interface of the first target application are displayed together, and the collection of the display area where the new interface and the original interface are located is the second area.

[0006] The first display parameter of the first target application displaying the interface in the second area may refer to the display parameter used by the first target application by default when displaying the interface in the second area without additional intervention. The first display parameter may be configured by the electronic device specifically for the first target application, or may be configured by the first target application itself.

[0007] The second display parameter may be a reference display parameter corresponding to the interface displayed in the second area after the display area change event is generated by the first target application, when the preset coordinated display conditions are met. The second display parameter may include all configurable display parameters in the interface of the first target application when the interface meets the preset coordinated display conditions in the second area. For example, the number of controls, control color, control brightness, control size, number of cards, card color, font of brief information in the card, card arrangement, or layout of the interface in the interface of the first target application.

[0008] In the above embodiment, displaying the interface of the first target application in the second area according to the second display parameter may include adjusting at least one of a layout of a control, a card, or an interface according to the second display parameter.

[0009] In an embodiment of the present application, whether the preset coordinated display conditions are met can be evaluated based on factors such as the size of the display screen of the electronic device, the size of controls in the interface of the first target application, the crowding level of controls, the size of the card, the amount of information in the brief information presented in the card, the crowding level of the card, the relative size of the blank area of ​​the card and the area where information is presented, or the ease with which users can operate in the interface.

[0010] Through the above-mentioned embodiments, when a display area change event occurs, it is possible to actively detect whether the first display parameter meets the preset adjustment conditions, and when the preset adjustment conditions are met, adjust the display parameters of the target application display interface in the second area, and the second display parameter is a pre-set reference display parameter. When the interface of the first target application is displayed in the second area using the second display parameter, the preset coordinated display effect can be achieved, making the interface of the first target application more coordinated.

[0011] In one embodiment, before obtaining the second display parameter corresponding to the first display parameter, it is also necessary to determine whether the preset adjustment condition is met. If the preset adjustment condition is not met, there is no need to use the second display parameter to display the interface of the first target application in the second area. Accordingly, the display method of the embodiment of the present application also includes: obtaining a view strategy corresponding to a display area change event from a view frame of the electronic device; the view strategy includes the display state of the electronic device after the display area change event occurs; the first display parameter is the display parameter of the first target application corresponding to the view strategy; querying the second display parameter corresponding to the view strategy recorded in the preset whitelist; and determining whether the preset adjustment condition is met based on the first display parameter and the second display parameter.

[0012] In an embodiment of the present application, the display state of the electronic device may include full-screen display, non-full-screen display, folded state display, unfolded state display, semi-folded state display, or multi-screen display, etc.

[0013] In an embodiment of the present application, it is first determined whether a preset adjustment condition is met, and then the first display parameter is adjusted when the preset adjustment condition is met, thereby reducing unnecessary operations performed by the electronic device when the preset adjustment condition is not met.

[0014] In one embodiment, the display method also includes: when the electronic device is started, detecting the preset whitelist; if the preset whitelist exists, registering the change notification broadcast of the first target application according to the preset whitelist; the change notification broadcast is used to notify and indicate that a first monitoring strategy is determined based on the changed first target application, and the first monitoring strategy is used to indicate monitoring of the first target application for a display area change event.

[0015] In the embodiment of the present application, for some electronic devices, there is no need to adjust the display parameters of any application before and after the display area change event occurs, so the model of the electronic device can be recorded in the preset whitelist.

[0016] At the same time, for the same electronic device, display parameters of multiple target applications can be adjusted after a display area change event occurs. Therefore, the preset whitelist can record multiple target applications and can also include detailed information such as version numbers of the target applications.

[0017] In addition, for the same target application, different display parameters can be adjusted for different display area change events. Alternatively, for the same target application, multiple display parameters can be adjusted after a display area change event occurs. Therefore, multiple second display parameters can also be recorded in the preset whitelist.

[0018] By registering the change notification broadcast of the first target application, it can be used to determine whether the first target application is installed, modified, upgraded or otherwise changed. If the first target application is uninstalled, the first target application can no longer be monitored, so the first monitoring strategy can be modified or cancelled.

[0019] Through the above embodiments, it is possible to monitor changes of the first target application according to the whitelist, and determine the first monitoring strategy for the first target application according to the changes of the first target application, so as to manage the first target application normally, adjust the display parameters of the interface of the first target application when necessary, and improve the coordination of the interface of the first target application.

[0020] In one embodiment, the display method also includes: receiving a whitelist change broadcast pushed by the network side; based on the whitelist change broadcast, executing at least one of the following: changing the first monitoring strategy for the display area change event of the first target application; the first monitoring strategy is used to indicate monitoring of the display area change event of the first target application; changing the second display parameter; adding a second monitoring strategy for the display area change event of the second target application; the second monitoring strategy is used to indicate monitoring of the display area change event of the second target application.

[0021] In an embodiment of the present application, the whitelist preset in the electronic device may include multiple target applications, and some of the target applications may not be installed on the electronic device. For the target applications that are not installed, the display area change events during the operation of the target applications may not be monitored.

[0022] In a possible implementation, the display area change event that the first target application needs to monitor may be different from the display area change event that the second target application needs to monitor. For example, during the operation of the first target application, if it is monitored that the interface of the first target application changes from being displayed in the first area to being displayed in the second area, the first display parameter is obtained and the display parameter adjustment-related operations are performed. During the operation of the second target application, if it is monitored that the interface of the second target application changes from the first set area to the second set area, the display parameter adjustment-related operations are performed. Among them, the first set area is a specific display area, and the second set area is another specific display area. This means that if a display area change event simply occurs during the operation of the second target application, adjustment-related operations may not be performed.

[0023] Through the above embodiments, it is possible to monitor multiple target applications, thereby making comprehensive adjustments to the problem of inconsistent display of target applications.

[0024] In one implementation, the preset whitelist includes a whitelist preset in the electronic device and / or a whitelist on the network side.

[0025] In one implementation, the whitelist on the network side may be provided by at least one network device.

[0026] In the case where the network side provides a whitelist, the whitelist on the network side can be updated according to the model changes of the electronic device, the version update of the target application, etc., to provide more flexibility for the adjustment of the display parameters.

[0027] In the case where a whitelist is preset in the electronic device, the display parameters can be adjusted according to the whitelist preset in the electronic device when the electronic device is not connected to the network server, thereby improving the stability of the display parameter adjustment operation.

[0028] Through the above embodiments, the display parameters of the target application can be adjusted by modifying the electronic device system configuration, and the display parameters of the target application can be adjusted by controlling the electronic device from the server side through network side configuration.

[0029] In one embodiment, the preset adjustment condition includes at least one of the following: the first display parameter is different from the second display parameter; the numerical difference between the first display parameter and the second display parameter is outside a preset range; the display area change event has not ended; the display size of the second area is within a preset size threshold range; the file corresponding to the display area change event is in the playback process.

[0030] In the embodiment of the present application, whether to adjust the display parameters can be controlled by presetting at least one of a plurality of adjustment conditions.

[0031] In one embodiment, the preset adjustment condition includes that the file corresponding to the display area change event is in the process of being played, and the display method further includes: playing the file in response to information about the display area change event of the first target application.

[0032] Through the above embodiments, when a display area change event occurs, pre-set videos, audios, vibration effects, pictures, texts and other files can be played, and when the display area changes, a visually smooth transition effect can be achieved, thereby enhancing the user's visual experience.

[0033] In one implementation, the second display parameter includes at least one of the following: a control size of the first target application, an interface layout of the first target application, a card size of the first target application, and a card layout of the first target application.

[0034] In an embodiment of the present application, important elements that affect the coordination of the visual effects of the interface, such as cards, controls, or the overall layout of the interface, can be adjusted to improve the visual coordination of the interface of the first target application.

[0035] In one embodiment, the aspect ratio of the first area is different from the aspect ratio of the second area; and / or, the screen displayed on the electronic device by the first area is different from the screen displayed on the electronic device by the second area; and / or, the size of the first area is different from the size of the second area.

[0036] In a possible implementation of the present application, the interface of the first target application includes visualization content generated using a recycle view module (recycleview), or the interface of the first target application includes visualization content generated using a text view module (textview).

[0037] Through the above method, when there is a significant difference between the area before and after the display area change event occurs, the display parameters of the interface of the first target application can be adjusted. When the area change before and after the display area change event occurs is not significant, the display parameters of the interface of the first target application will not be adjusted, thereby saving power consumption of the electronic device.

[0038] In a second aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor and a memory;

[0039] The memory is used to store a program for the electronic device to execute the method provided in any embodiment of the present application, and to store data involved in implementing the method provided in any embodiment of the present application;

[0040] The processor is configured to execute the program stored in the memory.

[0041] Optionally, there are one or more processors and one or more memories.

[0042] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0043] The processing device in the above-mentioned second aspect can be a chip. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0044] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.

[0045] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions stored in the storage medium are executed on a computer, the computer can execute the method of the first aspect mentioned above.

[0046] In a fourth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute any possible implementation method of the first aspect.

[0047] In a fifth aspect, an embodiment of the present application further provides a processor, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any one of the embodiments of the first aspect above.

[0048] In the specific implementation process, the above-mentioned processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. This application does not limit the specific implementation of the processor and various circuits.

[0049] The technical effects obtained by the above-mentioned second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0051] Figure 2 This is a schematic diagram of an application scenario of an embodiment of the present application;

[0052] Figure 3 is another application scenario schematic diagram of an embodiment of the present application;

[0053] Figure 4 This is another application scenario schematic diagram of the embodiment of the present application;

[0054] Figure 5A is a schematic diagram of different effects of switching display areas in an embodiment of the present application;

[0055] Figure 5B It is a schematic diagram of the possible effects of switching display areas in a scene;

[0056] Figure 6 A schematic diagram of a flow chart of a display method according to an embodiment of the present application;

[0057] Figure 7A schematic diagram of a display effect of an embodiment of the present application;

[0058] Figure 8 A schematic diagram of a software architecture of an electronic device according to an embodiment of the present application;

[0059] Fig. 9 A schematic diagram of a sub-process included in an example of the present application;

[0060] Fig.10 This is a schematic diagram of a display method according to an example of the present application. DETAILED DESCRIPTION

[0061] In the following description, specific details such as specific system structures and technologies are provided for illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details.

[0062] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or their collections. The terms "comprising", "including", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0063] It should be understood that the "one or more" mentioned in this application refers to one, two or more than two, and the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B. The "and / or" in this article is just a way to describe the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0064] In addition, in order to clearly describe the technical solution of the present application, the words "first", "second", etc. are used to distinguish the same or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not necessarily limit the difference.

[0065] The phrases such as "one embodiment" or "some embodiments" described in the present application mean that the specific features, structures or characteristics described in the embodiment are included in one or more embodiments of the present application. Therefore, the phrases such as "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments" etc. that appear in different places in the present application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.

[0066] The display method provided in the embodiment of the present application can be applied to electronic devices. The electronic device can be a mobile phone, a tablet computer, a wearable device, a digital camera, a vehicle-mounted device, an augmented reality (AR) device, a virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a laptop computer, etc., and the embodiment of the present application does not limit this.

[0067] First, the possible structure of the electronic device in the embodiments of the present application is introduced.

[0068] Figure 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 1 The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0069] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0070] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0071] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0072] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0073] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0074] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created by the electronic device 100 during use (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0075] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0076] The electronic device 100 can implement audio functions, such as music playback, recording, etc., through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D and the application processor.

[0077] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0078] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor.

[0079] The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information. The display screen 194 is used to display images, videos, etc.

[0080] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor 180K can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0081] In other possible implementations, the electronic device to which the display method involved in the present application is applied may also have other structures. The embodiment of the present application does not particularly limit the specific structure of the execution subject of the image display method, as long as the code recording the image display method provided by the embodiment of the present application can be run to perform processing according to the image display method provided by the embodiment of the present application. For example, the execution subject of the display method provided by the embodiment of the present application may be a functional module in an electronic device that can call and execute an application, or may be a processing device applied to an electronic device, such as a chip.

[0082] With the development of computer technology, the types of electronic devices have diversified, and the display methods of applications configured in electronic devices have become more and more diverse. For example, an electronic device can use more than two display screens for display. Alternatively, the electronic device can be connected to an external display screen, and display together through the external display screen and the display screen of the electronic device sub-band. Alternatively, the electronic device can change the display area on the display screen. Therefore, when the system interface of the electronic device or the interface of the application program is displayed on the electronic device, it can also be switched to be displayed on different display screens, or displayed in different modes on the same display screen.

[0083] When the interface displayed by the electronic device switches between different display screens, or changes the display mode on the same display screen, the layout of the interface may change due to the change of the display area, which may cause display inconsistency. The display method provided in the embodiment of the present application can be applied to such scenarios. The following examples are given to introduce the scenarios to which the embodiment of the present application can be applied.

[0084] Figure 2 This is a schematic diagram of a scenario that may be involved in the embodiments of this application. Figure 2 In the tablet computer shown in FIG. 1 , the display screen 21 has a large area, so that the interface 22 of the target application running on the tablet computer can be displayed in full screen, as shown in FIG. Figure 2 As shown in (a) in the figure. In the case of full-screen display, the interface 22 of the target application includes multiple cards, each card includes multiple contents, the selected card is in display state, and the unselected cards are covered by the selected card. The contents in the cards of the interface 22 may be divided into multiple rows and columns. The interface 22 includes "Follow", "Recommendation" and "Fitness". In the selected card 25 of the interface 22 (i.e., the "Recommendation" card), the displayed content is divided into 4 columns. At the same time, Figure 2The displayed cards show brief information (such as pictures) corresponding to each card, as well as text descriptions of the card, such as "Thanks to Dewu, I won a prize for the first time", "Share, a great camera", "Look here if you haven't won yet", and "Try to be extravagant and see if you can fill up your backpack". Below the corresponding card, the user name and user avatar that posted the information corresponding to the card can also be displayed.

[0085] When using a tablet computer to display the interface 22 of the target application, the user may change the display mode of the interface 22 from the full-screen display mode to the reduced window display mode, such as Figure 2 The interface 23 shown in (b) is a window after the window is reduced. In the interface 23, there are still multiple cards. In the selected card 24 (i.e., the "recommended" card), the displayed content is divided into two columns. Since the interface 23 is smaller than the interface 22, compared with Figure 2 The interface 22 shown in (a) in FIG. Figure 2 The number of columns displayed in the interface 23 shown in (b) is smaller, and the target application can change the distribution of the content in the interface to adapt to different interface sizes in different situations. Figure 2 The mode shown in (b) is changed to Figure 2 In the mode shown in (a) of the target application, the layout of the interface should be changed from Figure 2 The style shown in (b) is changed to Figure 2 The style shown in (a) in .

[0086] Similarly, when the user changes the orientation of the display screen 21, the display screen 21 may change from a horizontal display mode to a vertical display mode, thereby possibly changing the size of the target application interface that can be displayed in the horizontal visual direction. Furthermore, the number of columns displayed in the interface of the target application will change due to the switching between the horizontal display mode and the vertical display mode. In an embodiment of the present application, the orientation of the display screen may include horizontal and vertical. When the orientation of the display screen is horizontal, the horizontal dimension in the visual direction is greater than the vertical dimension in the visual direction. When the orientation of the display screen is vertical, the horizontal dimension in the visual direction is less than the vertical dimension in the visual direction.

[0087] Figure 3 This is another possible scenario diagram of an embodiment of the present application. Figure 3 In the scenario shown, the electronic device may be a foldable screen mobile phone, having a foldable screen and a non-foldable screen. Figure 3 The folding screen shown is the inner screen of the phone, and the non-folding screen is the outer screen of the phone. Figure 3 (a) and Figure 3 In the folded state shown in (c), the mobile phone displays the non-folding screen. Figure 3 (b) and Figure 3 In the unfolded state shown in (d), the mobile phone is displayed through the folding screen. Figure 3 In the scenario, the non-folding screen can be called the outer screen of the electronic device, and the folding screen can be called the inner screen of the electronic device.

[0088] When the mobile phone displays the interface of the target application through a non-folding screen, the interface of the target application is relatively small. Accordingly, the layout style in the target application is different from the layout style when the mobile phone displays the interface of the target application through a folding screen. Figure 3 In the folded state shown in (a), the size of the target application interface in the horizontal direction is significantly smaller than Figure 3 The visual horizontal size of the target application interface in the expanded state shown in (b) of FIG. Figure 3 The interface shown in (a) in FIG. 1 is limited in the horizontal direction of vision. Figure 3 In the folded state shown in (c), the size of the target application interface in the vertical direction is significantly smaller than Figure 3 The size of the interface of the target application in the visual longitudinal direction is determined in the expanded state shown in (d) of FIG. Figure 3 In the interface shown in (c), the content that can be displayed in the visual vertical direction is limited.

[0089] Figure 4 A schematic diagram of another possible scenario shown in an embodiment of the present application. Figure 4 The computer 41 shown is connected to an external display screen 42. The computer 41 is equipped with a built-in display screen 43. The contents of the computer 41 can be displayed on both the external display screen 42 and the built-in display screen 43. Figure 4 In the scenario shown, the external display screen 42 and the built-in display screen 43 may display a portion of the content together.

[0090] For example, when the computer 41 runs the target application and displays the interface of the target application, the built-in display screen 42 can be used to display one interface of the target application, and the external display screen 43 can display another interface of the target application. Alternatively, the built-in display screen 42 and the target display screen 43 can be used to display the interface of the target application and the interface of other applications, respectively. When the computer 41 displays the interface of the target application, the interface of the target application can be switched between the external display screen 43 and the built-in display screen 42. At the same time, the size, resolution and other configurations of the built-in display screen 42 and the external display screen 43 may be different.

[0091] Figure 4The built-in display screen and the external display screen shown can both detect the orientation of the display screen using a gyroscope or other device. When the orientation of the display screen is different, the size of the target application interface that can be displayed in the horizontal or vertical direction will also change accordingly.

[0092] exist Figures 2 to 4 The scenario shown shows that due to the display screen of the electronic device, when the target application interface switches on different display screens or converts to different modes on the display screen, the target application interface can display different contents in the horizontal and vertical directions of vision. Figures 2 to 4 In addition to the scenario shown, factors of the target application itself may also cause or aggravate the problem that the content that can be displayed by the target application in the horizontal and vertical directions of vision is not displayed.

[0093] If the target application can be displayed in a size that is too small in the horizontal or vertical direction, some content in the target application interface will not be able to obtain sufficient display area in the horizontal or vertical direction, causing the screen, card or control to be too small.

[0094] On the other hand, if the target application can be displayed in a size that is too large in the horizontal or vertical direction, and the layout of the target application interface does not change, it may cause the screen, card or control to be overly enlarged.

[0095] In some cases, the interface of the application program configured by the electronic device may include an uncommon editing area and a common editing area. Figure 5A The browser application interface shown in (a) in the figure includes a web page display frame 51, in which the web page abbreviation, URL, website operation controls, etc. are displayed. In the web page display frame 51, the specific content of the web page is not displayed, and the user cannot view the web page content by sliding the touch screen or rolling the mouse in the web page display frame 51. In the web page content display part 52, the user can slide the touch screen up and down or roll the mouse to view the web page content. Therefore, if the change in the display area causes the area size that can be used to display the content display part 52 to be too small, the user cannot operate the content display part 52 normally, such as Figure 5A As shown in (b) in .

[0096] exist Figure 2 Based on the scenario shown, if the first target application is from Figure 2 The area shown in (b) in the figure is switched to Figure 2 The area shown in (a) shows that the first target application may retain Figure 2 The display parameters shown in (b) appear Figure 5BThe one shown shows an incongruous situation.

[0097] In addition to the browser application, the target application may be an application such as a document editing application.

[0098] The above content is only used to explain the application scenario of the display method provided in the embodiment of the present application, and is not used to limit the embodiment of the present application. Figures 2 to 5B In scenarios similar to the scenario shown in FIG. 1 , the display method of the embodiment of the present application is still applicable. Next, the implementation process of the display method of the embodiment of the present application is introduced. Figure 6 As shown, the method provided in the embodiment of the present application may include Figure 6 Steps S61 to S64 are shown.

[0099] Step S61: Detecting information about a display area change event of a first target application; the display area change event is used to indicate that the interface of the first target application is changed from a first area to a second area.

[0100] In the embodiment of the present application, the first target application may be a system application of the electronic device, which is an application that comes with the system pre-configured by the electronic device, that is, an application that exists in the electronic device before the electronic device is first started. For example, the first target application may be a clock application, a memo application, or a system camera application.

[0101] Alternatively, the first target application may also be a third-party application configured in the electronic device, that is, an application installed in the electronic device after the electronic device is started for the first time.

[0102] The electronic device can monitor the display area change event of the first target application, and generate information that the display area change event has occurred when the display area of ​​the first target application changes. The information that the display area change event has occurred can be used to indicate that the display area has changed, rather than to indicate whether the change of the display area has been completed. Alternatively, the information that the display area change event has occurred can be used to indicate that the display area has completed the change. In this case, if the display area changes from the first area to the second area within a set shorter time threshold, and then changes from the second area to the first area within a very short time, it can be considered that the display area change event has not occurred.

[0103] In an embodiment of the present application, the first area may be an area displayed by the first target application before the display area change event occurs, and the second area may be an area displayed by the first target application after the display area change event occurs. The interface of the first target application may be an interface for displaying the running information of the first target application. The interface of the first target application may be entirely used to display information generated when the first target application is running. Alternatively, the interface of the first target application displays information about the running of the first target application and information about the running of other applications. The interface of the first target application may have certain boundaries.

[0104] The first area and the second area may be different areas on the display screen of the electronic device. The first area and the second area may be areas of different sizes, or may be areas of the same size but facing different directions. The display area change event that causes the interface to change from the first area to the second area may include at least one of the following situations.

[0105] In the first case, the user rotates the display screen of the electronic device so that the display screen changes from a horizontal display state to a vertical display state, or from a vertical display state to a horizontal display state.

[0106] If the display screen of the electronic device is locked, the display screen is displayed in a horizontal or vertical orientation regardless of how the display screen is rotated, and rotating the display screen is not recognized as a display area change event.

[0107] Case 2: The user performs a first gesture operation on the electronic device, and the first gesture operation is used to instruct the electronic device to switch from a state of displaying the interface of the first target application in full screen to a state of displaying the desktop, and the interface of the first target application changes from full screen display to floating window display.

[0108] Alternatively, the user performs a second gesture operation on the electronic device, and the second gesture operation is used to instruct the electronic device to switch from displaying the desktop to displaying the interface of the first target application in full screen, and the interface of the first target application changes from being displayed in a floating window to being displayed in full screen.

[0109] Case three: when the interface of the first target application is not displayed in full screen, the user performs a third gesture operation, and the third gesture operation is used to instruct the electronic device to change the size of the interface of the first target application.

[0110] Case 4: the interface of the first target application is switched from being displayed on the first display screen of the electronic device to being displayed on the second display screen of the electronic device.

[0111] Case 5: The first target application generates a pop-up window because it receives instructions such as jumping to the database or jumping to the gallery. The pop-up window is used to display files in the database or to display pictures in the gallery.

[0112] Case 6: The first target application receives a file opening instruction, opens the target file, and generates a pop-up window, which is used to display the target file.

[0113] Case 7: The first target application generates a pop-up window due to receiving an instruction, and then closes the pop-up window according to the received instruction.

[0114] In this case, although the first target application displays the same interface before and after generating the pop-up window, and the interface of the first target application may always be displayed on the same display screen, the information generated by the first target application for rendering may be different. Therefore, it can also be considered that a display area change event has occurred.

[0115] Step S62: obtaining a first display parameter of the first target application for displaying the interface in the second area.

[0116] In an embodiment of the present application, the first display parameter of the first target application that is about to display the interface in the second area can be actively obtained from the application layer of the electronic device. In an embodiment of the present application, the display parameter may include an item of the display parameter and a value of the display parameter. The item of the display parameter may also be referred to as the type of the display parameter, such as the size of the control, the color of the control, the number of controls, the size of the upper border, or the number of cards. The value of the display parameter may be a specific value corresponding to the type of the display parameter, such as a control size of 2×3, a pixel value of the control color of (255,0,0), or the number of cards is 5, etc.

[0117] After the information of the display area change event is received by the process of the first target application, the process of the first target application determines the corresponding first display parameter in the second area according to the information of the display area change event, and then sends the first display parameter to the view module of the electronic device, so that the view module displays the interface of the first target application according to the first display parameter. In step S62, the first display parameter can be obtained from the information sent by the first target application to the view module.

[0118] The above-mentioned view module is a module used to generate a view in an electronic device. In an electronic device, a view can be a rectangular area on a display screen, and the view module is used to generate a view in this rectangular area. In the embodiment of the present application, the view module can also be called a view framework.

[0119] In one possible implementation, the first display parameter may be all parameters of the first target application display interface in the second area, including parameters about controls, parameters about colors, parameters about layout, or parameters about font size, etc. In another possible implementation, the first display parameter may be a part of all parameters of the first target application display interface in the second area. For example, it is preset that when the interface of the first target application switches from the first area to the second area, only the parameter changes of the layout are concerned, so that only the parameters of the layout are obtained from all the display parameters sent by the first target application to the view target.

[0120] In a possible implementation, the first display parameter may be actively reported by the first target application when the display area changes, or may be passively acquired by other modules.

[0121] In a possible implementation, the interface of the first target application displayed in the first area may be different from the interface of the first target application displayed in the second area. For example, the first target application displays a login interface in the first area, and during the login process, a display area change event occurs. After the display area change event is completed, the post-login interface is displayed in the second area. In this case, the first display parameter obtained in step S62 may be a parameter of the interface of the first target application displayed in the second area.

[0122] In a possible implementation, after the display area is switched from the first area to the second area, the current content of the interface of the first target application indicates that the interface content of the first target application is about to change, and then the first display parameter is obtained after the interface content changes. For example, when a display area switching event occurs, the interface content displayed in the second area is a login interface, and it can be judged based on the login interface that in a short period of time, the first target application will jump to other interface content because the login operation is completed, and the display parameters can be obtained at intervals of a set time length, and the first display parameters are obtained when the interface content changes to the interface content after the login operation is completed.

[0123] In a possible implementation, the display parameters to be monitored can be pre-set for the first target application, and the first display parameters are obtained when the display parameters to be monitored are included in the interface of the first target application. If the display parameters to be monitored are not included in the interface of the first target application, the step of obtaining the first display parameters is not performed. For example, the first target application is an information recommendation application, and different recommended information is recommended in the form of cards in the first target application. In response to the user clicking on a specific card, the recommended information corresponding to the card is displayed.

[0124] As in Figure 2Based on the scenario shown, multiple cards are displayed in the interface 21 of the first target application, each card displays a brief content of the recommended information. Figure 2 The operation instructions of one of the multiple cards shown in the figure display the detailed information corresponding to the card, such as Figure 7 As shown. Figure 2 In the interface 21 of the first target application shown in FIG. 1 , the display parameters include the number of display columns. Figure 7 In the interface of the first target application shown in FIG. 1 , the display parameter does not include the number of display columns. At the same time, the display parameter preset for monitoring the first target application is the number of display columns. Figure 7 In the case of the interface shown, when a display area change event occurs, step S62 may not be executed. That is, in a possible implementation, when the display parameters corresponding to the interface displayed by the first target application include the first display parameter, step S62 is executed. When the display parameters corresponding to the interface of the first target application do not include the first display parameter, step S62 and subsequent steps may not be executed, or, when displayed in the second area, if the content of the interface of the first target application changes, when the display parameters corresponding to the interface of the first target application include the first display parameter, step S62 and subsequent steps are executed.

[0125] In another possible implementation, if the display parameters corresponding to the interface of the first target application do not include the first display parameter, a preset default value may be assigned to the first display parameter, and then the first display parameter is obtained.

[0126] Step S63: When it is determined that a preset adjustment condition is met based on at least one of the first display parameter and the second area, a second display parameter corresponding to the first display parameter is obtained; the second display parameter is a preset reference display parameter when the interface of the first target application is displayed in the second area.

[0127] In one embodiment, step S63 may be to obtain a second display parameter corresponding to the first display parameter when at least the first display parameter determines that the preset adjustment condition is satisfied. Meanwhile, the second display parameter corresponds to at least the first display parameter. The second display parameter is a preset display parameter, and when the interface of the target application is displayed in the second area using the second display parameter, a preset display effect can be achieved.

[0128] In the embodiment of the present application, the preset adjustment condition is used to indicate that displaying the interface of the first target application using the first display parameter will result in an inharmonious display. Exemplarily, the preset adjustment condition may include at least one of the following.

[0129] Condition 1: The first display parameter is different from the second display parameter.

[0130] In a possible implementation, a second display parameter for reference may be set for the interface of the first target application displayed in the second area. The second display parameter may have a corresponding relationship with the second area and the first target application. For example, when the first target application is displayed in full screen on a tablet computer, the corresponding second display parameter is second display parameter 1; when the first target application is displayed on the outer screen of a foldable screen mobile phone, the corresponding second display parameter is second display parameter 2.

[0131] If the first target application is displayed in the second area, and the display parameters corresponding to the interface of the first target application include the first display parameters, it can be determined whether the first display parameters are the same as the second display parameters. If they are the same, it is determined that no adjustment is required and the step of obtaining the second display parameters is not performed.

[0132] The first display parameter is different from the second display parameter, which may include that the first display parameter and the second display parameter are of the same type but have different values. For example, the type of the first display parameter is the number of columns, the type of the second display parameter is the number of columns, the value of the first display parameter is 3, and the value of the second display parameter is 4.

[0133] If a default value is assigned to the first display parameter, the default value may be compared with the value of the second display parameter to determine whether the first display parameter and the second display parameter are the same.

[0134] Condition 2: The difference between the values ​​of the first display parameter and the second display parameter is outside a preset range.

[0135] For example, the type of the first display parameter is control size, the type of the second display parameter is control size, the value of the first display parameter is N1, the value of the second display parameter is N2, and the preset range is N3. If the difference between N1 and N2 is less than N3, the preset adjustment condition is not met, otherwise the preset adjustment condition is met.

[0136] If a default value is assigned to the first display parameter, the default value can be compared with the value of the second display parameter to determine whether the difference between the values ​​of the first display parameter and the second display parameter is outside a preset range.

[0137] Condition three: the display area change event has not ended.

[0138] In the embodiment of the present application, the display area change event may start when certain trigger information is detected, and the display area change is completed in a short time, and the display area change operation is performed. Whether the display area change event is completed can be determined in a variety of ways.

[0139] Method (1): If the display area change is completed, information indicating that the display area change event is completed can be generated. When the information indicating that the display area change event is completed is detected, it can be determined that the display area change event is completed. Otherwise, if the information indicating that the display area change event is completed is not received, it can be determined that the display area change event is not completed.

[0140] Method (2): Within a set time after the information of the display area change event is generated, the display area change event can be considered to be over.

[0141] Condition 4: The display size of the second area is within a preset size threshold range.

[0142] In an embodiment of the present application, the display size of the second area is within a preset size threshold range, which may include at least one of the following: (1) the size of the second area along at least one preset direction is within a preset size threshold range; (2) the ratio of the sizes of the second area along at least two preset directions is within a preset size threshold range.

[0143] The preset direction may include a visual horizontal direction, a visual vertical direction, or a diagonal direction of a rectangular area, etc. In a possible implementation, the display size may be determined in combination with the model of the display screen of the electronic device.

[0144] Condition 5: The file corresponding to the display area change event is in the playback process.

[0145] In the embodiment of the present application, the file corresponding to the display area change event may be at least one of a video file, an animation file, a picture file, a sound effect file, or a vibration effect file.

[0146] When a display area change event occurs, the first target application or the system of the electronic device may generate information about the display area change event. In response to the information about the display area change event, the first target application or the system of the electronic device may play the corresponding file. In the case where the first target application plays the corresponding file, the playback progress of the corresponding file may be obtained from the first target application to determine whether the file corresponding to the display area change event is in the playback process. In the case where the system of the electronic device plays the corresponding file, the playback progress may be obtained from the playback module of the system of the electronic device to determine whether the corresponding file is in the playback process.

[0147] Step S64: displaying the interface of the first target application in the second area according to the second display parameter.

[0148] In the embodiment of the present application, when implementing step S64, the second display parameter can be sent to the first target application, so that the first target application uses the second display parameter to display the interface in the second area. Alternatively, the second display parameter can be sent to the view module of the electronic device, so that the view module uses the second display parameter to display the interface of the first target application. Alternatively, the second display parameter can also be sent to the rendering module of the electronic device, so that the rendering module uses the second display parameter to display the interface of the first target application.

[0149] When the content of other applications is also displayed in the interface of the first target application, the content of the first target application and the content of other applications may be displayed simultaneously according to the second display parameter.

[0150] Through the display method provided in the embodiment of the present application, it is possible to actively detect whether the first display parameter meets the preset adjustment conditions when a display area change event occurs, and adjust the display parameters of the target application display interface in the second area when the preset adjustment conditions are met, and the second display parameters are pre-set display parameters. When the interface of the first target application is displayed in the second area using the second display parameters, the preset display effect can be achieved, making the interface of the first target application more coordinated.

[0151] exist Figure 2 In the corresponding scenario, the interface of the first target application may include interface 21 or interface 23. Figure 2 is displayed in the first area shown in (a) of the diagram, and then changes to Figure 2 The display is displayed in the second area shown in (b) in FIG. 1 and then switched to Figure 2 When the first target application is displayed in the first area shown in (a), it is also considered that a display area change event has occurred. Figure 2 In the (b) area, return to Figure 2 When the first target application is displayed in the area shown in (a), the first display parameter can be obtained, and when the first display parameter is greatly different from the second display parameter used for reference, the interface of the first target application is displayed according to the second display parameter, so that the interface of the first target application is kept as close as possible. Figure 2 The effect shown in (a) in the figure should be avoided as much as possible to avoid inharmonious interface display.

[0152] exist Figure 3 In the corresponding scenario, when the interface of the first target application is switched from being displayed on a folding screen to being displayed on a non-folding screen, or when the interface of the first target application is switched from being displayed on a non-folding screen to being displayed on a folding screen, the parameters can be adjusted so that the interface of the first target application has a more coordinated layout and display effect on both the folding screen and the non-folding screen.

[0153] exist Figure 4 In the corresponding scenario, after the electronic device is connected to an external display, when the interface of the first target application is switched on different displays, it can avoid the problem of display inconsistency of the interface of the same target application due to the large difference in size between the external display and the built-in display of the electronic device.

[0154] exist Figure 5A In the scenario shown, the electronic device can avoid the problem that the user has difficulty operating the content display part due to the interface layout by adjusting the display ratio of the frame part (corresponding to the web page display frame) and the content display part in the interface.

[0155] Next, Figure 6 The method of obtaining the second display parameter in the method shown is introduced. When running on different electronic devices, the display effect of the interface of the first target application may be different, and when displayed in different areas of the same electronic device, the interface of the first target application may also present different effects.

[0156] Thus, in one possible implementation, a first target application can be run on an electronic device for testing, and the first target application can be tested using multiple display parameters. Then, based on the display effect of the interface of the first target application in the second area, a second display parameter can be determined from the multiple display parameters, so that when the first target application is displayed in the second area using the second display parameter, the display effect is optimal.

[0157] In the system of the electronic device, the corresponding relationship between the model of the electronic device, the second display parameter, the second area and the first target application can be recorded in advance, and a corresponding relationship between the model of the electronic device, the second display parameter, the second area and the first target application can be created in the system of the electronic device for implementing Figure 6 The functional modules of the display method shown.

[0158] For example, in Figures 1 to 6 Based on the embodiment shown, the electronic device may adopt Figure 8 The system architecture is shown. Figure 8 The electronic device shown runs an Android system. In other embodiments, the electronic device can be equipped with other types of operating systems.

[0159] See also Figure 8In a layered architecture, the system of an electronic device is divided into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system includes multiple layers, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system layer, and a kernel layer. In the case where the electronic device is a touch screen, the user can use the touch screen to send instructions for switching display areas from the kernel layer to the application layer layer by layer, and generate information on the occurrence of a display area change event.

[0160] The application layer can include a series of application packages. Figure 8 As shown, the application package may include: system user interface (system UI or system UI), third-party browser application, photo album, camera, third-party game application, pedometer and map applications. These applications can all be applied to the display method provided in the embodiment of the present application. For example, multiple cards can be configured in the interface of the pedometer application, and each card displays information on step statistics. Multiple controls can be configured in the interface of the third-party game application, and each control is used to receive operation instructions corresponding to the user. The interface of the album application is used to display a thumbnail of at least one image, or at least one image. The interface of the camera application includes an image preview area and at least one control for controlling shooting. The interface of the map application includes a partial map image browsing area and at least one control for controlling the map application to display a map.

[0161] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 8 As shown, the application framework layer may include a window manager service (WMS), a sensor manager, a resource manager, and a power manager (power manager or power manager service). In the process of changing the interface of the target application from the first area to the second area, the sensor manager may be used to receive information reported by at least one sensor, and at least one sensor receives a user's instruction, and the user's instruction may be used to instruct the interface of the target application to change from the first area to the second area. The sensor manager may send information related to the window to the window management service, and the window management service may send a control instruction to the application according to the information transmitted by the sensor manager to control the interface change of the application.

[0162] Still refer to Figure 8, the system layer includes the Android runtime. The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The system layer also includes native C / C++ libraries (also called native local libraries), which include various related function interfaces, such as the open graphics library. In an embodiment of the present application, the system layer also includes system services and UI adaptive services of the electronic device. The UI adaptive service is a functional module set in the system layer in order to implement the display method provided in the embodiment of the present application. Figure 8 The UI adaptive service shown can execute the display method provided by any embodiment of the present application.

[0163] The hardware abstraction layer (HAL) is an interface layer between the operating system kernel and the hardware circuit. Its purpose is to abstract the hardware and realize the interaction between the hardware and the system.

[0164] The kernel layer (linux kernal) is the layer between hardware and software. The kernel layer contains at least the display driver module, camera driver module, touch screen driver module and graphics driver module.

[0165] Under the above five-layer architecture, the receiving device is also provided with a hardware layer, which may include the aforementioned electronic device hardware components, such as display screens, buttons, etc.

[0166] In one embodiment, the module used to implement the method of the embodiment of the present application is delivered in the form of a binary APK, located at the application layer, and needs to rely on underlying system capabilities such as the application framework layer, native local library, HAL, and kernel layer.

[0167] exist Figure 8 On the basis of the software architecture shown, the pre-set second display parameter can be configured in the UI adaptive service in the form of a whitelist. In addition to the pre-configured second display parameters of the first target application in the second area in the whitelist, reference display parameters of other applications in the corresponding display area can also be configured. The whitelist configured in the system of the electronic device can be referred to as a whitelist preset in the electronic device in the embodiment of the present application. In the whitelist preset in the electronic device, the model of the electronic device to which the default whitelist applies is the model of the electronic device configured with the whitelist. Exemplarily, a preset whitelist is shown in Table 1 below.

[0168]

[0169] Table 1

[0170] As can be seen from the whitelist shown in Table 1, for the same application, multiple reference display parameters can be set, and each reference display parameter can be equivalent to Figure 6 The second display parameter of the embodiment shown in FIG. At least one display area can be determined according to the target display screen and the display state, and the determined at least one display area is equivalent to Figure 6 The second region of the embodiment shown in .

[0171] During the operation of the target application, the content of the target application's interface may change, and thus, the display parameters in the target referenced interface may also change. In a possible implementation, different reference display parameters may be configured for different interfaces during the operation of the target application. In the case where multiple reference display parameters are configured for the same target application, different reference display parameters may be different display items. For example, for the first target application, the number of columns and the size of controls may be configured, and the number of columns and the size of controls may be different reference display parameters, respectively.

[0172] In some cases, some models of electronic devices may not need to be configured with a whitelist. That is, a whitelist can be set for some electronic devices, and on electronic devices with a whitelist set, a display inconsistency problem may occur due to a display area change event.

[0173] In one embodiment, Figure 6 On the basis of the method shown, before step S61, it also includes: when the electronic device is started, detecting the preset whitelist; if the preset whitelist exists, registering the change notification broadcast of the first target application according to the preset whitelist; the change notification broadcast is used to notify and indicate that a first monitoring strategy is determined based on the changed first target application, and the first monitoring strategy is used to indicate monitoring the first target application for a display area change event.

[0174] exist Figure 8 Based on the software architecture shown, when the electronic device is started, it starts from the hardware circuit, and then starts from the hardware abstraction layer upward in sequence. When the system layer of the electronic device is started, the system service of the electronic device is pulled up, and then it is detected whether the preset whitelist exists. The preset whitelist includes a whitelist preset in the electronic device and / or a whitelist on the network side.

[0175] The whitelist preset in the electronic device may refer to a whitelist generated together with the system of the electronic device, configured in the system of the electronic device, and may be stored in the form of a system file.

[0176] The whitelist on the network side may refer to a whitelist that the electronic device can obtain through a wired network or a wireless network. The whitelist on the network side may be provided by a server, or may be provided by an external device that is wired or wirelessly connected to the electronic device. In the case where the whitelist on the network side is provided by a server, the server side that provides the target application may provide the whitelist on the network side, or the server side that provides the system update file of the electronic device may also provide the whitelist on the network side.

[0177] In one embodiment, Figure 6 On the basis of the illustrated embodiment, before step S63, the display method further includes: obtaining a view strategy corresponding to a display area change event from a view frame of the electronic device; the view strategy includes a display state of the electronic device after a display area change event occurs; the first display parameter is a display parameter of the first target application corresponding to the view strategy; querying a second display parameter corresponding to the view strategy recorded in a preset whitelist; and determining whether a preset adjustment condition is satisfied based on the first display parameter and the second display parameter.

[0178] In the embodiment of the present application, the view strategy corresponds to the display area change event. When the display area change event occurs, the window management module of the electronic device distributes the configuration information corresponding to the display area change event to the application. After receiving the configuration information, the target application sends a refresh message to the view module of the application layer. The view module determines the view strategy of the view according to the refresh message, thereby generating a new view in the changed second area and presenting the interface of the target application in the new view.

[0179] In an embodiment of the present application, there may be a corresponding relationship between the view strategy and the first display parameter. In different display areas of the electronic device, the target application is configured with corresponding view strategies and display parameters. Different view strategies may correspond to different first display parameters. For example, when the interface of the target application is changed from being displayed in the first area to being displayed in the second area, the corresponding view strategy may be view strategy 1, and when the interface of the target application is changed from being displayed in the second area to being displayed in the first area, the corresponding view strategy may be view strategy 2.

[0180] In one embodiment, at any time when the display method is running, information about changes to the whitelist can also be received to update the whitelist. Figure 6On the basis of the illustrated embodiment, the following steps may be included before, after or simultaneously with any step: receiving a whitelist change broadcast pushed by the network side; executing at least one of the following according to the whitelist change broadcast: changing the first monitoring strategy for the display area change event of the first target application; the first monitoring strategy is used to indicate monitoring of the display area change event of the first target application; changing the second display parameter; adding a second monitoring strategy for the display area change event of the second target application; the second monitoring strategy is used to indicate monitoring of the display area change event of the second target application.

[0181] Exemplarily, the whitelist on the network side may include models of electronic devices, as shown in Table 2 below.

[0182]

[0183] Table 2

[0184] In the embodiment of the present application, the first target application may be any one of the multiple applications recorded in Table 1 or Table 2, and the second target application may be any other one of the multiple applications recorded in Table 1 or Table 2.

[0185] In an embodiment of the present application, multiple target applications can be recorded in a whitelist, and different monitoring strategies can be set for each target application. The monitoring strategy can be used to indicate monitoring of at least one monitoring item of the target application, and the monitoring item can be an item (or type) of a display parameter. Thus, when a display area change event occurs and the display parameters of the interface of the first target application include the monitored item, the first display parameter is obtained. Exemplarily, the monitoring items of the monitoring strategy can include at least one of the following.

[0186] (a) Display parameter items.

[0187] Correspondingly, the reference display parameters corresponding to the items of the monitored display parameters may be configured in the whitelist.

[0188] (ii) Display area change events.

[0189] Exemplarily, the display area change event may include a directional change from one area to another area. For example, if the monitored display area change event is: the display area changes from the first area to the second area, then if the display area changes from the second area to the first area, it can be considered that no display area change event occurs.

[0190] (iii) The type of interface.

[0191] In a possible implementation, the preset interface of the target application can be monitored, while other interfaces of the target application are not monitored. For example, when the target application is a video playback application, the display parameters of the video information preview interface can be monitored. When the video playback application plays a video in full screen, the interface presented is the video playback interface, and the video playback interface is not monitored.

[0192] (iv) Display screen type.

[0193] In a possible implementation, when the electronic device includes more than two display screens, the type of the display screen can be monitored. When a display area change event occurs on a specified display screen, it is monitored whether the parameters corresponding to the interface of the target application include the monitored display parameters.

[0194] In a possible implementation, different monitoring strategies may be configured for different target applications.

[0195] In some other possible implementations, the monitoring policy may be used only to indicate monitoring the target application or not monitoring the target application. If the target application is monitored, the monitoring policy may be set to a first value to indicate monitoring the target application. If the target application is not monitored, the monitoring policy may be set to a second value to indicate not monitoring the target reference.

[0196] In one implementation, Figure 6 Based on the method, after step S61, in response to the information of the display area change event, the display area change operation is started. At the same time, in order to achieve a smooth visual transition, the corresponding animation can be played during the execution of the display area change operation. Therefore, the preset adjustment condition includes the case where the animation corresponding to the display area change event is in the process of being played. After step S61, the display method further includes: in response to the information of the display area change event of the first target application, playing the animation.

[0197] In a possible implementation, the preset adjustment condition includes that when the animation corresponding to the display area change event is in the process of playing, the adjustment of the display parameters can be performed during the animation playing process to avoid sudden changes in the display parameters affecting the user's visual experience.

[0198] For some electronic devices, since the configured display screen may have a relatively special size, such as tablet computers, wearable smart devices, folding screen electronic devices, etc., when displaying the interface of the application on such an electronic device, there may be a problem of inconsistency between the interface layout and the display screen of the electronic device. For example, tablet computers generally may have a larger display screen. If the application is laid out according to the original layout method, it may result in using a larger display area to display less content, resulting in the card being too large or the card having too much blank area. As a result, the systems of some electronic devices have optimized the layout of the application and tampered with the layout of some applications. However, when the system of the electronic device tampered with the application layout, tampering failure may occur. One of the reasons for the tampering time limit is that the application will readjust the layout parameters after the window shape changes, resulting in the failure of the parameters tampered with on the system side.

[0199] In a specific example of the present application, a UI adaptive service function module is set at the system layer of the electronic device, and the display method provided by any embodiment of the present application is executed through the UI adaptive service function module and other necessary function modules in the system of the electronic device to adjust the interface layout of the target application. Fig. 9 As shown, when the system of the electronic device is started, the process of the UI adaptive service implementing the display method provided in the embodiment of the present application includes the following steps.

[0200] Step S91: The hardware layer of the electronic device is started, and the software framework of the electronic device is pulled up.

[0201] During the boot process, the electronic device starts from the hardware layer and performs boot operations toward the application layer.

[0202] Step S92: The system service in the system layer of the electronic device is started.

[0203] Step S93: the system service detects whether there is a preset whitelist in the electronic device, and obtains a first detection result.

[0204] The preset whitelist may be stored in a location set in the system layer of the electronic device. Therefore, when the system service executes step S93, it may detect at the location set in the system layer of the electronic device to obtain a first detection result.

[0205] In a specific example, the whitelist preset in the electronic device is stored in the UI adaptive service of the electronic device.

[0206] Step S94: The system service detects whether there is a whitelist on the network side and obtains a second detection result.

[0207] The system service can obtain the corresponding detection result by sending query information to at least one network server.

[0208] In a possible implementation, during the startup of the electronic device, it may be impossible to determine whether there is a whitelist on the network side because the network is not connected. In this case, step S94 can be temporarily stopped, and the execution status of step S94 can be recorded at the system layer of the electronic device. After the electronic device is connected to the network, step S94 can be continued.

[0209] Step S95: When the first detection result or the second detection result indicates that there is a preset whitelist corresponding to the electronic device, the system service starts the UI adaptive service.

[0210] In an embodiment of the present application, the UI adaptive service can be set at the system layer.

[0211] Step S96: The UI adaptive service parses the preset whitelist to obtain a first parsing result.

[0212] Step S97: The UI adaptive service parses the whitelist on the network side to obtain a second parsing result.

[0213] Step S98: When the second analysis result indicates that there is a whitelist on the network side, the UI adaptive service registers the cloud push broadcast according to the analysis result.

[0214] In this example, cloud push broadcast is used to receive cloud push broadcast information sent by the network server. When the whitelist on the network side changes, the network server can send cloud push broadcast information to all electronic devices. After the electronic device registers cloud push broadcast, the electronic device can receive cloud push broadcast information sent by the network side server.

[0215] Step S99: When the first analysis result indicates that there is a preset whitelist, the UI adaptive service registers the application change broadcast in the electronic device system.

[0216] In this example, the application change broadcast is used to notify the UI adaptive service of information about changes to the target application. The changes to the target application include installation, uninstallation, or other forms of changes to the target application.

[0217] pass Fig. 9 According to the process shown, when a display area change event occurs during the operation of the target application, the electronic device can display the interface of the target application according to the display parameters in the preset whitelist.

[0218] exist Fig. 9 Based on the example shown, after parsing the whitelist, the display area change event corresponding to the target application is monitored according to the target application and the corresponding display parameters configured in the whitelist, and the display parameters corresponding to the interface of the target application are adjusted in real time. The specific implementation process includes the following steps: Fig.10 Steps shown.

[0219] Step S101: WMS detects information about a display area change event.

[0220] The display area change event may be caused by a change in the orientation of the display screen of the electronic device. In this case, the sensor of the electronic device may first detect the change in the orientation of the display screen, and then the sensor generates corresponding information and reports it to the application layer layer by layer. If the function of the electronic device to change the view orientation with the orientation of the display screen is not turned off, the interface of the first target application may change with the change in the orientation of the display screen. In this case, the WMS of the application framework layer first receives the corresponding information generated by the sensor, and then determines the information that the real area change event has been detected based on the corresponding information generated by the sensor.

[0221] In a possible implementation, if the function of the electronic device to change the view orientation with the display screen orientation is turned off, the interface of the first target application may not change with the change of the display screen orientation. In this case, even if the display screen orientation changes, the WMS may not perform step S101.

[0222] In another possible implementation, the display area change event is generated by a user manually adjusting the interface size of the target application in the area currently displayed by the target application. In this case, the sensor of the electronic device may first detect the change in the orientation of the display screen, and then the sensor generates corresponding information and reports the information generated by the sensor layer by layer. The WMS determines that the real area change event has been detected based on the corresponding information received from the sensor.

[0223] The user manually adjusts the size of the target application interface, which may include the user performing a first gesture operation on the target application interface, the electronic device displaying the desktop according to the first gesture operation, and displaying the target application interface in a floating window, and changing the size of the target application interface according to the user manually adjusting the edge of the target application interface.

[0224] Step S102: The WMS triggers the system UI to play the animation corresponding to the display area change event.

[0225] In the embodiment of the present application, the animation corresponding to the display area change event may be related to the target application, and the first area and the second area before and after the display area change event occurs.

[0226] In a possible implementation, if the function of the electronic device to change the view orientation according to the orientation of the display screen is turned off, then when the orientation of the display screen of the electronic device changes, step S102 may not be performed.

[0227] Step S103: The WMS sends information about the display area change event to the first target application.

[0228] In an embodiment of the present application, the WMS may send information on the occurrence of a display area change event to the first target application by distributing a configuration instruction (dispatchconfig), so that the first target application changes the interface according to the information on the occurrence of the display area change event.

[0229] Step S104: the first target application sends a refresh instruction to the view module of the electronic device in response to the information of the display area change event.

[0230] In the embodiment of the present application, the refresh instruction is used to refresh the interface of the first target application, so that the interface of the first target application changes with the display area change event.

[0231] Step S105: the adaptive UI service obtains the view strategy of the interface of the target application from the view module.

[0232] In an embodiment of the present application, the view module may feed back the view strategy after the refresh instruction to the adaptive UI service.

[0233] Step S106: The UI adaptive service obtains a first display parameter corresponding to the view strategy from the first target application.

[0234] In the embodiment of the present application, the first target application stores default display parameters for each different view strategy. If the system of the electronic device fails to tamper with the display parameters of the first target application, the first target application is displayed according to its own default display parameters.

[0235] Step S107: The UI adaptive service obtains the animation status from the system UI.

[0236] In the embodiment of the present application, the animation status may include the playback status of the animation, such as whether the animation has completed playback.

[0237] Step S108: The UI adaptive service determines to adjust the first display parameter according to the first display parameter and the second display parameter stored in the whitelist.

[0238] Exemplarily, when the UI adaptive service is started, the monitoring item in the first display parameter and the parameter value of the monitoring item are obtained. For example, the monitoring item can be the number of columns in the first display parameter. The parameter value of the monitoring item is compared with the corresponding parameter value in the second display parameter. If the parameter value of the monitoring item is the same as the parameter value of the second display parameter, it can be further determined whether other conditions in the preset adjustment conditions are met. Other conditions may include, for example: whether the interface of the target application is in full screen, and whether the animation state indicates that the animation is playing.

[0239] Step S109: the UI adaptive service generates at least one of a control adjustment instruction and a layout position adjustment instruction.

[0240] In the embodiment of the present application, the layout position adjustment instruction may include adjusting the card position in the interface of the first target application, adjusting the number of card columns in the interface of the first target application, or adjusting the number of cards in the interface of the first target application.

[0241] In a possible implementation, the UI adaptive service may generate a control adjustment instruction and / or a layout position adjustment instruction according to the first display parameter and the second display parameter.

[0242] Step S110: The UI adaptive service sends at least one of a control adjustment instruction and a layout position adjustment instruction to the view module.

[0243] Step S1011: the view module sends rendering information to the surface rendering module.

[0244] In the embodiment of the present application, the surface rendering module may be a surfaceflinger rendering module.

[0245] Step S1012: the surface rendering module displays the interface of the first target application in the second area according to the received rendering information.

[0246] In one implementation, the second display parameter includes at least one of the following: a control size of the first target application, an interface layout of the first target application, a card size of the first target application, and a card layout of the first target application.

[0247] In other possible implementations, the second display parameter may also include the size of the upper edge of the frame, the number of controls, the color of controls, or the position of controls, etc. In other words, the second display parameter may be used to adjust any item in the interface.

[0248] In one embodiment, the aspect ratio of the first area is different from the aspect ratio of the second area; and / or, the screen displayed on the electronic device by the first area is different from the screen displayed on the electronic device by the second area; and / or, the size of the first area is different from the size of the second area.

[0249] In the embodiment of the present application, the first area and the second area before and after the display area change event occur are not specific areas, and the first area can be used only to represent the area displayed on the interface of the first target application before the display area change event occurs.

[0250] The second area may be used only to represent the area where the interface of the first target application is displayed after the display area change event occurs.

[0251] An embodiment of the present application further provides a display device, which is applied to an electronic device and includes a detection module, a first display parameter acquisition module, a reference display parameter acquisition module and an adjustment module.

[0252] The detection module is used to detect information about a display area change event of the first target application; the display area change event is used to indicate that the interface of the first target application is changed from the first area to the second area.

[0253] The first display parameter obtaining module is used to obtain a first display parameter of the target application when displaying the interface in the second area.

[0254] A reference display parameter acquisition module is used to obtain a second display parameter corresponding to the first display parameter when it is determined that a preset adjustment condition is met based on at least one of the first display parameter and the second area; the second display parameter is a preset reference display parameter when the interface of the first target application is displayed in the second area.

[0255] An adjustment module is used to display the interface of the first target application in the second area according to the second display parameter.

[0256] An embodiment of the present application also provides an electronic device having the display device provided by any embodiment of the present application.

[0257] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0258] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0259] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0260] The embodiments of the present application also provide a computer program product. When the computer program product is executed on an electronic device, the electronic device can implement the steps in the above-mentioned various method embodiments.

[0261] The embodiment of the present application also provides a chip system, the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the steps of any method embodiment of the present application. The chip system can be a single chip or a chip module composed of multiple chips.

[0262] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (such as: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (such as: infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital versatile disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)).

[0263] The above are optional embodiments provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the technical scope disclosed in the present application shall be included in the protection scope of the present application.

Claims

1. A display method, applied to an electronic device, characterized in that: include: Detecting information about a display area change event of a first target application; The display area change event is used to indicate that the interface of the first target application is changed from the first area to the second area; Obtaining a first display parameter of the first target application displaying the interface in the second area; When it is determined that a preset adjustment condition is satisfied according to at least one of the first display parameter and the second area, a second display parameter corresponding to the first display parameter is obtained; the second display parameter is a preset reference display parameter when the interface of the first target application is displayed in the second area; According to the second display parameter, the interface of the first target application is displayed in the second area.

2. The method according to claim 1, characterized in that Before obtaining the second display parameter corresponding to the first display parameter, the method further includes: Obtaining a view policy corresponding to a display area change event from a view framework of the electronic device; the view policy includes a display state of the electronic device after the display area change event occurs; the first display parameter is a display parameter of the first target application corresponding to the view policy; Querying a preset whitelist for a second display parameter corresponding to the view strategy; According to the first display parameter and the second display parameter, it is determined whether a preset adjustment condition is satisfied.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: When the electronic device is started, detecting the preset whitelist; In the case where the preset whitelist exists, the change notification broadcast of the first target application is registered according to the preset whitelist; the change notification broadcast is used to notify and instruct to determine a first monitoring strategy based on the changed first target application, and the first monitoring strategy is used to instruct the first target application to monitor the display area change event.

4. The method according to claim 3, characterized in that The method further comprises: Receive whitelist change broadcasts pushed by the network side; According to the whitelist change broadcast, at least one of the following is performed: Changing a first monitoring strategy for a display area change event of the first target application; the first monitoring strategy is used to instruct monitoring of a display area change event of the first target application; changing the second display parameter; A second monitoring strategy for the display area change event of the second target application is added; the second monitoring strategy is used to instruct to monitor the display area change event of the second target application.

5. The method according to claim 1 or 2, characterized in that: The preset whitelist includes a whitelist preset in the electronic device and / or a whitelist on the network side.

6. The method according to any one of claims 1 to 5, characterized in that: The preset adjustment condition includes at least one of the following: The first display parameter is different from the second display parameter; The difference between the values ​​of the first display parameter and the second display parameter is outside a preset range; The display area change event has not ended; The display size of the second area is within a preset size threshold range; The file corresponding to the display area change event is in the playing process.

7. The method according to claim 6, characterized in that The preset adjustment condition includes that the file corresponding to the display area change event is in the process of being played, and the method further includes: In response to information about the occurrence of a display area change event of the first target application, the file is played.

8. The method according to any one of claims 1 to 7, characterized in that: The second display parameter includes at least one of the following: a control size of the first target application, an interface layout of the first target application, a card size of the first target application, and a card layout of the first target application.

9. The method according to any one of claims 1 to 8, characterized in that: The aspect ratio of the first region is different from the aspect ratio of the second region; and / or, a screen displayed on the electronic device by the first area is different from a screen displayed on the electronic device by the second area; And / or, a size of the first region is different from a size of the second region.

10. An electronic device, characterized in that: The electronic device comprises: a processor and a memory; The memory is used to store a program for the electronic device to execute the method according to any one of claims 1 to 9, and to store data involved in implementing the method according to any one of claims 1 to 9; The processor is configured to execute the program stored in the memory.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Interface display method and device, equipment, storage medium and program product

    CN114265653A

  • Display window display method and device, electronic equipment and storage medium

    CN117667269A

  • Screen mirroring abnormality processing method and electronic device

    EP4180944A1