Application display method and electronic device
By adjusting the number of display columns in the waterfall display area, the problem of abnormal display of the waterfall display area on different devices is solved, enabling flexible adaptation of screen sizes, reducing adaptation costs and improving user experience.
Patent Information
- Application Number
- PCT/CN2024/071074
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-10
- Filing Date
- 2024-01-08
- Publication Date
- 2024-09-19
AI Technical Summary
Existing applications cannot adapt to various screen aspect ratios, causing abnormal display problems in the waterfall display area and affecting user experience.
By obtaining the original display data in the application interface, responding to user operations or automatically adjusting the number of display columns in the waterfall flow display area, it can flexibly adapt to the screen size of electronic devices and avoid element truncation, abnormal positioning and overlapping display problems.
There is no need for application developers to make targeted adaptations for different devices, reducing adaptation costs and improving the amount of information displayed and user experience of the application interface on different devices.
Smart Images

Figure CN2024071074_19092024_PF_FP_ABST
Abstract
Description
Application display method and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on March 10, 2023, with application number 202310268856.6 and application name "A method for applying a display and an electronic device", the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of terminal technology, and in particular to an application display method and electronic equipment. Background Art
[0004] As the number of terminal product styles increases, the sizes and shapes of electronic device display screens are also becoming more diverse. For example, electronic device display screens can be folded inside out, horizontally or vertically, and so on. Many applications have optimized their display interfaces for display screens of various shapes and sizes. For example, they use responsive layouts to adapt to different display screen sizes, or they utilize the split-screen capabilities provided by electronic device systems to display applications in a split-screen interface. However, many applications still cannot adapt to various screen aspect ratios, resulting in display anomalies.
[0005] In application layout, waterfall layout is a relatively common layout method. The waterfall layout can generally be presented as a jagged multi-column layout, and can respond to page scroll bars or mouse wheel scrolling.
[0006] Therefore, how to solve the abnormal display problem of waterfall display area on different electronic devices is of great research significance.
[0007] Summary of the Invention
[0008] The present application provides an application display method and an electronic device for flexibly displaying a waterfall flow layout on the screen of the electronic device to enhance the user experience.
[0009] In a first aspect, the present application provides an application display method. In response to a first operation triggered by a user, an electronic device obtains original display data of a first area included in a first application, the original display data including one or more elements constituting a first area interface of the first area and an original column layout of the one or more elements; and in response to a first instruction, displays a second area interface, wherein the first instruction is used to instruct the one or more elements to change from displaying the one or more elements in the original column layout to displaying them in a target column layout.
[0010] In this method, electronic devices can adjust the display of display areas such as waterfall areas that use a multi-column layout, included in an application interface. By modifying the number of display columns in the waterfall display area, the adaptability of the waterfall display area to the screen size of the electronic device can be improved. This eliminates the need for application developers to perform targeted adaptations for electronic devices with screens of different aspect ratios. The electronic device can adjust the layout of the application developer's application from the perspective of the operating system before displaying it. This eliminates the need for application developers to develop applications specifically for different types of electronic devices, reduces adaptation costs, is applicable to more application scenarios, and increases the amount of information displayed in the application interface.
[0011] In some embodiments, the first element includes at least two levels, and the first element is at least one of the one or more elements; after responding to the first instruction and before displaying the second area interface, the method also includes: detecting that the first element meets a first condition, and the first condition is used to indicate that the first size of the first level included in the first element is smaller than the second size of the second level; wherein the first level includes the second level; expanding the first level of the first element from the first size to a third size, and the third size is greater than or equal to the second size.
[0012] In this embodiment, based on the adjustment of the number of display columns in the waterfall area and the possibility that elements may be displayed in a multi-level manner, when the electronic device detects that the display size of the outer level of the element is larger than the display size of the inner level, it can expand the display size of the outer level of the element, thereby avoiding the problem of truncated display of the element.
[0013] In some embodiments, the method also includes: detecting that the first element meets a second condition, the second condition being used to indicate that the first display size information of the first element is greater than the target display size information corresponding to the target column number layout; reducing the first element from the first display size information to a second display size information, the second display size information being equal to or less than the target display size information.
[0014] In this embodiment, based on adjusting the number of display columns in the waterfall area, the electronic device can also perform element reduction processing when it detects that the size of the element is larger than the maximum size allowed for each column, thereby avoiding problems such as overlapping display caused by the enlargement of the elements.
[0015] In some embodiments, after shrinking the first element from the first display size information to the second display size information, the method further includes: determining a stacking value of a second element based on the first display size information and the second display size information of the first element, the second element being an element located in the same column as the first element when the target column number layout is adopted, and the stacking value is a negative value; and adjusting the display position of the second element based on the stacking value.
[0016] In this embodiment, the electronic device can reduce the size of the elements and combine them with stacking of the elements, thereby increasing the amount of information displayed on the screen.
[0017] In some embodiments, the method further includes: detecting that the first element meets a third condition, the third condition being used to indicate that the first display position information of the first element is inconsistent with the target display position information corresponding to the target column number layout; determining a deviation value of the display position of the first element based on the first display position information and the target display position information; and adjusting the display position of the first element based on the deviation value.
[0018] In this embodiment, based on adjusting the number of display columns in the waterfall area, the electronic device can also perform alignment processing on the elements in a column when it detects that the display positions of the elements in a column cannot be aligned, thereby avoiding the problem of the elements not being able to be aligned for display.
[0019] In some embodiments, the first instruction is an instruction pre-configured by the electronic device; or, the first instruction is a second operation triggered by a user, and the second operation is used to indicate the target column number layout determined by the user.
[0020] In this embodiment, the method provided in the embodiment of the present application can be triggered in response to a user operation, or can be automatically triggered by the electronic device.
[0021] In some embodiments, the first area displays the one or more elements in a waterfall layout.
[0022] In a second aspect, the present application provides an electronic device comprising multiple functional modules; the multiple functional modules interact with each other to implement the method described in the first aspect and its respective embodiments. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on the specific implementation.
[0023] In a third aspect, the present application provides an electronic device comprising at least one processor and at least one memory, wherein the at least one memory stores computer program instructions. When the electronic device is running, the at least one processor executes the method shown in the above-mentioned first aspect and its various embodiments.
[0024] In a fourth aspect, the present application further provides a computer program, which, when executed on a computer, enables the computer to execute the method described in any one of the above aspects and its various implementation methods.
[0025] In a fifth aspect, the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the method shown in any one of the above aspects and its various embodiments.
[0026] In a sixth aspect, the present application also provides a chip, which is used to read a computer program stored in a memory and execute the method shown in any of the above aspects and its various embodiments.
[0027] In a seventh aspect, the present application further provides a chip system, comprising a processor for supporting a computer device in implementing the method described in any of the above aspects and its respective embodiments. In one possible design, the chip system further comprises a memory for storing the necessary programs and data for the computer device. The chip system may be composed of a chip or may include a chip and other discrete devices.
[0028] For the beneficial effects of any of the second to seventh aspects and their possible designs, please refer to the beneficial effects of the various possible designs in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] FIG1 is a schematic diagram of an application display;
[0030] FIG2 is a schematic diagram of an electronic device displaying an application interface centered on a screen;
[0031] FIG3 is a schematic diagram of an electronic device displaying an application interface on a screen in a parallel field of view manner;
[0032] FIG4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0033] FIG5 is a block diagram of a software architecture of an electronic device provided in an embodiment of the present application;
[0034] FIG6 is a schematic diagram of an interface of an application display method provided in an embodiment of the present application;
[0035] FIG7 is a flow chart of a method for displaying an application according to an embodiment of the present application;
[0036] FIG8 is a schematic diagram of an interface for a truncated display problem that may be involved in an application display method provided in an embodiment of the present application;
[0037] FIG9 is a schematic diagram showing a scenario in which an application display method provided by an embodiment of the present application is applicable to a truncation display problem;
[0038] FIG10 is a schematic diagram showing another scenario in which an application display method provided by an embodiment of the present application is applicable to a truncation display problem;
[0039] FIG11 is a schematic diagram of an interface for a position display problem that may be involved in an application display method provided in an embodiment of the present application;
[0040] FIG12 is a second flow chart of an application display method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0042] As the number of terminal products increases, the size and form of the display screens of electronic devices also tend to be diversified. For example, the display screens of electronic devices can be folded inside and outside, horizontally and vertically, etc. For display screens of various shapes and sizes, many applications have optimized the application display interface, for example, through responsive layout methods, different application interface layouts are adopted for display screens of different sizes; for example, with the help of the split-screen capability provided by the electronic device system, applications are displayed in the split-screen interface. However, there are still many applications that cannot adapt to various screen aspect ratios, resulting in abnormal application display. In application layout, waterfall layout is a more common layout method. The waterfall layout can generally be expressed as a jagged multi-column layout, and can scroll in response to page scroll bars or mouse wheels. In scenarios where the application cannot adapt to the screen aspect ratio, solving the abnormal display problem of the waterfall display area is of great research significance.
[0043] For example, Figure 1 is a schematic diagram of an application display. Referring to Figure 1 , an application can be displayed on a mobile phone as interface 11, as shown in Figure 1 . Interface 11 includes display area 11a, which is an application display area using a waterfall layout. Continuing with Figure 1 , when the application shown in interface 11 is displayed on a tablet, or when the mobile phone is a foldable device, interface 11 is displayed when the phone is folded. When the phone is unfolded from the folded state, the application shown in interface 11 can be displayed as interface 12, as shown in Figure 1 . Interface 12 includes display area 12a, which is an application display area using a waterfall layout. As can be seen from interfaces 11 and 12 , the interfaces of the same application displayed on different electronic devices are simply scaled up. Therefore, although the tablet or unfolded foldable screen has a larger screen, the large screen size of the tablet or unfolded foldable screen causes images, text, and other content in the application interface displayed on the tablet or unfolded foldable screen to be abnormally large, resulting in less information displayed on the screen, impacting the user experience.
[0044] One application display solution addresses the varying aspect ratios of electronic devices by allowing each developer to tailor their application to suit their needs. For example, they could develop a version for mobile phones and another for tablets. This allows developers to tailor waterfall display areas to devices with varying aspect ratios. However, this solution carries significant adaptation costs and has certain limitations.
[0045] In another application display solution, when the aspect ratio of the application interface is incompatible with the aspect ratio of the electronic device screen, the electronic device can display the application interface in the center of the screen to display the application interface in a more appropriate ratio. For example, Figure 2 is a schematic diagram of an electronic device displaying an application interface in the center of the screen. Referring to the content shown in interface 21 in Figure 2, the application interface is displayed in the center of the electronic device screen, and the area on the screen not occupied by the application interface can be filled with a black background. However, in this solution, the size of the application interface displayed on the screen is fixed, the screen utilization is low, and the user experience is poor.
[0046] In another application display scheme, large-screen devices such as tablets or foldable phones can also use a parallel view method to display application interfaces. For example, Figure 3 is a schematic diagram of an electronic device displaying an application interface using a parallel view method on its screen. As can be seen from interface 31 shown in Figure 3, the electronic device's screen can be divided into two windows to display the application. For example, interface 31 can be divided into display window 31a and display window 31b. This display method typically requires configuring various jump logic to achieve linkage between the two windows. For example, the electronic device can detect and respond to an operation instruction on a preview card 31a1 for displaying a top in display window 31a by displaying a detailed information page 31b1 for the top in display window 31b. Although this display method can overcome the problem of abnormal application display through the parallel view method, the various jump logic of this display method is generally configured by the application developer, and the jump logic is relatively complex, requiring a lot of configuration by the application developer. Moreover, users may not be accustomed to the jump logic developed by the application developer, resulting in a poor user experience.
[0047] In view of this, an application display method is provided in an embodiment of the present application, which is used to flexibly display an application interface on the screen of an electronic device, and at the same time, the screen utilization rate of the electronic device can be improved. In the embodiment of the present application, the focus is on the display area of the application that adopts a waterfall flow layout. In this method, the electronic device can provide the ability to modify the number of columns in the waterfall flow display area, and can achieve adaptive display after the number of columns is modified. In this way, there is no need for application developers to make targeted adaptations for electronic devices with screens with different aspect ratios. The electronic device can adjust the layout of the application developer's application from the perspective of the operating system before displaying it. In this way, there is no need for application developers to carry out targeted development for different types of electronic devices, thereby reducing adaptation costs, being applicable to more application scenarios, and also increasing the amount of information displayed in the application interface.
[0048] The following describes electronic devices and embodiments for using such electronic devices. The electronic devices of the embodiments of the present application can be electronic devices with display functions, such as tablet computers, mobile phones, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), wearable devices, etc. The embodiments of the present application do not impose any restrictions on the specific type of electronic devices.
[0049] FIG4 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. As shown in FIG4 , 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 194, and a subscriber identification module (SIM) card interface 195.
[0050] 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 processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The controller may serve as the nerve center and command center of the electronic device 100. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces the processor 110's waiting time, and thus improves system efficiency. In an embodiment of the present application, the processor 110 may be configured to execute the application display method provided in an embodiment of the present application. For example, the processor 110 may be configured to modify the number of columns in the waterfall display area of the application. Furthermore, the processor 110 may be configured to resolve one or more of the following issues that may arise from modifying the number of columns: element display truncation, abnormal element display position, element size, and element spacing.
[0051] The USB interface 130 complies with USB standards. The charging management module 140 receives charging input from a charger. The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160.
[0052] 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 modulation and demodulation processor and the baseband processor. The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied on the electronic device 100. The wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc. applied on the electronic device 100. In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
[0053] In the embodiment of the present application, the electronic device 100 can obtain an application program package provided by an application developer through the mobile communication module 150 or the wireless communication module 160, so that an application interface can be provided to the user after the application package is installed on the electronic device 100.
[0054] Display screen 194 is used to display application interfaces, such as those of applications installed on electronic device 100. Application interfaces may include display areas with a waterfall-style layout, such as display area 11a of interface 11 in FIG. 1 , or display area 12a of interface 12. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0055] The camera 193 is used to capture still images or videos. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0056] 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 can store an operating system, and the software code of at least one application, etc. The data storage area can store data generated during the use of the electronic device 100 (such as captured images, recorded videos, 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. In an embodiment of the present application, the application package obtained by the electronic device 100 can be stored in the internal memory 121, and computer program instructions for implementing the application display method provided in the embodiment of the present application can also be stored to implement the layout adjustment of the elements using the waterfall flow layout included in the application package from the application developer, such as modifying the number of display columns, and then displaying the application.
[0057] 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. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as pictures and videos can be stored on the external memory card.
[0058] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0059] Among them, the sensor module 180 may include a pressure sensor 180A, an acceleration sensor 180B, a touch sensor 180C, etc.
[0060] The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .
[0061] The touch sensor 180C is also called a "touch panel". The touch sensor 180C can be set on the display screen 194, and the touch sensor 180C and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180C is used to detect touch operations acting on or near it. The touch sensor 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 180C can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194. In the embodiment of the present application, the touch sensor 180C can be used to collect user operations on the display screen 194. The user operation can be, for example, a sliding operation on the display interface of the application to switch to display different contents of the application. For example, it can also be a click operation on an element on the display interface of the application to jump to the associated display interface corresponding to the element, etc.
[0062] The buttons 190 include a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The electronic device 100 can receive button input and generate key signal input related to the user settings and function control of the electronic device 100. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
[0063] It is understood that the components shown in FIG4 do not constitute a specific limitation on the electronic device 100. The electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. In addition, the combination / connection relationship between the components in FIG4 may also be adjusted and modified.
[0064] Figure 5 is a block diagram of the software architecture of an electronic device provided in an embodiment of the present application. As shown in Figure 5, the software architecture of the electronic device can be a layered architecture. For example, the software can be 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 operating system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer (framework, FWK), the runtime (runtime) and system library, and the kernel layer.
[0065] The application layer may include a series of application packages. As shown in Figure 5, the application layer may include a camera, settings, skin module, user interface (UI), third-party applications, etc. Among them, third-party applications may include gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc. In an embodiment of the present application, the application layer may include a target installation package of a target application that the electronic device requests to download from a server, and the function files and layout files in the target installation package are adapted to the electronic device.
[0066] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer may include some predefined functions. As shown in Figure 5, the application framework layer may include a content provider, a telephony manager, a notification manager, a resource manager, and a window manager; in addition, it may also include the callback tool, layout manager, and view system, which are the focus of the embodiments of this application.
[0067] The view system includes visual controls, such as controls for displaying text and images. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface containing a text notification icon can include a view for displaying text and a view for displaying images. It will be understood that the view system can support the display of various elements included in an application.
[0068] The layout manager is a plug-in toolkit added to the embodiments of this application to implement the application display method. It can be used to re-edit the layout of visual controls in the view system. Layout re-editing can include, but is not limited to, modifying the number of columns, reducing (or enlarging), stacking, and adjusting the layout. Correspondingly, the layout manager can include, but is not limited to, tools for modifying the number of columns, reducing (or enlarging), stacking, and adjusting the layout.
[0069] The callback tool can be used to respond to the application layer's request to display the application interface, and to call back various tools in the layout manager, so that the layout of the original visual controls in the view system included in the application package can be re-edited. Exemplarily, the callback tool can be, for example, a hook tool. It should be noted that in the embodiment of the present application, the number of hook tools is not limited, and hook tools can be added to various drawing nodes as needed, such as when a new view node is added, when the size of the view changes, before measuring the view size, or before drawing the view, etc. In a specific embodiment, the hook tool can call various tools in the layout manager, so that the functions that the various tools are responsible for can be implemented.
[0070] The content provider is used to store and retrieve data and make it accessible to applications. This data can include video, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc. In this embodiment of the application, the window manager is also used to calculate the size of the waterfall display area after user adjustment and improve the window's resizing capabilities.
[0071] The phone manager is used to provide communication functions for electronic devices, such as call status management (including answering, hanging up, etc.).
[0072] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0073] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0074] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0075] The runtime includes the core library and the virtual machine. The runtime is responsible for the scheduling and management of the operating system.
[0076] The core library consists of two parts: one containing the Java language's callable functions and the other containing the operating system's core libraries. The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0077] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (e.g., OpenGL ES), a 2D graphics engine (e.g., SGL), and an image processing library.
[0078] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0079] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0080] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0081] A 2D graphics engine is a drawing engine for 2D drawings.
[0082] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0083] The hardware layer can include various sensors, such as accelerometers, gyroscopes, touch sensors, etc.
[0084] It should be noted that the structures shown in Figures 4 and 5 are merely examples of electronic devices provided in the embodiments of the present application and do not limit the electronic devices provided in the embodiments of the present application. In specific implementations, the electronic device may have more or fewer devices or modules than those in the structures shown in Figures 4 or 5.
[0085] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings. In the description of the embodiments of the present application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0086] It should be understood that in the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.
[0087] In order to facilitate understanding of an application display method provided by the present application, the implementation process of the method provided by the present application is introduced below in combination with the contents shown in Figures 6 to 12.
[0088] The method provided in the embodiment of the present application can be applied to electronic devices such as mobile phones, tablet computers, or folding screen mobile phones, and can be specifically applied to scenarios where application program interfaces are displayed on electronic devices. Through the method provided in the present application, the problem of abnormal display of images and texts that may be caused by the incompatibility between the screen aspect ratio of the electronic device and the aspect ratio of the application interface developed by the application can be solved. The focus can be on the abnormal display problems of the waterfall display area included in the application interface, such as abnormal display problems such as pictures being displayed too large, fonts being displayed too large, etc. (for ease of understanding, the following embodiments may be referred to as "large pictures and large fonts"). In this method, the electronic device can adjust the number of display columns for various display elements using a waterfall layout included in the application interface designed by the application developer, and can also realize adaptive display based on the adjustment of the number of display columns. Among them, the adaptive display can be, but is not limited to, processing the following abnormal display scenarios that may be caused by the adjustment of the number of display columns: one or more of abnormal displays such as element display truncation, abnormal element display position, element size and element spacing. Therefore, this method can not only improve the adaptability of the application interface to the screen aspect ratio when displaying, solve abnormal display problems such as large images and large fonts, but also increase the amount of information displayed by the application on the screen of the electronic device, thereby improving the user experience.
[0089] Among them, the display elements involved in the application may include but are not limited to: picture elements (for example, they may include picture controls, background picture frames, etc.), text elements (for example, they may include text controls, prompt text information, etc.), button controls and selection controls, etc.
[0090] In some application scenarios, the methods provided by embodiments of the present application can be applied to foldable screen phones. For example, the screen aspect ratio of a foldable screen phone in its folded and unfolded states is different. Displaying the foldable screen in both the folded and unfolded states based on the original display data of the application interface may cause display anomalies when the foldable screen phone is in the unfolded state. For example, Figure 6 shows an interface diagram of an application display method provided by embodiments of the present application. Figure 6 may include an application display interface 600a for the foldable screen phone in the folded state, and may also include an application display interface 600b for the foldable screen phone in the unfolded state. As can be seen from the waterfall display area 601 of interface 600a and the waterfall display area 602 of interface 600b, although the foldable screen phone in the unfolded state has a larger display screen than the folded screen phone, the application display may experience anomalies, resulting in less information being displayed. Figure 6 may also include interface 600c. Interface 600c is the application interface displayed after using the method provided by embodiments of the present application. Interface 600c includes waterfall display area 603, which is the focus of embodiments of the present application. For example, interface 600c and interface 600b can display the same application data. Interface 600b divides the application data into two columns for display, while interface 600c changes the display of the application data from two columns to three columns. As can be seen from interface 600c shown in Figure 6, compared with interface 600b, the display effect of the waterfall display area in interface 600c can better adapt to the screen aspect ratio of the electronic device, and can also display more content, thereby increasing the amount of information displayed on the electronic device screen.
[0091] It should be noted that the interface 600c is only displayed in three columns as an example. The method provided in the embodiment of the present application is not limited to changing to three columns, and changing to four or more columns is also applicable.
[0092] In other application scenarios, the method provided in the embodiment of the present application can also be applied to scenarios where the application interface displayed on a mobile phone is projected onto other electronic devices, such as scenarios where the screen is projected onto a large screen. Based on the fact that mobile phones generally have long and narrow characteristics, and large screens generally have large-screen characteristics, projecting the application interface displayed on a mobile phone onto a large screen may also cause abnormal display problems as described in the scenario where the aforementioned folding-screen mobile phone changes from a folded state to an unfolded state. Based on the method provided in the embodiment of the present application, it is possible to modify the number of display columns of the waterfall display area on the large screen and then display it, so that a more suitable display effect can be achieved on the large screen. In some application scenarios, the method provided in the embodiment of the present application can also be applied to scenarios where a mobile phone is turned from a vertical screen to a horizontal screen. It can be understood that the method provided in the embodiment of the present application can also be applied to electronic devices such as tablet computers, and this application does not limit the type of electronic device.
[0093] Based on the interface display effect introduced in Figure 6, the implementation process of the application display method provided by this application is introduced below to illustrate how to use the method provided by this application to achieve the interface processing effect shown in Figure 6 introduced above, so that the waterfall flow display area included in the application interface can be flexibly displayed on the screen of the electronic device.
[0094] To facilitate understanding of the methods provided by the embodiments of this application, we first introduce the technologies that may be involved in the application's interface display. Applications typically use slidable container controls to build interfaces. The following are examples of some typical controls provided by the system:
[0095] RecyclerView control: can display elements (or objects, which can contain text and images) in a list or grid format. Compared to the ListView control, the RecyclerView control has a more powerful element reuse mechanism and provides more layout managers (LayoutMananger) to handle multiple layouts. You can customize the layout manager to determine the arrangement rules of items. For example, it can provide: 1. Linear layout similar to the ListView control, which implements element layout in horizontal or vertical list direction; 2. Grid layout, which can specify the number of elements; 3. StaggeredGridLayoutManager, which can specify the list direction and the number of elements in the same direction.
[0096] Scrollbar (ScrollView): This allows a control to scroll. In some embodiments, a ScrollView can trigger scrolling in response to scrolling the mouse wheel. In other embodiments, a ScrollView can also trigger scrolling in response to dragging the scrollbar with a mouse, stylus, or finger.
[0097] StaggeredGridLayoutManager: This typically presents a staggered multi-column layout. The display area of a StaggeredGridLayoutManager can scroll in response to the page scroll bar, allowing for continuous loading of data blocks and appending them to the end of the current display area. A staggered multi-column layout means that the heights of elements such as cards or images displayed using a staggered grid layout can generally be unequal.
[0098] It can be understood that the combination of RecyclerView control, ScrollView and StaggeredGridLayoutManager can reduce the complexity of user browsing application interface and improve the user experience. Therefore, waterfall flow layout is increasingly appearing in application interfaces.
[0099] Refer to Figure 7, which is a flow chart of an application display method provided in an embodiment of the present application. The flow chart can be applied to electronic devices and may include the following steps:
[0100] Step 701, find the data to be displayed corresponding to the target cyclic view (RecyclerView) control. It can be understood that the electronic device can process the method provided by this application based on the application package obtained from the application developer. Among them, the application package may include a variety of possible data; some data can be used to support the display of the application interface. The method provided in the embodiment of the present application focuses on the display method of the waterfall display area included in the application interface. The waterfall display area can generally be implemented based on the RecyclerView control. Based on this, the electronic device can obtain the data to be displayed corresponding to the RecyclerView control from the application package, so as to process the application display based on the data to be displayed.
[0101] Step 702: For the data to be displayed, change the display method from using the original number of columns to using the target number of columns.
[0102] In a possible example, the target RecyclerView control can be called based on the reflection method to implement the modification of the number of columns used when displaying the waterfall flow area of the application on the system side. For example, if the waterfall flow area that does not adopt the method provided in the embodiment of the present application is displayed in two columns, the waterfall flow area after adopting the method provided in the embodiment of the present application can be changed to be displayed in three or more columns; in this scenario, the original number of columns is two columns, and the target number of columns is three or more columns, so that the data to be displayed in the waterfall flow layout included in the application package can be displayed in three or more columns on the screen of the electronic device. Among them, the reflection method is a feature of the programming language, which can obtain information and dynamically call objects when the program is running. Based on this, the electronic device can modify the number of display columns by running the reflection method in the process of displaying the application package.
[0103] In some embodiments, an electronic device may provide a user with a selection interface for determining a target number of columns; wherein a selection control for determining the target number of columns may be provided in the selection interface. It is understood that if the electronic device detects a user operation that determines the target number of columns to be 3 columns via the selection control, the electronic device may, in response to the user operation, change the waterfall flow area from displaying 2 columns to displaying 3 columns; or, if the electronic device detects a user operation that determines the target number of columns to be 4 columns via the selection control, the electronic device may, in response to the user operation, change the waterfall flow area from displaying 2 columns to displaying 4 columns. Furthermore, the electronic device may also display a preview display interface after the target number of columns is modified to the user on the selection interface to facilitate the user's selection of the target number of columns. Through this embodiment, the display of the application interface can be made more in line with the user's usage habits, thereby achieving personalized application display and improving the user experience. In other embodiments, the electronic device may also automatically trigger the method provided by the embodiments of the present application based on the screen characteristics of the electronic device. For example, when a foldable screen mobile phone detects that the mobile phone has transitioned from a folded state to an unfolded state, the method provided by the present application may be automatically triggered to implement interface display on the unfolded foldable screen.
[0104] In some possible implementations, after the electronic device executes step 702, due to the modification of the number of display columns, when displaying the data to be displayed, one or more of truncation display issues, size display issues, and position display issues may occur in the waterfall display area. Various possible display issues may be resolved by the following steps:
[0105] 1) Problem of truncated display. In the waterfall display area, each data block can be used as an item. For example, three items are shown in interface 600b in Figure 6, and seven items are shown in interface 600c. For each item, the display of element content can generally be achieved based on a container control. In some embodiments, the container control can be used to determine the display frame of the item, for example, the shape, size, and position of the display frame can be determined. In other embodiments, the container control can allow other element content to be added internally, for example, element content such as picture controls and text controls can be added internally. In addition, the item can generally be constructed based on a multi-tree structure; wherein the container control can serve as the root node of the multi-tree structure, the elements included in the container control can serve as child nodes of the multi-tree structure, and the innermost child elements further included in the element can serve as leaf nodes of the multi-tree structure.
[0106] Based on the above introduction, after the electronic device adopts steps 701 and 702 to modify the number of columns, it may happen that the size of the container control included in the Item as the parent node is adaptively adjusted, while the size of the element content included in the Item as the child node or leaf node is a fixed size and is not adaptively adjusted, resulting in a truncated display problem. For example, Figure 8 is an interface schematic diagram of a truncated display problem that may be involved in an application display method provided in an embodiment of the present application. Figure 8 takes a folding screen mobile phone in an unfolded state as an example. It can be seen from area 801 shown in interface 800a in Figure 8 that the picture element content included in the data block in the waterfall flow area cannot be fully displayed, and only the picture element content of the size of the Item can be displayed. In this scenario, the electronic device can execute the following steps 703a and 704a.
[0107] Step 703a: Determine whether there is a truncation display problem.
[0108] In some embodiments, the electronic device may use a recursive layer-by-layer approach to compare the element display size and the target display size of the corresponding layer. For example, when it is detected that the first-level elements meet the target display size requirements of the first level, but the second-level elements do not meet the target display size requirements of the second level, it can be determined that there is a truncated display problem, and step 704a is continued; wherein the first level includes the second level. Another example, when it is detected that each level element meets the target display size of the corresponding level, it can be determined that there is no truncated display problem, and subsequent steps can be continued, for example, step 703b shown in Figure 7 can be continued. In some embodiments, the electronic device's display size comparison can be implemented as a display width comparison.
[0109] It can be understood that when the waterfall display area is displayed as two columns, the width of each column is approximately half the width of the electronic device screen (also referred to as "1 / 2 screen width"); wherein the electronic device screen width is the screen length determined based on the display direction of the electronic device and perpendicular to the display direction. For example, when the display direction is a vertical screen direction, the electronic device screen width is the top side length (or bottom side length) of the electronic device. For another example, when the display direction is a horizontal screen direction, the electronic device screen width is the side length of the electronic device. Similarly, when the waterfall display area is displayed as three columns, the width of each column is approximately one-third the width of the electronic device screen (also referred to as "1 / 3 screen width"). It can be understood that the actual display width of each column element can also be determined in combination with the spacing between the element and the side and the spacing between the elements. In the embodiments of the present application, for ease of understanding, 1 / 2 screen width and 1 / 3 screen width are used as examples for introduction. Those skilled in the art can understand that the actual display width may not be equal to 1 / 2 screen width or 1 / 3 screen width.
[0110] Based on the above introduction, the target display size can be determined according to the width of the electronic screen and the number of display columns. For example, when displayed as three columns, the target display size can be 1 / 3 of the screen width. In addition, it can be understood that for each Item in the waterfall display area, the node size at the previous level is generally greater than or equal to the node size at the current level. For example, the container control included in the Item is the parent node, and the size of the container control is generally greater than or equal to the picture element as the child node. In this way, the waterfall display area will not have a truncated display problem. If the size of each level does not meet the target display size requirements of the corresponding level, a truncated display problem may occur as shown in interface 800a in Figure 8.
[0111] It should be noted that interface 800a in FIG8 is merely a display interface for understanding the method provided in the embodiment of the present application. In actual display, after the electronic device employs the method provided in the embodiment of the present application, it may directly display interface 800d. Interface 800d may be used to indicate the application interface displayed after employing the method provided in the embodiment of the present application. Furthermore, interfaces 800b and 800c described in subsequent embodiments are also intended to facilitate understanding of the method provided in the embodiment of the present application. In actual display, the electronic device may not display interfaces 800a to 800c, but may directly display interface 800d. This will not be further described.
[0112] Step 704a: perform capacity expansion processing.
[0113] In some possible embodiments, Figure 9 illustrates a scenario in which an application display method provided by an embodiment of the present application is applied to a truncated display problem. Interface 900 included in Figure 9 may be the original display interface of an element of an application package; for example, the original display interface is displayed as two columns. Interface 910 included in Figure 9 may be the display interface after modifying the number of columns, where the truncated display problem occurs; for example, interface 910 is displayed as three columns. Interface 920 included in Figure 9 may be the display interface after scaling to address the truncated display problem. For example, an electronic device may scale the display size of a first-level element based on the display size of a second-level element, so that the display size of the first-level element includes the display size of the second-level element, thereby addressing the truncated display problem. For example, the second-level element may be an image element as a child node, and the first-level element may be a container control as a parent node. It will be appreciated that by scaling the container control, the expanded size of the container control can encompass the size of the element content contained within the container control, thereby addressing the truncated display problem.
[0114] It can be understood that based on the expansion process described in step 704a, the expanded waterfall display area can be displayed as interface 800b in Figure 8. As can be seen from interface 800b, while the expanded waterfall display area can solve the truncated display problem, it still has size issues, such as the enlargement problem shown in interface 800b. Based on this, the electronic device can proceed to step 703b.
[0115] In other possible embodiments, in addition to using the expansion processing implementation method introduced in step 704a to address the truncated display problem, the electronic device may also use a layer-by-layer recursive method to perform a reduction process on each item included in the waterfall display area, so that the node size of each level included in the item meets the target display size of the corresponding level. For example, Figure 10 shows a schematic diagram of another scenario in which an application display method provided by an embodiment of the present application is applicable to the truncated display problem. The interface 1000 included in Figure 10 can be the original display interface of the elements of the application package; wherein the original display interface is displayed as two columns as an example. The interface 1010 included in Figure 10 can be the display interface of the element after the number of columns is modified; wherein the interface 1010 is displayed as three columns as an example. The interface 1020 included in Figure 10 can be the display interface after the reduction process is performed in a layer-by-layer recursive method to address the truncated display problem. It can be understood that based on the above-mentioned reduction process, the waterfall display area after the reduction process can be displayed as the interface 800c in Figure 8. As can be seen from interface 800c, the reduced waterfall display area can solve the truncated display problem. In addition, the electronic device can also perform stacking processing on interface 800c, which can be displayed as interface 800d in Figure 8 after stacking processing.
[0116] 2) Size display problem, which can be manifested as a magnification problem, for example. Since the screen size of the electronic device is fixed, after the number of columns is modified using steps 701 and 702, when there is a magnification problem with the elements, overlapping of the three columns of elements may occur. Alternatively, after the electronic device executes step 704a, there may also be a size display problem. For example, interface 800b in Figure 8 shows the display interface of the waterfall area with a magnification problem. It can be understood that the truncated display problem can also be understood as a size display problem, which is due to the magnification problem of the internal elements included in the data block. It can be understood that since the size of the data block or picture element is greater than 1 / 3 or equal to 1 / 3 of the screen width, it is not reduced to the appropriate size range, so there is a magnification problem, which may cause overlapping problems of elements belonging to different columns. In this scenario, the electronic device can execute the following steps 703b and 704b.
[0117] Step 703b: Determine whether there is a size display issue. Exemplarily, the electronic device compares the element display width with the target display width. If it detects that the element display width does not meet the target display width requirement, it determines that a size display issue exists and proceeds to step 704b. If it detects that the element display width meets the target display width requirement, it determines that there is no size display issue and proceeds to subsequent steps, such as step 703c shown in Figure 7. In some embodiments, taking the size display issue as an example of a zoom-in issue, the target display width requirement may be less than 1 / 3 of the screen width. It is understood that the element display width not meeting the target display width requirement may be represented by the element display width being greater than or equal to 1 / 3 of the screen width. Similarly, when the size display issue is a zoom-out issue, the target display width requirement may be greater than a specified screen width threshold. It is understood that the specified screen width threshold is less than 1 / 3 of the screen width. In other words, when the waterfall display area is displayed as three columns, the image elements need to be displayed within an appropriate target display width range, for example, the target display width range may be from 0.3 screen width to 1 / 3 screen width, etc., although this application does not limit this.
[0118] Step 704b: Perform zooming, or zooming and stacking. It is understood that when the size display problem is an enlargement problem, the electronic device can perform a reduction process; when the size display problem is a reduction problem, the electronic device can perform a zooming process.
[0119] In some possible embodiments, taking the size display problem as an example of the magnification problem, the electronic device can perform a reduction process on the element to reduce the width of the element to meet the target display width requirement. Exemplarily, the scenario where there is a magnification problem when the waterfall display area is displayed may be the area 802 shown in the interface 800b in Figure 8, at which point there is an overlap problem between elements in different columns; after the electronic device performs a reduction process on the element, it may be displayed as the area 601 shown in the interface 600c in Figure 8, at which point the waterfall display area can be displayed normally. It will be understood that in this embodiment, the distance between the elements in each column can be fixed, and the display position of the element can be automatically adjusted as the adjacent elements are reduced (or enlarged).
[0120] In some embodiments, the zoom-out process can be performed by performing a zoom-out process in the direction of a first coordinate axis and performing a zoom-out process in the direction of a second coordinate axis; wherein the direction of the first coordinate axis and the direction of the second coordinate axis are perpendicular to each other, for example, the first coordinate axis can be the Y axis, and the second coordinate axis can be the X axis. In other embodiments, the zoom-out process can be performed on the elements of each level at a time in a layer-by-layer recursive manner, or by performing a zoom-out process on the entire element including at least one level. In some further embodiments, the zoom-out process can be performed based on a reference point, or can also be performed based on a reference axis; wherein, the reference point can include, but is not limited to: the upper center point of the element, the upper left coordinate point, the upper right coordinate point, or the center point of each element, etc., and the reference axis can include, but is not limited to: the center axis of the element, the left side, the right side, etc. It should be noted that the various aspects introduced above can be combined with each other, and the present application will not introduce the specific implementation process in detail.
[0121] In other possible embodiments, after the electronic device performs a shrinking process on the elements, there may be a certain blank area between each column of elements. For example, after the electronic device performs a shrinking process on the elements, it can be displayed as the area 803 shown in the interface 800c in Figure 8. At this time, the overlapping problem of the waterfall display area has been solved, but since there is a certain blank area between the shrinking elements, the amount of information displayed in the waterfall display area is small. At this time, the electronic device can perform a stacking process between the elements. For example, after the stacking process, it can be displayed as the area 804 shown in the interface 800d in Figure 8. At this time, the waterfall display area can not only solve the overlapping problem, but also increase the amount of information in the waterfall display area.
[0122] In the above embodiment, the electronic device can determine the target stacking value of the element based on the height and reduction ratio of the previous adjacent element in the same column; for example, the target stacking value y of the jth element in the i-th column can be expressed as y=-h i(j-1) *(1-ratio i(j-1) ); where h i(j-1) Can be used to indicate the height of the j-1th element in the i-th column, ratio i(j-1) It can be used to indicate the reduction ratio of the j-1th element in the i-th column; wherein, the jth element in the i-th column can be, for example, the 2nd element in the 1st column, and its target stacking value can be determined according to the height and reduction ratio of the 1st element in the 1st column.
[0123] In addition, in the embodiments of the present application, other possible implementation methods of the reduction processing and stacking processing may also be adopted, and the present application does not limit this.
[0124] 3) Location display problem.
[0125] Step 703c, determine whether there is a position display problem. Exemplarily, after the electronic device performs the process of modifying the number of columns, there may still be a problem that the element is not displayed at the target center position of the corresponding column, for example, it is not displayed in the center of the corresponding column. For example, Figure 11 is an interface schematic diagram of a position display problem that may be involved in an application display method provided in an embodiment of the present application. The interface 1100 in Figure 11 shows an interface with a position display problem. Taking the modification to three columns for display as an example, the target center position corresponding to the elements in the first column can be, for example, 1 / 6 of the screen width, the target center position corresponding to the elements in the second column can be, for example, 3 / 6 of the screen width (i.e., the center of the screen), and the target center position corresponding to the elements in the third column can be, for example, 5 / 6 of the screen width. It can be seen from interface 1100 that the display position of each column element has a position display problem that is biased to the right relative to the target position. It should be noted that the target center position of each column shown in Figure 11 is only an example. In actual implementation, factors such as column spacing and spacing from the edge of the screen can also be considered to determine.
[0126] For example, the electronic device may compare the display center position of each column of elements with the target center position. If they are the same, step 704c may not be performed. If they are not the same, step 704c may be continued. As can be seen from interface 1100, the display center position of each column of elements is different from the target center position, so alignment processing needs to be performed in step 704c.
[0127] Step 704c: Perform alignment. Referring to FIG. 11 , interface 1120 in FIG. 11 illustrates a schematic diagram of an interface displayed after alignment. For example, the electronic device may determine an offset based on the display center position and the target display position of each column of elements; the electronic device then performs translation on the elements based on the offset. In some embodiments, the offset may be positive or negative; if the offset is positive, the element may be translated to the right, and if the offset is negative, the element may be translated to the left.
[0128] It should be noted that, in the embodiments of the present application, the execution order for the three display problems introduced above is not limited. For example, they can be executed in parallel through different processes or threads, or the processing for the position display problem can be executed first, or the processing for the truncated display problem can be executed first, etc.
[0129] Through the method provided in the embodiments of the present application, an electronic device can implement display adjustment of the waterfall flow area included in the application interface. By modifying the number of display columns in the waterfall flow display area, the degree of adaptation of the waterfall flow display area to the screen size of the electronic device can be improved. As a result, there is no need for application developers to perform targeted adaptation for electronic devices with screens of different aspect ratios. The electronic device can adjust the layout of the application developer's application from the perspective of the operating system before displaying it. This eliminates the need for application developers to perform targeted development for different types of electronic devices, reduces adaptation costs, is applicable to more application scenarios, and can also increase the amount of information displayed in the application interface.
[0130] Refer to Figure 12, which is a flow chart of an application display method provided in an embodiment of the present application. The method can be applied to electronic devices, and the flow of the method may include at least the following steps:
[0131] Step 1201: The electronic device obtains original display data of a first area included in a first application in response to a first operation triggered by a user, wherein the original display data includes one or more elements constituting a first area interface of the first area and an original column layout adopted by the one or more elements.
[0132] In some embodiments, the first operation may be an operation in which the user selects a target number of columns; or, when the electronic device is a foldable screen mobile phone, the first operation may be an operation in which the user unfolds the foldable screen mobile phone; or, the first operation may be an operation in which the user projects the mobile phone interface onto a large screen, etc., which is not limited in this application. The first area may be, for example, an area with a multi-column layout, such as a waterfall area.
[0133] Step 1202: The electronic device displays the second area interface in response to a first instruction, wherein the first instruction is used to instruct the one or more elements to change from being displayed using the original column layout to being displayed using the target column layout. For example, the original column layout may be 2 columns, and the target column layout may be 3 columns or 4 columns.
[0134] The specific implementation process of the method introduced in step 1201 and step 1202 can refer to the content introduced in the above embodiment and will not be repeated here.
[0135] Based on the above embodiments, the present application also provides an electronic device, which includes multiple functional modules; the multiple functional modules interact with each other to implement the various methods described in the embodiments of the present application. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on the specific implementation. For example, the electronic device can be used to execute steps 1201 to 1202 as shown in Figure 12. The specific implementation process can refer to the content introduced in the aforementioned embodiment and will not be repeated here.
[0136] Based on the above embodiments, the present application also provides an electronic device, which includes at least one processor and at least one memory, wherein the at least one memory stores computer program instructions, and when the electronic device is running, the at least one processor executes the various methods described in the embodiments of the present application. For example, the electronic device can be used to execute steps 1201 to 1202 as shown in Figure 12. The specific implementation process can refer to the contents introduced in the aforementioned embodiments, which will not be repeated here. Based on the above embodiments, the present application also provides a computer program, which, when the computer program is run on a computer, enables the computer to execute the various methods described in the embodiments of the present application.
[0137] Based on the above embodiments, the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the methods described in the embodiments of the present application.
[0138] Based on the above embodiments, the present application further provides a chip, which is used to read a computer program stored in a memory to implement the various methods described in the embodiments of the present application.
[0139] Based on the above embodiments, the present application provides a chip system, which includes a processor for supporting a computer device to implement the various methods described in the embodiments of the present application. In one possible design, the chip system also includes a memory for storing the necessary programs and data for the computer device. The chip system can be composed of a chip or can include a chip and other discrete devices.
[0140] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0141] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.
[0142] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0143] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0144] Obviously, those skilled in the art may make various modifications and variations to this application without departing from the scope of protection of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. An application display method, characterized in that: Applied to electronic equipment, the method comprises: In response to a first operation triggered by a user, original display data of a first area included in a first application is acquired, wherein the original display data includes one or more elements constituting a first area interface of the first area, and an original column number layout adopted by the one or more elements; In response to the first instruction, the second area interface is displayed; the first instruction is used to instruct the one or more elements to be displayed in a layout with a target number of columns instead of being displayed in the layout with the original number of columns.
2. The method according to claim 1, characterized in that: A first element includes at least two levels, the first element being at least one of the one or more elements; After responding to the first instruction and before displaying the second area interface, the method further includes: It is detected that the first element meets a first condition, where the first condition is used to indicate that a first size of a first level included in the first element is smaller than a second size of a second level; wherein the first level includes the second level; The first level of the first element is expanded from the first size to a third size, the third size being greater than or equal to the second size.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: It is detected that the first element meets a second condition, where the second condition is used to indicate that the first display size information of the first element is larger than the target display size information corresponding to the target column number layout; The first element is reduced from the first display size information to a second display size information, where the second display size information is equal to or smaller than the target display size information.
4. The method according to claim 3, characterized in that After reducing the first element from the first display size information to the second display size information, the method further includes: determining a stacking value of a second element according to the first display size information and the second display size information of the first element, the second element being an element located in the same column as the first element when the target number of columns is used for layout, and the stacking value is a negative value; Based on the stacking value, a display position of the second element is adjusted.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: It is detected that the first element meets a third condition, where the third condition is used to indicate that the first display position information of the first element is inconsistent with the target display position information corresponding to the target column number layout; determining a deviation value of a display position of the first element according to the first display position information and the target display position information; Based on the deviation value, a display position of the first element is adjusted.
6. The method according to any one of claims 1 to 5, characterized in that The first instruction is an instruction pre-configured by the electronic device; or, The first instruction is a second operation triggered by a user, and the second operation is used to indicate the target column number layout determined by the user.
7. The method according to any one of claims 1 to 6, characterized in that The first area displays the one or more elements in a waterfall layout.
8. An electronic device, characterized in that: It includes an acquisition module and a processing module; wherein, The acquisition module is configured to acquire original display data of a first area included in a first application in response to a first operation triggered by a user, wherein the original display data includes one or more elements constituting a first area interface of the first area, and an original column number layout adopted by the one or more elements; The processing module is used to display the second area interface in response to a first instruction; the first instruction is used to instruct the one or more elements to change from being displayed in the original column layout to being displayed in the target column layout.
9. The electronic device according to claim 8, characterized in that: A first element includes at least two levels, the first element being at least one of the one or more elements; The processing module is further configured to, after responding to the first instruction and before displaying the second area interface, include: It is detected that the first element meets a first condition, where the first condition is used to indicate that a first size of a first level included in the first element is smaller than a second size of a second level; wherein the first level includes the second level; The first level of the first element is expanded from the first size to a third size, the third size being greater than or equal to the second size.
10. The electronic device according to claim 8 or 9, characterized in that: The processing module is further used for: It is detected that the first element meets a second condition, where the second condition is used to indicate that the first display size information of the first element is larger than the target display size information corresponding to the target column number layout; The first element is reduced from the first display size information to a second display size information, where the second display size information is equal to or smaller than the target display size information.
11. The electronic device according to claim 10, characterized in that: The processing module is further configured to reduce the first element from the first display size information to the second display size information, comprising: determining a stacking value of a second element according to the first display size information and the second display size information of the first element, the second element being an element located in the same column as the first element when the target number of columns is used for layout, and the stacking value is a negative value; Based on the stacking value, a display position of the second element is adjusted.
12. The electronic device according to any one of claims 8 to 11, characterized in that: The processing module is further used for: It is detected that the first element meets a third condition, where the third condition is used to indicate that the first display position information of the first element is inconsistent with the target display position information corresponding to the target column number layout; determining a deviation value of a display position of the first element according to the first display position information and the target display position information; Based on the deviation value, a display position of the first element is adjusted.
13. The electronic device according to any one of claims 8 to 12, characterized in that: The first instruction is an instruction pre-configured by the electronic device; or, The first instruction is a second operation triggered by a user, and the second operation is used to indicate the target column number layout determined by the user.
14. The electronic device according to any one of claims 8 to 13, characterized in that: The first area displays the one or more elements in a waterfall layout.
15. An electronic device, characterized in that: The system comprises at least one processor coupled to at least one memory, wherein the at least one processor is configured to read a computer program stored in the at least one memory to execute the method according to any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 7.
17. A computer program product comprising instructions, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Client side, method and system for changing view display
CN104035703A
Method and device for exhibiting information, and touch electronic device
CN105511710A
Method, system and device for displaying pictures in waterfall flow mode and storage medium
CN110187781A
Remote sensing data visual interface interaction method and device and electronic equipment
CN113468452A
Page information operating method and apparatus, and electronic device
US20170262148A1
