CN118444805A - Method and related device for displaying floating window - Google Patents
Method and related device for displaying floating window Download PDFInfo
- Publication number
- CN118444805A CN118444805A CN202311849299.3A CN202311849299A CN118444805A CN 118444805 A CN118444805 A CN 118444805A CN 202311849299 A CN202311849299 A CN 202311849299A CN 118444805 A CN118444805 A CN 118444805A
- Authority
- CN
- China
- Prior art keywords
- floating window
- user interface
- electronic device
- window
- application
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及电子显示技术,尤其涉及显示悬浮窗的方法及相关装置。The present application relates to electronic display technology, and more particularly to a method for displaying a floating window and related devices.
背景技术Background technique
电子设备支持在显示一个应用程序的用户界面的同时显示另一个应用程序的悬浮窗,这样,用户可以同时观察到两个应用程序的用户界面。如何高效且美观的显示悬浮窗是本领域亟需解决的问题。Electronic devices support displaying a floating window of another application while displaying a user interface of one application, so that a user can observe the user interfaces of two applications at the same time. How to display a floating window efficiently and beautifully is an urgent problem to be solved in the art.
发明内容Summary of the invention
本申请提供了一种显示悬浮窗的方法及相关装置,不仅可以实现对悬浮窗进行圆角裁切,还可以保证无论悬浮窗是否包含有SurfaceView,电子设备对悬浮窗进行圆角裁切均是通过硬合成实现的,减少电子设备的功耗。并且,本申请后实施例提供的显示悬浮窗的方法尽可能减少了悬浮窗的顶部栏与底部栏对应用程序中内容的遮挡,更加美观。The present application provides a method and related device for displaying a floating window, which can not only realize rounded corner cutting of the floating window, but also ensure that whether the floating window contains a SurfaceView or not, the electronic device performs rounded corner cutting of the floating window through hard synthesis, thereby reducing the power consumption of the electronic device. In addition, the method for displaying a floating window provided in the latter embodiment of the present application minimizes the obstruction of the top bar and bottom bar of the floating window to the content in the application, making it more beautiful.
第一方面,本申请提供了一种显示悬浮窗的方法,接收第一操作,该第一操作用于生成第一悬浮窗,该第一悬浮窗包括第一应用程序的第一用户界面,该第一用户界面包括表面视图,该第一用户界面的表面视图用于显示动态变化的内容;In a first aspect, the present application provides a method for displaying a floating window, receiving a first operation, the first operation is used to generate a first floating window, the first floating window includes a first user interface of a first application, the first user interface includes a surface view, and the surface view of the first user interface is used to display dynamically changing content;
设置该第一悬浮窗的圆角参数,该圆角参数包括第一图层的圆角参数,该第一图层包括该第一用户界面的根节点视图;Setting the rounded corner parameters of the first floating window, the rounded corner parameters including the rounded corner parameters of the first layer, the first layer including the root node view of the first user interface;
设置该第一悬浮窗的内边距,该内边距指示该第一用户界面在该第一悬浮窗中的位置;Setting a padding of the first floating window, where the padding indicates a position of the first user interface in the first floating window;
根据该圆角参数和该内边距绘制该第一悬浮窗;Draw the first floating window according to the rounded corner parameter and the inner margin;
显示该第一悬浮窗,该第一悬浮窗呈圆角方形。The first floating window is displayed, and the first floating window is in a rounded square shape.
实施上述方法,不仅可以实现呈圆角方形显示,这样,不仅悬浮窗中的顶部栏与底部栏不会遮挡用户界面,悬浮窗中的顶部栏与底部栏的指示符也不会遮挡住用户界面中的内容。还可以在响应用户操作,改变悬浮窗的位置以及大小的情况下依旧能够呈圆角方形显示。By implementing the above method, not only can the rounded square display be realized, but also the top bar and bottom bar in the floating window will not block the user interface, and the indicators of the top bar and bottom bar in the floating window will not block the content in the user interface. In addition, the rounded square display can still be realized when the position and size of the floating window are changed in response to user operations.
结合第一方面描述的方法,该圆角参数包括圆角半径,该内边距大于或等于该圆角半径。这样可以保证悬浮窗显示的是圆角,SurfaceView的直角不会被看到。In combination with the method described in the first aspect, the rounded corner parameter includes a rounded corner radius, and the inner margin is greater than or equal to the rounded corner radius. This ensures that the floating window displays rounded corners, and the right angles of SurfaceView will not be seen.
在一种可能的实现方式中,电子设备可以针对于悬浮窗的四个圆角半径分开进行设置。优选的,电子设备可以针对于悬浮窗的左上圆角以及右上圆角设置相同的圆角半径,针对于悬浮窗的左下圆角以及右下圆角设置相同的圆角半径。In a possible implementation, the electronic device can set the four fillet radii of the floating window separately. Preferably, the electronic device can set the same fillet radius for the upper left and upper right fillets of the floating window, and set the same fillet radius for the lower left and lower right fillets of the floating window.
结合第一方面描述的方法,该第一悬浮窗还包括顶部栏与底部栏,该圆角参数还包括第二图层的圆角参数,该第二图层用于显示该第一悬浮窗的顶部栏与底部栏。In combination with the method described in the first aspect, the first floating window also includes a top bar and a bottom bar, and the rounded corner parameters also include rounded corner parameters of a second layer, and the second layer is used to display the top bar and the bottom bar of the first floating window.
结合第一方面描述的方法,该第一悬浮窗中的顶部栏以及底部栏呈透明状。In combination with the method described in the first aspect, the top bar and the bottom bar in the first floating window are transparent.
结合第一方面描述的方法,该方法还包括:接收作用于该第一悬浮窗的顶部栏的操作,调整该第一悬浮窗的位置;或者接收作用于该第一悬浮窗的底部栏的操作,调整该第一悬浮窗的大小。In combination with the method described in the first aspect, the method also includes: receiving an operation acting on the top bar of the first floating window to adjust the position of the first floating window; or receiving an operation acting on the bottom bar of the first floating window to adjust the size of the first floating window.
结合第一方面描述的方法,该圆角参数基于该第一悬浮窗中顶部栏与底部栏的高度得到,该圆角参数的圆角半径小于或等于该第一悬浮窗中顶部栏与底部栏的高度。这样,不仅可以对悬浮窗设置任意样式的圆角,还可以使得悬浮窗中顶部栏与底部栏与悬浮窗的两侧可以平滑过度。In combination with the method described in the first aspect, the rounded corner parameter is obtained based on the height of the top bar and the bottom bar in the first floating window, and the rounded corner radius of the rounded corner parameter is less than or equal to the height of the top bar and the bottom bar in the first floating window. In this way, not only can the floating window be rounded in any style, but also the top bar and the bottom bar in the floating window can be smoothly transitioned to the two sides of the floating window.
结合第一方面描述的方法,该圆角参数为固定值。In combination with the method described in the first aspect, the rounded corner parameter is a fixed value.
结合第一方面描述的方法,该内边距包括:上边距和下边距,该上边距指示该第一用户界面的根节点视图和表面视图在该第一悬浮窗中开始绘制的位置,该下边距指示该第一用户界面的根节点视图和表面视图在该第一悬浮窗中结束绘制的位置。In combination with the method described in the first aspect, the inner margin includes: a top margin and a bottom margin, the top margin indicates the position where the root node view and the surface view of the first user interface start to be drawn in the first floating window, and the bottom margin indicates the position where the root node view and the surface view of the first user interface end to be drawn in the first floating window.
结合第一方面描述的方法,该第一图层小于该第二图层,该内边距包括:上边距或下边距,该上边距指示该第一用户界面的根节点视图和表面视图在该第一悬浮窗中开始绘制的位置,该下边距指示该第一用户界面的根节点视图和表面视图在该第一悬浮窗中结束绘制的位置。In combination with the method described in the first aspect, the first layer is smaller than the second layer, and the inner margin includes: a top margin or a bottom margin, the top margin indicates the position where the root node view and the surface view of the first user interface start to be drawn in the first floating window, and the bottom margin indicates the position where the root node view and the surface view of the first user interface end to be drawn in the first floating window.
结合第一方面描述的方法,在显示包含该悬浮窗之后,该方法还包括:In combination with the method described in the first aspect, after displaying the floating window, the method further includes:
接收第二操作,该第二操作用于将该第一悬浮窗显示的该第一用户界面切换至第二用户界面,该第二用户界面包括表面视图;根据该内边距绘制该第一悬浮窗中的该第二用户界面;将该第一悬浮窗显示的该第一用户界面切换至该第二用户界面。Receive a second operation, the second operation being used to switch the first user interface displayed in the first floating window to a second user interface, the second user interface including a surface view; draw the second user interface in the first floating window according to the inner margin; and switch the first user interface displayed in the first floating window to the second user interface.
结合第一方面描述的方法,在显示包含有该第一用户界面的该第一悬浮窗之后,该方法还包括:In combination with the method described in the first aspect, after displaying the first floating window including the first user interface, the method further includes:
接收第三操作,该第三操作用于生成第二悬浮窗,该第二悬浮窗包括第二应用程序的用户界面;在显示该第一悬浮窗的同时,显示该第二悬浮窗,该第二悬浮窗呈圆角方形。A third operation is received, where the third operation is used to generate a second floating window, where the second floating window includes a user interface of a second application; and the second floating window is displayed while the first floating window is displayed, where the second floating window is in a rounded square shape.
这样,电子设备可以显示多个应用程序的悬浮窗。In this way, the electronic device can display floating windows of multiple applications.
结合第一方面描述的方法,该方法包括:In combination with the method described in the first aspect, the method includes:
接收第三操作,该第三操作用于生成第三悬浮窗,该第三悬浮窗包括第三应用程序的第三用户界面,该第三用户界面不包括表面视图;设置该第三悬浮窗的圆角参数,该第三悬浮窗的圆角参数包括第三图层的圆角参数,该第三图层包括该第三用户界面的根节点视图;根据该第三悬浮窗的圆角参数绘制该第三悬浮窗;显示该第三悬浮窗,该第三悬浮窗呈圆角方形。A third operation is received, where the third operation is used to generate a third floating window, where the third floating window includes a third user interface of a third application, where the third user interface does not include a surface view; corner fillet parameters of the third floating window are set, where the corner fillet parameters of the third floating window include corner fillet parameters of a third layer, where the third layer includes a root node view of the third user interface; the third floating window is drawn according to the corner fillet parameters of the third floating window; and the third floating window is displayed, where the third floating window is a rounded square.
这样,电子设备在悬浮窗不包括SurfaceView的情况下也能呈圆角方形显示。In this way, the electronic device can also display in a rounded square when the floating window does not include SurfaceView.
第二方面,本申请提供了一种电子设备,该电子设备包括折叠屏、一个或多个存储器、一个或多个处理器;该存储器与该一个或多个处理器耦合,该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,该一个或多个处理器调用该计算机指令以使得该电子设备执行如第一方面中任一项描述的方法。In a second aspect, the present application provides an electronic device, comprising a folding screen, one or more memories, and one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute a method as described in any one of the first aspects.
第三方面,本申请提供了一种计算机可读存储介质,包括指令,当该指令在电子设备上运行时,使得该电子设备执行如第一方面中任一项描述的方法。In a third aspect, the present application provides a computer-readable storage medium, comprising instructions, which, when executed on an electronic device, enable the electronic device to execute a method as described in any one of the first aspects.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1A-图1D示例性示出了本申请实施例提供的悬浮窗架构。1A-1D exemplarily show the floating window architecture provided in an embodiment of the present application.
图2A-图2G示例了本申请实施例中电子设备显示悬浮窗的相关用户界面。2A-2G illustrate the user interfaces related to the floating window displayed by the electronic device in the embodiment of the present application.
图2H-图2J示例了本申请实施例中电子设备显示悬浮窗的相关用户界面。2H-2J illustrate the user interfaces related to the floating window displayed by the electronic device in the embodiment of the present application.
图3为本申请实施例提供的一种显示悬浮窗的方法的流程示意图。FIG. 3 is a schematic flow chart of a method for displaying a floating window provided in an embodiment of the present application.
图4为本申请实施例提供的一种显示悬悬浮窗的方法对应的OS交互图。FIG. 4 is an OS interaction diagram corresponding to a method for displaying a suspended window provided in an embodiment of the present application.
图5为本申请实施例提供的电子设备的结构示意图。FIG5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
图6为本申请实施例提供的电子设备的软件结构框图。FIG6 is a software structure block diagram of the electronic device provided in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, "/" means or, for example, A/B can mean A or B; "and/or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
在本申请中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本申请所描述的实施例可以与其它实施例相结合。Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
本申请以下实施例中的术语“用户界面(user interface,UI)”,是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。用户界面是通过java、可扩展标记语言(extensible markuplanguage,XML)等特定计算机语言编写的源代码,界面源代码在电子设备上经过解析,渲染,最终呈现为用户可以识别的内容。用户界面常用的表现形式是图形用户界面(graphicuser interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的文本、图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device, and finally presented as content that the user can recognize. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation that is displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.
悬浮窗作为电子设备的系统功能,可以用于显示某一个应用程序的用户界面。悬浮窗可以与另一个应用程序的用户界面叠加显示。As a system function of an electronic device, a floating window can be used to display the user interface of a certain application. The floating window can be displayed superimposed on the user interface of another application.
悬浮窗可以包括:用户界面、顶部栏以及底部栏。用户界面可以由应用程序提供,顶部栏以及底部栏可以由系统生成。在一种可能的实现方式中,顶部栏以及底部栏还可以是在应用程序接收系统发送的顶部栏以及底部栏之后,由应用程序生成的。The floating window may include: a user interface, a top bar, and a bottom bar. The user interface may be provided by the application, and the top bar and the bottom bar may be generated by the system. In a possible implementation, the top bar and the bottom bar may also be generated by the application after the application receives the top bar and the bottom bar sent by the system.
这样,用户可以同时对两个甚至更多应用程序进行交互操作。This way, users can interact with two or more applications at the same time.
首先,先介绍本申请实施例提供的两种悬浮窗的架构。First, the architectures of two floating windows provided in the embodiments of the present application are introduced.
图1A示出了第一种悬浮窗架构。图1A中的(a)可以表示电子设备显示的第一种架构的悬浮窗。如图1A中的(b)所示,悬浮窗中应用程序提供的用户界面,顶部栏以及底部栏均绘制在同一图层例如Surface Layer中。在第一种架构中,悬浮窗中的顶部栏、底部栏与应用程序提供的用户界面都可以由应用程序生成。如图1A所示,使用第一种悬浮窗架构,顶部栏以及底部栏可能会遮挡部分应用程序中的用户界面。这样,不仅悬浮窗不够美观,也会导致使得用户无法针对被遮挡的区域进行交互。Figure 1A shows a first floating window architecture. (a) in Figure 1A can represent a floating window of the first architecture displayed by an electronic device. As shown in (b) in Figure 1A, the user interface, the top bar, and the bottom bar provided by the application in the floating window are all drawn in the same layer, such as the Surface Layer. In the first architecture, the top bar, the bottom bar, and the user interface provided by the application in the floating window can all be generated by the application. As shown in Figure 1A, using the first floating window architecture, the top bar and the bottom bar may block the user interface in part of the application. In this way, not only is the floating window not beautiful enough, but it also makes it impossible for users to interact with the blocked area.
图1B示出了第二种悬浮窗架构。图1B中的(a)可以表示电子设备显示的第二种架构的悬浮窗。如图1B中的(b)所示,看出悬浮窗中应用程序提供的用户界面绘制在一个图层中,悬浮窗中的顶部栏与底部栏绘制在另一个图层中。在第二种架构中,悬浮窗中的顶部栏以及底部栏可以由系统提供,应用程序的用户界面由该应用程序提供。如图1B所示,使用第二种悬浮窗架构,顶部栏以及底部栏可以设置为透明形式,不会过多的遮挡应用程序中的内容。Figure 1B shows a second floating window architecture. (a) in Figure 1B can represent a floating window of the second architecture displayed by an electronic device. As shown in (b) in Figure 1B, it can be seen that the user interface provided by the application in the floating window is drawn in one layer, and the top bar and bottom bar in the floating window are drawn in another layer. In the second architecture, the top bar and bottom bar in the floating window can be provided by the system, and the user interface of the application is provided by the application. As shown in Figure 1B, using the second floating window architecture, the top bar and bottom bar can be set to transparent form, so as not to block too much content in the application.
示例性的,第二种悬浮窗架构中存在两个图层,其中,用于显示应用程序的用户界面的图层可以是指Decorview,用于显示悬浮窗的顶部栏与底部栏的图层可以是指WindowDecoration(又称DecorCaptionView)。Window Decoration可以是指是用于承载窗口的装饰元素(例如顶部栏、底部栏)的图层等,它影响窗口的外观。Exemplarily, there are two layers in the second floating window architecture, where the layer for displaying the user interface of the application may refer to Decorview, and the layer for displaying the top bar and bottom bar of the floating window may refer to WindowDecoration (also known as DecorCaptionView). Window Decoration may refer to a layer for carrying window decoration elements (such as top bar, bottom bar), etc., which affects the appearance of the window.
在上述两种悬浮窗架构中,悬浮窗中所显示的用户界面均可能包含表面视图SurfaceView。SurfaceView用于显示动态变化的内容,一般应用在需要实时更新绘制合成的应用程序(例如游戏应用程序、视频应用程序)中,其独立于Decorview单独进行绘制。例如,当应用程序中存在需要每一帧都进行绘制的内容时,例如视频、游戏,则会采用SurfaceView来实现。In the above two floating window architectures, the user interface displayed in the floating window may include a surface view SurfaceView. SurfaceView is used to display dynamically changing content. It is generally used in applications that need to update drawing synthesis in real time (such as game applications, video applications), and it is drawn independently of Decorview. For example, when there is content in the application that needs to be drawn for each frame, such as videos and games, SurfaceView will be used to implement it.
进一步的,为了使得悬浮窗更加美观,电子设备可以将悬浮窗设置成圆角。Furthermore, in order to make the floating window more beautiful, the electronic device can set the floating window to have rounded corners.
示例性的,以电子设备设置成悬浮窗的应用程序为社交类应用程序为例,当悬浮窗设置成圆角之后,第一种架构的悬浮窗可以如图1C所示。在图1C中,悬浮窗A的顶部栏与底部栏遮挡住了社交类应用程序中的某些内容(例如聊天框标题、输入框等等)。第二种结构的悬浮窗可以如图1D所示。在图1D中,悬浮窗B的顶部栏与底部栏设置为透明状态,其没有过多的遮挡住社交类应用程序中的内容。For example, taking the application of a social application as an example, when the floating window is set to rounded corners, the floating window of the first structure can be shown in FIG1C. In FIG1C, the top bar and bottom bar of the floating window A block some content in the social application (such as the chat box title, input box, etc.). The floating window of the second structure can be shown in FIG1D. In FIG1D, the top bar and bottom bar of the floating window B are set to a transparent state, which does not block too much content in the social application.
下面介绍本申请实施例涉及的相关应用场景。The following introduces relevant application scenarios involved in the embodiments of the present application.
图2A-图2G示出了本申请实施例中电子设备显示悬浮窗的相关用户界面。其中,以所显示的悬浮窗包括SurfaceView为例来介绍下面的用户界面。2A-2G show the relevant user interfaces of the electronic device displaying the floating window in the embodiment of the present application. Among them, the following user interface is introduced by taking the displayed floating window including SurfaceView as an example.
如图2A所示,用户界面200为电子设备的视频类应用程序提供的用户界面。示例性的,用户界面200可以是观看直播的用户界面。用户界面200可以包括但不限于:直播标题、直播画面、评论区域、评论输入框等等。As shown in Fig. 2A, user interface 200 is a user interface provided by a video application of an electronic device. Exemplarily, user interface 200 may be a user interface for watching live broadcasts. User interface 200 may include, but is not limited to: a live broadcast title, a live broadcast screen, a comment area, a comment input box, and the like.
示例性的,电子设备可以在用户界面200中响应向上滑动的操作,显示用户界面210。该向上滑动的操作包括:从用户界面200底部向上滑动的操作。如图2B所示,用户界面210电子设备显示多个正在进行的任务(或应用程序)的用户界面。用户界面210可以包括但不限于:任务211。其中,任务211用于指示上述视频类应用程序。电子设备可以响应作用于任务211的点击操作,重新显示用户界面200。Exemplarily, the electronic device may respond to an upward sliding operation in the user interface 200 and display the user interface 210. The upward sliding operation includes: an operation of sliding upward from the bottom of the user interface 200. As shown in FIG2B , the user interface 210 electronic device displays the user interfaces of multiple ongoing tasks (or applications). The user interface 210 may include, but is not limited to, task 211. Among them, task 211 is used to indicate the above-mentioned video application. The electronic device may respond to a click operation on task 211 and redisplay the user interface 200.
电子设备可以响应作用于任务211的长按操作,显示用户界面220。如图2C所示,用户界面220可以包括:任务211、锁定控件221、分屏控件222、悬浮窗控件223、设置控件224。电子设备可以响应作用于锁定控件221的点击操作,将上述视频类应用程序锁定为后台运行。电子设备可以响应作用于分屏控件222的点击操作,选择另一个应用程序与上述视频类应用程序设置为分屏显示。The electronic device may respond to a long press operation on the task 211 and display the user interface 220. As shown in FIG2C , the user interface 220 may include: the task 211, the lock control 221, the split screen control 222, the floating window control 223, and the setting control 224. The electronic device may respond to a click operation on the lock control 221 to lock the above-mentioned video application to run in the background. The electronic device may respond to a click operation on the split screen control 222 to select another application to be set to split screen display with the above-mentioned video application.
示例性的,电子设备可以响应作用于悬浮窗控件223的点击操作,将上述视频类应用程序设置为悬浮窗。Exemplarily, the electronic device may respond to a click operation on the floating window control 223 to set the video application as a floating window.
又示例性的,电子设备可以在用户界面200中响应向下滑动的操作,显示用户界面230。如图2D所示,用户界面230为电子设备提供的状态栏用户界面。用户界面230可以包括但不限于:悬浮窗控件231。电子设备可以响应作用于悬浮窗控件231的点击操作,将上述视频类应用程序设置为悬浮窗。In another exemplary embodiment, the electronic device may respond to a downward sliding operation in the user interface 200 to display a user interface 230. As shown in FIG2D , the user interface 230 is a status bar user interface provided by the electronic device. The user interface 230 may include, but is not limited to, a floating window control 231. The electronic device may respond to a click operation on the floating window control 231 to set the above-mentioned video application as a floating window.
在本申请实施例中,上述两种设置为悬浮窗的方式仅做示例性说明,还可以包括更多方式将某一应用程序设置为悬浮窗。例如,在电子设备显示某一应用程序的用户界面的情况下,显示另一应用程序的通知消息。电子设备可以响应作用于上述通知消息的下滑操作,显示另一应用程序的悬浮窗。对此不作限定。In the embodiments of the present application, the above two ways of setting as floating windows are only exemplary, and more ways of setting a certain application as a floating window may be included. For example, when the electronic device displays the user interface of a certain application, a notification message of another application is displayed. The electronic device may respond to a sliding operation on the above notification message and display a floating window of another application. This is not limited.
下面结合用户界面介绍本申请实施例提供的几种将悬浮窗设置为圆角的方式:The following describes several methods of setting the floating window to rounded corners provided by the embodiments of the present application in combination with the user interface:
方式一:直接针对于悬浮窗的Task Surface进行圆角裁切。Method 1: Directly perform rounded corner cutting on the Task Surface of the floating window.
在一些实现方式中,task是一组activity的集合。Task可以跨多个activity,并且允许用户在不同的activity之间进行切换。示例性的,当电子设备显示有悬浮窗时,当前task中可能包含用于指示两个应用程序的activity,此时,存在两个Task Surface,即一个用于表示悬浮窗中应用程序。悬浮窗的Task Surface可以理解为电子设备在将悬浮窗送显之前所合成的图层。In some implementations, a task is a set of activities. A task can span multiple activities and allow users to switch between different activities. For example, when an electronic device displays a floating window, the current task may contain activities for indicating two applications. At this time, there are two Task Surfaces, one for representing the application in the floating window. The Task Surface of the floating window can be understood as a layer synthesized by the electronic device before displaying the floating window.
在本申请实施例中,由于电子设备在采用上述两种悬浮窗架构生成悬浮窗的过程中均会生成Task Surface,因此,方式一可以适用于以上两种悬浮窗结构。使用方式一,需要对每一帧悬浮窗的Task Surface进行圆角裁切。在应用程序运行时每一帧都需要进行圆角裁切的方式需要通过GPU实现,因此该方式也可以被称为软合成。鉴于此,软合成功耗较高。软合成可以应用于例如游戏类应用程序、视频类应用程序。In an embodiment of the present application, since the electronic device will generate a Task Surface in the process of generating a floating window using the above two floating window architectures, method one can be applied to the above two floating window structures. When using method one, it is necessary to perform rounded corner cropping on the Task Surface of each floating window frame. The method of performing rounded corner cropping on each frame when the application is running needs to be implemented by the GPU, so this method can also be called soft synthesis. In view of this, soft synthesis consumes high power. Soft synthesis can be applied to, for example, game applications and video applications.
在方式一应用于上述第一种悬浮窗框架的情况下,电子设备响应作用于悬浮窗控件223或悬浮窗控件231的点击操作,可以显示用户界面250。如图2F所示,用户界面250中可以包括但不限于:桌面251、悬浮窗252。其中,悬浮窗252可以以圆角方形的形式呈现。但是悬浮窗252中的顶部栏与底部栏遮挡悬浮窗252中的内容。When the first method is applied to the first floating window frame, the electronic device can display the user interface 250 in response to the click operation on the floating window control 223 or the floating window control 231. As shown in FIG. 2F, the user interface 250 may include but is not limited to: a desktop 251 and a floating window 252. The floating window 252 may be presented in the form of a rounded square. However, the top bar and the bottom bar in the floating window 252 block the content in the floating window 252.
在方式一应用于上述第二种悬浮窗框架的情况下,电子设备响应作用于悬浮窗控件223或悬浮窗控件231的点击操作,可以显示用户界面260。如图2G所示,用户界面260中可以包括但不限于:桌面261、悬浮窗262。其中,悬浮窗262可以以圆角方形的形式呈现。并且悬浮窗262中的顶部栏与底部栏可以呈透明状态。但是,顶部栏与底部栏所包含的指示符仍会遮挡部分用户界面的内容。When the first method is applied to the second floating window frame, the electronic device can display a user interface 260 in response to a click operation on the floating window control 223 or the floating window control 231. As shown in FIG. 2G , the user interface 260 may include, but is not limited to, a desktop 261 and a floating window 262. The floating window 262 may be presented in the form of a rounded square. And the top bar and the bottom bar in the floating window 262 may be transparent. However, the indicators contained in the top bar and the bottom bar will still block part of the content of the user interface.
方式二:针对于悬浮窗的Decorview以及DecorCaptionView设置圆角属性。Method 2: Set the rounded corner properties for Decorview and DecorCaptionView of the floating window.
在本申请实施例中,方式二可以适用于上述第二种悬浮窗结构。具体的,方式二可以是指:仅需在首次生成悬浮窗的过程中,在悬浮窗的Decorview以及DecorCaptionView的绘制过程中,执行一次圆角裁剪即可。在后续每一帧针对于悬浮窗的Surface合成时都无需再进行圆角裁切。仅需在首次生成悬浮窗时进行圆角裁切的方式需要通过CPU实现,因此该方式也可以被称为硬合成。鉴于此,硬合成功耗较低。In an embodiment of the present application, method 2 can be applicable to the second floating window structure mentioned above. Specifically, method 2 may refer to: it is only necessary to perform rounded corner cropping once during the first generation of the floating window, during the drawing process of the Decorview and DecorCaptionView of the floating window. There is no need to perform rounded corner cropping when synthesizing the Surface of the floating window in each subsequent frame. The method of performing rounded corner cropping only when the floating window is generated for the first time needs to be implemented by the CPU, so this method can also be called hard synthesis. In view of this, hard synthesis has lower power consumption.
但是,若悬浮窗中包含有SurfaceView,则使用方式二无法实现对悬浮窗进行圆角裁切。这是由于针对于悬浮窗的Decorview设置的圆角属性对SurfaceView不生效。However, if the floating window contains a SurfaceView, the second method cannot be used to round the corners of the floating window. This is because the rounded corner properties set for the Decorview of the floating window are not effective for the SurfaceView.
示例性的,当电子设备采用上述方式二设置悬浮窗的圆角属性时,电子设备响应作用于悬浮窗控件223或悬浮窗控件231的点击操作,可以显示用户界面240。如图2E所示,用户界面240中可以包括但不限于:桌面241、悬浮窗242。其中,悬浮窗242以直角方形的形式呈现,例如,悬浮窗242中的四个角呈黑色是由于电子设备绘制生成的SurfaceView。电子设备未成功的将悬浮窗242的四个角设置为圆角。Exemplarily, when the electronic device sets the rounded corner attribute of the floating window using the above-mentioned method 2, the electronic device can display the user interface 240 in response to the click operation on the floating window control 223 or the floating window control 231. As shown in FIG2E, the user interface 240 may include but is not limited to: desktop 241, floating window 242. Among them, the floating window 242 is presented in the form of a right-angled square. For example, the four corners of the floating window 242 are black because the electronic device draws the generated SurfaceView. The electronic device failed to successfully set the four corners of the floating window 242 to rounded corners.
方式三:针对于悬浮窗中的Surface Layer设置圆角属性,针对于悬浮窗中的SurfaceView进行圆角裁切。Method 3: Set the rounded corner properties for the Surface Layer in the floating window, and perform rounded corner cutting for the SurfaceView in the floating window.
在本申请实施例中,方式三可以适用于上述第一种悬浮窗结构。若悬浮窗中不包含SurfaceView,则可以直接针对于Surface Layer设置圆角属性;若悬浮窗中包含SurfaceView,除了针对于Surface Layer设置圆角属性,还会在每一帧针对悬浮窗进行Surface合成时都对SurfaceView进行圆角裁切。这样,针对于SurfaceView进行圆角裁切的过程仍会采用软合成的方式,功耗高。In the embodiment of the present application, method three can be applied to the first floating window structure mentioned above. If the floating window does not contain SurfaceView, the rounded corner properties can be set directly for the Surface Layer; if the floating window contains SurfaceView, in addition to setting the rounded corner properties for the Surface Layer, the SurfaceView will also be rounded when the Surface is synthesized for the floating window in each frame. In this way, the process of rounding the corners of SurfaceView will still use soft synthesis, which consumes high power.
示例性的,当电子设备采用上述方式三设置悬浮窗的圆角时,电子设备响应作用于悬浮窗控件223或悬浮窗控件231的点击操作,可以显示用户界面250。Exemplarily, when the electronic device sets the rounded corners of the floating window using the third method described above, the electronic device may display the user interface 250 in response to a click operation on the floating window control 223 or the floating window control 231 .
总的来说,悬浮窗包括SurfaceView时,上述三种将悬浮窗设置为圆角的方式都有一些问题,具体包括:In general, when the floating window includes SurfaceView, the above three ways of setting the floating window to rounded corners have some problems, including:
方式一功耗大,并且在方式一应用第一种悬浮窗架构的情况下,顶部栏与底部栏遮挡住了用户界面的部分内容,在方式一应用第二种悬浮窗架构的情况下,顶部栏与底部栏中的指示符也会遮挡住了用户界面的部分内容;Method 1 consumes a lot of power, and when the first floating window architecture is applied in method 1, the top bar and the bottom bar block part of the content of the user interface. When the second floating window architecture is applied in method 1, the indicators in the top bar and the bottom bar also block part of the content of the user interface.
上述方式二并不能实现悬浮窗的圆角设置;The above method 2 cannot achieve the rounded corner setting of the floating window;
上述方式三同样存在功耗大且顶部栏与底部栏的指示符遮挡住了用户界面的内容的部分问题。The above method 3 also has the problem of high power consumption and the indicators of the top bar and the bottom bar partially covering the content of the user interface.
为了解决上述几种情况出现的问题,本申请实施例提供了一种显示悬浮窗的方法,该方法基于上述第二种悬浮窗框架实施。In order to solve the problems arising from the above-mentioned situations, an embodiment of the present application provides a method for displaying a floating window, which is implemented based on the above-mentioned second floating window frame.
在该方法中,在悬浮窗所显示的用户界面包含SurfaceView的情况下,设置内边距(即padding值),改变悬浮窗中的用户界面与悬浮窗的上边界以及下边界之间的距离,使得SurfaceView的直角可以在与悬浮窗的上边界以及下边界间隔一段距离的区域内显示,不会在悬浮窗的圆角之外的区域显示。这样SurfaceView的直角就不会被暴露出来,用户就能看到圆角的悬浮窗。In this method, when the user interface displayed by the floating window includes SurfaceView, the inner margin (i.e., padding value) is set to change the distance between the user interface in the floating window and the upper and lower borders of the floating window, so that the right angle of SurfaceView can be displayed in the area separated by a certain distance from the upper and lower borders of the floating window, and will not be displayed in the area outside the rounded corners of the floating window. In this way, the right angle of SurfaceView will not be exposed, and the user can see the floating window with rounded corners.
这样,电子设备可以在悬浮窗所显示的用户界面中包含SurfaceView的情况下,也可以显示呈圆角方形的悬浮窗。并且,电子设备可以在首次生成悬浮窗时实现针对于悬浮窗的圆角设置,无需后续每一帧更新用户界面时都进行针对于悬浮窗的圆角设置,这样功耗较小。本申请实施例提供的方法使用第二种悬浮窗架构还可以使得悬浮窗的顶部栏与底部栏不遮挡应用程序中的内容,更加美观。In this way, the electronic device can display a floating window with rounded square corners when the user interface displayed by the floating window includes SurfaceView. In addition, the electronic device can implement the rounded corner setting for the floating window when the floating window is first generated, without the need to perform the rounded corner setting for the floating window when updating the user interface in each subsequent frame, which consumes less power. The method provided in the embodiment of the present application uses the second floating window architecture and can also make the top bar and bottom bar of the floating window not block the content in the application, which is more beautiful.
下面介绍本申请实施例提供的显示悬浮窗的用户界面。The following describes a user interface for displaying a floating window provided in an embodiment of the present application.
图2H-图2J示例性示出了本申请实施例提供了另一种电子设备显示悬浮窗的用户界面。2H-2J exemplarily show another user interface for displaying a floating window on an electronic device provided in an embodiment of the present application.
示例性的,电子设备响应作用于悬浮窗控件223或悬浮窗控件231的点击操作,可以显示用户界面270。Exemplarily, the electronic device may display the user interface 270 in response to a click operation on the floating window control 223 or the floating window control 231 .
如图2H所示,用户界面270可以包括但不限于:桌面271、悬浮窗272。其中,悬浮窗272可以以圆角方形的形式呈现。并且悬浮窗272中的顶部栏272A与底部栏272B可以呈白色,其也不会遮挡住悬浮窗272中的内容。并且,电子设备是通过硬合成对悬浮窗272进行圆角裁切的,具体可以参考下述流程,在此先不详细描述。As shown in FIG. 2H , the user interface 270 may include but is not limited to: a desktop 271 and a floating window 272. The floating window 272 may be presented in the form of a rounded square. The top bar 272A and the bottom bar 272B in the floating window 272 may be white, and they will not block the content in the floating window 272. In addition, the electronic device rounds the floating window 272 through hard synthesis. For details, please refer to the following process, which will not be described in detail here.
示例性的,电子设备可以响应作用于悬浮窗272的双击操作,退出悬浮窗,进入全屏显示视频类应用程序,即显示用户界面200。Exemplarily, the electronic device may respond to a double-click operation on the floating window 272 , exit the floating window, and enter a full-screen display of a video application, that is, display the user interface 200 .
示例性的,电子设备可以响应作用于顶部栏272A的长按滑动操作,改变悬浮窗在用户界面270中的位置之后显示用户界面280。如图2I所示,用户界面280可以包括但不限于桌面281、悬浮窗282。其中,悬浮窗272同样可以以圆角方形的形式呈现。并且悬浮窗282中的顶部栏282A与底部栏282B可以呈白色,其也不会遮挡住悬浮窗282中的内容。上述悬浮窗272与悬浮窗282的位置不一致。Exemplarily, the electronic device may respond to a long press and slide operation on the top bar 272A, change the position of the floating window in the user interface 270, and then display the user interface 280. As shown in FIG. 2I, the user interface 280 may include, but is not limited to, a desktop 281 and a floating window 282. Among them, the floating window 272 may also be presented in the form of a rounded square. And the top bar 282A and the bottom bar 282B in the floating window 282 may be white, which will not block the content in the floating window 282. The positions of the above-mentioned floating window 272 and the floating window 282 are inconsistent.
示例性的,电子设备可以响应作用于底部栏282B的长按滑动操作,改变悬浮窗的大小之后显示用户界面290。如图2J所示,用户界面290可以包括但不限于桌面291、悬浮窗292。其中,悬浮窗292同样可以以圆角方形的形式呈现。并且悬浮窗292中的顶部栏292A与底部栏292B可以呈白色,其也不会遮挡住悬浮窗292中的内容。上述悬浮窗282与悬浮窗292的大小不一致。Exemplarily, the electronic device may respond to a long press and slide operation on the bottom bar 282B, change the size of the floating window, and then display the user interface 290. As shown in FIG. 2J, the user interface 290 may include, but is not limited to, a desktop 291 and a floating window 292. Among them, the floating window 292 may also be presented in the form of a rounded square. And the top bar 292A and the bottom bar 292B in the floating window 292 may be white, which will not block the content in the floating window 292. The sizes of the above-mentioned floating window 282 and the floating window 292 are inconsistent.
本申请实施例提供的悬浮窗不仅可以实现呈圆角方形显示,这样,不仅悬浮窗中的顶部栏与底部栏不会遮挡用户界面,悬浮窗中的顶部栏与底部栏的指示符也不会遮挡住用户界面中的内容。还可以在响应用户操作,改变悬浮窗的位置以及大小的情况下依旧能够呈圆角方形显示。The floating window provided in the embodiment of the present application can not only be displayed in a rounded square shape, so that not only the top bar and the bottom bar in the floating window will not block the user interface, but also the indicators in the top bar and the bottom bar in the floating window will not block the content in the user interface. It can also be displayed in a rounded square shape when the position and size of the floating window are changed in response to user operations.
下面介绍本申请实施例提供的显示悬浮窗的方法流程。The following describes a method flow for displaying a floating window provided in an embodiment of the present application.
图3示例性示出了本申请实施例提供的显示悬浮窗的方法流程图。示例性的,以采用第二种悬浮窗框架为例来介绍下述方法,该方法流程包括:FIG3 exemplarily shows a flow chart of a method for displaying a floating window provided in an embodiment of the present application. By way of example, the following method is introduced by taking the second floating window frame as an example, and the method flow includes:
S301、电子设备接收第一操作,第一操作用于指示将第一应用程序设置为悬浮窗。S301: An electronic device receives a first operation, where the first operation is used to instruct to set a first application as a floating window.
在一些实现方式中,电子设备将第一应用程序设置为悬浮窗可以是指:将第一应用程序所提供的用户界面以悬浮窗的形式与其他应用程序提供的用户界面叠加显示在屏幕上。示例性的,第一应用程序为视频类应用程序,如图2H所示,视频类应用程序提供的用户界面以悬浮窗272的形式与系统应用程序提供的桌面271叠加显示在屏幕上。In some implementations, the electronic device setting the first application as a floating window may refer to: displaying the user interface provided by the first application in the form of a floating window superimposed on the user interface provided by other applications on the screen. Exemplarily, the first application is a video application, as shown in FIG2H , the user interface provided by the video application is displayed in the form of a floating window 272 superimposed on the desktop 271 provided by the system application on the screen.
第一操作可以包括但不限于:点击操作、滑动操作。示例性的,第一操作可以是指针对于图2C所示的悬浮窗控件223的点击操作或针对于图2D所示的悬浮窗控件231的点击操作,此时其他应用程序可以是指桌面应用程序。第一操作还可以是指针对于在显示应用程序A时所弹出的通知的滑动操作,此时其他应用程序可以是指应用程序A。The first operation may include, but is not limited to, a click operation and a slide operation. For example, the first operation may be a click operation of the pointer on the floating window control 223 shown in FIG. 2C or a click operation on the floating window control 231 shown in FIG. 2D , in which case the other application may refer to a desktop application. The first operation may also be a slide operation of the pointer on a notification that pops up when application A is displayed, in which case the other application may refer to application A.
在本申请实施例中,上述第一操作的类型以及其他应用程序的类型仅做示例性说明,对此不作限定。In the embodiment of the present application, the type of the first operation and the types of other application programs are merely illustrative and are not limiting.
第一应用程序可以包括:电子设备中的系统应用程序,也可以是指三方应用程序。可选的,第一应用程序不包括用于显示桌面的系统应用程序。The first application may include: a system application in the electronic device, or may refer to a third-party application. Optionally, the first application does not include a system application for displaying a desktop.
S302、电子设备获取针对于悬浮窗所设置的圆角参数。S302: The electronic device obtains corner fillet parameters set for the floating window.
上述圆角参数由电子设备设置,圆角参数包括:悬浮窗的四个圆角的半径。The above-mentioned rounded corner parameters are set by the electronic device, and the rounded corner parameters include: the radii of the four rounded corners of the floating window.
在一种可能的实现方式中,电子设备可以基于悬浮窗的顶部栏高度以及底部栏高度来设置圆角参数。在一种可能的实现方式中,电子设备可以基于圆角参数来设置悬浮窗的顶部栏高度以及底部栏高度。在本申请实施例中,对此不作限定。In a possible implementation, the electronic device may set the rounded corner parameters based on the top bar height and the bottom bar height of the floating window. In a possible implementation, the electronic device may set the top bar height and the bottom bar height of the floating window based on the rounded corner parameters. In the embodiments of the present application, this is not limited.
具体的,电子设备可以将小于悬浮窗的顶部栏与底部栏的高度的任意数值设置为悬浮窗的圆角的半径。这样,不仅可以对悬浮窗设置任意样式的圆角,还可以使得悬浮窗中顶部栏与底部栏与悬浮窗的两侧可以平滑过度。Specifically, the electronic device can set any value less than the height of the top bar and the bottom bar of the floating window as the radius of the rounded corner of the floating window. In this way, not only can the floating window be rounded in any style, but also the top bar and the bottom bar in the floating window can be smoothly transitioned from the two sides of the floating window.
优选的,电子设备可以将悬浮窗的顶部栏与底部栏的高度设置为悬浮窗的圆角的半径。这样,悬浮窗的圆角最为饱满,呈现的视觉效果最好。在本申请实施例中,对上述圆角参数不作限定。Preferably, the electronic device can set the height of the top bar and the bottom bar of the floating window to the radius of the rounded corners of the floating window. In this way, the rounded corners of the floating window are fullest and present the best visual effect. In the embodiment of the present application, the above rounded corner parameters are not limited.
在一种可能的实现方式中,电子设备可以针对于悬浮窗的四个圆角半径分开进行设置。优选的,电子设备可以针对于悬浮窗的左上圆角以及右上圆角设置相同的圆角半径,针对于悬浮窗的左下圆角以及右下圆角设置相同的圆角半径。In a possible implementation, the electronic device can set the four fillet radii of the floating window separately. Preferably, the electronic device can set the same fillet radius for the upper left and upper right fillets of the floating window, and set the same fillet radius for the lower left and lower right fillets of the floating window.
在一些实现方式中,电子设备可以获取针对于悬浮窗中两个图层分别设置的圆角参数。在图3所示的流程图中,以两个图层的大小是一致的为例来介绍本申请实施例提供的显示悬浮窗的方法。In some implementations, the electronic device may obtain the fillet parameters respectively set for the two layers in the floating window. In the flowchart shown in FIG3 , the method for displaying a floating window provided in an embodiment of the present application is introduced by taking the case where the sizes of the two layers are the same as an example.
两个图层可以包括:第一应用程序的第一用户界面的根节点视图(Decorview)以及用于显示悬浮窗的顶部栏与底部栏的图层(Window Decoration)。The two layers may include: a root node view (Decorview) of the first user interface of the first application and a layer (Window Decoration) for displaying a top bar and a bottom bar of a floating window.
在一些实现方式中,电子设备针对于上述两个图层设置圆角参数的方式可能不同,但两个图层所呈现的圆角一般是一致的。示例性的,电子设备可以通过getOutlineProvider来获取针对于Decorview设置的圆角参数,还可以通过setOutlineProviderNeeded将针对于Decorview设置的圆角参数应用在绘制悬浮窗的过程中。电子设备可以通过caption_decor_title.xml的方式来获取针对于Window Decoration设置的顶部圆角,电子设备可以通过caption_decor_tail.xml的方式来获取针对于WindowDecoration设置的底部圆角。在一些实现方式中,电子设备针对于悬浮窗所设置的圆角参数是固定的。也就是说,不同大小的悬浮窗呈现出来的圆角效果可能有所不同。In some implementations, the electronic device may set the rounded corner parameters for the above two layers in different ways, but the rounded corners presented by the two layers are generally consistent. Exemplarily, the electronic device can obtain the rounded corner parameters set for Decorview through getOutlineProvider, and can also apply the rounded corner parameters set for Decorview in the process of drawing the floating window through setOutlineProviderNeeded. The electronic device can obtain the top rounded corner set for Window Decoration through caption_decor_title.xml, and the electronic device can obtain the bottom rounded corner set for WindowDecoration through caption_decor_tail.xml. In some implementations, the rounded corner parameters set by the electronic device for the floating window are fixed. In other words, the rounded corner effects presented by floating windows of different sizes may be different.
可选的,电子设备针对于悬浮窗所设置的圆角参数可以是变化的。悬浮窗的圆角参数可以随着悬浮窗的大小变化而变化。也就是说,不同大小的悬浮窗呈现出来的圆角效果也可以是一样的。Optionally, the rounded corner parameters set by the electronic device for the floating window may be variable. The rounded corner parameters of the floating window may change as the size of the floating window changes. In other words, the rounded corner effects presented by floating windows of different sizes may also be the same.
S303、电子设备判断当前第一应用程序的用户界面是否包含SurfaceView。S303: The electronic device determines whether the user interface of the current first application includes SurfaceView.
在一些实现方式中,电子设备可以基于在接收第一操作时第一应用程序所显示的用户界面来生成悬浮窗。In some implementations, the electronic device may generate a floating window based on a user interface displayed by the first application when receiving the first operation.
具体的,电子设备可以获取到当前第一应用程序中的用户界面中所包含的各种view的类型。电子设备可以判断当前第一应用程序中的用户界面是否包含有SurfaceView。Specifically, the electronic device can obtain various view types included in the user interface of the current first application. The electronic device can determine whether the user interface of the current first application includes SurfaceView.
示例性的,当前第一应用程序中的用户界面可以是指用户界面200。又示例性的,若第一操作是指针对于通知的滑动操作,则当前第一应用程序中的用户界面可以是指电子设备响应作用于通知的点击操作所显示的第一应用程序的用户界面。例如,若通知为社交类应用程序新消息的通知,则第一应用程序的用户界面为新消息的聊天用户界面。Exemplarily, the user interface in the current first application may refer to user interface 200. In another exemplary embodiment, if the first operation is a sliding operation of the pointer on the notification, the user interface in the current first application may refer to the user interface of the first application displayed by the electronic device in response to the click operation on the notification. For example, if the notification is a notification of a new message of a social application, the user interface of the first application is a chat user interface of the new message.
若当前第一应用程序中的用户界面不包含SurfaceView,则执行S304;若当前第一应用程序中的用户界面包含SurfaceView,则执行S306。If the user interface in the current first application does not include SurfaceView, execute S304; if the user interface in the current first application includes SurfaceView, execute S306.
可选的,S302也可以在S303之后执行。即,电子设备可以先判断当前第一应用程序的用户界面是否包含SurfaceView,然后再获取针对于悬浮窗设置的圆角参数。Optionally, S302 may also be performed after S303. That is, the electronic device may first determine whether the user interface of the current first application includes SurfaceView, and then obtain the rounded corner parameters set for the floating window.
S304、若不包含,则电子设备直接基于圆角参数绘制合成悬浮窗。S304: If not included, the electronic device directly draws a synthetic floating window based on the rounded corner parameters.
在一些实现方式中,若当前第一应用程序中的用户界面不包含SurfaceView,则说明针对于第一应用程序设置的悬浮窗显示的用户界面也不包含SurfaceView。In some implementations, if the user interface in the current first application does not include SurfaceView, it means that the user interface displayed in the floating window set for the first application does not include SurfaceView either.
为了不遮挡应用程序的内容,悬浮窗的顶部栏与底部栏可以设置为透明状态。电子设备可以根据S302获取的针对于悬浮窗中两个图层(即Decorview与DecorCaptionView)所设置的圆角参数绘制合成悬浮窗。In order not to block the content of the application, the top bar and the bottom bar of the floating window can be set to a transparent state. The electronic device can draw a composite floating window according to the rounded corner parameters set for the two layers (ie, Decorview and DecorCaptionView) in the floating window obtained in S302.
执行S304之后,电子设备合成不包含SurfaceView的悬浮窗。After executing S304, the electronic device synthesizes a floating window that does not include SurfaceView.
S305、电子设备显示不包含SurfaceView的悬浮窗。S305. The electronic device displays a floating window that does not include SurfaceView.
在一些实现方式中,电子设备可以显示不包含SurfaceView的悬浮窗。此时,悬浮窗显示的用户界面与上述在接收第一操作时第一应用程序所显示的用户界面所包含的内容一致。但是由于电子设备采用整块屏幕显示第一应用程序的用户界面与采用悬浮窗显示第一应用程序的用户界面的范围不同,电子设备需要自适应的调整在悬浮窗中显示第一应用程序的用户界面的内容。因此,悬浮窗中的用户界面中各种控件、文字、图片的尺寸大小可能与采用整块屏幕显示第一应用程序的用户界面的不一致。In some implementations, the electronic device can display a floating window that does not include a SurfaceView. At this time, the user interface displayed in the floating window is consistent with the content included in the user interface displayed by the first application when receiving the first operation. However, since the electronic device uses the entire screen to display the user interface of the first application and uses a floating window to display the user interface of the first application, the electronic device needs to adaptively adjust the content of the user interface of the first application displayed in the floating window. Therefore, the sizes of various controls, texts, and pictures in the user interface in the floating window may be inconsistent with those of the user interface of the first application displayed on the entire screen.
在一些实现方式中,电子设备在改变悬浮窗的位置和大小之后,悬浮窗仍能以圆角方形的形式显示在屏幕上。示例性的,电子设备可以响应作用于悬浮窗的顶部栏的长按滑动操作,改变悬浮窗的位置。电子设备还可以响应作用于悬浮窗的底部栏的长按滑动操作,改变悬浮窗的大小。In some implementations, after the electronic device changes the position and size of the floating window, the floating window can still be displayed on the screen in the form of a rounded square. For example, the electronic device can change the position of the floating window in response to a long press and slide operation on the top bar of the floating window. The electronic device can also change the size of the floating window in response to a long press and slide operation on the bottom bar of the floating window.
示例性的,第一应用程序可以是指社交类应用程序,上述不包含SurfaceView的悬浮窗可以如图1D所示。Exemplarily, the first application may refer to a social application, and the floating window that does not include SurfaceView may be as shown in FIG. 1D .
S306、若包含,则电子设备获取针对于悬浮窗设置的内边距(即padding值)。S306: If included, the electronic device obtains the inner margin (ie, padding value) set for the floating window.
在一些实现方式中,若当前第一应用程序中的用户界面包含SurfaceView,则说明针对于第一应用程序设置的悬浮窗中显示的用户界面也包含SurfaceView。若电子设备直接根据S302获取的针对于悬浮窗中两个图层所设置的圆角参数绘制合成悬浮窗,由于SurfaceView未进行圆角设置,合成之后的悬浮窗呈直角方形。In some implementations, if the user interface in the current first application includes SurfaceView, it means that the user interface displayed in the floating window set for the first application also includes SurfaceView. If the electronic device directly draws the composite floating window according to the rounded corner parameters set for the two layers in the floating window obtained in S302, since SurfaceView does not set the rounded corners, the composite floating window is a rectangular square.
因此,在包含SurfaceView的情况下,电子设备可以获取对悬浮窗设定的padding值。Therefore, when SurfaceView is included, the electronic device can obtain the padding value set for the floating window.
其中,设定padding值是指设定图层各个边框(例如上下左右四边)与图层中元素(例如用于表示应用程序的内容的)之间的距离。Here, setting the padding value refers to setting the distance between each border of the layer (eg, the top, bottom, left, and right sides) and the elements in the layer (eg, for representing the content of the application).
电子设备设定padding值的方式有两种:设定长度数值或设定百分比数值。其中,设定的长度数值可以是指非负的固定长度,例如120px。设定的百分比数值可以是指图层长度或宽度的百分值,例如3%。There are two ways to set padding values in electronic devices: setting a length value or setting a percentage value. The set length value can refer to a non-negative fixed length, such as 120px. The set percentage value can refer to a percentage of the layer length or width, such as 3%.
电子设备可以设定一个或两个或三个或四个padding值。例如,在设定的padding值的数量为一个的情况下,该padding值可以用于指定图层的内容与图层四边的距离。在设定的padding值的数量为两个的情况下,其中,第一个padding值可以用于指定图层的内容与图层上下两边之间的距离,第二个padding值可以用于指定图层的内容与图层左右两边的距离。在设定的padding值的数量为三个的情况下,其中,第一个padding值可以用于指定图层的内容与图层上边界之间的距离,第二个padding值可以用于指定图层的内容与图层左右两边的距离,第三个padding值可以用于指定图层的内容与图层下边界之间的距离。在设定的padding值的数量为四个的情况下,其中,第一个padding值可以用于指定图层的内容与图层上边界之间的距离,第二个padding值可以用于指定图层的内容与图层右边界的距离,第三个padding值可以用于指定图层的内容与图层下边界之间的距离,第四个padding值可以用于指定图层的内容与图层左边界之间的距离。The electronic device may set one, two, three or four padding values. For example, when the number of padding values set is one, the padding value may be used to specify the distance between the content of the layer and the four sides of the layer. When the number of padding values set is two, the first padding value may be used to specify the distance between the content of the layer and the upper and lower sides of the layer, and the second padding value may be used to specify the distance between the content of the layer and the left and right sides of the layer. When the number of padding values set is three, the first padding value may be used to specify the distance between the content of the layer and the upper boundary of the layer, the second padding value may be used to specify the distance between the content of the layer and the left and right sides of the layer, and the third padding value may be used to specify the distance between the content of the layer and the lower boundary of the layer. When the number of padding values set is four, the first padding value may be used to specify the distance between the content of the layer and the upper boundary of the layer, the second padding value may be used to specify the distance between the content of the layer and the right boundary of the layer, the third padding value may be used to specify the distance between the content of the layer and the lower boundary of the layer, and the fourth padding value may be used to specify the distance between the content of the layer and the left boundary of the layer.
具体的,电子设备可以获取针对于悬浮窗中第一用户界面的根节点视图(即Decorview)的上下两边设置的padding值。示例性的,电子设备可以获取如下述的padding值。例如,padding:120px 0px 20px;或者padding:120px 0px 20px 0px。Specifically, the electronic device may obtain padding values set for the upper and lower sides of the root node view (ie, Decorview) of the first user interface in the floating window. Exemplarily, the electronic device may obtain padding values as follows: For example, padding: 120px 0px 20px; or padding: 120px 0px 20px 0px.
在一些实现方式中,电子设备可以根据上述针对于悬浮窗所设置的圆角参数来设置padding值。这样,可以使得SurfaceView的直角不会超出悬浮窗的圆角范围。具体的,电子设备可以将针对于悬浮窗的圆角所设置的圆角半径设置为padding值。优选的,电子设备可以将顶部栏与底部栏的高度设置为padding值。In some implementations, the electronic device can set the padding value according to the rounded corner parameters set for the floating window. In this way, the right angle of SurfaceView will not exceed the rounded corner range of the floating window. Specifically, the electronic device can set the rounded corner radius set for the floating window as the padding value. Preferably, the electronic device can set the height of the top bar and the bottom bar to the padding value.
例如,电子设备针对于悬浮窗中Decorview上边界设置的padding值与悬浮窗的顶部栏宽度一致,电子设备针对于悬浮窗中Decorview下边界设置的padding值与悬浮窗的底部栏宽度一致。For example, the padding value set by the electronic device for the upper border of Decorview in the floating window is consistent with the top bar width of the floating window, and the padding value set by the electronic device for the lower border of Decorview in the floating window is consistent with the bottom bar width of the floating window.
可选的,在电子设备设置悬浮窗的两个图层大小不一致的情况下,电子设备可以仅获取针对于悬浮窗上边界设置的padding值或针对于悬浮窗下边界设置的padding值。例如,Decorview与DecorCaptionView的上边界、左边界以及右边界重合,但是DecorCaptionView的下边界与Decorview的下边界不重合。DecorCaptionView比Decorview更大一些。又例如,Decorview与DecorCaptionView的下边界、左边界以及右边界重合,但是DecorCaptionView的上边界与Decorview的上边界不重合。DecorCaptionView比Decorview更大一些。Optionally, when the sizes of the two layers of the floating window set by the electronic device are inconsistent, the electronic device may only obtain the padding value set for the upper border of the floating window or the padding value set for the lower border of the floating window. For example, the upper border, left border, and right border of Decorview coincide with those of DecorCaptionView, but the lower border of DecorCaptionView does not coincide with the lower border of Decorview. DecorCaptionView is larger than Decorview. For another example, the lower border, left border, and right border of Decorview coincide with those of DecorCaptionView, but the upper border of DecorCaptionView does not coincide with the upper border of Decorview. DecorCaptionView is larger than Decorview.
S307、电子设备基于圆角参数以及padding值绘制合成悬浮窗。S307: The electronic device draws a synthetic floating window based on the rounded corner parameter and the padding value.
在一些实现方式中,电子设备可以根据S302获取的针对于悬浮窗中两个图层所设置的圆角参数以及S306中获取的针对于悬浮窗的padding值绘制合成悬浮窗。In some implementations, the electronic device may draw a composite floating window according to the rounded corner parameters set for the two layers in the floating window obtained in S302 and the padding value for the floating window obtained in S306.
具体的,在绘制悬浮窗的过程中,由于电子设备针对Decorview设置有padding值,那么电子设备在绘制Decorview中所包含的view时,需要在与Decorview上边界间隔一定距离的位置开始绘制,并且在与Decorview下边界间隔一定距离的位置停止绘制。也就是说,Decorview中存在两个区域未绘制有任何应用程序中的内容。该两个未进行绘制的区域一般呈黑色。Specifically, in the process of drawing the floating window, since the electronic device sets a padding value for Decorview, when drawing the view contained in Decorview, the electronic device needs to start drawing at a position with a certain distance from the upper boundary of Decorview, and stop drawing at a position with a certain distance from the lower boundary of Decorview. In other words, there are two areas in Decorview where no content in any application is drawn. The two undrawn areas are generally black.
在一些实现方式中,虽然SurfaceView独立于Decorview,但是SurfaceView的绘制区域与Decorview设定的绘制区域一致。也就是说,电子设备绘制悬浮窗中的SurfaceView时,SurfaceView需要在与Decorview上边界间隔一定距离的位置(即SurfaceView上边界)开始绘制,并且在与Decorview下边界间隔一定距离的位置(即SurfaceView下边界)停止绘制。也就是说,电子设备绘制悬浮窗的SurfaceView区域位于除Decorview中上述两个未进行绘制的区域之外的范围内。In some implementations, although SurfaceView is independent of Decorview, the drawing area of SurfaceView is consistent with the drawing area set by Decorview. That is, when the electronic device draws the SurfaceView in the floating window, SurfaceView needs to start drawing at a position that is a certain distance away from the upper boundary of Decorview (i.e., the upper boundary of SurfaceView), and stop drawing at a position that is a certain distance away from the lower boundary of Decorview (i.e., the lower boundary of SurfaceView). In other words, the SurfaceView area where the electronic device draws the floating window is within the range excluding the above two areas in Decorview that are not drawn.
在一些实现方式中,由于上述padding值是基于顶部栏与底部栏的宽度设定的,则上述两个区域恰好是DecorCaptionView中用于显示顶部栏与底部栏的区域。在这种情况下,无论悬浮窗的顶部栏与底部栏设置为任何颜色均不会遮挡住悬浮窗内应用程序提供的内容。示例性的,悬浮窗的顶部栏与底部栏可以设置为透明状态,也可以设置为任意颜色,例如白色。在本申请实施例中,对此不作限定。In some implementations, since the padding value is set based on the width of the top bar and the bottom bar, the two areas are exactly the areas in DecorCaptionView used to display the top bar and the bottom bar. In this case, no matter what color the top bar and the bottom bar of the floating window are set to, they will not block the content provided by the application in the floating window. Exemplarily, the top bar and the bottom bar of the floating window can be set to a transparent state or to any color, such as white. In the embodiments of the present application, this is not limited.
S308、电子设备显示包含SurfaceView的悬浮窗。S308. The electronic device displays a floating window including SurfaceView.
在一些实现方式中,电子设备可以显示包含SurfaceView的悬浮窗。此时,悬浮窗显示的用户界面与上述在接收第一操作时第一应用程序所显示的用户界面所包含的内容一致。但是由于电子设备采用整块屏幕显示第一应用程序的用户界面与采用悬浮窗显示第一应用程序的用户界面的范围不同,电子设备需要自适应的调整在悬浮窗中显示第一应用程序的用户界面的内容。因此,悬浮窗中的用户界面中各种控件、文字、图片的尺寸大小可能与采用整块屏幕显示第一应用程序的用户界面的不一致。In some implementations, the electronic device can display a floating window that includes a SurfaceView. At this time, the user interface displayed in the floating window is consistent with the content included in the user interface displayed by the first application when receiving the first operation. However, since the electronic device uses the entire screen to display the user interface of the first application and uses a floating window to display the user interface of the first application, the electronic device needs to adaptively adjust the content of the user interface of the first application displayed in the floating window. Therefore, the sizes of various controls, texts, and pictures in the user interface in the floating window may be inconsistent with those of the user interface of the first application displayed on the entire screen.
在一些实现方式中,电子设备在改变悬浮窗的位置和大小之后,悬浮窗仍以圆角方形的形式显示在屏幕上。示例性的,电子设备可以响应作用于悬浮窗的顶部栏的长按滑动操作,改变悬浮窗的位置。电子设备还可以响应作用于悬浮窗的底部栏的长按滑动操作,改变悬浮窗的大小。In some implementations, after the electronic device changes the position and size of the floating window, the floating window is still displayed on the screen in the form of a rounded square. For example, the electronic device can change the position of the floating window in response to a long press and slide operation on the top bar of the floating window. The electronic device can also change the size of the floating window in response to a long press and slide operation on the bottom bar of the floating window.
示例性的,第一应用程序可以是指视频类应用程序,上述包含SurfaceView的悬浮窗可以如图2H所示。Exemplarily, the first application may refer to a video application, and the floating window including the SurfaceView may be as shown in FIG. 2H .
实施上述方法,不仅可以实现对悬浮窗进行圆角裁切,还可以保证无论悬浮窗是否包含有SurfaceView,电子设备对悬浮窗进行圆角裁切均是通过硬合成实现的,减少电子设备的功耗。并且,本申请后实施例提供的显示悬浮窗的方法尽可能减少了悬浮窗的顶部栏与底部栏对应用程序中内容的遮挡,更加美观。The implementation of the above method can not only realize the rounded corner cropping of the floating window, but also ensure that no matter whether the floating window contains SurfaceView, the electronic device performs the rounded corner cropping of the floating window through hard synthesis, thereby reducing the power consumption of the electronic device. In addition, the method for displaying the floating window provided in the later embodiment of the present application minimizes the obstruction of the top bar and bottom bar of the floating window to the content in the application, making it more beautiful.
在一种可能的实现方式中,电子设备在针对第一应用程序的悬浮窗之后,可以响应作用于悬浮窗中各种控件的操作,改变悬浮窗中显示的用户界面。其中,电子设备改变悬浮窗中显示的用户界面可以包括以下几种情况:In a possible implementation, after the floating window of the first application is opened, the electronic device can respond to operations on various controls in the floating window and change the user interface displayed in the floating window. The electronic device can change the user interface displayed in the floating window in the following cases:
情况1、悬浮窗中显示的用户界面由包含SurfaceView的用户界面更换为不包含SurfaceView的用户界面。Case 1: The user interface displayed in the floating window is changed from a user interface including SurfaceView to a user interface not including SurfaceView.
情况2、悬浮窗中显示的用户界面由不包含SurfaceView的用户界面更换为包含SurfaceView的用户界面。Case 2: The user interface displayed in the floating window is changed from a user interface that does not include SurfaceView to a user interface that includes SurfaceView.
在一些实现方式,电子设备可以根据应用程序的相关设置自行实现情况1或情况2,也可以响应用户操作实现情况1或情况2。在本申请实施例中,对实现情况1或情况2的方式不作限定。In some implementations, the electronic device can implement situation 1 or situation 2 by itself according to the relevant settings of the application, or can respond to user operations to implement situation 1 or situation 2. In the embodiments of the present application, the method for implementing situation 1 or situation 2 is not limited.
进一步的,由于会出现情况1或情况2,因此电子设备可以在针对于第一应用程序的悬浮窗首次生成之后,在每次更新绘制悬浮窗中所显示的应用程序的用户界面时,均判断当前所绘制的悬浮窗的用户界面是否包含SurfaceView。Furthermore, since situation 1 or situation 2 may occur, the electronic device can determine whether the user interface of the currently drawn floating window includes SurfaceView each time the user interface of the application displayed in the floating window is updated after the floating window for the first application is generated for the first time.
具体的,若新绘制的用户界面不包含SurfaceView,电子设备直接根据更新之后的内容绘制用户界面,并在悬浮窗中显示更新之后的用户界面。值得说明的是,这里电子设备无需再基于圆角参数再合成悬浮窗。这是由于首次生成悬浮窗之后,若针对于悬浮窗进行相关操作(例如改变悬浮窗大小以及位置或取消显示悬浮窗),Decorview与DecorCaptionView是固定不变的,电子设备仅更新Decorview的相关内容,并不会改变Decorview的整体结构。因此,电子设备仅需在首次合成悬浮窗时进行圆角裁剪,在悬浮窗中显示更新之后的不包含SurfaceView的用户界面时,无需再针对于悬浮窗进行圆角裁剪,功耗小,效率高。Specifically, if the newly drawn user interface does not include SurfaceView, the electronic device directly draws the user interface according to the updated content, and displays the updated user interface in the floating window. It is worth noting that the electronic device here no longer needs to synthesize the floating window based on the rounded corner parameters. This is because after the floating window is generated for the first time, if relevant operations are performed on the floating window (such as changing the size and position of the floating window or canceling the display of the floating window), Decorview and DecorCaptionView are fixed, and the electronic device only updates the relevant content of Decorview and does not change the overall structure of Decorview. Therefore, the electronic device only needs to perform rounded corner cropping when the floating window is synthesized for the first time. When the updated user interface that does not contain SurfaceView is displayed in the floating window, there is no need to perform rounded corner cropping on the floating window, which has low power consumption and high efficiency.
若新绘制的用户界面包含SurfaceView,电子设备可以执行S306,即获取针对于悬浮窗设置的padding值。然后,电子设备根据该padding值绘制届合成当前的用户界面。值得说明的是,这里电子设备也无需再基于圆角参数再合成悬浮窗。这是由于首次生成悬浮窗之后,若针对于悬浮窗进行相关操作(例如改变悬浮窗大小以及位置或取消显示悬浮窗),Decorview与DecorCaptionView是固定不变的,电子设备仅更新Decorview的相关内容,并不会改变Decorview的整体结构。例如,电子设备可以根据padding值在与Decorview上边界(间隔一定距离的位置开始绘制SurfaceView,并且在与Decorview下边界间隔一定距离的位置停止绘制SurfaceView。因此,电子设备仅需在首次合成悬浮窗时进行圆角裁剪,在悬浮窗中显示更新之后的包含SurfaceView的用户界面时,无需再针对于悬浮窗进行圆角裁剪,功耗小,效率高。If the newly drawn user interface includes SurfaceView, the electronic device can execute S306, that is, obtain the padding value set for the floating window. Then, the electronic device draws and synthesizes the current user interface according to the padding value. It is worth noting that the electronic device does not need to synthesize the floating window based on the rounded corner parameters here. This is because after the floating window is generated for the first time, if relevant operations are performed on the floating window (such as changing the size and position of the floating window or canceling the display of the floating window), Decorview and DecorCaptionView are fixed, and the electronic device only updates the relevant content of Decorview and does not change the overall structure of Decorview. For example, the electronic device can start drawing SurfaceView at a position with a certain distance from the upper boundary of Decorview according to the padding value, and stop drawing SurfaceView at a position with a certain distance from the lower boundary of Decorview. Therefore, the electronic device only needs to perform rounded corner cropping when synthesizing the floating window for the first time. When the updated user interface containing SurfaceView is displayed in the floating window, there is no need to perform rounded corner cropping for the floating window, which has low power consumption and high efficiency.
在另一种可能的实现方式中,电子设备可以同时显示多个悬浮窗。示例性的,电子设备可以在显示针对于第一应用程序设置的悬浮窗之后,响应用户操作,显示针对于第二应用程序设置的悬浮窗。In another possible implementation, the electronic device may display multiple floating windows simultaneously. For example, after displaying the floating window set for the first application, the electronic device may respond to a user operation and display a floating window set for the second application.
在一种可能的实现方式中,若悬浮窗中不包含顶部栏与底部栏,则本申请实施例提供的显示悬浮窗的方法可以适用于上述两种悬浮窗架构。具体的,若电子设备设置的悬浮窗不包含顶部栏与底部栏,则悬浮窗仅包含一个图层即Decorview。在悬浮窗包括SurfaceView的情况下,电子设备可以根据针对于悬浮窗设置的圆角参数,例如,针对于Decorview设置的圆角参数与内边距绘制悬浮窗。在悬浮窗不包括SurfaceView的情况下,电子设备可以根据针对于悬浮窗设置的圆角参数,例如,针对于Decorview设置的圆角参数与内边距绘制悬浮窗。In one possible implementation, if the floating window does not include a top bar and a bottom bar, the method for displaying a floating window provided in an embodiment of the present application may be applicable to the above two floating window architectures. Specifically, if the floating window set by the electronic device does not include a top bar and a bottom bar, the floating window only includes one layer, namely, Decorview. In the case where the floating window includes a SurfaceView, the electronic device may draw the floating window according to the rounded corner parameters set for the floating window, for example, the rounded corner parameters and the inner margins set for Decorview. In the case where the floating window does not include a SurfaceView, the electronic device may draw the floating window according to the rounded corner parameters set for the floating window, for example, the rounded corner parameters and the inner margins set for Decorview.
这样,电子设备不仅可以实现对悬浮窗进行圆角裁切,还可以保证无论悬浮窗是否包含有SurfaceView,电子设备对悬浮窗进行圆角裁切均是通过硬合成实现的,减少电子设备的功耗。并且,本申请后实施例提供的显示悬浮窗的方法尽可能减少了悬浮窗的顶部栏与底部栏对应用程序中内容的遮挡,更加美观。In this way, the electronic device can not only realize the rounded corner cropping of the floating window, but also ensure that no matter whether the floating window contains SurfaceView, the electronic device can realize the rounded corner cropping of the floating window through hard synthesis, thereby reducing the power consumption of the electronic device. In addition, the method for displaying the floating window provided in the later embodiment of the present application minimizes the obstruction of the top bar and the bottom bar of the floating window to the content in the application, which is more beautiful.
下面结合图4介绍前文图3中的方法流程对应的电子设备的操作系统(Operatingsystem,OS)交互图。The following introduces an operating system (OS) interaction diagram of an electronic device corresponding to the method flow in FIG. 3 in conjunction with FIG. 4 .
图4中示出的用户操作模块、判断模块、参数获取模块以及视图模块是电子设备中包含的用于管理悬浮窗合成的模块,关于这些模块的定义还可以参考后文电子设备软件架构处的详细描述,关于这些模块的具体作用已详细记载在如下流程中,在此不再赘述。The user operation module, judgment module, parameter acquisition module and view module shown in Figure 4 are modules included in the electronic device for managing the synthesis of floating windows. For the definitions of these modules, please refer to the detailed description of the electronic device software architecture later. The specific functions of these modules have been recorded in detail in the following process and will not be repeated here.
如图4所示,本申请实施例提供的显示悬浮窗的方法的OS交互图包括以下步骤:As shown in FIG. 4 , the OS interaction diagram of the method for displaying a floating window provided in an embodiment of the present application includes the following steps:
S401、用户操作模块检测到针对于第一应用程序设置悬浮窗的操作。S401: A user operation module detects an operation of setting a floating window for a first application.
在一些实现方式中,用户操作模块可以在检测针对于第一应用程序设置悬浮窗的操作之后,获取到当前第一应用程序的用户界面的view类型。示例性的,用户操作模块可以检测到针对于设置悬浮窗的点击操作。关于S401的相关介绍可以参考上述S301中的详细描述,在此不作赘述。In some implementations, the user operation module can obtain the view type of the user interface of the current first application after detecting the operation of setting a floating window for the first application. Exemplarily, the user operation module can detect a click operation for setting a floating window. For the relevant introduction of S401, please refer to the detailed description of S301 above, which will not be repeated here.
S402、用户操作模块发送当前第一应用程序的用户界面中所包含的view的类型发送至判断模块。S402: The user operation module sends the type of view included in the user interface of the current first application to the judgment module.
在一些实现方式中,用户操作模块在获取到当前第一应用程序的用户界面的view类型之后,可以将view的类型发送至判断模块。In some implementations, after obtaining the view type of the user interface of the current first application, the user operation module may send the view type to the determination module.
S403、判断模块判断view的类型中是否包含SurfaceView类型。S403, the judgment module judges whether the view type includes the SurfaceView type.
在一些实现方式中,若判断模块判断S401中获取的view的类型包含有SurfaceView类型,则执行S404,具体的,判断模块会通知视图系统进行重新绘制,并通知参数获取模块中的回调参数获取padding值;若判断模块判断S401中获取的view的类型包含有SurfaceView类型,则执行S405。关于S402的相关介绍可以参考上述S303中的详细描述,在此不作赘述。In some implementations, if the judgment module determines that the type of view obtained in S401 includes the SurfaceView type, S404 is executed. Specifically, the judgment module notifies the view system to redraw and notifies the callback parameter in the parameter acquisition module to obtain the padding value; if the judgment module determines that the type of view obtained in S401 includes the SurfaceView type, S405 is executed. For the relevant introduction of S402, please refer to the detailed description in the above S303, which will not be repeated here.
S404、判断模块发送第一消息至视图模块,第一消息用于指示视图模块获取存储在参数获取模块中针对于悬浮窗的圆角参数。S404: The judgment module sends a first message to the view module, where the first message is used to instruct the view module to obtain the rounded corner parameters for the floating window stored in the parameter acquisition module.
在一些实现方式中,针对于悬浮窗的圆角参数具体可以是指针对于悬浮窗中两个图层所设置的圆角参数。两个图层可以包括:Decorview以及Window Decoration。In some implementations, the rounded corner parameters for the floating window may specifically be rounded corner parameters set for two layers in the floating window. The two layers may include: Decorview and Window Decoration.
具体的,参数获取模块可以通过回调函数,例如HnSurfaceViewEx函数,来获取padding值。关于圆角参数的相关介绍可以参考上述S302中的详细描述,在此不作赘述。Specifically, the parameter acquisition module can obtain the padding value through a callback function, such as the HnSurfaceViewEx function. For the relevant introduction of the rounded corner parameter, please refer to the detailed description in the above S302, which will not be repeated here.
执行S404之后,执行S405。After executing S404, execute S405.
S405、视图模块读取参数获取模块发送针对于悬浮窗的圆角参数,并绘制渲染针对于第一应用程序的悬浮窗。S405: The view module reads the rounded corner parameters for the floating window sent by the parameter acquisition module, and draws and renders the floating window for the first application.
在一些实现方式中,视图模块可以根据针对于悬浮窗的圆角参数绘制并渲染生成包含有Decorview以及Window Decoration的悬浮窗。关于S405的相关介绍可以参考上述S304中的详细描述,在此不作赘述。In some implementations, the view module can draw and render the floating window including Decorview and Window Decoration according to the rounded corner parameters for the floating window. For the relevant introduction of S405, please refer to the detailed description of S304 above, which will not be repeated here.
电子设备在执行S405之后,可以将绘制渲染之后的悬浮窗发送至SurfaceFlinger合成,然后Surface Flinger将合成完毕的悬浮窗发送至显示驱动。最后,电子设备通过显示驱动可以显示不包含Surface View的悬浮窗。After executing S405, the electronic device can send the floating window after drawing and rendering to SurfaceFlinger for synthesis, and then SurfaceFlinger sends the synthesized floating window to the display driver. Finally, the electronic device can display the floating window without Surface View through the display driver.
S406、视图模块发送第二消息至参数获取模块,第二消息用于指示视图模块获取存储在参数获取模块中针对于悬浮窗的圆角参数以及padding值。S406: The view module sends a second message to the parameter acquisition module, where the second message is used to instruct the view module to acquire the corner fillet parameters and padding value for the floating window stored in the parameter acquisition module.
在一些实现方式中,针对于悬浮窗的padding值可以是指第一用户界面的根节点视图(即Decorview)的上下两边设置的padding值。电子设备可以通过回调的方式,使得电子设备生成关于padding值的相关介绍可以参考上述S306中的详细描述,在此不作赘述。In some implementations, the padding value for the floating window may refer to the padding values set on the upper and lower sides of the root node view (i.e., Decorview) of the first user interface. The electronic device may generate the padding value by callback, and the related description of the electronic device can refer to the detailed description in the above S306, which will not be repeated here.
执行S406之后,执行S407。After executing S406, execute S407.
S407、视图模块读取获取模块发送针对于悬浮窗的圆角参数以及padding值,并绘制合成针对于第一应用程序的悬浮窗。S407: The view module reads the corner fillet parameter and padding value for the floating window sent by the acquisition module, and draws and synthesizes the floating window for the first application.
在一些实现方式中,视图模块可以根据针对于悬浮窗的圆角参数以及padding绘制并渲染生成包含有Decorview以及Window Decoration的悬浮窗。In some implementations, the view module may draw and render the floating window including Decorview and Window Decoration according to the rounded corner parameters and padding for the floating window.
具体的,视图模块可以通过getFramePaddingExcall函数获取到针对于Decorview设置的padding值,关于S405的相关介绍可以参考上述S307中的详细描述,在此不作赘述。Specifically, the view module can obtain the padding value set for Decorview through the getFramePaddingExcall function. For the relevant introduction of S405, please refer to the detailed description in the above S307, which will not be repeated here.
电子设备在执行S407之后,可以将绘制渲染之后的悬浮窗发送至SurfaceFlinger合成,然后Surface Flinger将合成完毕的悬浮窗发送至显示驱动。最后,电子设备通过显示驱动可以显示包含SurfaceView的悬浮窗。After executing S407, the electronic device can send the floating window after drawing and rendering to SurfaceFlinger for synthesis, and then SurfaceFlinger sends the synthesized floating window to the display driver. Finally, the electronic device can display the floating window including SurfaceView through the display driver.
基于上述针对于流程方法的介绍,下面介绍本申请实施例提供的电子设备的结构示意图。Based on the above introduction to the process method, the structural diagram of the electronic device provided in the embodiment of the present application is introduced below.
图5示出了电子设备100的结构示意图。FIG. 5 shows a schematic structural diagram of the electronic device 100 .
电子设备100可以是搭载或者其它操作系统的便携式终端设备,电子设备100可以是手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车辆、车载设备、智能家居设备和/或智慧城市设备,不限于此,电子设备100还可以包括具有触敏表面或触控面板的膝上型计算机(laptop)、具有触敏表面或触控面板的台式计算机等非便携式终端设备等等。本申请实施例对该电子设备的具体类型不作特殊限制。The electronic device 100 may be equipped with Or a portable terminal device of other operating systems, the electronic device 100 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle, a vehicle-mounted device, a smart home device and/or a smart city device, but not limited thereto, the electronic device 100 can also include a laptop computer (laptop) with a touch-sensitive surface or a touch panel, a desktop computer with a touch-sensitive surface or a touch panel, and other non-portable terminal devices, etc. The embodiment of the present application does not impose any special restrictions on the specific type of the electronic device.
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
在一些实现方式中,处理器110可以用于设置悬浮窗的圆角参数,还可以用于设置悬浮窗的内内边距,还可以用于根据圆角参数以及内边距绘制悬浮窗。处理器110还可以用于判断所设置的悬浮窗中的用户界面是否包括SurfaceView。In some implementations, the processor 110 may be used to set the rounded corner parameters of the floating window, may be used to set the inner margin of the floating window, and may be used to draw the floating window according to the rounded corner parameters and the inner margin. The processor 110 may also be used to determine whether the user interface in the set floating window includes SurfaceView.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号解调以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,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),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include 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, and/or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be 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 (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
在一些实现方式中,显示屏194可以显示呈圆角方形的悬浮窗。In some implementations, the display screen 194 may display a floating window in a rounded square shape.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,颜色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
内部存储器121可以包括一个或多个随机存取存储器(random access memory,RAM)和一个或多个非易失性存储器(non-volatile memory,NVM)。The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
随机存取存储器可以包括静态随机存储器(static random-access memory,SRAM)、动态随机存储器(dynamic random access memory,DRAM)、同步动态随机存储器(synchronous dynamic random access memory,SDRAM)、双倍资料率同步动态随机存取存储器(doubledata rate synchronous dynamic random access memory,DDR SDRAM,例如第五代DDR SDRAM一般称为DDR5 SDRAM)等;非易失性存储器可以包括磁盘存储器件、快闪存储器(flash memory)。Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.
快闪存储器按照运作原理划分可以包括NOR FLASH、NAND FLASH、3D NAND FLASH等,按照存储单元电位阶数划分可以包括单阶存储单元(single-level cell,SLC)、多阶存储单元(multi-level cell,MLC)、三阶储存单元(triple-level cell,TLC)、四阶储存单元(quad-level cell,QLC)等,按照存储规范划分可以包括通用闪存存储(英文:universalflash storage,UFS)、嵌入式多媒体存储卡(embedded multi media Card,eMMC)等。Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level; universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.
随机存取存储器可以由处理器110直接进行读写,可以用于存储操作系统或其他正在运行中的程序的可执行程序(例如机器指令),还可以用于存储用户及应用程序的数据等。The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data, etc.
非易失性存储器也可以存储可执行程序和存储用户及应用程序的数据等,可以提前加载到随机存取存储器中,用于处理器110直接进行读写。The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
外部存储器接口120可以用于连接外部的非易失性存储器,实现扩展电子设备100的存储能力。外部的非易失性存储器通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部的非易失性存储器中。The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.
图6是本发明实施例的电子设备100的软件结构框图。FIG. 6 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图6所示,应用程序包可以包括第一应用程序。例如,第一应用程序可以包括但不限于:相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Fig. 6, the application package may include a first application. For example, the first application may include but is not limited to: camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。在图6中未示出上述内容。The application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc. The above contents are not shown in FIG6 .
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
如图6所示,应用程序框架层可以包括:判断模块、参数获取模块、视图模块。As shown in FIG. 6 , the application framework layer may include: a judgment module, a parameter acquisition module, and a view module.
其中,判断模块用于判断悬浮窗中的用户界面是否包含SurfaceView。参数获取模块用于获取针对于悬浮窗设置的padding值以及圆角参数,视图模块用于根据针对于悬浮窗设置的padding值以及圆角参数绘制并合成悬浮窗。The judgment module is used to judge whether the user interface in the floating window includes SurfaceView. The parameter acquisition module is used to obtain the padding value and rounded corner parameter set for the floating window, and the view module is used to draw and synthesize the floating window according to the padding value and rounded corner parameter set for the floating window.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surfaceFlinger),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library may include multiple functional modules, such as surface manager (surfaceFlinger), media library (Media Libraries), 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。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 a variety of 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, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。A 2D graphics engine is a drawing engine for 2D drawings.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,触控驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver and touch driver.
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。The following is an illustrative description of the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture static images or videos through the camera 193.
本申请的各实施方式可以任意进行组合,以实现不同的技术效果。The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solidstate disk,SSD))等。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。A person skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
总之,以上所述仅为本发明技术方案的实施例而已,并非用于限定本发明的保护范围。凡根据本发明的揭露,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311849299.3A CN118444805B (en) | 2023-12-28 | 2023-12-28 | Method and related device for displaying floating window |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311849299.3A CN118444805B (en) | 2023-12-28 | 2023-12-28 | Method and related device for displaying floating window |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118444805A true CN118444805A (en) | 2024-08-06 |
CN118444805B CN118444805B (en) | 2025-04-25 |
Family
ID=92326835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311849299.3A Active CN118444805B (en) | 2023-12-28 | 2023-12-28 | Method and related device for displaying floating window |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118444805B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9035949B1 (en) * | 2009-12-21 | 2015-05-19 | Lucasfilm Entertainment Company Ltd. | Visually representing a composite graph of image functions |
CN114647351A (en) * | 2020-12-25 | 2022-06-21 | 华为技术有限公司 | Interface element display method and device |
WO2023174322A1 (en) * | 2022-03-17 | 2023-09-21 | 华为技术有限公司 | Layer processing method and electronic device |
CN116841658A (en) * | 2022-03-23 | 2023-10-03 | 华为技术有限公司 | Interface display method and electronic equipment |
-
2023
- 2023-12-28 CN CN202311849299.3A patent/CN118444805B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9035949B1 (en) * | 2009-12-21 | 2015-05-19 | Lucasfilm Entertainment Company Ltd. | Visually representing a composite graph of image functions |
CN114647351A (en) * | 2020-12-25 | 2022-06-21 | 华为技术有限公司 | Interface element display method and device |
WO2023174322A1 (en) * | 2022-03-17 | 2023-09-21 | 华为技术有限公司 | Layer processing method and electronic device |
CN116795197A (en) * | 2022-03-17 | 2023-09-22 | 华为技术有限公司 | Layer processing method and electronic equipment |
CN116841658A (en) * | 2022-03-23 | 2023-10-03 | 华为技术有限公司 | Interface display method and electronic equipment |
Non-Patent Citations (1)
Title |
---|
YONGFENGNICE: ""Android的对话框DialogFragment指定弹窗口大小,设置圆角"", pages 1, Retrieved from the Internet <URL:https://blog.51cto.com/u_15639793/5297340> * |
Also Published As
Publication number | Publication date |
---|---|
CN118444805B (en) | 2025-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112130742B (en) | Full screen display method and device of mobile terminal | |
CN115866121B (en) | Application interface interaction method, electronic device and computer readable storage medium | |
CN109559270B (en) | Image processing method and electronic equipment | |
WO2021027747A1 (en) | Interface display method and device | |
CN111190681A (en) | Display interface adaptation method, display interface adaptation design method and electronic equipment | |
CN114397981A (en) | Application display method and electronic device | |
CN113961157B (en) | Display interaction system, display method and equipment | |
WO2021036770A1 (en) | Split-screen processing method and terminal device | |
WO2021258814A1 (en) | Video synthesis method and apparatus, electronic device, and storage medium | |
WO2020155875A1 (en) | Display method for electronic device, graphic user interface and electronic device | |
CN114089932B (en) | Multi-screen display method, device, terminal equipment and storage medium | |
WO2022143180A1 (en) | Collaborative display method, terminal device, and computer readable storage medium | |
CN116051351A (en) | Special effect processing method and electronic equipment | |
CN112437341A (en) | Video stream processing method and electronic equipment | |
CN116048831B (en) | Target signal processing method and electronic device | |
CN116828100A (en) | Bluetooth audio playing method, electronic equipment and storage medium | |
WO2024067551A1 (en) | Interface display method and electronic device | |
CN118444805B (en) | Method and related device for displaying floating window | |
CN113495733A (en) | Theme pack installation method and device, electronic equipment and computer readable storage medium | |
CN115529379B (en) | Method, electronic device and storage medium for preventing bluetooth audio track from shaking | |
CN118447141B (en) | Image display method and related device | |
WO2025060749A1 (en) | Photographing method, and electronic device and storage medium | |
CN116709609A (en) | Message transmission method, electronic device and storage medium | |
WO2024046010A1 (en) | Interface display method, and device and system | |
CN118689424A (en) | Data sharing method and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Country or region after: China Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Applicant after: Honor Terminal Co.,Ltd. Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Applicant before: Honor Device Co.,Ltd. Country or region before: China |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |