WO2024027696A1 - Page display method and related apparatus - Google Patents

Page display method and related apparatus Download PDF

Info

Publication number
WO2024027696A1
WO2024027696A1 PCT/CN2023/110518 CN2023110518W WO2024027696A1 WO 2024027696 A1 WO2024027696 A1 WO 2024027696A1 CN 2023110518 W CN2023110518 W CN 2023110518W WO 2024027696 A1 WO2024027696 A1 WO 2024027696A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
target
configuration information
elements
target element
Prior art date
Application number
PCT/CN2023/110518
Other languages
French (fr)
Chinese (zh)
Inventor
许顺
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024027696A1 publication Critical patent/WO2024027696A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

A page display method and a related apparatus, relating to the technical field of terminals. The method comprises: displaying a first page on a foldable screen in a folded state (501); when detecting that the foldable screen is unfolded, obtaining a third page on the basis of measurements and layouts in respect of elements in the first page (502); performing re-layout of a target element in the third page to obtain the position of the target element after the re-layout, the target element being a view or a view group (503); drawing on the basis of the position of the target element after the re-layout to obtain a second page (504), the absolute layout of the target element in the third page being different from the absolute layout of the target element in the second page; and displaying the second page on the foldable screen in an unfolded state (505). By performing re-layout of a target element in a page, a page displayed on a foldable screen in an unfolded state matches a screen of the foldable screen in the unfolded state, thereby improving the user experience.

Description

页面显示方法和相关装置Page display method and related devices
本申请要求于2022年08月02日提交中国专利局、申请号为202210923735.6、申请名称为“页面显示方法和相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the China Patent Office on August 2, 2022, with the application number 202210923735.6 and the application name "Page Display Method and Related Devices", the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及终端技术领域,并且更具体地,涉及页面显示方法和相关装置。The present application relates to the field of terminal technology, and more specifically, to a page display method and related devices.
背景技术Background technique
随着折叠屏手机的出现,应用程序的页面显示与终端屏幕的适配越来越受到关注。With the emergence of foldable screen mobile phones, the adaptation of application page display to the terminal screen has attracted more and more attention.
目前,在用户将折叠屏手机的折叠屏从折叠状态变为展开状态时,在展开状态下的折叠屏上显示应用的页面时,通常先将折叠状态下的折叠屏上所显示的应用的页面按照预设的放大比例(比如,放大比例为2倍、或3倍等)进行放大,再将放大后的页面显示在展开状态下的折叠屏上。Currently, when a user changes the folding screen of a folding screen mobile phone from the folded state to the unfolded state, and when displaying the page of the application on the folding screen in the unfolded state, the user usually first changes the page of the application displayed on the folding screen in the folding state. Magnify according to the preset magnification ratio (for example, the magnification ratio is 2 times, or 3 times, etc.), and then display the enlarged page on the folding screen in the expanded state.
然而,由于放大后的页面的面积通常大于展开状态下的折叠屏的面积,这就导致放大后的页面显示在展开状态下的折叠屏上时,容易出现内容显示不全的情况,也就是容易出现应用的页面与展开态的屏幕不适配的问题,影响用户的体验。However, since the area of the enlarged page is usually larger than the area of the folding screen in the unfolded state, it is easy for the content to be incompletely displayed when the enlarged page is displayed on the folding screen in the unfolded state. The application page does not match the expanded screen, which affects the user experience.
发明内容Contents of the invention
本申请提供了页面显示方法和相关装置,以期实现应用的页面与展开状态下的屏幕相适配,提升用户体验。This application provides a page display method and related devices, in order to realize the adaptation of the application page to the screen in the expanded state and improve the user experience.
第一方面,本申请提供了一种页面显示方法,应用于电子设备,该方法包括:在折叠态下的折叠屏显示第一页面;在检测到折叠屏被展开时,基于对第一页面中的元素的测量和布局,得到第三页面;对第三页面中的目标元素进行重布局,得到目标元素重布局后的位置,该目标元素为视图或视图组;基于目标元素重布局后的位置进行绘制,得到第二页面,该目标元素在第三页面中的绝对布局和在第二页面中的绝对布局不同;在展开态下的折叠屏显示第二页面。In a first aspect, the present application provides a page display method, which is applied to an electronic device. The method includes: displaying a first page on a folding screen in a folded state; and when detecting that the folding screen is unfolded, displaying the first page based on the Measure and layout the elements to obtain the third page; re-layout the target element in the third page to obtain the re-layout position of the target element, which is a view or view group; based on the re-layout position of the target element Draw to obtain the second page. The absolute layout of the target element in the third page is different from the absolute layout in the second page; the folding screen in the expanded state displays the second page.
其中,对第一页面中的元素的测量可以用于确定元素在第三页面中的大小,对第一页面中的元素的布局可用于确定元素在第三页面中的位置。The measurement of the elements in the first page can be used to determine the size of the elements in the third page, and the layout of the elements in the first page can be used to determine the position of the elements in the third page.
目标元素可以是预定义的。该目标元素例如可以在设备出厂前,对不同应用的页面测试确定,具体可以包括:页面中一些可能会在折叠屏由折叠态被展开后落在折叠屏范围之外的元素,或者显示不全的元素,等等。本申请对此不作限定。Target elements can be predefined. For example, the target element can be determined by testing the pages of different applications before the device leaves the factory. Specifically, it can include: some elements on the page that may fall outside the scope of the folding screen after the folding screen is expanded from the folded state, or are incompletely displayed. elements, etc. This application does not limit this.
基于上述方法,电子设备在检测到折叠屏从折叠态变为展开态时,先以折叠态下的折叠屏上所显示的第一页面中元素的大小和位置为基准,通过测量和布局来得到第三页面,再对第三页面中的部分或全部元素(也即上述目标元素)的位置进行重布局,进而可以根据目标元素重布局后的位置进行绘制以得到第二页面,并将第二页面显示在折叠屏上。如此一来,用户在将折叠屏展开后看到的页面为第二页面,由于在绘制第二页面前,考虑到目标元素可能落在折叠屏范围之外的情况,对其进行了重布局,从而使得呈现给用户的第二页面包含了第一页面中的所有元素,可以避免第一页面中的元素在折叠屏被展开后显示不全的情况,换言之,折叠屏上所显示的页面能够与屏幕相适配,从而提升了用户体验。Based on the above method, when the electronic device detects that the folding screen changes from the folded state to the unfolded state, it first uses the size and position of the elements in the first page displayed on the folding screen in the folded state as a benchmark, and obtains it through measurement and layout. On the third page, the position of some or all elements in the third page (that is, the above-mentioned target element) is re-layout, and then the second page can be obtained by drawing according to the re-layout position of the target element. The page is displayed on the folding screen. In this way, the page that the user sees after unfolding the folding screen is the second page. Before drawing the second page, considering that the target element may fall outside the scope of the folding screen, it is re-layout. As a result, the second page presented to the user contains all the elements in the first page, which can avoid the situation where the elements in the first page are not fully displayed after the folding screen is unfolded. In other words, the page displayed on the folding screen can be consistent with the screen. Adapt accordingly, thus improving the user experience.
结合第一方面,在第一方面的某些可能的实现方式中,所述对第三页面中的目标元素进行重布局,包括:获取配置信息,该配置信息用于指示目标元素在重布局之前的初始位置和重布局之后的目标位置,该目标元素重布局之前的初始位置和重布局之后的目标位置不同;基于配置信息,对第三页面中的目标元素进行重布局。With reference to the first aspect, in some possible implementations of the first aspect, relayout of the target element in the third page includes: obtaining configuration information, the configuration information is used to indicate that the target element is before relayout The initial position before relayout and the target position after relayout of the target element are different; based on the configuration information, the target element in the third page is relayout.
通过预先设置好的配置信息来对第三页面中的目标元素进行重布局,使得电子设备根据配置信息的指示对第三页面中的目标元素进行位置调整即可,无需再去临时通过大量计算来确定各个目标元素的显示位置,提高了重布局的效率。 The target element in the third page is rearranged through the preset configuration information, so that the electronic device can adjust the position of the target element in the third page according to the instructions of the configuration information, without having to temporarily perform a large amount of calculations. Determine the display position of each target element to improve the efficiency of relayout.
结合第一方面,在第一方面的某些可能的实现方式中,该配置信息指示第三页面中的多个元素分别在重布局之前的初始位置和重布局之后的目标位置;该多个元素包括多个视图,或者,该多个元素包括至少一个视图组和至少一个视图组中的多个视图,且多个元素包括目标元素。Combined with the first aspect, in some possible implementations of the first aspect, the configuration information indicates the initial positions before relayout and the target positions after relayout of multiple elements in the third page; the multiple elements A plurality of views is included, or the plurality of elements includes at least one view group and a plurality of views in at least one view group, and the plurality of elements includes the target element.
其中,该多个元素可以为第三页面中一部分区域的元素,也可以为第三页面中所有区域的元素。该多个元素中包括需要进行重布局的目标元素,也包括无需进行重布局的目标元素。The plurality of elements may be elements in a part of the area on the third page, or may be elements in all areas on the third page. The multiple elements include target elements that need to be re-layout and target elements that do not need to be re-layout.
在某些可能的实现方式中,在所述基于配置信息,对第三页面中的目标元素进行重布局之前,该方法还包括:基于配置信息指示的多个元素中每个元素的初始位置和目标位置,确定需要重布局的目标元素;在第三页面中匹配目标元素。In some possible implementations, before relayout of the target element in the third page based on the configuration information, the method further includes: based on the initial position and sum of each of the multiple elements indicated by the configuration information. Target position, determine the target element that needs to be re-layout; match the target element on the third page.
通过对配置信息所指示的每个元素的初始位置和目标位置的差异比对,可从多个元素中快速筛选出目标元素,进而加快在第三页面中定位出目标元素的效率。By comparing the difference between the initial position and the target position of each element indicated by the configuration information, the target element can be quickly selected from multiple elements, thereby speeding up the efficiency of locating the target element on the third page.
结合第一方面,在第一方面的某些可能的实现方式中,该多个元素包括至少一个视图组和至少一个视图组中的多个视图,以及所述基于配置信息指示的多个元素中每个元素的初始位置和目标位置,确定需要重布局的目标元素,包括:基于多个元素中各元素的层次结构,按照从父元素到子元素的顺序,遍历多个元素中每个元素的初始位置和目标位置,以确定需要重布局的目标元素。In conjunction with the first aspect, in some possible implementations of the first aspect, the multiple elements include at least one view group and multiple views in the at least one view group, and among the multiple elements indicated based on the configuration information The initial position and target position of each element, determine the target element that needs to be re-layout, including: based on the hierarchical structure of each element in multiple elements, traversing the order of each element in multiple elements in order from parent elements to child elements. Initial position and target position to determine the target element that needs to be re-layout.
通过各个元素的层次结构来遍历寻找出目标元素,从而可以准确地确定出目标元素,避免目标元素被遗漏。By traversing the hierarchical structure of each element to find the target element, the target element can be accurately determined and the target element can be avoided from being missed.
结合第一方面,在第一方面的某些可能的实现方式中,所述在第三页面中匹配目标元素,包括:根据多个元素在第三页面中的位置和配置信息中指示的目标元素的初始位置,在第三页面中匹配目标元素。In conjunction with the first aspect, in some possible implementations of the first aspect, matching the target element in the third page includes: based on the position of the multiple elements in the third page and the target element indicated in the configuration information. The initial position matches the target element in the third page.
结合第一方面,在第一方面的某些可能的实现方式中,该配置信息还用于指示多个元素中每个元素的标识;所述在第三页面中匹配目标元素,包括:根据多个元素的标识和配置信息中指示的目标元素的标识,在第三页面中匹配目标元素。In connection with the first aspect, in some possible implementations of the first aspect, the configuration information is also used to indicate the identity of each element in the plurality of elements; the matching of the target element in the third page includes: according to the plurality of elements The identifier of the element and the identifier of the target element indicated in the configuration information match the target element in the third page.
结合第一方面,在第一方面的某些可能的实现方式中,该配置信息还用于指示页面的放大比例,该配置信息指示的多个元素中每个元素的初始位置和目标位置是基于放大比例确定的。Combined with the first aspect, in some possible implementations of the first aspect, the configuration information is also used to indicate the magnification ratio of the page, and the initial position and target position of each element among the multiple elements indicated by the configuration information are based on The magnification ratio is determined.
其中,放大比例可以满足如下条件:0<R≤N,N为折叠屏在完全展开时的屏幕宽度与折叠屏在折叠状态下的屏幕宽度之间的比值。在一种可能的设计中,在N=2时,R可取值1.2。Among them, the enlargement ratio can satisfy the following conditions: 0<R≤N, where N is the ratio between the screen width of the folding screen when it is fully unfolded and the screen width of the folding screen in the folded state. In one possible design, when N=2, R can take a value of 1.2.
通过配置信息来指示页面的放大比例,使得页面中的元素可根据放大需求被适度放大,既能避免展开态下的折叠屏所显示的页面中元素不会过大,使得放大后的元素与展开态下的折叠屏的屏幕相适配,提高用户体验。By configuring information to indicate the magnification ratio of the page, the elements in the page can be appropriately enlarged according to the magnification requirements, which can avoid the elements in the page displayed on the folding screen in the expanded state from being too large, making the enlarged elements different from the expanded ones. It adapts to the screen of the folding screen in the state to improve the user experience.
在一种可实现的方式中,配置信息还用于指示电子设备的折叠屏在展开状态下,第三页面所占的屏幕宽度。In an implementable manner, the configuration information is also used to indicate the screen width occupied by the third page when the folding screen of the electronic device is in the unfolded state.
第三页面所占的屏幕宽度Q可以满足如下条件:Qx=Ry,其中,Q为电子设备在展开状态下,第三页面所占的屏幕宽度,x为电子设备在展开状态下的屏幕宽度,y为电子设备在折叠状态下的屏幕宽度,R为放大比例。The screen width Q occupied by the third page can meet the following conditions: Qx=Ry, where Q is the screen width occupied by the third page when the electronic device is in the expanded state, x is the screen width of the electronic device in the expanded state, y is the screen width of the electronic device in the folded state, and R is the enlargement ratio.
结合第一方面,在第一方面的某些可能的实现方式中,该放大比例大于1的情况下,该配置信息还用于指示资源的存储路径,该资源是与折叠屏在展开态下的显示分辨率匹配的资源。Combined with the first aspect, in some possible implementations of the first aspect, when the amplification ratio is greater than 1, the configuration information is also used to indicate the storage path of the resource, and the resource is with the folding screen in the unfolded state. Display resources with matching resolutions.
在配置信息所指示的放大比例大于1的情况下,通过配置信息指示与折叠屏在展开态下的显示分辨率匹配的资源的存储路径,提高了展开态下的折叠屏所显示的页面中的元素的清晰度,也提升了用户体验。When the amplification ratio indicated by the configuration information is greater than 1, the configuration information indicates the storage path of the resource that matches the display resolution of the folding screen in the unfolded state, thereby improving the resolution of the page displayed by the folding screen in the unfolded state. The clarity of elements also improves the user experience.
结合第一方面,在第一方面的某些可能的实现方式中,该第一页面为应用程序的页面,所述获取配置信息,包括:基于应用程序的页面对应的Activity组件,获取与Activity组件对应的配置信息。Combined with the first aspect, in some possible implementations of the first aspect, the first page is a page of an application, and the obtaining configuration information includes: based on the Activity component corresponding to the page of the application, obtaining the Activity component Corresponding configuration information.
第二方面,本申请提供了一种页面显示装置,该装置包括用于执行如第一方面以及第一方面任意一种可能的实现方式的模块。In a second aspect, this application provides a page display device, which includes a module for executing the first aspect and any possible implementation manner of the first aspect.
第三方面,本申请提供了一种页面显示装置,包括存储器和处理器,存储器用于存储计算机程序,处理器用于执行计算机程序,以执行第一方面以及第一方面任意一种可能的实现方式。 In a third aspect, this application provides a page display device, including a memory and a processor. The memory is used to store a computer program, and the processor is used to execute the computer program to execute the first aspect and any possible implementation of the first aspect. .
第四方面,本申请提供了一种电子设备,该电子设备包括处理器和存储器,该存储器用于存储计算机程序,该处理器用于调用存储器中的计算机程序以执行如第一方面以及第一方面任一种可能实现方式中的方法。In a fourth aspect, the present application provides an electronic device. The electronic device includes a processor and a memory. The memory is used to store a computer program. The processor is used to call the computer program in the memory to execute the first aspect and the first aspect. method in any of the possible implementations.
第五方面,本申请提供了一种芯片,芯片包括处理器,该处理器用于调用存储器中的计算机程序,以执行如第一方面以及第一方面任一种可能实现方式中的方法。In a fifth aspect, this application provides a chip, which includes a processor configured to call a computer program in a memory to execute the method in the first aspect and any possible implementation of the first aspect.
第六方面,本申请提供了一种计算机可读存储介质,包括计算机程序,当该计算机程序在计算机上运行时,使得电子设备执行第一方面以及第一方面任一种可能实现方式中的方法。In a sixth aspect, the present application provides a computer-readable storage medium, including a computer program. When the computer program is run on a computer, the electronic device causes the electronic device to execute the method in the first aspect and any possible implementation of the first aspect. .
第七方面,本申请提供了一种计算机程序产品,包括计算机程序,当该计算机程序在计算机上运行时,使得电子设备执行第一方面以及第一方面任一种可能实现方式中的方法。In a seventh aspect, the present application provides a computer program product, including a computer program, which when the computer program is run on a computer, causes the electronic device to execute the method in the first aspect and any possible implementation of the first aspect.
应当理解的是,本申请的第二方面至第七方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。It should be understood that the second to seventh aspects of the present application correspond to the technical solution of the first aspect of the present application, and the beneficial effects achieved by each aspect and corresponding feasible implementations are similar, and will not be described again.
附图说明Description of the drawings
图1是本申请实施例提供的电子设备的一种外观示意图;Figure 1 is a schematic diagram of the appearance of an electronic device provided by an embodiment of the present application;
图2是本申请实施例提供的元素的一种结构示意图;Figure 2 is a schematic structural diagram of elements provided by the embodiment of the present application;
图3a是本申请实施例提供的电子设备的硬件结构的示意图;Figure 3a is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;
图3b是本申请实施例提供的电子设备的软件与硬件的结构框图;Figure 3b is a structural block diagram of the software and hardware of the electronic device provided by the embodiment of the present application;
图4是本申请实施例提供的电子设备进行页面显示的一种界面示意图;Figure 4 is a schematic interface diagram of an electronic device providing a page display according to an embodiment of the present application;
图5是本申请实施例提供的页面显示方法的示意性流程图;Figure 5 is a schematic flow chart of a page display method provided by an embodiment of the present application;
图6a至图6d是本申请实施例提供的电子设备进行页面显示的另一界面示意图;Figures 6a to 6d are another schematic interface diagram of the electronic device provided by the embodiment of the present application for page display;
图7a至图7e是本申请实施例提供的电子设备进行页面显示的另一界面示意图;Figures 7a to 7e are another schematic interface diagram of the electronic device provided by the embodiment of the present application for page display;
图8是本申请实施例提供的电子设备的软件架构示意图;Figure 8 is a schematic diagram of the software architecture of the electronic device provided by the embodiment of the present application;
图9是本申请实施例提供的页面显示装置的示意性框图;Figure 9 is a schematic block diagram of a page display device provided by an embodiment of the present application;
图10是本申请实施例提供的页面显示装置的硬件结构示意图。FIG. 10 is a schematic diagram of the hardware structure of a page display device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in this application will be described below with reference to the accompanying drawings.
本申请实施例提供的页面显示方法,可以应用在具备柔性屏幕的电子设备中。用户使用具有柔性屏幕的电子设备时,可以展开或折叠屏幕,即屏幕可以开合。电子设备的屏幕可以包括但不限于为:外折屏、内折屏、对角折叠屏等。电子设备的屏幕可以折叠至少一次,与此对应的屏幕可以称为双折折叠屏、三折折叠屏等。下述实施例中以电子设备的屏幕折叠一次为例进行说明。由于电子设备的屏幕可折叠,因此也可将该屏幕称为折叠屏。The page display method provided by the embodiment of the present application can be applied to electronic devices with flexible screens. When users use electronic devices with flexible screens, they can unfold or fold the screen, that is, the screen can be opened and closed. The screens of electronic devices may include, but are not limited to, outer folding screens, inner folding screens, diagonal folding screens, etc. The screen of an electronic device can be folded at least once, and the corresponding screen can be called a bi-fold folding screen, a tri-fold folding screen, etc. In the following embodiments, the screen of the electronic device is folded once as an example for description. Since the screen of an electronic device can be folded, the screen can also be called a folding screen.
为便于理解,首先对下文涉及到的几个术语做简单说明。To facilitate understanding, first a brief explanation of several terms involved below.
1.折叠态与展开态:电子设备的折叠屏处于被折叠的状态称为折叠态,电子设备的折叠屏处于被展开的状态称为展开态。1. Folded state and unfolded state: The folded state of the electronic device is called the folded state, and the unfolded state of the electronic device is called the unfolded state.
对于具有外折折叠屏的电子设备来说,由于该电子设备具有一个屏幕,则折叠态可以理解为将该屏幕从该屏幕的折叠线对折,直至折叠线两侧的屏幕之间的夹角为0°或近似0°时的状态。例如,对于双折的折叠屏,该折叠线可以为折叠屏的中轴线。For an electronic device with an outward-folding screen, since the electronic device has one screen, the folded state can be understood as folding the screen in half from the folding line of the screen until the angle between the screens on both sides of the folding line is The state at 0° or approximately 0°. For example, for a bi-fold folding screen, the folding line may be the central axis of the folding screen.
对于具有内折折叠屏的电子设备来说,由于该电子设备具有多个独立的屏幕,则折叠态可以为多个屏幕之间的夹角为0°或近似0°时的状态。比如,对于具有两个独立屏幕的内折折叠屏的电子设备,在两个屏幕之间的夹角为0°或近似0°时,说明折叠屏处于折叠态。For an electronic device with an inward-folding screen, since the electronic device has multiple independent screens, the folded state may be a state when the angle between the multiple screens is 0° or approximately 0°. For example, for an electronic device with an inward-folding screen that has two independent screens, when the angle between the two screens is 0° or approximately 0°, it means that the folding screen is in a folded state.
下文中为方便说明,将外折折叠屏的折叠线两侧的屏幕之间的夹角和内折折叠屏多个屏幕之间的夹角统称为屏幕之间的夹角。For the convenience of explanation below, the angle between the screens on both sides of the folding line of the outward-folding folding screen and the angle between multiple screens of the in-folding folding screen are collectively referred to as the angle between the screens.
图1示例性地示出了电子设备的一种外观示意图。应理解,图1所示的电子设备的折叠屏为外折屏,且该折叠屏为双折折叠屏。Figure 1 exemplarily shows a schematic diagram of the appearance of an electronic device. It should be understood that the folding screen of the electronic device shown in Figure 1 is an outward-folding screen, and the folding screen is a double-folding screen.
图1中的(a)示出了该电子设备的折叠屏处于折叠态下的外观,图1中的(b)示出了该电子设备的折叠屏处于完全展开态下的外观。用户可通过对电子设备的折叠屏进行展开操作、或折叠操作,在如 图1中的(a)和如图1中的(b)之间进行折叠屏的不同状态的转换。(a) in FIG. 1 shows the appearance of the folding screen of the electronic device in the folded state, and (b) in FIG. 1 shows the appearance of the folding screen of the electronic device in the fully unfolded state. Users can unfold or fold the folding screen of electronic devices, such as The different states of the folding screen are converted between (a) in Figure 1 and (b) in Figure 1 .
该折叠屏在折叠态时,屏幕间夹角为0°或近似0°,当折叠屏被展开后,屏幕间夹角随之增大,屏幕间夹角可以在0°至180°的范围内变化。需要说明的是,文中只是为了区分电子设备在不同状态下显示的不同页面,对折叠屏定义了折叠态和展开态,而并不限定不同状态对应的屏幕间夹角。不同的设备厂商可以将折叠态和展开态对应的角度范围做出不同的定义。在另一些设计中,折叠屏还可能被定义更多的状态,比如中间态、支架态等,本申请对此均不做限定。When the folding screen is in the folded state, the angle between the screens is 0° or approximately 0°. When the folding screen is unfolded, the angle between the screens increases, and the angle between the screens can be in the range of 0° to 180°. Variety. It should be noted that the article only defines the folded state and the unfolded state for the folding screen in order to distinguish different pages displayed by the electronic device in different states, and does not limit the angle between the screens corresponding to the different states. Different equipment manufacturers can define different angle ranges corresponding to the folded state and the unfolded state. In other designs, the folding screen may be defined in more states, such as intermediate state, stand state, etc., which are not limited in this application.
需注意,这里所述的电子设备在不同状态下显示的不同页面,是指同一应用程序(可简称,应用)(application,APP)的页面,虽然在不同状态下显示的页面不同,但这些状态下显示的页面都包含了相同的页面内容,例如包含了相同的元素,且元素间的关系也相同。其中,所述元素包括视图(view)和视图组(viewgroup),元素间的关系包括视图与视图间的关系,以及视图与视图组间的关系。It should be noted that the different pages displayed by the electronic device in different states mentioned here refer to the pages of the same application (application, APP). Although the pages displayed in different states are different, these states The pages shown below all contain the same page content, such as the same elements, and the relationships between elements are also the same. Wherein, the elements include views and view groups, and relationships between elements include relationships between views and views and views.
应理解,电子设备无论处于折叠态还是展开态,均可通过折叠屏显示各种应用的各个页面。比如,如图1所示,电子设备可通过折叠屏显示桌面应用的主页面。图1中的(a)和(b)中所示的页面就分别为该电子设备在不同状态下显示的不同页面。It should be understood that whether the electronic device is in a folded state or an unfolded state, various pages of various applications can be displayed through the folding screen. For example, as shown in Figure 1, the electronic device can display the main page of the desktop application through the folding screen. The pages shown in (a) and (b) in Figure 1 are different pages displayed by the electronic device in different states.
一种可能的设计是,电子设备可以在由折叠态展开至某一预设角度时,将显示的页面由适用于折叠态的页面切换为适用于展开态的页面,该预设角度可以由设备厂商定义,不同的设备厂商对于该预设角度定义的值也可能不同,本申请对此不作限定。One possible design is that when the electronic device is unfolded from the folded state to a certain preset angle, the displayed page can be switched from a page suitable for the folded state to a page suitable for the unfolded state. The preset angle can be determined by the device. Different equipment manufacturers may define different values for the preset angle, which is not limited in this application.
2.元素:应用程序的页面内容可以包括多个元素。该多个元素可以包括多个视图,或者,多个元素可以包括至少一个视图组和该至少一个视图组中的多个视图。视图是元素的最小单位。2. Elements: The page content of the application can include multiple elements. The plurality of elements may include a plurality of views, or the plurality of elements may include at least one view group and a plurality of views in the at least one view group. A view is the smallest unit of an element.
对于任意一个页面,可将该页面上展现的所有内容统称为一个元素,也可将页面上展现的内容划分为多个不同的部分,每个部分称为一个元素。For any page, all the content displayed on the page can be collectively called an element, or the content displayed on the page can be divided into multiple different parts, and each part is called an element.
在页面中,元素可按照父元素到子元素的层次结构进行设置。其中,父元素可以包括子元素,父元素可以为视图组,子元素可以为视图、或者视图组。In a page, elements can be arranged in a hierarchical structure from parent to child elements. Among them, the parent element can include child elements, the parent element can be a view group, and the child elements can be a view or a view group.
下面结合图2对元素的结构进行示例性说明。The structure of the elements will be exemplified below with reference to Figure 2.
图2为本申请实施例提供的元素的一种结构示意图。如图2所示,该元素包括视图组200,视图组200可包括视图组210和视图组220。其中,视图组210可进一步包括视图211和视图组212,视图组220可进一步包括视图221和视图222,视图组212可进一步包括视图2121和视图2122。Figure 2 is a schematic structural diagram of elements provided by the embodiment of the present application. As shown in FIG. 2 , the element includes a view group 200 , which may include a view group 210 and a view group 220 . The view group 210 may further include a view 211 and a view group 212, the view group 220 may further include a view 221 and a view 222, and the view group 212 may further include a view 2121 and a view 2122.
应理解,视图组200可以为视图组210和视图组220的父元素,视图组210和视图组220可以为视图组200的子元素。视图组210可以为视图211和视图组212的父元素,视图211和视图组212可以为视图组210的子元素。视图组220可以为视图221和视图222的父元素,视图221和视图222可以为视图组220的子元素。视图组212可以为视图2121和视图2122的父元素,视图2121和视图2122可以为视图组212的子元素。It should be understood that view group 200 may be a parent element of view group 210 and view group 220 , and view group 210 and view group 220 may be child elements of view group 200 . View group 210 may be the parent element of view 211 and view group 212 , and view 211 and view group 212 may be child elements of view group 210 . View group 220 may be the parent element of view 221 and view 222 , and view 221 and view 222 may be child elements of view group 220 . View group 212 may be the parent element of view 2121 and view 2122, and view 2121 and view 2122 may be child elements of view group 212.
3.绝对布局(relative layout):又称坐标布局,可以直接指定元素的绝对位置,可通过设置元素的X坐标和Y坐标来控制元素的位置。其中,元素的X坐标和Y坐标分别是相对于预定义的坐标轴来设置。3. Absolute layout (relative layout): Also known as coordinate layout, the absolute position of the element can be directly specified, and the position of the element can be controlled by setting the X coordinate and Y coordinate of the element. Among them, the X coordinate and Y coordinate of the element are set relative to the predefined coordinate axis.
下面对适用于本申请实施例提供的方法的电子设备进行介绍。Electronic devices suitable for the method provided by the embodiments of the present application are introduced below.
图3a是本申请实施例提供的电子设备的硬件结构的示意图。Figure 3a is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
电子设备300可以包括处理器310,外部存储器接口320,内部存储器321,通用串行总线(universal serial bus,USB)接口330,充电管理模块340,电源管理模块341,天线1,天线2,移动通信模块350,无线通信模块360,音频模块370,扬声器370A,受话器370B,麦克风370C,耳机接口370D,传感器模块380,按键390,马达391,指示器392,摄像头393,显示屏394,以及用户标识模块(subscriber identification module,SIM)卡接口395等。其中传感器模块380可以包括压力传感器380A,陀螺仪传感器380B,气压传感器380C,磁传感器380D,加速度传感器380E,距离传感器380F,接近光传感器380G,指纹传感器380H,温度传感器380J,触摸传感器380K,环境光传感器380L,骨传导传感器380M等。The electronic device 300 may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, an antenna 1, an antenna 2, and a mobile communication Module 350, wireless communication module 360, audio module 370, speaker 370A, receiver 370B, microphone 370C, headphone interface 370D, sensor module 380, button 390, motor 391, indicator 392, camera 393, display screen 394, and user identification module (subscriber identification module, SIM) card interface 395, etc. The sensor module 380 may include a pressure sensor 380A, a gyro sensor 380B, an air pressure sensor 380C, a magnetic sensor 380D, an acceleration sensor 380E, a distance sensor 380F, a proximity light sensor 380G, a fingerprint sensor 380H, a temperature sensor 380J, a touch sensor 380K, and ambient light. Sensor 380L, bone conduction sensor 380M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备300的具体限定。在本申请另一些实施例中,电子设备300可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或 者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 300 . In other embodiments of the present application, the electronic device 300 may include more or less components than shown in the figures, or combine some components, or separate some components, or or different component arrangements. The components illustrated may be implemented in hardware, software, or a combination of software and hardware.
处理器310可以包括一个或多个处理单元,例如:处理器310可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 310 may include one or more processing units. For example, the processor 310 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器310中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器310中的存储器为高速缓冲存储器。该存储器可以保存处理器310刚用过或循环使用的指令或数据。如果处理器310需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器310的等待时间,因而提高了系统的效率。The processor 310 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 310 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 310 . If processor 310 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 310 is reduced, thus improving the efficiency of the system.
在一些实施例中,处理器310可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 310 may include one or more interfaces. Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备300的结构限定。在本申请另一些实施例中,电子设备300也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation of the electronic device 300 . In other embodiments of the present application, the electronic device 300 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块340用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块340可以通过USB接口330接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块340可以通过电子设备300的无线充电线圈接收无线充电输入。充电管理模块340为电池充电的同时,还可以通过电源管理模块341为电子设备供电。The charge management module 340 is used to receive charging input from the charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 340 may receive charging input from the wired charger through the USB interface 330 . In some wireless charging embodiments, the charging management module 340 may receive wireless charging input through the wireless charging coil of the electronic device 300 . While the charging management module 340 charges the battery, it can also provide power to the electronic device through the power management module 341 .
电源管理模块341用于连接电池,充电管理模块340与处理器310。电源管理模块341接收电池和/或充电管理模块340的输入,为处理器310,内部存储器321,显示屏394,摄像头393,和无线通信模块360等供电。电源管理模块341还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块341也可以设置于处理器310中。在另一些实施例中,电源管理模块341和充电管理模块340也可以设置于同一个器件中。The power management module 341 is used to connect the battery, the charging management module 340 and the processor 310 . The power management module 341 receives input from the battery and/or charging management module 340 and supplies power to the processor 310, internal memory 321, display screen 394, camera 393, wireless communication module 360, etc. The power management module 341 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters. In some other embodiments, the power management module 341 may also be provided in the processor 310 . In other embodiments, the power management module 341 and the charging management module 340 can also be provided in the same device.
电子设备300的无线通信功能可以通过天线1,天线2,移动通信模块350,无线通信模块360,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 300 can be implemented through the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the modem processor and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备300中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 300 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other embodiments, antennas may be used in conjunction with tuning switches.
移动通信模块350可以提供应用在电子设备300上的包括2G/3G/4G/5G等无线通信的解决方案。The mobile communication module 350 can provide wireless communication solutions including 2G/3G/4G/5G applied to the electronic device 300 .
无线通信模块360可以提供应用在电子设备300上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。The wireless communication module 360 can provide applications on the electronic device 300 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
在一些实施例中,电子设备300的天线1和移动通信模块350耦合,天线2和无线通信模块360耦合,使得电子设备300可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准 天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 300 is coupled to the mobile communication module 350, and the antenna 2 is coupled to the wireless communication module 360, so that the electronic device 300 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi Zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
电子设备300通过GPU,显示屏394,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏394和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器310可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 300 implements display functions through a GPU, a display screen 394, an application processor, and the like. The GPU is an image processing microprocessor and is connected to the display screen 394 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 310 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏394用于显示图像,视频等。显示屏394包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),MiniLed,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备300可以包括1个或N个显示屏394,N为大于1的正整数。本申请实施例中的显示屏394为柔性屏幕,可以响应于用户的操作被折叠或展开,相关介绍可以参照图1中所示的屏幕。The display screen 394 is used to display images, videos, etc. Display 394 includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode). emitting diode (AMOLED), flexible light-emitting diode (FLED), MiniLed, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 300 may include 1 or N display screens 394, where N is a positive integer greater than 1. The display screen 394 in the embodiment of the present application is a flexible screen that can be folded or unfolded in response to user operations. For relevant introduction, please refer to the screen shown in Figure 1 .
电子设备300可以通过ISP,摄像头393,视频编解码器,GPU,显示屏394以及应用处理器等实现拍摄功能。The electronic device 300 can implement the shooting function through an ISP, a camera 393, a video codec, a GPU, a display screen 394, and an application processor.
外部存储器接口320可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备300的存储能力。外部存储卡通过外部存储器接口320与处理器310通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 300. The external memory card communicates with the processor 310 through the external memory interface 320 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.
内部存储器321可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器321可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备300使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器321可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器310通过运行存储在内部存储器321的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备300的各种功能应用以及数据处理。Internal memory 321 may be used to store computer executable program code, which includes instructions. The internal memory 321 may include a program storage area and a data storage area. Among them, the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.). The storage data area may store data created during use of the electronic device 300 (such as audio data, phone book, etc.). In addition, the internal memory 321 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 310 executes various functional applications and data processing of the electronic device 300 by executing instructions stored in the internal memory 321 and/or instructions stored in a memory provided in the processor.
电子设备300可以通过音频模块370,扬声器370A,受话器370B,麦克风370C,耳机接口370D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 300 can implement audio functions through the audio module 370, the speaker 370A, the receiver 370B, the microphone 370C, the headphone interface 370D, and the application processor. Such as music playback, recording, etc.
按键390包括开机键,音量键等。按键390可以是机械按键。也可以是触摸式按键。电子设备300可以接收按键输入,产生与电子设备300的用户设置以及功能控制有关的键信号输入。The buttons 390 include a power button, a volume button, etc. Key 390 may be a mechanical key. It can also be a touch button. The electronic device 300 may receive key input and generate key signal input related to user settings and function control of the electronic device 300 .
马达391可以产生振动提示。马达391可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏394不同区域的触摸操作,马达391也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 391 can produce vibration prompts. Motor 391 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback. For example, touch operations for different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. Acting on touch operations in different areas of the display screen 394, the motor 391 can also correspond to different vibration feedback effects. Different application scenarios (such as time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
指示器392可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 392 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.
SIM卡接口395用于连接SIM卡。SIM卡可以通过插入SIM卡接口395,或从SIM卡接口395拔出,实现和电子设备300的接触和分离。在一些实施例中,电子设备300采用eSIM,即:嵌入式SIM卡。The SIM card interface 395 is used to connect the SIM card. The SIM card can be connected to or separated from the electronic device 300 by inserting it into the SIM card interface 395 or pulling it out from the SIM card interface 395 . In some embodiments, the electronic device 300 uses an eSIM, that is, an embedded SIM card.
图3b为本申请实施例提供电子设备的软件与硬件的结构框图。Figure 3b is a structural block diagram of software and hardware of an electronic device according to an embodiment of the present application.
如图3b所示,分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层、应用程序框架层、安卓运行时(Android runtime)和系统库,以及内核层。As shown in Figure 3b, the layered architecture divides the software into several layers, and each layer has clear roles and division of labor. The layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system library, and kernel layer.
应用程序层可以包括一系列应用程序包。如图3b所示,应用程序层可以包括锁屏应用、桌面应用等。桌面应用例如可进一步包括相机、图库、日历、通话、地图、导航、WLAN、蓝牙、音乐、视频、游戏、购物、出行、即时通信(如短信息、微信等)、智能家居、设备控制等应用程序。The application layer can include a series of application packages. As shown in Figure 3b, the application layer may include lock screen applications, desktop applications, etc. Desktop applications may further include, for example, cameras, galleries, calendars, calls, maps, navigation, WLAN, Bluetooth, music, videos, games, shopping, travel, instant messaging (such as SMS, WeChat, etc.), smart home, device control and other applications. program.
其中,智能家居应用可用于对具有联网功能的家居设备进行控制或管理。例如,家居设备可以包括电灯、电视和空调。又如,家居设备还可以包括防盗门锁、音箱、扫地机器人、插座、体脂秤、台灯、空气净化器、电冰箱、洗衣机、热水器、微波炉、电饭锅、窗帘、风扇、电视、机顶盒、门窗等。 Among them, smart home applications can be used to control or manage home devices with networking capabilities. For example, home appliances may include lights, televisions, and air conditioners. As another example, home equipment can also include anti-theft door locks, speakers, sweeping robots, sockets, body fat scales, desk lamps, air purifiers, refrigerators, washing machines, water heaters, microwave ovens, rice cookers, curtains, fans, TVs, set-top boxes, Doors, windows, etc.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图3b所示,应用程序框架层可以包括ActivityManagerService、视图系统、窗口管理服务(window manager service,WMS)、SurfaceFlinger等。本申请实施例对此不作任何限制。As shown in Figure 3b, the application framework layer can include ActivityManagerService, view system, window management service (window manager service, WMS), SurfaceFlinger, etc. The embodiments of this application do not impose any limitation on this.
WMS也可以称为窗口管理器,可用于管理窗口程序,它负责窗口的启动、添加、删除。窗口的层级、大小也由WMS管理。窗口不具备绘制功能,因此每个窗口都需要一块Surface来供自己绘制,为每个窗口分配Surface是由WMS完成的。WMS can also be called a window manager, which can be used to manage window programs. It is responsible for starting, adding, and deleting windows. The level and size of the window are also managed by WMS. Windows do not have the drawing function, so each window requires a Surface for drawing. The allocation of Surface to each window is completed by WMS.
ActivityManagerService可简称为AMS,是Android中很重要的一个服务,它统筹管理着Android的四大组件,即管理着活动(Activity)、服务(Service)、广播(Broadcast)和内容提供(ContentProvider)四大组件。AMS也可统一调度各应用进程。ActivityManagerService, referred to as AMS, is a very important service in Android. It manages the four major components of Android, namely, activity, service, broadcast and content provider. components. AMS can also schedule various application processes in a unified manner.
SurfaceFlinger可用于接收多个图形显示数据,将这些图形显示数据合成,也就是进行图层合成,以得到待显示的界面。SurfaceFlinger can be used to receive multiple graphic display data and synthesize these graphic display data, that is, perform layer synthesis to obtain the interface to be displayed.
SurfaceFlinger是整个Android系统渲染的核心进程。所有应用的渲染逻辑最终都会来到SurfaceFlinger中进行处理,比如进行图像合成。SurfaceFlinger会把合成后的图像数据交给中央处理器(central processing unit,CPU)或者图形处理器(graphics processing unit,GPU)进行绘制。应理解,SurfaceFlinger的具体原理可参考现有技术,在此不再赘述。SurfaceFlinger is the core process of rendering in the entire Android system. All application rendering logic will eventually come to SurfaceFlinger for processing, such as image synthesis. SurfaceFlinger will hand over the synthesized image data to the central processing unit (CPU) or graphics processing unit (GPU) for rendering. It should be understood that the specific principles of SurfaceFlinger can be referred to the existing technology and will not be described again here.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls that display text, controls that display pictures, etc. A view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
安卓运行时可以包括核心库和虚拟机。安卓运行时负责Android系统的调度和管理。The Android runtime can include core libraries and virtual machines. The Android runtime is responsible for the scheduling and management of the Android system.
核心库可以包含两部分:一部分是java语言需要调用的功能函数,另一部分是Android系统的核心库。The core library can contain two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core library of the Android system.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理、堆栈管理、线程管理、安全和异常的管理,以及垃圾回收等功能。The application layer and application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and application framework layer into binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, as well as garbage collection and other functions.
系统库可以包括多个功能模块。例如:状态监测服务、表面管理器(surface manager)、媒体库(media libraries)、三维图形处理库(例如,OpenGLES)、二维(2 dimensions,2D)图形引擎(例如,SGL)等。System libraries can include multiple functional modules. For example: status monitoring services, surface managers (surface managers), media libraries (media libraries), three-dimensional graphics processing libraries (for example, OpenGLES), two-dimensional (2 dimensions, 2D) graphics engines (for example, SGL), etc.
状态监测服务用于根据内核层上报的监测数据确定手机的具体朝向、柔性屏幕的物理状态等。表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和三维(3 dimensions,3D)图层的融合。媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如,MPEG4、H.264、MP3、AAC、AMR、JPG、PNG等。三维图形处理库用于实现三维图形绘图、图像渲染、合成和图层处理等。2D图形引擎是2D绘图的绘图引擎。The status monitoring service is used to determine the specific orientation of the mobile phone, the physical status of the flexible screen, etc. based on the monitoring data reported by the kernel layer. The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3 dimensions (3D) layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition and layer processing. 2D Graphics Engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含电源管理服务、传感器服务(也可以称,传感器驱动)、显示服务(也可以称,显示驱动)、摄像头驱动、音频驱动等。本申请实施例对此不做任何限制。The kernel layer is the layer between hardware and software. The kernel layer at least includes power management services, sensor services (also called sensor drivers), display services (also called display drivers), camera drivers, audio drivers, etc. The embodiments of this application do not impose any limitations on this.
如图3a所示,应用程序框架层以下的系统库和内核层等可称为底层系统。底层系统中包括用于提供显示服务的底层显示系统,例如,底层显示系统包括内核层中的显示驱动以及系统库中的表面管理器等。As shown in Figure 3a, the system library and kernel layer below the application framework layer can be called the underlying system. The underlying system includes the underlying display system used to provide display services. For example, the underlying display system includes the display driver in the kernel layer and the surface manager in the system library.
底层系统之下为硬件,硬件可以为软件运行提供基础。如图3a所示,该电子设备的硬件可以包括但不限于,开机键、传感器、显示屏、指纹、摄像头等。Underneath the underlying system is hardware, which can provide the basis for software operation. As shown in Figure 3a, the hardware of the electronic device may include, but is not limited to, a power button, a sensor, a display screen, a fingerprint, a camera, etc.
图4为本申请实施例提供的电子设备进行页面显示的一种界面示意图。FIG. 4 is a schematic interface diagram of an electronic device providing a page display according to an embodiment of the present application.
如图4中的(a)所示,在折叠态下的折叠屏上显示有某应用的页面401,该页面401中包含有如下元素:数字“1”、数字“2”、数字“3”、数字“4”、数字“5”、数字“6”、数字“7”和数字“8”,以及作为各数字的背景的元素(以下简称背景元素,图中以“○”示出)。As shown in (a) of Figure 4, a page 401 of an application is displayed on the folding screen in the folded state. The page 401 contains the following elements: number "1", number "2", number "3" , the number "4", the number "5", the number "6", the number "7" and the number "8", as well as elements that serve as the background of each number (hereinafter referred to as background elements, shown with "○" in the figure).
应理解,每个数字、或每个数字的背景元素均可看做视图,一个数字和一个数字的背景元素可以作为一个视图组。It should be understood that each number or the background element of each number can be regarded as a view, and a number and a number's background element can be regarded as a view group.
若用户想体验平板的效果,就可将电子设备的折叠屏展开。如图4中的(b)所示,图中以虚线框示出了电子设备的折叠屏被展开时的大小。此时,电子设备在检测到折叠屏被展开时,会将 页面401整体放大2倍,也就是以折叠态下的屏幕宽度的2倍为放大比例来放大页面401,得到放大后的页面401'。换言之,将页面401的宽度W拉宽2倍至2W、长度H拉长2倍至2H,页面401中各元素的大小也同步被放大2倍,从而得到放大后的页面401'。If users want to experience the effect of a tablet, they can unfold the folding screen of the electronic device. As shown in (b) of FIG. 4 , the dotted box in the figure shows the size of the folding screen of the electronic device when it is unfolded. At this time, when the electronic device detects that the folding screen is unfolded, it will The entire page 401 is enlarged by 2 times, that is, the page 401 is enlarged using 2 times the screen width in the folded state as the enlargement ratio, and the enlarged page 401' is obtained. In other words, the width W of the page 401 is widened by 2 times to 2W, and the length H is lengthened by 2 times to 2H. The size of each element in the page 401 is also simultaneously enlarged by 2 times, thereby obtaining the enlarged page 401'.
可以看出,放大后的页面401'中,数字“5”、数字“6”、数字“7”和数字“8”以及这四个数字对应的背景元素落在了展开态的折叠屏的范围以内,而数字“1”、数字“2”、数字“3”、数字“4”以及这四个数字对应的背景元素则落在了展开态的折叠屏的范围之外。It can be seen that in the enlarged page 401', the number "5", the number "6", the number "7" and the number "8" and the background elements corresponding to these four numbers fall within the range of the unfolded folding screen. Within, the number “1”, the number “2”, the number “3”, the number “4” and the background elements corresponding to these four numbers fall outside the range of the unfolded folding screen.
应理解,得到放大后的页面401'的过程为电子设备的内部实现,在实际应用中,该页面并不会显示在折叠屏上。It should be understood that the process of obtaining the enlarged page 401' is an internal implementation of the electronic device. In actual applications, this page will not be displayed on the folding screen.
还应理解,图4中的(b)所采用的放大比例仅为示例性说明,在实际应用中,该放大比例可由展开态下屏幕的宽度与折叠态下屏幕的宽度的比值确定。例如,若展开态下屏幕的宽度为折叠态下屏幕的宽度的两倍(比如,折叠屏为两折的折叠屏),那么该放大比例可以为2倍;若展开态下屏幕的宽度为折叠态下屏幕的宽度的三倍(比如,折叠屏为三折的折叠屏),那么该放大比例可以为3倍。It should also be understood that the amplification ratio used in (b) of FIG. 4 is only an exemplary illustration. In practical applications, the amplification ratio can be determined by the ratio of the width of the screen in the unfolded state and the width of the screen in the folded state. For example, if the width of the screen in the expanded state is twice the width of the screen in the folded state (for example, the folding screen is a folding screen with two folds), then the magnification ratio can be 2 times; if the width of the screen in the expanded state is If the folding screen is three times the width of the screen (for example, the folding screen is a three-fold folding screen), then the magnification ratio can be 3 times.
如图4中的(c)所示,电子设备确定数字“5”、数字“6”、数字“7”和数字“8”以及这四个数字对应的背景元素落在了展开态的折叠屏的范围之内,就可基于这些元素的位置和大小进行绘制,得到第二页面402,并在展开态下的折叠屏上显示该第二页面402。As shown in (c) of Figure 4, the electronic device determines that the number "5", the number "6", the number "7" and the number "8" and the background elements corresponding to these four numbers fall on the unfolded folding screen. Within the range, drawing can be performed based on the position and size of these elements to obtain the second page 402, and the second page 402 is displayed on the folding screen in the expanded state.
可以看出,第二页面402中各数字的字体大小及其各自的背景元素大小相比第一页面401放大很多倍,且第二页面402所显示的内容相比第一页面401所显示的内容减少一半。It can be seen that the font size of each number and the size of their respective background elements on the second page 402 are enlarged many times compared to the first page 401, and the content displayed on the second page 402 is larger than the content displayed on the first page 401. Reduce by half.
通过上述页面显示的方式可以看出,在用户将电子设备的折叠屏从折叠态变为展开态时,电子设备会将在折叠态下的折叠屏上所显示的应用的页面按照放大比例(比如,放大比例为2倍)进行整体放大,由于放大后的页面的面积通常远远大于展开态下的折叠屏的面积,这就导致放大后的页面显示在展开态下的折叠屏上时,往往出现内容显示不全的问题,也就是容易出现应用的页面与展开态下的屏幕不适配的问题,影响用户的体验。It can be seen from the above page display method that when the user changes the folding screen of the electronic device from the folded state to the unfolded state, the electronic device will enlarge the page of the application displayed on the folding screen in the folded state according to the enlargement ratio (such as , the magnification ratio is 2 times) for overall enlargement. Since the area of the enlarged page is usually much larger than the area of the folding screen in the unfolded state, this causes the enlarged page to be displayed on the folding screen in the unfolded state. There is a problem of incomplete content display, which means that the application page is prone to not matching the screen in the expanded state, which affects the user experience.
鉴于此,本申请提供了一种页面显示的方法。电子设备在检测到折叠屏从折叠态变为展开态时,通过对折叠态下的折叠屏所显示的页面中的部分元素的位置进行重布局,进而根据重布局后的位置进行页面绘制,将绘制得到的页面显示在展开态下的折叠屏上。由于这些重布局的元素可以预先定义,也即,预先考虑到了页面因折叠屏被展开落在屏幕之外或显示不全的问题,因此,针对这些元素进行重布局,可以避免页面中的部分元素在折叠屏被展开后显示不全的情况。换言之,所显示的页面与展开态下的屏幕能够相适配,提升了用户的体验。In view of this, this application provides a page display method. When the electronic device detects that the folding screen changes from the folded state to the unfolded state, it re-lays out the positions of some elements in the page displayed on the folding screen in the folded state, and then draws the page according to the re-layout position. The drawn page is displayed on the folded screen in the expanded state. Since these re-layout elements can be pre-defined, that is, the problem of the page falling outside the screen or being incompletely displayed due to the folding screen being expanded has been taken into account in advance. Therefore, re-layout of these elements can avoid some elements in the page from being displayed in full. The display is incomplete after the folding screen is unfolded. In other words, the displayed page can be adapted to the screen in the expanded state, thereby improving the user experience.
在介绍本申请实施例之前,首先做出如下几点说明:Before introducing the embodiments of this application, we first make the following explanations:
第一,在下文示出的实施例中第一、第二以及各种数字编号仅为描述方便进行的区分,并不用来限制本申请实施例的范围。例如,区分不同的页面等。First, in the embodiments shown below, the first, second, and various numerical numbers are only for convenience of description and are not used to limit the scope of the embodiments of the present application. For example, distinguish different pages, etc.
第二,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b和c中的至少一项(个),可以表示:a,或b,或c,或a和b,或a和c,或b和c,或a、b和c,其中a,b,c可以是单个,也可以是多个。Second, “at least one” refers to one or more, and “plurality” refers to two or more. "And/or" describes the association of associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the related objects are in an "or" relationship. “At least one of the following” or similar expressions thereof refers to any combination of these items, including any combination of a single item (items) or a plurality of items (items). For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.
第三,在本申请实施例中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念,便于理解。Third, in the embodiments of this application, words such as “exemplarily” or “for example” are used to represent examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application shall not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a concrete manner to facilitate understanding.
图5为本申请实施例提供的页面显示方法的示意性流程图。图5所示的方法可以由页面显示装置执行,例如可以是图3a中的电子设备,也可以是该电子设备中的部件,如芯片、芯片系统或其它可用于实现其部分或全部功能的模块,本申请对此不作限定。为了便于理解,后文以电子设备为例来说明本申请实施例提供的方法。Figure 5 is a schematic flow chart of a page display method provided by an embodiment of the present application. The method shown in Figure 5 can be executed by a page display device, for example, it can be the electronic device in Figure 3a, or it can be a component in the electronic device, such as a chip, a chip system or other modules that can be used to implement part or all of its functions. , this application does not limit this. For ease of understanding, the method provided by the embodiments of the present application will be described below by taking an electronic device as an example.
下面对方法500中的各个步骤做详细说明。 Each step in method 500 is described in detail below.
步骤501,在折叠态下的折叠屏显示第一页面。Step 501: Display the first page on the folding screen in the folded state.
如前所述,折叠态为电子设备的折叠屏处于折叠时的状态。第一页面为电子设备的折叠屏处于折叠态时,在折叠屏上所显示的页面,该页面可以为任意一个应用程序的任意一个页面。As mentioned above, the folded state is the state in which the folding screen of the electronic device is folded. The first page is the page displayed on the folding screen when the folding screen of the electronic device is in the folded state. This page can be any page of any application.
例如,图6a示出了在电子设备的折叠屏处于折叠态时,在折叠屏上显示有第一页面601。For example, FIG. 6a shows that when the folding screen of the electronic device is in a folded state, the first page 601 is displayed on the folding screen.
步骤502,在检测到折叠屏被展开时,基于对第一页面中的元素的测量和布局,得到第三页面。Step 502: When it is detected that the folding screen is unfolded, a third page is obtained based on the measurement and layout of elements in the first page.
其中,测量是指确定元素的大小,元素的大小包括元素的宽度和高度。布局是指确定元素的位置,即元素的坐标(x,y)。Among them, measurement refers to determining the size of the element, and the size of the element includes the width and height of the element. Layout refers to determining the position of the element, that is, the coordinates (x, y) of the element.
在用户想体验平板的效果时,就可将折叠态下的折叠屏展开,电子设备在检测到折叠屏被展开时,就可基于第一预设坐标轴来确定第一页面中各元素的大小(宽和高)及坐标(x,y)。在确定出第一页面中各元素的大小和坐标后,电子设备就可基于第二预设坐标轴和第一页面中各元素的大小、坐标,得到第三页面。When the user wants to experience the effect of a tablet, the foldable screen in the folded state can be unfolded. When the electronic device detects that the foldable screen is unfolded, the size of each element in the first page can be determined based on the first preset coordinate axis. (width and height) and coordinates (x, y). After determining the size and coordinates of each element in the first page, the electronic device can obtain the third page based on the second preset coordinate axis and the size and coordinates of each element in the first page.
其中,第一预设坐标轴为电子设备处于折叠态下时,本领域技术人员所预设的坐标轴。第二预设坐标轴为折叠屏被展开至预设角度时,本领域技术人员所预设的坐标轴。其中,坐标轴的原点可由本领域技术人员根据实际需求设置。比如,可以折叠屏的四个顶点中任一顶点所在的位置为坐标原点来建立坐标轴,也可以折叠屏的四个边中任一边的中间点所在的位置为坐标原点来建立坐标轴。The first preset coordinate axis is a coordinate axis preset by those skilled in the art when the electronic device is in a folded state. The second preset coordinate axis is the coordinate axis preset by those skilled in the art when the folding screen is unfolded to a preset angle. The origin of the coordinate axis can be set by those skilled in the art according to actual needs. For example, the position of any one of the four vertices of the folding screen can be used as the coordinate origin to establish the coordinate axis, or the position of the middle point of any of the four sides of the folding screen can be used as the coordinate origin to establish the coordinate axis.
在确定元素的坐标(x,y)时,可将该元素的中心点的坐标作为该元素的坐标。在确定元素的宽度时,可将该元素投影在x轴上的长度作为该元素的宽度。在确定元素的高度时,可将该元素投影在y轴上的长度作为该元素的高度。When determining the coordinates (x, y) of an element, the coordinates of the center point of the element can be used as the coordinates of the element. When determining the width of an element, the length of the element projected on the x-axis can be used as the width of the element. When determining the height of an element, the length of the element projected on the y-axis can be used as the height of the element.
在第一预设坐标轴的原点和第二预设坐标轴的原点所在的位置不同,比如,第一预设坐标轴的原点为折叠屏的左下角的顶点,第二预设坐标轴的原点为折叠屏的右侧边的中间点。那么,在确定出第一页面中各元素的大小和坐标后,电子设备需要先基于第一预设坐标轴和第二预设坐标轴的坐标转换关系,确定出第一页面中各元素在第二预设坐标轴中的坐标,再根据第一页面中各元素在第二预设坐标轴中的坐标和各元素的大小,来得到第三页面。The origin of the first preset coordinate axis and the origin of the second preset coordinate axis are in different locations. For example, the origin of the first preset coordinate axis is the vertex of the lower left corner of the folding screen, and the origin of the second preset coordinate axis is the vertex of the lower left corner of the folding screen. It is the middle point of the right side of the folding screen. Then, after determining the size and coordinates of each element in the first page, the electronic device needs to first determine the position of each element in the first page based on the coordinate conversion relationship between the first preset coordinate axis and the second preset coordinate axis. The coordinates in the second preset coordinate axis are then used to obtain the third page based on the coordinates of each element in the first page in the second preset coordinate axis and the size of each element.
下面结合图6a和图6b对电子设备得到第三页面的实现过程进行示例性说明。The following is an exemplary description of the implementation process of the electronic device obtaining the third page with reference to FIG. 6a and FIG. 6b.
需要说明的是,该示例中,第一预设坐标轴是以图6a所示的折叠态下的折叠屏的左下角的顶点为坐标原点建立的坐标轴,第二预设坐标轴是以图6b所示的折叠屏被展开至180°时,折叠屏的左下角的顶点为坐标原点建立的坐标轴。即,图6a采用的第一预设坐标轴和图6b采用的第二预设坐标轴为同一个坐标轴。It should be noted that in this example, the first preset coordinate axis is a coordinate axis established with the vertex of the lower left corner of the folding screen in the folded state shown in Figure 6a as the coordinate origin, and the second preset coordinate axis is based on Figure 6a When the folding screen shown in 6b is unfolded to 180°, the vertex of the lower left corner of the folding screen is the coordinate axis established by the coordinate origin. That is, the first preset coordinate axis used in Figure 6a and the second preset coordinate axis used in Figure 6b are the same coordinate axis.
如图6a,在折叠态下的折叠屏上显示有第一页面601。假设第一页面601中的元素包括八个视图组,分别为a1、a2、a3、a4、a5、a6、a7和a8。每个视图组又包括两个视图,具体地,a1包括的两个视图分别为a11和a12,a2包括的两个视图分别为a21和a22,a3包括的两个视图分别为a31和a32,a4包括的两个视图分别为a41和a42,a5包括的两个视图分别为a51和a52,a6包括的两个视图分别为a61和a62,a7包括的两个视图分别为a71和a72,以及a8包括的两个视图分别为a81和a82。As shown in Figure 6a, a first page 601 is displayed on the folding screen in the folded state. Assume that the elements in the first page 601 include eight view groups, namely a1, a2, a3, a4, a5, a6, a7 and a8. Each view group includes two views. Specifically, the two views included in a1 are a11 and a12, the two views included in a2 are a21 and a22, and the two views included in a3 are a31, a32, and a4. The two views included are a41 and a42 respectively, the two views included in a5 are a51 and a52 respectively, the two views included in a6 are a61 and a62 respectively, the two views included in a7 are a71 and a72 respectively, and a8 includes The two views are a81 and a82 respectively.
电子设备在检测到折叠屏被展开时,就可以图6a所示的第一预设坐标轴为基准,确定出八个视图组,也就是a1至a8各自的宽度、高度和坐标,以及确定出16个视图,也就是a11、a12、a21、a22、a31、a32、a41、a42、a51、a52、a61、a62、a71、a72、a81及a82各自的宽度、高度和坐标。When the electronic device detects that the folding screen is unfolded, it can use the first preset coordinate axis shown in Figure 6a as a reference to determine eight view groups, that is, the width, height and coordinates of a1 to a8, and determine the 16 views, that is, the width, height and coordinates of a11, a12, a21, a22, a31, a32, a41, a42, a51, a52, a61, a62, a71, a72, a81 and a82.
如图6b,电子设备在确定出第一页面601中各个元素的宽度、高度和坐标后,就可以图6b所示的第二预设坐标系为基准,确定出a1至a8、a11、a12、a21、a22、a31、a32、a41、a42、a51、a52、a61、a62、a71、a72、a81及a82分别在第二预设坐标轴中的位置,再根据这些元素分别在第二预设坐标轴中的位置和确定的各自的宽度、高度,就可得到第三页面602。As shown in Figure 6b, after the electronic device determines the width, height and coordinates of each element in the first page 601, it can use the second preset coordinate system shown in Figure 6b as a reference to determine a1 to a8, a11, a12, The positions of a21, a22, a31, a32, a41, a42, a51, a52, a61, a62, a71, a72, a81 and a82 respectively in the second preset coordinate axis, and then according to the positions of these elements in the second preset coordinate axis By determining the position in the axis and determining the respective width and height, the third page 602 can be obtained.
应理解,由于图6a中的第一预设坐标轴和图6b中的第二预设坐标轴为同一个坐标轴。因此,电子设备确定出的各元素在第二预设坐标轴中的位置与各元素在第一预设坐标轴中的位置相同,无需进行坐标转换。It should be understood that the first preset coordinate axis in Figure 6a and the second preset coordinate axis in Figure 6b are the same coordinate axis. Therefore, the position of each element in the second preset coordinate axis determined by the electronic device is the same as the position of each element in the first preset coordinate axis, without coordinate conversion.
需要说明的是,本申请所涉及的第三页面是电子设备的内部生成的页面,并不会通过折叠屏 显示在屏幕上。It should be noted that the third page involved in this application is a page generated internally by the electronic device and will not be displayed through the folding screen. displayed on the screen.
步骤503,对第三页面中的目标元素进行重布局,得到目标元素重布局后的位置,该目标元素为视图或视图组。Step 503: Relayout the target element in the third page to obtain the rearranged position of the target element. The target element is a view or a view group.
其中,对目标元素进行重布局,可以理解为重新确定目标元素的位置。Among them, re-layout of the target element can be understood as re-determining the position of the target element.
目标元素为第三页面中需要进行重布局的元素,也就是需要重新确定位置的元素。The target element is the element in the third page that needs to be re-layout, that is, the element that needs to be repositioned.
电子设备对第三页面中的目标元素进行重布局的过程可通过如下步骤1)~2)实现。The process of the electronic device rearranging the target elements in the third page can be implemented through the following steps 1) to 2).
步骤1)、获取配置信息,该配置信息用于指示目标元素在重布局之前的初始位置和重布局之后的目标位置,该目标元素重布局之前的初始位置和重布局之后的目标位置不同。Step 1): Obtain configuration information. The configuration information is used to indicate the initial position of the target element before relayout and the target position after relayout. The initial position of the target element before relayout and the target position after relayout are different.
本领域技术人员可针对存在页面布局问题的页面进行配置,以得到配置信息。对于存在页面布局问题的应用程序的页面,每个页面对应一个配置信息。Those skilled in the art can configure pages with page layout problems to obtain configuration information. For pages of applications with page layout problems, each page corresponds to one configuration information.
可选地,电子设备可通过如下方式来获取配置信息:Optionally, the electronic device can obtain configuration information in the following ways:
基于应用程序的页面对应的Activity组件,获取与Activity组件对应的配置信息。Based on the Activity component corresponding to the application page, obtain the configuration information corresponding to the Activity component.
在一种可实现的方式中,电子设备可基于页面对应的Activity组件的名称,在本地预存的多个配置信息中查找出对应的配置信息。其中,Activity组件的名称会携带对应的应用程序的名称和页面的名称等信息,比如,根据某个Activity组件的名称,可以确定出对应的应用程序为A应用程序,页面为登录页。In an implementable manner, the electronic device can find the corresponding configuration information among multiple locally pre-stored configuration information based on the name of the Activity component corresponding to the page. Among them, the name of the Activity component will carry information such as the name of the corresponding application and the name of the page. For example, according to the name of an Activity component, it can be determined that the corresponding application is application A and the page is the login page.
在根据Activity组件的名称来查找配置信息时,可能出现查找到多个配置信息的情况。例如,对应用程序A的登录页而言,该页面处于登录状态和未处于登录状态的页面内容显示不同,因此,本领域技术人员对预先针对登录状态的该登录页和未登录状态的该登录页分别设置配置信息。若此时仍旧根据该登录页对应的Activity组件的名称来查找配置信息,就出现查找到两个配置信息的情况。When searching for configuration information based on the name of the Activity component, multiple configuration information may be found. For example, for the login page of application A, the content of the page in the logged-in state and the page in the non-logged-in state are displayed differently. Therefore, those skilled in the art will preliminarily analyze the login page in the logged-in state and the login page in the non-logged-in state. page to set configuration information respectively. If the configuration information is still searched based on the name of the Activity component corresponding to the login page at this time, two configuration information will be found.
因此,在另一种可实现的方式中,电子设备可基于页面对应的Activity组件的属性信息,在本地预存的多个配置信息中查找出对应的配置信息。其中,该属性信息例如可以为登录状态。Therefore, in another implementable manner, the electronic device can find the corresponding configuration information among multiple locally pre-stored configuration information based on the attribute information of the Activity component corresponding to the page. The attribute information may be a login status, for example.
例如,电子设备可进一步确定出应用程序A的登录页对应的Activity组件的属性信息为登录状态,则就可从查找到的两个配置信息中进一步确定出与该登录页的登录状态相匹配的配置信息。For example, the electronic device can further determine that the attribute information of the Activity component corresponding to the login page of application A is the login status, and then it can further determine from the two found configuration information that matches the login status of the login page. Configuration information.
由于配置信息是针对应用程序的页面配置的,因此,每个配置信息也会携带该页面对应的Activity组件的名称和属性信息。Since the configuration information is configured for the application page, each configuration information also carries the name and attribute information of the Activity component corresponding to the page.
电子设备在根据应用程序的页面对应的Activity组件在本地预置的多个配置信息中查找对应的配置信息时,若未查找到对应的配置信息,则说明该页面无需进行重布局,也就是该页面不存在页面布局问题。那么,电子设备无需按照本申请的方案来进行页面显示,采用目前已有的方案进行页面显示即可。When the electronic device searches for the corresponding configuration information among multiple locally preset configuration information according to the Activity component corresponding to the page of the application, if the corresponding configuration information is not found, it means that the page does not need to be re-layout, that is, the page does not need to be re-layout. The page does not have page layout issues. Then, the electronic device does not need to display the page according to the solution of this application, and can use the currently existing solution to display the page.
应理解,本申请所提供的基于Activity组件的名称、属性信息来查找页面对应的配置信息仅为示例性说明,本申请对查找页面对应的配置信息的具体实现方式不作限定,均在本申请保护范围之内。It should be understood that the search for the configuration information corresponding to the page based on the name and attribute information of the Activity component provided in this application is only an exemplary explanation. This application does not limit the specific implementation of the search for the configuration information corresponding to the page, and all are protected by this application. within the range.
在本申请中,配置信息可以有如下两种可能的设计。In this application, the configuration information can have the following two possible designs.
设计一,配置信息指示第三页面中的多个元素分别在重布局之前的初始位置和重布局之后的目标位置。In Design 1, the configuration information indicates the initial position before relayout and the target position after relayout of multiple elements in the third page.
其中,该多个元素包括多个视图,或者,该多个元素包括至少一个视图组和该至少一个视图组中的多个视图,且该多个元素中包括目标元素。Wherein, the multiple elements include multiple views, or the multiple elements include at least one view group and multiple views in the at least one view group, and the multiple elements include a target element.
配置信息所指示的第三页面中的多个元素可以为第三页面中的全部区域的所有元素,也可以为第三页面中的部分区域中的所有元素,但无论哪种指示方式,需要进行重布局的目标元素都包含于该多个元素之中。The multiple elements in the third page indicated by the configuration information may be all elements in all areas of the third page, or may be all elements in some areas of the third page, but no matter which indication method is used, it needs to be carried out The target elements for relayout are included in the multiple elements.
可以理解,对于配置信息所指示的多个元素,所指示的目标元素在重布局之前的初始位置和重布局之后的目标位置不同,非目标元素在重布局之前的初始位置和重布局之后的目标位置相同。其中,非目标元素为配置信息中所指示的多个元素中,除目标元素之外的其它元素。It can be understood that for multiple elements indicated by the configuration information, the initial position of the indicated target element before relayout and the target position after relayout are different, and the initial position of the non-target element before relayout and the target after relayout are different. Same location. The non-target elements are elements other than the target element among the multiple elements indicated in the configuration information.
示例性地,如图6b所示,电子设备在得到第三页面602后,电子设备获取到了第三页面602对应的配置信息,该配置信息可指示第三页面602中多个元素的初始位置和目标位置。比如,可 指示a1至a8、a11、a12、a21、a22、a31、a32、a41、a42、a51、a52、a61、a62、a71、a72、a81及a82各自对应的重布局之前的初始位置和重布局之后的目标位置,这些元素中,有的元素为目标元素,有的元素为非目标元素。For example, as shown in FIG. 6b, after the electronic device obtains the third page 602, the electronic device obtains the configuration information corresponding to the third page 602. The configuration information can indicate the initial positions and values of multiple elements in the third page 602. target location. For example, can Indicates the initial position before relayout and the position after relayout corresponding to a1 to a8, a11, a12, a21, a22, a31, a32, a41, a42, a51, a52, a61, a62, a71, a72, a81 and a82. Target position. Among these elements, some elements are target elements and some elements are non-target elements.
设计二,配置信息指示第三页面中的目标元素在重布局之前的初始位置和重布局之后的目标位置。In Design 2, the configuration information indicates the initial position of the target element in the third page before relayout and the target position after relayout.
该配置信息可仅指示第三页面中需要进行位置调整的元素的初始位置和目标位置,也就是需要进行重布局的目标元素在重布局之前的初始位置和重布局之后的目标位置。The configuration information may only indicate the initial position and target position of the element in the third page that needs to be repositioned, that is, the initial position before relayout and the target position after relayout of the target element that needs to be relayout.
示例性地,如图6b所示,电子设备在得到第三页面602后,电子设备获取到了第三页面602对应的配置信息,该配置信息可指示第三页面602中需要调整位置的目标元素的初始位置和目标位置。比如,可指示a2至a3、a6至a8、a21、a22、a31、a32、a41、a42、a61、a62、a71、a72、a81及a82各自对应的重布局之前的初始位置和重布局之后的目标位置,这些元素均为目标元素。For example, as shown in Figure 6b, after the electronic device obtains the third page 602, the electronic device obtains the configuration information corresponding to the third page 602. The configuration information can indicate the location of the target element that needs to be adjusted in the third page 602. initial position and target position. For example, the initial position before relayout and the target after relayout corresponding to a2 to a3, a6 to a8, a21, a22, a31, a32, a41, a42, a61, a62, a71, a72, a81 and a82 can be indicated. Position, these elements are target elements.
步骤2)、基于配置信息,对第三页面中的目标元素进行重布局。Step 2): Relayout the target elements in the third page based on the configuration information.
电子设备在获取到第三页面对应的配置信息后,就可根据配置信息所指示的需要重布局的目标元素的原始位置和目标位置,重新确定出第三页面中目标元素的位置。After obtaining the configuration information corresponding to the third page, the electronic device can re-determine the position of the target element in the third page according to the original position and target position of the target element that needs to be re-layout indicated by the configuration information.
在本申请中,在步骤1)之后,步骤2)之前,电子设备还可根据获取到的配置信息在第三页面中匹配出目标元素。In this application, after step 1) and before step 2), the electronic device can also match the target element in the third page based on the obtained configuration information.
与前述的配置信息的两种设计相对应,电子设备可采用不同的方式来匹配目标元素。Corresponding to the two designs of configuration information mentioned above, the electronic device can use different ways to match the target element.
与设计一相对应,电子设备可通过执行如下步骤i)和ii)来匹配目标元素。Corresponding to design one, the electronic device can match the target element by performing the following steps i) and ii).
步骤i)、基于配置信息指示的多个元素中每个元素的初始位置和目标位置,确定需要重布局的目标元素。Step i): Determine the target element that needs to be re-layout based on the initial position and target position of each element among the multiple elements indicated by the configuration information.
配置信息在指示第三页面中多个元素的初始位置和目标位置时,所指示的多个初始位置和相应的多个目标位置中,不但包含有目标元素的初始位置和目标位置,也包含有非目标元素的初始位置和目标位置。因此,电子设备就需要根据配置信息所指示的多个初始位置和相应的多个目标位置来确定出初始位置和目标位置不同的元素,也就是目标元素。When the configuration information indicates the initial positions and target positions of multiple elements in the third page, the multiple initial positions and corresponding multiple target positions indicated not only include the initial positions and target positions of the target elements, but also include The initial and target positions of non-target elements. Therefore, the electronic device needs to determine the element whose initial position is different from the target position, that is, the target element, based on the multiple initial positions and the corresponding multiple target positions indicated by the configuration information.
电子设备在从配置信息的多个元素中确定目标元素时,可通过如下方式来确定出目标元素:When the electronic device determines the target element from multiple elements of the configuration information, it can determine the target element in the following ways:
基于多个元素中各元素的层次结构,按照从父元素到子元素的顺序,遍历多个元素中每个元素的初始位置和目标位置,以确定需要重布局的目标元素。Based on the hierarchical structure of each element in the multiple elements, in order from the parent element to the child element, the initial position and target position of each element in the multiple elements are traversed to determine the target element that needs to be re-layout.
应理解,本领域技术人员在预先设置配置信息时,按照从父元素到子元素的顺序,来存储多个元素中每个元素的初始位置和目标位置。It should be understood that when setting configuration information in advance, those skilled in the art will store the initial position and target position of each element in the plurality of elements in order from the parent element to the child element.
例如,在设置如图6b所示的第三页面的配置信息时,本领域技术人员就可按照a1至a8为父元素,a11、a12、a21、a22、a31、a32、a41、a42、a51、a52、a61、a62、a71、a72、a81及a82为子元素的顺序来在电子设备中存储各个元素的初始位置和目标位置。For example, when setting the configuration information of the third page as shown in Figure 6b, those skilled in the art can use a1 to a8 as parent elements, a11, a12, a21, a22, a31, a32, a41, a42, a51, a52, a61, a62, a71, a72, a81 and a82 are the order of sub-elements to store the initial position and target position of each element in the electronic device.
那么,在确定配置信息中的目标元素时,电子设备就可先依次判断a1、a2、a3、a4、a5、a6、a7和a8各自对应的初始位置和目标位置是否相同,从中确定出初始位置和目标位置不同的父元素。再进一步判断各个子元素,即a11、a12、a21、a22、a31、a32、a41、a42、a51、a52、a61、a62、a71、a72、a81及a82各自的初始位置和目标位置是否相同。因此,就可从中确定出需要重布局的目标元素,比如,确定出了需要重布局的目标元素为a2、a3、a4、a6、a7、a8、a21、a22、a31、a32、a41、a42、a61、a62、a71、a72、a81和a82。Then, when determining the target element in the configuration information, the electronic device can first determine whether the corresponding initial positions and target positions of a1, a2, a3, a4, a5, a6, a7 and a8 are the same, and determine the initial position from there A parent element that is different from the target position. Then further determine whether the initial position and target position of each sub-element, namely a11, a12, a21, a22, a31, a32, a41, a42, a51, a52, a61, a62, a71, a72, a81 and a82, are the same. Therefore, the target elements that need to be re-layout can be determined. For example, the target elements that need to be re-layout are determined to be a2, a3, a4, a6, a7, a8, a21, a22, a31, a32, a41, a42, a61, a62, a71, a72, a81 and a82.
为了避免歧义,需要指出的是,前述的配置信息并没有指示具体的元素是哪些,其指示的仅是多个初始位置和相对应的多个目标位置,也就是前述的配置信息指示的是多对位置信息,每对位置信息包括一个初始位置和相对应的一个目标位置。电子设备获取到配置信息后,并不知道这些位置信息中的每对位置信息具体对应的是第三页面中的哪个元素。因此,电子设备就可先通过执行步骤i)比较每对位置信息中的初始位置和目标位置是否相同,来筛选出初始位置和目标位置不相同的位置信息,这些位置信息就是配置信息所指示的目标元素的位置信息,再通过执行下述步骤ii)确定出这些初始位置和目标位置不同的位置信息对应的是第三页面中的哪个目标元素。In order to avoid ambiguity, it should be pointed out that the aforementioned configuration information does not indicate the specific elements. It only indicates multiple initial positions and corresponding multiple target positions. That is, the aforementioned configuration information indicates multiple For position information, each pair of position information includes an initial position and a corresponding target position. After the electronic device obtains the configuration information, it does not know which element in the third page each pair of position information in the position information corresponds to. Therefore, the electronic device can first perform step i) to compare whether the initial position and the target position in each pair of position information are the same to filter out position information whose initial position and target position are different. These position information are indicated by the configuration information. The position information of the target element is then determined by performing the following step ii) which target element in the third page corresponds to the position information whose initial position is different from the target position.
步骤ii)、在第三页面中匹配目标元素。Step ii), match the target element in the third page.
其中,在第三页面中匹配目标元素,可以理解为在第三页面中定位出配置信息所指示的需要 进行重布局的目标元素。Among them, matching the target element in the third page can be understood as locating the needs indicated by the configuration information in the third page. The target element for relayout.
在第三页面中匹配目标元素的一种可能的实现方式是,根据多个元素在第三页面中的位置和配置信息中指示的目标元素的初始位置,在第三页面中匹配目标元素。One possible implementation of matching the target element in the third page is to match the target element in the third page based on the positions of the multiple elements in the third page and the initial position of the target element indicated in the configuration information.
如前所述,电子设备在生成第三页面的时候,会确定出第一页面中的各元素在第二预设坐标轴下的位置,也就是确定出各元素在第三页面中的位置。因此,电子设备就可将第三页面中各个元素的位置与确定出的配置信息所指示各个目标元素的初始位置分别进行匹配,若第三页面中某元素的位置与配置信息所指示的某个初始位置相同,就可将第三页面中的该元素作为目标元素。As mentioned above, when the electronic device generates the third page, it will determine the position of each element in the first page under the second preset coordinate axis, that is, determine the position of each element in the third page. Therefore, the electronic device can respectively match the position of each element in the third page with the initial position of each target element indicated by the determined configuration information. If the position of an element in the third page matches an element indicated by the configuration information, If the initial position is the same, the element in the third page can be used as the target element.
在第三页面中匹配目标元素的另一种可能的实现方式是,根据多个元素的标识(identifier,ID)和配置信息中指示的目标元素的ID,在第三页面中匹配目标元素。Another possible implementation of matching the target element in the third page is to match the target element in the third page based on identifiers (IDs) of multiple elements and the ID of the target element indicated in the configuration information.
在这种实现方式中,配置信息还可用于指示多个元素中每个元素的ID。电子设备在确定出了配置信息所指示的多个位置信息中,哪些位置信息的初始位置和目标位置有差异,也就相应可获知初始位置和目标位置有差异的元素ID,也就是确定出了目标元素的ID。因此,电子设备就可将配置信息中目标元素的ID与第三页面中的各个元素的ID进行匹配,从而在第三页面中定位出目标元素。In this implementation, the configuration information may also be used to indicate the ID of each of the multiple elements. After the electronic device determines which position information has a difference between the initial position and the target position among the multiple position information indicated by the configuration information, it can accordingly obtain the element ID that is different from the initial position and the target position, that is, it determines The ID of the target element. Therefore, the electronic device can match the ID of the target element in the configuration information with the ID of each element in the third page, thereby locating the target element in the third page.
在第三页面中匹配目标元素的又一种可能的实现方式是,根据多个元素的标签和配置信息中所指示的目标元素的标签,在第三页面中匹配目标元素。Another possible implementation method of matching the target element in the third page is to match the target element in the third page based on the tags of multiple elements and the tag of the target element indicated in the configuration information.
应理解,本申请所提供的基于位置、标识、或标签在第三页面中进行目标元素的匹配仅为示例性说明,本申请对目标元素的具体匹配方式不作限定,均在本申请保护范围之内。It should be understood that the matching of target elements in the third page based on location, identification, or tags provided in this application is only an exemplary illustration. This application does not limit the specific matching method of the target elements, and they are all within the scope of protection of this application. Inside.
在设计二中,由于配置信息指示第三页面中的目标元素的初始位置和目标位置,而不指示其他元素的初始位置和目标位置,因此电子设备无需再从配置信息中筛选出初始位置和目标位置有差异的位置信息,而是可以直接在第三页面中匹配目标元素。也就是,电子设备不执行上述步骤i),直接执行上述步骤ii)。应理解,步骤ii)的具体实现方式可参照前文说明,在此不再赘述。In Design 2, since the configuration information indicates the initial position and target position of the target element in the third page, but does not indicate the initial position and target position of other elements, the electronic device no longer needs to filter out the initial position and target position from the configuration information. The location information has different location information, but the target element can be directly matched in the third page. That is, the electronic device does not perform the above step i) but directly performs the above step ii). It should be understood that the specific implementation of step ii) may refer to the previous description and will not be described again here.
电子设备在获取到配置信息,并从第三页面中匹配出目标元素之后,便可以根据配置信息中目标元素的目标位置,对目标元素进行重布局。After the electronic device obtains the configuration information and matches the target element from the third page, it can rearrange the target element according to the target position of the target element in the configuration information.
为便于理解,下面结合图6b和图6c来对步骤503的实现过程进行示例性介绍。For ease of understanding, the implementation process of step 503 is exemplarily introduced below in conjunction with Figure 6b and Figure 6c.
如图6b,电子设备在得到第三页面602后,获取第三页面602的配置信息。假设该配置信息指示了第三页面602中需要重布局的目标元素的初始位置和目标位置,以及各个目标元素的ID。比如,指示了a2至a4、a6至a8、a21、a22、a31、a32、a41、a42、a61、a62、a71、a72、a81及a82分别在重布局之前的初始位置和重布局之后的目标位置。其中,配置信息所指示的a2、a21和a22的目标位置为(x2,y2),所指示的a3、a31和a32的目标位置为(x3,y3),所指示的a4、a41和a42的目标位置为(x4,y4),所指示的a6、a61和a62的目标位置为(x6,y6),所指示的a7、a71和a72的目标位置为(x7,y7),所指示的a8、a81和a82的目标位置为(x8,y8)。As shown in Figure 6b, after obtaining the third page 602, the electronic device obtains the configuration information of the third page 602. It is assumed that the configuration information indicates the initial position and target position of the target element that needs to be re-layout in the third page 602, as well as the ID of each target element. For example, the initial positions of a2 to a4, a6 to a8, a21, a22, a31, a32, a41, a42, a61, a62, a71, a72, a81 and a82 before relayout and the target position after relayout are indicated. . Among them, the target positions of a2, a21 and a22 indicated by the configuration information are (x2, y2), the indicated target positions of a3, a31 and a32 are (x3, y3), and the indicated targets of a4, a41 and a42 The position is (x4, y4), the indicated target positions of a6, a61, and a62 are (x6, y6), the indicated target positions of a7, a71, and a72 are (x7, y7), and the indicated target positions of a8, a81 and the target position of a82 is (x8, y8).
如图6c,电子设备就可基于配置信息所指示的这些需要重布局的目标元素ID,在第三页面602中定位出目标元素(在图6c中以加粗方式示出),并根据所指示的各个目标元素的目标位置,重新确定出目标元素a2、a21和a22重布局后的位置为(x2,y2),a3、a31和a32重布局后的位置为(x3,y3),a4、a41和a42重布局后的位置为(x4,y4),a6、a61和a62重布局后的位置为(x6,y6),a7、a71和a72重布局后的位置为(x7,y7),a8、a81和a82重布局后的位置为(x8,y8)。As shown in Figure 6c, the electronic device can locate the target elements in the third page 602 (shown in bold in Figure 6c) based on the IDs of the target elements that need to be rearranged as indicated by the configuration information, and according to the instructions The target positions of each target element are re-determined. The positions of the target elements a2, a21 and a22 after re-layout are (x2, y2), the positions of a3, a31 and a32 after re-layout are (x3, y3), a4, a41 The rearranged positions of a6, a61 and a62 are (x6, y6), the rearranged positions of a7, a71 and a72 are (x7, y7), a8, The positions of a81 and a82 after rearrangement are (x8, y8).
电子设备就可将各个目标元素的位置调整到各自的目标位置处,即,将a2、a21和a22的位置调整至(x2,y2)处,将a3、a31和a32的位置调整至(x3,y3)处,将a4、a41和a42的位置调整至(x4,y4)处,将a6、a61和a62的位置调整至(x6,y6)处,将a7、a71和a72的位置调整至(x7,y7)处,以及将a8、a81和a82的位置调整至(x8,y8)处,以实现对这些目标元素的重布局。The electronic device can adjust the position of each target element to its respective target position, that is, adjust the positions of a2, a21 and a22 to (x2, y2), and adjust the positions of a3, a31 and a32 to (x3, y3), adjust the positions of a4, a41 and a42 to (x4, y4), adjust the positions of a6, a61 and a62 to (x6, y6), adjust the positions of a7, a71 and a72 to (x7 , y7), and adjust the positions of a8, a81 and a82 to (x8, y8) to achieve the re-layout of these target elements.
在本申请中,配置信息还可用于指示页面的放大比例,该配置信息指示的多个元素中每个元素的初始位置和目标位置是基于放大比例确定的。In this application, the configuration information can also be used to indicate the magnification ratio of the page, and the initial position and target position of each element among the multiple elements indicated by the configuration information are determined based on the magnification ratio.
配置信息还可以指示第三页面的放大比例,放大比例可以满足如下条件:0<R≤N,N为折 叠屏在完全展开时的屏幕宽度与折叠屏在折叠状态下的屏幕宽度的比值。The configuration information can also indicate the magnification ratio of the third page. The magnification ratio can meet the following conditions: 0<R≤N, N is the folding ratio. The ratio of the screen width of the stacked screen when fully expanded to the screen width of the foldable screen in the folded state.
例如,在电子设备的折叠屏为双折折叠屏时,折叠屏在完全展开时的屏幕宽度为折叠状态下的屏幕宽度的2倍,则放大比例满足0<R≤2。在电子设备的折叠屏为三折折叠屏时,折叠屏在完全展开时的屏幕宽度为折叠状态下的屏幕宽度的三倍,则放大比例满足0<R≤3。For example, when the folding screen of the electronic device is a bi-fold folding screen, and the screen width of the folding screen when fully unfolded is twice the screen width in the folded state, then the enlargement ratio satisfies 0<R≤2. When the folding screen of the electronic device is a three-fold folding screen, and the screen width of the folding screen when fully unfolded is three times the screen width in the folded state, the enlargement ratio satisfies 0<R≤3.
在一种可实现的方式中,考虑到用户的感官体验,R可取值为1.2。In an achievable way, taking into account the user's sensory experience, R can take a value of 1.2.
在一种可实现的方式中,配置信息可以不指示第三页面的放大比例,而是指示电子设备的折叠屏在展开状态下,第三页面所占的屏幕宽度。In an implementable manner, the configuration information may not indicate the enlargement ratio of the third page, but may indicate the screen width occupied by the third page when the folding screen of the electronic device is in the unfolded state.
其中,第三页面所占的屏幕宽度Q满足如下条件:Qx=Ry,其中,Q为电子设备在展开状态下,第三页面所占的屏幕宽度,x为电子设备在展开状态下的屏幕宽度,y为电子设备在折叠状态下的屏幕宽度,R为前述放大比例。Among them, the screen width Q occupied by the third page satisfies the following conditions: Qx=Ry, where Q is the screen width occupied by the third page when the electronic device is in the expanded state, and x is the screen width of the electronic device in the expanded state. , y is the screen width of the electronic device in the folded state, and R is the aforementioned enlargement ratio.
例如,假设电子设备在展开状态下的屏幕宽度是在折叠状态下的屏幕宽度的2倍,则x可取值为2,y可取值为1。假设配置信息所指示的电子设备在展开状态下,第三页面所占的屏幕宽度,即Q为3/5。那么,根据上述换算关系,就可确定出放大比例R为1.2。因此,就可对第三页面进行1.2倍的放大。For example, assuming that the screen width of the electronic device in the unfolded state is twice the width of the screen in the folded state, x can take a value of 2 and y can take a value of 1. Assume that the electronic device indicated by the configuration information is in the expanded state, and the screen width occupied by the third page, that is, Q is 3/5. Then, based on the above conversion relationship, it can be determined that the amplification ratio R is 1.2. Therefore, the third page can be enlarged 1.2 times.
应理解,若配置信息指示了页面的放大比例,那么,步骤503具体为对放大后的第三页面中的目标元素进行重布局。It should be understood that if the configuration information indicates the enlargement ratio of the page, then step 503 specifically involves rearranging the target element in the enlarged third page.
在本申请中,在放大比例大于1的情况下,配置信息还用于指示资源的存储路径,资源是与折叠屏在展开态下的显示分辨率匹配的资源。In this application, when the magnification ratio is greater than 1, the configuration information is also used to indicate the storage path of the resource. The resource is a resource that matches the display resolution of the folding screen in the unfolded state.
在配置信息所指示的放大比例大于1时,对于放大后的第三页面中的元素,若仍旧采用折叠屏在折叠态下的分辨率资源来显示页面,就可能出现页面中元素模糊的问题。因此,在配置信息所指示的放大比例大于1时,重新指示与展开态下的屏幕的显示分辨率匹配的资源。When the amplification ratio indicated by the configuration information is greater than 1, for the elements in the enlarged third page, if the resolution resources of the folded screen in the folded state are still used to display the page, the problem of blurred elements on the page may occur. Therefore, when the enlargement ratio indicated by the configuration information is greater than 1, resources matching the display resolution of the screen in the expanded state are re-indicated.
例如,折叠屏处于折叠态时,配置信息指示高清分辨率资源所在的路径,电子设备就可采用高清分辨率资源来显示页面,而折叠屏在展开态下,若配置信息所指示的放大比例大于1,配置信息就不会再指示高清分辨率资源所在的路径,而是指示超高清分辨率所在的资源的路径。那么,电子设备就不再采用高清分辨率资源来显示画面,而是采用超高清分辨率资源来显示画面,以保证页面显示的清晰度。For example, when the folding screen is in the folded state, the configuration information indicates the path where the high-definition resolution resource is located, and the electronic device can use the high-definition resolution resource to display the page. When the folding screen is in the unfolded state, if the amplification ratio indicated by the configuration information is greater than 1. The configuration information will no longer indicate the path of the HD resolution resource, but the path of the UHD resolution resource. Then, electronic devices no longer use high-definition resolution resources to display images, but use ultra-high-definition resolution resources to display images to ensure the clarity of page display.
应理解,每个应用都对应有不同的分辨率资源,不同显示分辨率资源存储在电子设备的不同文件夹中。It should be understood that each application corresponds to different resolution resources, and different display resolution resources are stored in different folders of the electronic device.
步骤504,基于目标元素重布局后的位置进行绘制,得到第二页面,该目标元素在第三页面中的绝对布局和在第二页面中的绝对布局不同。Step 504: Draw based on the re-layout position of the target element to obtain the second page. The absolute layout of the target element in the third page is different from the absolute layout in the second page.
目标元素在第三页面中的绝对布局和在第二页面中的绝对布局不同可以理解为目标元素在第三页面中的绝对位置和在第二页面中的绝对位置不同。The absolute layout of the target element in the third page is different from the absolute layout in the second page. It can be understood that the absolute position of the target element in the third page is different from the absolute position in the second page.
示例性地,如图6c,电子设备对a2至a4、a6至a8、a21、a22、a31、a32、a41、a42、a61、a62、a71、a72、a81及a82的位置进行调整后,就可基于这些目标元素调整后的位置进行页面绘制,从而得到如图6d所示的第二页面603。For example, as shown in Figure 6c, after the electronic device adjusts the positions of a2 to a4, a6 to a8, a21, a22, a31, a32, a41, a42, a61, a62, a71, a72, a81 and a82, The page is drawn based on the adjusted positions of these target elements, thereby obtaining the second page 603 as shown in Figure 6d.
可以看出,a2至a4、a6至a8、a21、a22、a31、a32、a41、a42、a61、a62、a71、a72、a81及a82在第三页面602中的位置与在第二页面603中的绝对位置均不同。It can be seen that the positions of a2 to a4, a6 to a8, a21, a22, a31, a32, a41, a42, a61, a62, a71, a72, a81 and a82 in the third page 602 are the same as those in the second page 603 The absolute positions are different.
应理解,页面绘制的过程可参照现有技术,在此不再赘述。It should be understood that the process of page drawing can refer to the existing technology, and will not be described again here.
步骤505,在展开态下的折叠屏显示第二页面。Step 505: Display the second page on the folding screen in the expanded state.
如前所述,电子设备的折叠屏处于被展开的状态称为展开态。As mentioned before, the folded screen of an electronic device is called the unfolded state.
例如,如图6d,电子设备根据步骤504绘制得到第二页面603后,就可将该第二页面603显示在折叠屏完全展开时的屏幕上。For example, as shown in Figure 6d, after the electronic device draws the second page 603 according to step 504, the second page 603 can be displayed on the screen when the folding screen is fully unfolded.
基于上述方案,电子设备在检测到折叠屏从折叠态变为展开态时,以折叠态下的折叠屏上所显示的第一页面中元素的大小和位置为基准,通过测量和布局来得到第三页面,再基于配置信息对第三页面中的部分或全部元素(也即上述目标元素)的位置进行重布局,进而可以根据目标元素重布局后的位置进行绘制以得到第二页面,并将第二页面显示在折叠屏上。由于这些重布局的元素可以预先定义,也即,预先考虑到了页面因折叠屏被展开落在屏幕之外或显示不全的问题, 因此,针对这些元素进行重布局,可以避免页面中的部分元素在折叠屏被展开后显示不全的情况,换言之,所显示的页面与展开态下的屏幕能够相适配,提升了用户的体验。Based on the above solution, when the electronic device detects that the folding screen changes from the folded state to the unfolded state, the size and position of the elements in the first page displayed on the folding screen in the folded state are used as the basis, and the third page is obtained through measurement and layout. three pages, and then rearrange the positions of some or all elements (that is, the above-mentioned target elements) in the third page based on the configuration information, and then draw according to the rearranged positions of the target elements to obtain the second page, and The second page is displayed on the folding screen. Since these re-layout elements can be pre-defined, that is, the problem of the page falling outside the screen or being incompletely displayed due to the folding screen being expanded is taken into account in advance. Therefore, re-layout of these elements can avoid the situation where some elements in the page are not fully displayed after the folding screen is unfolded. In other words, the displayed page can adapt to the screen in the expanded state, improving the user experience.
为了对本申请所提供的页面显示方法的实现过程更好的理解,下面结合图7a至图7e进行示例性说明。In order to better understand the implementation process of the page display method provided by this application, an exemplary description will be provided below with reference to Figures 7a to 7e.
图7a~图7e为本申请实施例提供的电子设备进行页面显示的另一界面示意图。Figures 7a to 7e are another schematic diagram of an interface for displaying a page on an electronic device provided by an embodiment of the present application.
如图7a,在折叠态下的折叠屏上显示有第一页面701。假设该第一页面701包含有八个视图组,分别为b1、b2、b3、b4、b5、b6、b7和b8。每个视图组包括两个视图。其中,b1包括的两个视图分别为b11和b12,b2包括的两个视图分别为b21和b22,b3包括的两个视图分别为b31和b32,b4包括的两个视图分别为b41和b42,b5包括的两个视图分别为b51和b52,b6包括的两个视图分别为b61和b62,b7包括的两个视图分别为b71和b72,以及b8包括的两个视图分别为b81和b82。As shown in Figure 7a, a first page 701 is displayed on the folding screen in the folded state. Assume that the first page 701 contains eight view groups, namely b1, b2, b3, b4, b5, b6, b7 and b8. Each view group includes two views. Among them, the two views included in b1 are b11 and b12 respectively, the two views included in b2 are b21 and b22 respectively, the two views included in b3 are b31 and b32 respectively, and the two views included in b4 are b41 and b42 respectively. The two views included in b5 are b51 and b52 respectively, the two views included in b6 are b61 and b62 respectively, the two views included in b7 are b71 and b72 respectively, and the two views included in b8 are b81 and b82 respectively.
电子设备在监测到折叠屏被展开时,就可以图7a中所示的坐标轴为基准,确定出b1至b8、b11、b12、b21、b22、b31、b32、b41、b42、b51、b52、b61、b62、b71、b72、b81及a82各自的宽度、高度和坐标。When the electronic device detects that the folding screen is unfolded, it can use the coordinate axes shown in Figure 7a as a reference to determine b1 to b8, b11, b12, b21, b22, b31, b32, b41, b42, b51, b52, The respective width, height and coordinates of b61, b62, b71, b72, b81 and a82.
如图7b,电子设备在确定出第一页面701中各个元素的宽度、高度和坐标后,就可以图7b中的坐标轴为基准,确定出上述各个元素分别在图7b所示的坐标轴中的位置,再根据这些元素分别在图7b所示的坐标轴中的位置和确定的各个元素的宽度、高度,就可得到第三页面702。As shown in Figure 7b, after the electronic device determines the width, height and coordinates of each element in the first page 701, it can use the coordinate axis in Figure 7b as a reference to determine that each of the above elements is in the coordinate axis shown in Figure 7b. , and then based on the positions of these elements on the coordinate axis shown in Figure 7b and the determined width and height of each element, the third page 702 can be obtained.
电子设备在得到第三页面702后,可在本地预存的多个配置信息中获取第三页面702对应的配置信息。假设该配置信息指示了第三页面702的放大比例为1.2倍,也指示了放大后的第三页面中需要重布局的目标元素的初始位置和目标位置、以及各个目标元素的ID。比如,指示了b1至b8、b11、b12、b21、b22、b31、b32、b41、b42、b51、b52、b61、b62、b71、b72、b81及b82各自在重布局之前的初始位置和重布局之后的目标位置。After obtaining the third page 702, the electronic device can obtain the configuration information corresponding to the third page 702 from a plurality of locally pre-stored configuration information. Assume that the configuration information indicates that the enlargement ratio of the third page 702 is 1.2 times, and also indicates the initial and target positions of the target elements that need to be re-layout in the enlarged third page, as well as the IDs of each target element. For example, the initial positions and relayout of b1 to b8, b11, b12, b21, b22, b31, b32, b41, b42, b51, b52, b61, b62, b71, b72, b81 and b82 before relayout are indicated. subsequent target location.
如图7c,电子设备可先基于配置信息所指示的放大比例对第三页面702进行放大,即,将第三页面702整体放大1.2倍,得到放大后的第三页面702'。可以看出,放大后的第三页面702'的宽度、高度均是未放大前的第三页面702的宽度、高度的1.2倍,放大后的第三页面702'中元素的大小也是未放大的第三页面中元素的大小的1.2倍,即b1'至b8'、b11'、b12'、b21'、b22'、b31'、b32'、b41'、b42'、b51'、b52'、b61'、b62'、b71'、b72'、b81'及b82'分别是b1至b8、b11、b12、b21、b22、b31、b32、b41、b42、b51、b52、b61、b62、b71、b72、b81及b82的1.2倍。As shown in Figure 7c, the electronic device can first enlarge the third page 702 based on the enlargement ratio indicated by the configuration information, that is, enlarge the entire third page 702 by 1.2 times to obtain an enlarged third page 702'. It can be seen that the width and height of the enlarged third page 702' are both 1.2 times the width and height of the unenlarged third page 702, and the sizes of elements in the enlarged third page 702' are also unenlarged. 1.2 times the size of the elements in the third page, that is, b1' to b8', b11', b12', b21', b22', b31', b32', b41', b42', b51', b52', b61' , b62', b71', b72', b81' and b82' are respectively b1 to b8, b11, b12, b21, b22, b31, b32, b41, b42, b51, b52, b61, b62, b71, b72, b81 And 1.2 times that of b82.
如图7d,电子设备将第三页面702放大后,就可进一步根据配置信息所指示的需要重布局的各目标元素的初始位置和目标位置,对放大后的第三页面702'中的目标元素进行重布局。假设配置信息所指示的b1、b11和b12的目标位置为(x1',y1'),b2、b21和b22的目标位置为(x2',y2'),所指示的b3、b31和b32的目标位置为(x3',y3'),所指示的b4、b41和b42的目标位置为(x4',y4'),所指示的b5、b51和b52的目标位置为(x5',y5'),所指示的b6、b61和b62的目标位置为(x6',y6'),所指示的b7、b71和b72的目标位置为(x7',y7'),所指示的b8、b81和b82的目标位置为(x8',y8')。那么,电子设备可就可相应将b1'、b11'和b12'位置调整至(x1',y1'),将b2'、b21'和b22'位置调整至(x2',y2'),将b3'、b31'和b32'位置调整至(x3',y3'),将b4'、b41'和b42'的位置调整至(x4',y4'),将b5'、b51'和b52'位置调整至(x5',y5'),将b6'、b61'和b62'位置调整至(x6',y6'),将b7'、b71'和b72'的位置调整至(x7',y7'),以及将b8'、b81'和b82'位置调整至(x8',y8')。As shown in Figure 7d, after the electronic device enlarges the third page 702, it can further adjust the target elements in the enlarged third page 702' according to the initial position and target position of each target element that needs to be re-layout indicated by the configuration information. Perform re-layout. Assume that the target positions of b1, b11 and b12 indicated by the configuration information are (x1', y1'), the target positions of b2, b21 and b22 are (x2', y2'), and the indicated targets of b3, b31 and b32 The position is (x3', y3'), the indicated target positions of b4, b41 and b42 are (x4', y4'), the indicated target positions of b5, b51 and b52 are (x5', y5'), The indicated target positions of b6, b61 and b62 are (x6', y6'), the indicated target positions of b7, b71 and b72 are (x7', y7'), and the indicated targets of b8, b81 and b82 The position is (x8', y8'). Then, the electronic device can correspondingly adjust the positions of b1', b11' and b12' to (x1', y1'), adjust the positions of b2', b21' and b22' to (x2', y2'), and adjust the positions of b3 Adjust the positions of ', b31' and b32' to (x3', y3'), adjust the positions of b4', b41' and b42' to (x4', y4'), and adjust the positions of b5', b51' and b52' to (x5', y5'), adjust the positions of b6', b61' and b62' to (x6', y6'), adjust the positions of b7', b71' and b72' to (x7', y7'), And adjust the positions of b8', b81' and b82' to (x8', y8').
如图7e,电子设备进一步根据上述各个目标元素调整后的位置进行绘制,从而得到第二页面703,并将第二页面703显示在展开态下的折叠屏上。As shown in Figure 7e, the electronic device further draws according to the adjusted positions of each of the above target elements, thereby obtaining the second page 703, and displays the second page 703 on the folding screen in the expanded state.
基于上述方案,电子设备在检测到折叠屏从折叠态变为展开态时,以折叠态下的折叠屏上所显示的第一页面中元素的大小和位置为基准,通过测量和布局来得到第三页面,再基于配置信息对第三页面中的部分或全部元素(也即上述目标元素)的位置进行重布局,进而可以根据目标元素重布局后的位置进行绘制以得到第二页面,并将第二页面显示在折叠屏上。由于这些重布局的元素可以预先定义,也即,预先考虑到了页面因折叠屏被展开落在屏幕之外或显示不全的问题,因此,针对这些元素进行重布局,可以避免页面中的部分元素在折叠屏被展开后显示不全的情况。 换言之,所显示的页面与展开态下的屏幕能够相适配,提升了用户的体验。Based on the above solution, when the electronic device detects that the folding screen changes from the folded state to the unfolded state, the size and position of the elements in the first page displayed on the folding screen in the folded state are used as the basis, and the third page is obtained through measurement and layout. three pages, and then rearrange the positions of some or all elements (that is, the above-mentioned target elements) in the third page based on the configuration information, and then draw according to the rearranged positions of the target elements to obtain the second page, and The second page is displayed on the folding screen. Since these re-layout elements can be pre-defined, that is, the problem of the page falling outside the screen or being incompletely displayed due to the folding screen being expanded is taken into account in advance. Therefore, re-layout of these elements can avoid some elements on the page from being displayed in full. The display is incomplete after the folding screen is unfolded. In other words, the displayed page can be adapted to the screen in the expanded state, thereby improving the user experience.
图8为本申请实施例提供的电子设备的软件架构示意图。FIG. 8 is a schematic diagram of the software architecture of the electronic device provided by the embodiment of the present application.
如图8所示,该软件架构包括应用程序层、应用程序框架层、硬件抽象层和内核层。图8所示的软件架构示出了与本申请实施例相关的模块,而并未示出各个层所有的模块。As shown in Figure 8, the software architecture includes the application layer, application framework layer, hardware abstraction layer and kernel layer. The software architecture shown in Figure 8 shows modules related to the embodiment of the present application, but does not show all modules in each layer.
应用程序层包括一系列应用程序包。在应用程序层可通过启动应用程序包来运行应用程序。Activity组件是Android组件中的四大组件之一,在一个Android应用中,一个Activity组件通常可以理解为一个应用的活动页面,它上面可以显示一些控件也可以监听并处理用户的事件以做出响应。每运行一个应用程序,就会有相应的Activity组件启动。The application layer consists of a series of application packages. Applications can be run at the application layer by launching application packages. Activity component is one of the four major components in Android components. In an Android application, an Activity component can usually be understood as the active page of an application. It can display some controls and can also listen to and process user events to respond. . Every time an application is run, the corresponding Activity component will be started.
应用程序框架层包括AMS、WMS和SurfaceFlinger。关于AMS、WMS和SurfaceFlinger的相关说明可参看前文结合图3b的描述,此处不再赘述。The application framework layer includes AMS, WMS and SurfaceFlinger. For relevant descriptions of AMS, WMS and SurfaceFlinger, please refer to the previous description in conjunction with Figure 3b and will not be repeated here.
在本申请中,AMS可对应用程序的页面所对应的Activity组件进行识别,以及根据识别的Activity组件来从本地预存的配置文件中读取该页面对应的配置信息。In this application, AMS can identify the Activity component corresponding to the application page, and read the configuration information corresponding to the page from the locally pre-stored configuration file based on the identified Activity component.
硬件抽象层是位于操作系统内核与硬件电路之间的接口层,其目的在于将硬件抽象化。它隐藏了特定平台的硬件接口细节,为操作系统提供虚拟硬件平台,使其具有硬件无关性,可在多种平台上进行移植。从软硬件测试的角度看,软硬件的测试工作都可分别基于硬件抽象层来完成,使得硬件测试工作的并行进行称为可能。硬件抽象层是一个编程层,允许计算机操作系统在逻辑层而不是硬件层与硬件设备交互。The hardware abstraction layer is the interface layer between the operating system kernel and the hardware circuit. Its purpose is to abstract the hardware. It hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system, making it hardware-independent and portable on multiple platforms. From the perspective of software and hardware testing, both software and hardware testing work can be completed based on the hardware abstraction layer, making it possible to conduct hardware testing work in parallel. The hardware abstraction layer is a programming layer that allows a computer operating system to interact with hardware devices at a logical level rather than a hardware level.
硬件抽象层可以包括GraphicsAlloc和Hwcomposer。其中,GraphicsAlloc也可简称为Gralloc,用于分配显存、刷新显示。Hwcomposer可用于将图像缓冲区内容刷新到显示缓冲区。Hardware abstraction layers can include GraphicsAlloc and Hwcomposer. Among them, GraphicsAlloc can also be referred to as Gralloc, which is used to allocate video memory and refresh the display. Hwcomposer can be used to flush image buffer contents to the display buffer.
内核层可以采用Linux内核,内核层可以包括显示驱动(display driver)和图形处理器驱动(graphics processing unit driver,GPU driver)。The kernel layer can use the Linux kernel, and the kernel layer can include a display driver (display driver) and a graphics processor driver (graphics processing unit driver, GPU driver).
需要说明的是,硬件抽象层和内核层的相关原理可参照现有技术,在此不再赘述。It should be noted that the relevant principles of the hardware abstraction layer and kernel layer may refer to the existing technology and will not be described again here.
在本申请中,假设用户在折叠态下的折叠屏上想打开应用程序1,就可通过底层系统的显示屏,即折叠态下的折叠屏上触发折叠屏上所显示的应用程序1的图标。折叠屏在接收到该触发事件时,会将该触发事件上报给应用程序层。In this application, assuming that the user wants to open application 1 on the folding screen in the folded state, the user can trigger the icon of application 1 displayed on the folding screen through the display screen of the underlying system, that is, the folding screen in the folded state. . When the folding screen receives the trigger event, it will report the trigger event to the application layer.
应用程序层在接收到该触发事件时,通过运行应用程序包1,使应用程序1的第一页面(比如,登录页)相应地显示在底层系统中的显示屏,即折叠态下的折叠屏上。同时,在运行应用程序1的第一页面时,该应用程序1的第一页面对应的Activity组件也相应启动。When the application layer receives the trigger event, it runs application package 1 so that the first page of application 1 (for example, the login page) is displayed on the display screen in the underlying system, that is, the folding screen in the folded state. superior. At the same time, when the first page of application 1 is run, the Activity component corresponding to the first page of application 1 is also started accordingly.
需要说明的是,关于底层系统的介绍可参照前述图3b的相关说明,在此不再赘述。It should be noted that for the introduction of the underlying system, please refer to the relevant description of FIG. 3b and will not be repeated here.
在用户将折叠屏展开时,应用程序框架层中的AMS可对第一页面的Activity组件进行识别,根据该第一页面对应的Activity组件,从本地预存的配置文件中读取该第一页面对应的配置信息。AMS在读取到第一页面对应的配置信息后,可将该配置信息缓存在本地。在第一次的测量流程和布局流程中,可确定出第一页面中各个元素在第一页面中的宽度、高度以及位置,进而根据确定出的第一页面中各个元素的大小和位置,得到第三页面。When the user unfolds the folding screen, the AMS in the application framework layer can identify the Activity component of the first page, and read the corresponding Activity component of the first page from the locally pre-stored configuration file. configuration information. After AMS reads the configuration information corresponding to the first page, it can cache the configuration information locally. In the first measurement process and layout process, the width, height and position of each element in the first page can be determined, and then based on the determined size and position of each element in the first page, we get The third page.
进一步地,WMS从AMS处读取该配置信息,基于该配置信息,对第三页面中的目标元素进行重布局。Further, the WMS reads the configuration information from the AMS, and rearranges the target elements in the third page based on the configuration information.
若配置信息指示了第三页面中的目标元素在重布局之前的初始位置和重布局之后的目标位置,并未指示第三页面的放大比例。则基于配置信息对第三页面中的目标元素重新执行布局流程。If the configuration information indicates the initial position of the target element in the third page before relayout and the target position after relayout, it does not indicate the enlargement ratio of the third page. Then the layout process is re-executed for the target element in the third page based on the configuration information.
在对第三页面中的目标元素重新执行布局流程后,WMS可为窗口分配一块Surface,基于该Surface和所确定的目标元素重布局之后的位置执行绘制流程,从而得到第二页面。After re-executing the layout process on the target element in the third page, WMS can allocate a Surface to the window, and execute the drawing process based on the Surface and the determined position of the target element after re-layout, thereby obtaining the second page.
若配置信息不但指示第三页面的放大比例,还指示了放大后的第三页面中目标元素在重布局之前的初始位置和重布局之后的目标位置。则根据配置信息所指示的放大比例对第三页面进行放大,对于放大后的第三页面,重新执行测量流程和布局流程,也就是重新确定放大后的第三页面中各个元素的宽度、高度,以及基于配置信息所指示的放大后的第三页面中目标元素的目标位置,重新调整放大后的第三页面中目标元素的位置。If the configuration information not only indicates the enlargement ratio of the third page, but also indicates the initial position of the target element in the enlarged third page before re-layout and the target position after re-layout. Then the third page is enlarged according to the enlargement ratio indicated by the configuration information. For the enlarged third page, the measurement process and layout process are re-executed, that is, the width and height of each element in the enlarged third page are re-determined. and re-adjusting the position of the target element in the enlarged third page based on the target position of the target element in the enlarged third page indicated by the configuration information.
在重新执行测量流程和布局流程后,WMS可为窗口分配一块Surface,基于该Surface和所确定的放大后的第三页面中各元素的大小、目标元素重布局之后的位置执行绘制流程,从而得到第 二页面。After re-executing the measurement process and layout process, WMS can allocate a Surface to the window, and execute the drawing process based on the Surface and the determined size of each element in the enlarged third page and the position of the target element after re-layout, thus obtaining No. Two pages.
WMS将绘制得到的第二页面交由SurfaceFlinger,由SurfaceFlinger进行图像合成,进而就可在展开态下的折叠上显示第二页面。WMS hands the drawn second page to SurfaceFlinger, and SurfaceFlinger performs image synthesis, and then the second page can be displayed on the fold in the expanded state.
简言之,本申请所提供的页面显示方法主要由应用程序框架层中的AMS和WMS实现,具体实现细节可参照前述对图5至图7e的相关介绍,在此不再赘述。In short, the page display method provided by this application is mainly implemented by AMS and WMS in the application framework layer. For specific implementation details, please refer to the relevant introduction of Figure 5 to Figure 7e, which will not be described again here.
图9是本申请实施例提供的页面显示装置的示意性框图。如图9所示,该通信装置900可以包括:显示模块910和处理模块920。该装置900中的各模块可用于实现上文方法中电子设备的相应流程。Figure 9 is a schematic block diagram of a page display device provided by an embodiment of the present application. As shown in FIG. 9 , the communication device 900 may include: a display module 910 and a processing module 920 . Each module in the device 900 can be used to implement the corresponding process of the electronic device in the above method.
具体地,显示模块910可以用于在折叠态下的折叠屏显示第一页面;处理模块920可以用于在检测到折叠屏被展开时,基于对第一页面中的元素的测量和布局,得到第三页面;对第三页面中的目标元素进行重布局,得到目标元素重布局后的位置,该目标元素为视图或视图组;基于目标元素重布局后的位置进行绘制,得到第二页面,该目标元素在第三页面中的绝对布局和在第二页面中的绝对布局不同;显示模块910还可以用于在展开态下的折叠屏显示第二页面。Specifically, the display module 910 can be used to display the first page on the folding screen in the folded state; the processing module 920 can be used to obtain, based on the measurement and layout of the elements in the first page, when detecting that the folding screen is unfolded. The third page; Relayout the target element in the third page to obtain the rearranged position of the target element. The target element is a view or view group; Draw based on the rearranged position of the target element to obtain the second page. The absolute layout of the target element in the third page is different from the absolute layout in the second page; the display module 910 can also be used to display the second page on the folding screen in the expanded state.
可选地,该处理模块920具体可以用于获取配置信息,该配置信息用于指示目标元素在重布局之前的初始位置和重布局之后的目标位置,该目标元素重布局之前的初始位置和重布局之后的目标位置不同;基于配置信息,对第三页面中的目标元素进行重布局。Optionally, the processing module 920 can be specifically configured to obtain configuration information, which is used to indicate the initial position of the target element before relayout and the target position after relayout, and the initial position and target position of the target element before relayout. The target position after layout is different; based on the configuration information, the target element in the third page is re-layout.
可选地,该配置信息指示第三页面中的多个元素分别在重布局之前的初始位置和重布局之后的目标位置;该多个元素包括多个视图,或者,该多个元素包括至少一个视图组和至少一个视图组中的多个视图,且多个元素包括目标元素;该处理模块920还可以用于基于配置信息指示的多个元素中每个元素的初始位置和目标位置,确定需要重布局的目标元素;在第三页面中匹配目标元素。Optionally, the configuration information indicates the initial positions before relayout and the target positions after relayout of multiple elements in the third page; the multiple elements include multiple views, or the multiple elements include at least one The view group and multiple views in at least one view group, and the multiple elements include the target element; the processing module 920 can also be used to determine the need based on the initial position and target position of each element in the multiple elements indicated by the configuration information. The target element of the relayout; matches the target element in the third page.
可选地,该多个元素包括至少一个视图组和至少一个视图组中的多个视图,该处理模块920具体用于基于多个元素中各元素的层次结构,按照从父元素到子元素的顺序,遍历多个元素中每个元素的初始位置和目标位置,以确定需要重布局的目标元素。Optionally, the multiple elements include at least one view group and multiple views in the at least one view group. The processing module 920 is specifically configured to, based on the hierarchical structure of each element in the multiple elements, in accordance with the order from the parent element to the child element. Sequentially, traverse the initial position and target position of each element in multiple elements to determine the target element that needs to be relayout.
可选地,该处理模块920具体用于根据多个元素在第三页面中的位置和配置信息中指示的目标元素的初始位置,在第三页面中匹配目标元素。Optionally, the processing module 920 is specifically configured to match the target element in the third page according to the positions of the multiple elements in the third page and the initial position of the target element indicated in the configuration information.
可选地,该配置信息还用于指示多个元素中每个元素的标识,该处理模块920具体用于根据多个元素的标识和配置信息中指示的目标元素的标识,在三页面中匹配目标元素。Optionally, the configuration information is also used to indicate the identification of each element in the plurality of elements. The processing module 920 is specifically configured to match the three pages according to the identification of the plurality of elements and the identification of the target element indicated in the configuration information. target element.
可选地,该配置信息还用于指示页面的放大比例,该配置信息指示的多个元素中每个元素的初始位置和目标位置是基于放大比例确定的。Optionally, the configuration information is also used to indicate the magnification ratio of the page, and the initial position and target position of each of the multiple elements indicated by the configuration information are determined based on the magnification ratio.
可选地,在放大比例大于1的情况下,该配置信息还用于指示资源的存储路径,该资源是与折叠屏在展开态下的显示分辨率匹配的资源。Optionally, when the magnification ratio is greater than 1, the configuration information is also used to indicate the storage path of the resource, which is a resource that matches the display resolution of the folding screen in the unfolded state.
可选地,该处理模块920具体用于基于应用程序的页面对应的Activity组件,获取与Activity组件对应的配置信息。Optionally, the processing module 920 is specifically configured to obtain configuration information corresponding to the Activity component based on the Activity component corresponding to the page of the application.
应理解,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。另外,在本申请各个实施例中的各功能单元可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。It should be understood that the division of units in the embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods. In addition, each functional unit in various embodiments of the present application may be integrated into one processor, may exist independently, or may have two or more units integrated into one unit. The above integrated units can be implemented in the form of hardware or software functional units.
图10为本申请实施例提供的页面显示装置的硬件结构示意图。Figure 10 is a schematic diagram of the hardware structure of a page display device provided by an embodiment of the present application.
如图10所示,该装置包括:存储器1001、处理器1002和接口电路1003。该装置还可以包括显示屏1004,其中,存储器1001、处理器1002、接口电路1003和显示屏1004可以通信。示例性的,存储器1001、处理器1002、接口电路1003和显示屏1004可以通过通信总线通信,存储器1001用于存储计算机执行指令,由处理器1002来控制执行,并由接口电路1003来执行通信,从而实现本申请实施例提供的页面显示方法。As shown in Figure 10, the device includes: a memory 1001, a processor 1002 and an interface circuit 1003. The apparatus may also include a display screen 1004, wherein the memory 1001, the processor 1002, the interface circuitry 1003, and the display screen 1004 may be in communication. Exemplarily, the memory 1001, the processor 1002, the interface circuit 1003 and the display screen 1004 can communicate through a communication bus. The memory 1001 is used to store computer execution instructions, the processor 1002 controls the execution, and the interface circuit 1003 performs communication. Thus, the page display method provided by the embodiment of this application is implemented.
可选地,接口电路1003还可以包括输入输入电路和/或输出电路。Optionally, the interface circuit 1003 may also include an input circuit and/or an output circuit.
可选地,上述处理器1002可以包括一个或多个CPU,还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)等。通 用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。Optionally, the above-mentioned processor 1002 may include one or more CPUs, and may also be other general-purpose processors, digital signal processors (digital signal processors, DSPs), application specific integrated circuits (application specific integrated circuits, ASICs), etc. Pass The processor may be a microprocessor or the processor may be any conventional processor. The steps of the method disclosed in this application can be directly implemented by a hardware processor, or executed by a combination of hardware and software modules in the processor.
可能的实现方式中,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。In a possible implementation manner, the computer execution instructions in the embodiments of the present application may also be called application codes, which are not specifically limited in the embodiments of the present application.
本申请实施例提供一种电子设备,结构可参见图2,电子设备的存储器可用于存储至少一个程序指令,处理器用于执行至少一个程序指令,以实现上述方法实施例的技术方案。其实现原理和技术效果与上述方法相关实施例类似,此处不再赘述。An embodiment of the present application provides an electronic device. The structure can be seen in Figure 2. The memory of the electronic device can be used to store at least one program instruction, and the processor is used to execute at least one program instruction to implement the technical solution of the above method embodiment. The implementation principles and technical effects are similar to the above-mentioned method-related embodiments, and will not be described again here.
本申请实施例提供一种芯片,该芯片包括处理器,处理器用于调用存储器中的计算机程序,以执行上述实施例中的技术方案。其实现原理和技术效果与上述相关实施例类似,此处不再赘述。Embodiments of the present application provide a chip, which includes a processor. The processor is configured to call a computer program in a memory to execute the technical solutions in the above embodiments. The implementation principles and technical effects are similar to the above-mentioned related embodiments and will not be described again here.
本申请实施例提供一种计算机程序产品,当该计算机程序产品在电子设备运行时,使得该电子设备执行上述实施例中的技术方案。其实现原理和技术效果与上述相关实施例类似,此处不再赘述。Embodiments of the present application provide a computer program product. When the computer program product is run on an electronic device, it causes the electronic device to execute the technical solutions in the above embodiments. The implementation principles and technical effects are similar to the above-mentioned related embodiments and will not be described again here.
本申请实施例提供一种计算机可读存储介质,其上存储有程序指令,该程序指令被电子设备执行时,使得电子设备执行上述实施例的技术方案。其实现原理和技术效果与上述相关实施例类似,此处不再赘述。Embodiments of the present application provide a computer-readable storage medium on which program instructions are stored. When the program instructions are executed by an electronic device, the electronic device causes the electronic device to execute the technical solutions of the above embodiments. The implementation principles and technical effects are similar to the above-mentioned related embodiments and will not be described again here.
以上的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。 The above specific embodiments further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention shall be included in the protection scope of the present invention.

Claims (14)

  1. 一种页面显示方法,其特征在于,应用于包括折叠屏的电子设备,所述方法包括:A page display method, characterized in that it is applied to an electronic device including a folding screen, and the method includes:
    在折叠态下的所述折叠屏显示第一页面;The folding screen in the folded state displays the first page;
    在检测到所述折叠屏被展开时,基于对所述第一页面中的元素的测量和布局,得到第三页面;When detecting that the folding screen is unfolded, obtain a third page based on the measurement and layout of elements in the first page;
    对所述第三页面中的目标元素进行重布局,得到所述目标元素重布局后的位置,所述目标元素为视图或视图组;Relayout the target element in the third page to obtain the rearranged position of the target element, where the target element is a view or a view group;
    基于所述目标元素重布局后的位置进行绘制,得到第二页面,所述目标元素在所述第三页面中的绝对布局和在所述第二页面中的绝对布局不同;Draw based on the re-layout position of the target element to obtain a second page, where the absolute layout of the target element in the third page is different from the absolute layout in the second page;
    在展开态下的所述折叠屏显示所述第二页面。The folding screen in the unfolded state displays the second page.
  2. 如权利要求1所述的方法,其特征在于,所述对所述第三页面中的目标元素进行重布局,包括:The method of claim 1, wherein the re-layout of the target elements in the third page includes:
    获取配置信息,所述配置信息用于指示所述目标元素在所述重布局之前的初始位置和所述重布局之后的目标位置,所述目标元素重布局之前的初始位置和重布局之后的目标位置不同;Obtain configuration information, the configuration information is used to indicate the initial position of the target element before the re-layout and the target position after the re-layout, the initial position of the target element before the re-layout and the target after the re-layout The location is different;
    基于所述配置信息,对所述第三页面中的目标元素进行重布局。Based on the configuration information, the target element in the third page is rearranged.
  3. 如权利要求2所述的方法,其特征在于,所述配置信息指示所述第三页面中的多个元素分别在所述重布局之前的初始位置和所述重布局之后的目标位置;所述多个元素包括多个视图,或者,所述多个元素包括至少一个视图组和所述至少一个视图组中的多个视图,且所述多个元素包括所述目标元素;The method of claim 2, wherein the configuration information indicates the initial positions of the plurality of elements in the third page before the re-layout and the target positions after the re-layout; The plurality of elements includes a plurality of views, or the plurality of elements includes at least one view group and a plurality of views in the at least one view group, and the plurality of elements includes the target element;
    在所述基于所述配置信息,对所述第三页面中的目标元素进行重布局之前,所述方法还包括:Before relayout the target element in the third page based on the configuration information, the method further includes:
    基于所述配置信息指示的所述多个元素中每个元素的初始位置和目标位置,确定需要重布局的所述目标元素;Determine the target element that needs to be re-layout based on the initial position and target position of each element in the plurality of elements indicated by the configuration information;
    在第三页面中匹配所述目标元素。Match said target element in the third page.
  4. 如权利要求3所述的方法,其特征在于,所述多个元素包括至少一个视图组和所述至少一个视图组中的多个视图,以及The method of claim 3, wherein the plurality of elements includes at least one view group and a plurality of views in the at least one view group, and
    所述基于所述配置信息指示的所述多个元素中每个元素的初始位置和目标位置,确定需要重布局的目标元素,包括:Determining the target element that needs to be re-layout based on the initial position and target position of each element in the plurality of elements indicated by the configuration information includes:
    基于所述多个元素中各元素的层次结构,按照从父元素到子元素的顺序,遍历所述多个元素中每个元素的初始位置和目标位置,以确定需要重布局的所述目标元素。Based on the hierarchical structure of each element in the plurality of elements, in order from the parent element to the child element, the initial position and the target position of each element in the plurality of elements are traversed to determine the target element that needs to be re-layout .
  5. 如权利要求3或4所述的方法,其特征在于,所述在第三页面中匹配所述目标元素,包括:The method according to claim 3 or 4, characterized in that matching the target element in the third page includes:
    根据所述多个元素在所述第三页面中的位置和所述配置信息中指示的所述目标元素的初始位置,在所述第三页面中匹配所述目标元素。The target element is matched in the third page according to the positions of the plurality of elements in the third page and the initial position of the target element indicated in the configuration information.
  6. 如权利要求3或4所述的方法,其特征在于,所述配置信息还用于指示所述多个元素中每个元素的标识;The method according to claim 3 or 4, characterized in that the configuration information is also used to indicate the identity of each element in the plurality of elements;
    所述在第三页面中匹配所述目标元素,包括:The matching of the target element in the third page includes:
    根据所述多个元素的标识和所述配置信息中指示的所述目标元素的标识,在所述第三页面中匹配所述目标元素。The target element is matched in the third page according to the identification of the plurality of elements and the identification of the target element indicated in the configuration information.
  7. 如权利要求3至6中任一项所述的方法,其特征在于,所述配置信息还用于指示页面的放大比例,所述配置信息指示的所述多个元素中每个元素的初始位置和目标位置是基于所述放大比例确定的。The method according to any one of claims 3 to 6, wherein the configuration information is also used to indicate the magnification ratio of the page, and the configuration information indicates the initial position of each element in the plurality of elements. and the target position is determined based on the magnification ratio.
  8. 如权利要求7所述的方法,其特征在于,所述放大比例大于1的情况下,所述配置信息还用于指示资源的存储路径,所述资源是与所述折叠屏在展开态下的显示分辨率匹配的资源。The method of claim 7, wherein when the amplification ratio is greater than 1, the configuration information is also used to indicate a storage path of a resource, and the resource is in the unfolded state with the folding screen. Display resources with matching resolutions.
  9. 如权利要求2至8中任一项所述的方法,其特征在于,所述第一页面为应用程序的页面,所述获取配置信息,包括:The method according to any one of claims 2 to 8, characterized in that the first page is a page of an application program, and the obtaining configuration information includes:
    基于所述应用程序的页面对应的Activity组件,获取与所述Activity组件对应的配置信息。Based on the Activity component corresponding to the page of the application program, the configuration information corresponding to the Activity component is obtained.
  10. 一种页面显示装置,其特征在于,包括用于执行如权利要求1至9中任一项所述方法的模块。 A page display device, characterized by comprising a module for executing the method according to any one of claims 1 to 9.
  11. 一种页面显示装置,其特征在于,包括存储器和处理器,其中,所述存储器用于存储计算机程序;A page display device, characterized by comprising a memory and a processor, wherein the memory is used to store a computer program;
    所述处理器用于调用并执行所述计算机程序,以使所述装置执行如权利要求1至9中任一项所述的方法。The processor is used to call and execute the computer program, so that the device performs the method according to any one of claims 1 to 9.
  12. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,当所述计算机程序在计算机上运行时,使得电子设备执行如权利要求1至9中任一项所述的方法。A computer-readable storage medium, characterized in that it is used to store a computer program, which when the computer program is run on a computer, causes the electronic device to perform the method according to any one of claims 1 to 9.
  13. 一种计算机程序产品,其特征在于,所述计算机程序产品中包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得电子设备实现如权利要求1至9中任一项所述的方法。A computer program product, characterized in that the computer program product includes computer program code. When the computer program code is run on a computer, the electronic device implements the method as described in any one of claims 1 to 9. method.
  14. 一种程序产品,其特征在于,所述程序产品包括计算机程序,所述计算机程序存储在可读存储介质中,通信装置的至少一个处理器可以从所述可读存储介质读取所述计算机程序,所述至少一个处理器执行所述计算机程序使得通信装置实施如权利要求1-9任意一项所述的方法。 A program product, characterized in that the program product includes a computer program, the computer program is stored in a readable storage medium, and at least one processor of the communication device can read the computer program from the readable storage medium , the at least one processor executes the computer program so that the communication device implements the method according to any one of claims 1-9.
PCT/CN2023/110518 2022-08-02 2023-08-01 Page display method and related apparatus WO2024027696A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210923735.6 2022-08-02
CN202210923735.6A CN117539561A (en) 2022-08-02 2022-08-02 Page display method and related device

Publications (1)

Publication Number Publication Date
WO2024027696A1 true WO2024027696A1 (en) 2024-02-08

Family

ID=89790579

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/110518 WO2024027696A1 (en) 2022-08-02 2023-08-01 Page display method and related apparatus

Country Status (2)

Country Link
CN (1) CN117539561A (en)
WO (1) WO2024027696A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597510A (en) * 2019-08-09 2019-12-20 华为技术有限公司 Dynamic layout method and device for interface
CN112558951A (en) * 2020-12-24 2021-03-26 大唐互联科技(武汉)有限公司 Foldable screen webpage adaptation method, device and storage device
CN114564263A (en) * 2022-02-18 2022-05-31 维沃移动通信有限公司 Page layout adjusting method and device
CN116009802A (en) * 2021-10-22 2023-04-25 华为技术有限公司 Page display method, electronic device and computer readable storage medium
CN116483488A (en) * 2023-02-21 2023-07-25 维沃移动通信有限公司 Screen display method, device, electronic equipment and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597510A (en) * 2019-08-09 2019-12-20 华为技术有限公司 Dynamic layout method and device for interface
CN112558951A (en) * 2020-12-24 2021-03-26 大唐互联科技(武汉)有限公司 Foldable screen webpage adaptation method, device and storage device
CN116009802A (en) * 2021-10-22 2023-04-25 华为技术有限公司 Page display method, electronic device and computer readable storage medium
CN114564263A (en) * 2022-02-18 2022-05-31 维沃移动通信有限公司 Page layout adjusting method and device
CN116483488A (en) * 2023-02-21 2023-07-25 维沃移动通信有限公司 Screen display method, device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN117539561A (en) 2024-02-09

Similar Documents

Publication Publication Date Title
WO2020244497A1 (en) Display method for flexible screen and electronic device
US20230161420A1 (en) Display control method and apparatus
US10817165B2 (en) Folder management method and device
WO2021104030A1 (en) Split-screen display method and electronic device
WO2021244443A1 (en) Split-screen display method, electronic device, and computer readable storage medium
US10043488B2 (en) Electronic device and method of controlling display thereof
US10121449B2 (en) Method and apparatus for screen sharing
US9852491B2 (en) Objects in screen images
TWI546670B (en) Windows portable devices interface for bluetooth low energy devices
WO2021115194A1 (en) Application icon display method and electronic device
CN110312985A (en) Electronic equipment and method for showing its screen
CN108475184A (en) Electronic equipment and its apply data display method
CN106708181A (en) Electronic device and method for configuring display thereof
WO2021110133A1 (en) Control operation method and electronic device
US20160247306A1 (en) Apparatus and method for controlling display in electronic device having processors
JP2020537794A (en) Icon display method, device, and system
WO2022022177A1 (en) Display method and electronic device
WO2023130921A1 (en) Method for page layout adapted to multiple devices, and electronic device
WO2022161119A1 (en) Display method and electronic device
WO2024027696A1 (en) Page display method and related apparatus
US10303351B2 (en) Method and apparatus for notifying of content change
WO2023179428A1 (en) Adaptive display method of interface, and terminal device
KR102216656B1 (en) Method for processing image and electronic device thereof
KR102266869B1 (en) Electronic apparatus and dispalying method thereof
CN112181915A (en) Method, device, terminal and storage medium for executing service

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23849402

Country of ref document: EP

Kind code of ref document: A1