Window interaction method, electronic device, computer-readable storage medium, and program product
By implementing the window interaction method in the folding screen mobile phone and adjusting the display method of the floating window, the user experience problems caused by different screen sizes are solved, and the display effect and user interaction experience of the floating window are improved.
Patent Information
- Application Number
- CN202210114777.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-30
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-01-30
AI Technical Summary
Due to the different screen sizes of folding screen mobile phones, the display of the floating window cannot be reasonably adjusted according to user needs, which affects the user experience.
By implementing the window interaction method in electronic devices, the first and second display screens are used to display different interfaces respectively, the size and position of the floating window are adjusted, and responsive adjustments are made according to user operations and screen status to ensure that the floating window can be displayed on different pages or states. Reasonable display below.
It improves the user experience of using floating windows, meets the display requirements of floating windows in different screen states, and enhances the flexibility and convenience of user interaction.
Smart Images

Figure CN116456019B_ABST
Abstract
Description
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on January 10, 2022, with application number 202210023808.6 and application name “Window Interaction Method and Electronic Device”, the entire contents of which are incorporated by reference in this application. Technical Field
[0002] The present application relates to the field of terminal technology, and in particular to a window interaction method and an electronic device. Background Art
[0003] With the popularization and development of the Internet, people's functional requirements for electronic devices are becoming more and more diverse. For example, in order to meet users' needs for multiple functions, many electronic devices can support the display of floating windows of electronic devices. For example, a user can trigger the display of a floating window corresponding to a translation function by copying a text to be translated, and the user can also view the translated content through the floating window corresponding to the translation function.
[0004] However, when the electronic device is a foldable screen mobile phone, since the sizes of different screens of the foldable screen mobile phone are different, the foldable screen mobile phone cannot adjust the display of the floating window according to the user's usage requirements for any screen, thereby affecting the user's usage experience. Summary of the invention
[0005] The embodiments of the present application provide a window interaction method and an electronic device, so that the electronic device can reasonably display the floating window in different pages or in the states of different electronic devices, thereby enhancing the user experience of using the floating window.
[0006] In the first aspect, an embodiment of the present application provides a window interaction method, which is applied to an electronic device, wherein the electronic device includes a first display screen and a second display screen, and the second display screen is foldable, and the method includes: the electronic device uses the first display screen to display a first interface; wherein the first interface includes a first floating window; the width of the first floating window is the same as the width of the first display screen, the first floating window satisfies the first state, and the first floating window is a non-modal dialog box; in response to a first operation on the electronic device, the electronic device uses the second display screen to display a second interface; wherein the second interface includes a second floating window; the width of the second floating window is less than the width of the second display screen, the second floating window satisfies the first state, and the second floating window is a non-modal dialog box. In this way, the electronic device can realize reasonable display of the floating window in different pages or in the states of different electronic devices, thereby enhancing the user's experience of using the floating window.
[0007] In a possible implementation, the method further includes: in response to the second operation on the electronic device, the electronic device displays a third interface using the second display screen; wherein the third interface includes a third floating window; the width of the third floating window is less than the height of the second display screen, and the third floating window satisfies the first state. In this way, the electronic device can realize the flipping of the floating window when the user flips the screen.
[0008] In a possible implementation, when the second interface is an interface of the electronic device in a portrait state, the third interface is an interface of the electronic device in a landscape state.
[0009] In a possible implementation, the second interface also includes a first area, the first area is an area of the second interface other than the second floating window, and the method further includes: in response to a third operation on the first area, the electronic device displays a fourth interface; the fourth interface includes a fourth floating window, the fourth floating window satisfies the second state; the second state is different from or the same as the first state. In this way, the electronic device can implement a non-modal floating window, enhancing the user's experience of using the floating window.
[0010] In a possible implementation manner, the first state includes any one of a half-screen state, a full-screen state, or a bottom state; and the second state includes a bottom state.
[0011] In a possible implementation, after the electronic device displays the first interface using the first display screen, the method further includes: in response to a fourth operation on the electronic device, the electronic device displays a fifth interface using the first display screen; wherein the fifth interface includes a fifth floating window; and the width of the fifth floating window is the same as the height of the first display screen. In this way, the electronic device can realize the flipping of the floating window when the user flips the screen.
[0012] In a possible implementation, when the first interface is an interface of the electronic device in a portrait state, the fifth interface is an interface of the electronic device in a landscape state.
[0013] In a possible implementation, the first state includes any one of a half-screen state, a full-screen state or a bottom state; when the first floating window is in a half-screen state, the fifth floating window is in a full-screen state; when the first floating window is in a bottom state, the fifth floating window is in a bottom state; when the first floating window is in a full-screen state, the fifth floating window is in a full-screen state.
[0014] In a possible implementation, the first interface also includes a second area, and the second area is an area of the first interface other than the first floating window. After the electronic device displays the first interface using the first display screen, the method further includes: in response to a fifth operation on the second area, the electronic device displays a sixth interface; the sixth interface includes a sixth floating window, and the sixth floating window satisfies a second state; the second state is different from or the same as the first state, and the second state includes a bottom state. In this way, the electronic device can realize a non-modal floating window, and enhance the user's experience of using the floating window.
[0015] In a possible implementation, in response to a first operation on the electronic device, the electronic device uses a second display screen to display a second interface, including: in response to the first operation on the electronic device, the electronic device obtains first data; the first data includes folding angle data; the folding angle data is obtained based on the detection of the angle chain sensor; when the electronic device determines that the folding angle data meets the first preset condition, the electronic device uses the second display screen to display the second interface. In this way, the electronic device performs the corresponding folding steps according to the monitoring of the state of the electronic device, and realizes the user's experience of the floating window during the folding of the mobile phone.
[0016] In a possible implementation, the second floating window is displayed centered at the bottom of the second display screen; and the first floating window is displayed at the bottom of the first display screen.
[0017] In a possible implementation, the electronic device uses the first display screen to display the first interface, including: the electronic device uses the first display screen to display the seventh interface; the seventh interface includes the first text; in response to the sixth operation on the first text, the electronic device displays the first control; the first control includes a copy option and a translation option; in response to the seventh operation on the copy option, the electronic device displays the floating ball control; in response to the eighth operation on the floating ball control, the electronic device uses the first display screen to display the first interface. In this way, the electronic device can flexibly call out the floating window based on the user's copy operation.
[0018] In a possible implementation, the electronic device displays the first interface using the first display screen, including: the electronic device displays the eighth interface using the first display screen; the eighth interface includes the second text; in response to the ninth operation on the second text, the electronic device displays the second control; the second control includes a copy option and a translation option; in response to the tenth operation on the translation option, the electronic device displays the first interface using the first display screen. In this way, the electronic device can flexibly call out the floating window based on the user's translation operation.
[0019] In a second aspect, an embodiment of the present application provides a window interaction device, which is applied to an electronic device, wherein the electronic device includes a first display screen and a second display screen, and the second display screen is foldable. The method includes: a display unit, which is used to display a first interface using the first display screen; wherein the first interface includes a first floating window; the width of the first floating window is the same as the width of the first display screen, the first floating window satisfies a first state, and the first floating window is a non-modal dialog box; in response to a first operation on the electronic device, the display unit is used to display a second interface using the second display screen; wherein the second interface includes a second floating window; the width of the second floating window is less than the width of the second display screen, the second floating window satisfies the first state, and the second floating window is a non-modal dialog box.
[0020] In one possible implementation, in response to a second operation on the electronic device, the display unit is used to display a third interface using a second display screen; wherein the third interface includes a third floating window; the width of the third floating window is less than the height of the second display screen, and the third floating window satisfies the first state.
[0021] In a possible implementation, when the second interface is an interface of the electronic device in a portrait state, the third interface is an interface of the electronic device in a landscape state.
[0022] In one possible implementation, the second interface also includes a first area, which is the area of the second interface excluding the second floating window. In response to a third operation on the first area, the display unit is used to display a fourth interface; the fourth interface includes a fourth floating window, and the fourth floating window satisfies the second state; the second state is different from or the same as the first state.
[0023] In a possible implementation manner, the first state includes any one of a half-screen state, a full-screen state, or a bottom state; and the second state includes a bottom state.
[0024] In one possible implementation, in response to a fourth operation on the electronic device, the display unit is used to display a fifth interface using the first display screen; wherein the fifth interface includes a fifth floating window; and the width of the fifth floating window is the same as the height of the first display screen.
[0025] In a possible implementation, when the first interface is an interface of the electronic device in a portrait state, the fifth interface is an interface of the electronic device in a landscape state.
[0026] In a possible implementation, the first state includes any one of a half-screen state, a full-screen state or a bottom state; when the first floating window is in a half-screen state, the fifth floating window is in a full-screen state; when the first floating window is in a bottom state, the fifth floating window is in a bottom state; when the first floating window is in a full-screen state, the fifth floating window is in a full-screen state.
[0027] In one possible implementation, the first interface also includes a second area, which is the area of the first interface excluding the first floating window. In response to a fifth operation on the second area, the display unit is used to display a sixth interface; the sixth interface includes a sixth floating window, and the sixth floating window satisfies the second state; the second state is different from or the same as the first state, and the second state includes a bottom state.
[0028] In one possible implementation, in response to a first operation on the electronic device, the processing unit is used to obtain first data; the first data includes folding angle data; the folding angle data is obtained based on detection by an angle chain sensor; when the electronic device determines that the folding angle data meets a first preset condition, the display unit is used to display a second interface using a second display screen.
[0029] In a possible implementation, the second floating window is displayed centered at the bottom of the second display screen; and the first floating window is displayed at the bottom of the first display screen.
[0030] In one possible implementation, the display unit is used to display a seventh interface using a first display screen; the seventh interface includes a first text; in response to a sixth operation on the first text, the display unit is used to display a first control; the first control includes a copy option and a translation option; in response to a seventh operation on the copy option, the display unit is used to display a floating ball control; in response to an eighth operation on the floating ball control, the display unit is used to display the first interface using the first display screen.
[0031] In one possible implementation, the display unit is used to display an eighth interface using a first display screen; the eighth interface includes a second text; in response to a ninth operation on the second text, the display unit is used to display a second control; the second control includes a copy option and a translation option; in response to a tenth operation on the translation option, the display unit is used to display the first interface using the first display screen.
[0032] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0033] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes any one of the methods of the first aspect.
[0034] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.
[0035] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is run on a computer, it enables the computer to execute any method of the first aspect.
[0036] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0037] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0039] Figure 2 A schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application;
[0040] Figure 3 A schematic diagram of the structure of a window manager provided in an embodiment of the present application;
[0041] Figure 4 A schematic diagram of the structure of a foldable screen mobile phone provided in an embodiment of the present application;
[0042] Figure 5 A schematic diagram of an interface for displaying a floating window provided in an embodiment of the present application;
[0043] Figure 6 A schematic diagram of an interface for displaying a floating window in a vertical screen state provided in an embodiment of the present application;
[0044] Figure 7 A schematic diagram of an interface for displaying a floating window in a horizontal screen state provided in an embodiment of the present application;
[0045] Figure 8 A schematic diagram of an interface for flipping the outer screen of a foldable screen mobile phone provided in an embodiment of the present application;
[0046] Fig. 9 A schematic diagram of an interface for flipping the outer screen of another foldable screen mobile phone provided in an embodiment of the present application;
[0047] Fig.10 A schematic diagram of an interface for flipping the outer screen of another foldable screen mobile phone provided in an embodiment of the present application;
[0048] Fig.11 A schematic diagram of another interface for displaying a floating window in a vertical screen state provided in an embodiment of the present application;
[0049] Fig.12 A schematic diagram of another interface for displaying a floating window in a vertical screen state provided in an embodiment of the present application;
[0050] Fig.13 A schematic diagram of an interface for flipping the inner screen of a foldable screen mobile phone provided in an embodiment of the present application;
[0051] Fig.14 A schematic diagram of an interface of an unfolded folding screen mobile phone provided in an embodiment of the present application;
[0052] Fig.15 A schematic diagram of another interface of an unfolded folding screen mobile phone provided in an embodiment of the present application;
[0053] Fig.16 A non-modal interface schematic diagram provided for an embodiment of the present application;
[0054] Fig.17 A schematic diagram of another non-modal interface provided in an embodiment of the present application;
[0055] Fig.18 A schematic diagram of a window interaction process provided by an embodiment of the present application;
[0056] Fig.19 A schematic diagram of the structure of a window interaction device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first value and the second value are only used to distinguish different values, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0058] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0059] In this application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.
[0060] With the diversification of the functional requirements of electronic devices, more electronic devices can support the automatic rotation function of the screen. For example, when the electronic device receives an operation from the user to switch from the portrait screen to the landscape screen, the display interface of the electronic device can be adaptively switched from the portrait screen to the landscape screen, thereby satisfying the user's use requirements for the automatic rotation function. When the interface of the electronic device includes a floating window, and the electronic device receives an operation from the user to switch from the portrait screen to the landscape screen, the electronic device needs to reasonably display the floating window according to the size of the floating window and the size of the screen of the electronic device.
[0061] Furthermore, when the interface of an electronic device includes a floating window, and the electronic device includes multiple screens, for example, when the electronic device is a folding screen mobile phone, and the folding screen mobile phone includes an inner screen and an outer screen, due to the different screen aspect ratios of the inner screen and the outer screen, and when the folding screen mobile phone receives an operation of flipping the screen by the user on any screen, it is difficult to reasonably display the floating window according to the screen aspect ratio and the size of the floating window.
[0062] Normally, when a floating window is displayed on the inner screen of a foldable phone, and the foldable phone receives an operation from the user to switch from the portrait mode to the landscape mode, the foldable phone cannot automatically flip the floating window; and the floating window is a modal dialog box. A modal dialog box means that when it is displayed, the program will be suspended, and other tasks in the program can only be continued after closing the modal dialog box, such as clicking the OK, Cancel, or Close button to close the dialog box.
[0063] In view of this, an embodiment of the present application provides a window interaction method and an electronic device, so that the electronic device can reasonably display the floating window in different pages or in the states of different electronic devices, thereby enhancing the user experience of using the floating window.
[0064] The above-mentioned electronic device may also be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The electronic device may be a mobile phone with a window display function, a folding screen mobile phone, a smart TV, a wearable device, a tablet, a computer with a wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the electronic device.
[0065] For example, Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0066] like Figure 1As shown, the electronic device 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 angle chain sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a touch sensor 180K, an ambient light sensor 180L, etc.
[0067] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain 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.
[0068] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. For example, the processor 110 is used to execute the ambient light detection method in the embodiment of the present application.
[0069] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0070] 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.
[0071] The electronic device 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.
[0072] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may be an organic light-emitting diode (OLED). In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0073] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.
[0074] For example, Figure 2 A schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application.
[0075] like Figure 2 As shown, the electronic device can divide the Android system into five layers, namely, application layer (applications), application framework layer (application framework), Android runtime (Android runtime) and system library, hardware abstract layer (hardware abstract layer, HAL, not shown in the figure) and kernel layer (kernel).
[0076] In a possible implementation, the electronic device may further include a hardware layer, which may include: a gyroscope sensor for detecting a flip state of the electronic device, and an angle chain sensor for detecting a folded state of the electronic device.
[0077] The application layer may include a series of application packages. For example, the application layer may include application programs such as settings, calendar, map, and alarm clock (application programs may be referred to as applications for short), and the present application embodiment does not impose any restrictions on this.
[0078] In the embodiment of the present application, the application layer may also include a context awareness module, a business logic processing module, a business presentation module, etc. The context awareness module, the business logic processing module, and the business presentation module may be independent APPs, or may be integrated in different APPs, or may be integrated in the same APP, which is not limited in the present application.
[0079] Among them, the context awareness module, which runs permanently or in a low-power form, has the ability to perceive external facts or environments. The context awareness module can detect related events and obtain the status of events from other applications in the application layer or the application framework layer or the system layer or the kernel layer through an API (application programming interface), such as detecting Bluetooth connections, network connections, monitoring user text messages, custom timers, etc. In an embodiment of the present application, the main function of the context awareness module is to monitor whether there is a copy event in the clipboard. When a copy event is detected in the clipboard, the copy event is notified to the business logic processing module. The context awareness module can also be used to obtain the source application (APP) of the cut content in the clipboard, that is, the application package name. In other words, the clipboard content recognizes that the cut content is copied from a specific application through the context awareness module. In addition, the context awareness module can also detect whether there is an operation to exit the current page. When an operation to exit the current page is detected, the business logic processing module is notified.
[0080] The business logic processing module (such as: computing engine) has business logic processing capabilities, which is used to implement the display and disappearance logic of various floating balls or floating windows. For example, the business logic processing module receives the copy event triggered by the user and the clipboard content sent by the context awareness module, and determines whether the translation conditions are met, thereby determining whether to display the floating ball. The business logic processing module can also determine whether to display the floating window and display the translation result in the floating window based on the user-triggered click event of the floating ball and the translation result content obtained from the third-party server. Alternatively, when the business logic processing module receives a translation event triggered by the user, the translation result content can be obtained from the third-party server, and it can be determined whether to display the floating window and display the translation result in the floating window.
[0081] In addition, the business logic processing module can also be used to determine whether to display or disappear the floating ball or floating window on the electronic device according to the event of disappearance of the floating ball or floating window triggered by the user.
[0082] In addition, the business logic processing module can also identify copied text or text extracted by OCR technology. For example, it can identify that the text is at least one of the following types: schedule, link to be shared, Taobao password, website, etc. For another example, it can also identify the language of the text.
[0083] The business presentation module (such as: YOYO suggestion) is used to display or disappear the floating ball or floating window on the screen of the mobile phone. For example, the business presentation module receives the command to display the floating ball or floating window sent by the business logic processing module, and notifies the window manager to display the floating ball or floating window on the electronic device. At the same time, the business presentation module can also present the text copied by the user and its corresponding translation results in the floating window. In addition, the business presentation module can also notify the window manager to display or disappear the floating ball or floating window on the electronic device according to the event of the disappearance of the floating ball or floating window triggered by the user.
[0084] like Figure 2 As shown, the application framework layer may include a window manager, a device status management module, a view system, a resource manager, a notification manager, an activity manager, a clipboard manager, etc., and the embodiments of the present application do not impose any restrictions on this.
[0085] 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. Specifically, the window management module may include: an external screen management module for managing external screen display, and an internal screen management module for managing internal screen display.
[0086] The device status management module is used to monitor the status of the electronic device, for example, monitor the screen flipping status of the electronic device, or monitor the folding status of the electronic device.
[0087] The Clipboard Manager is used to manage the Clipboard. The Clipboard is a temporary storage area for temporarily storing exchange information.
[0088] The activity manager is used to manage the life cycle of each application and the navigation fallback function. It is responsible for creating the Android main thread and maintaining the life cycle of each application.
[0089] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0090] 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.
[0091] 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.
[0092] like Figure 2 As shown, the system library may include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library (such as OpenGL ES), a 2D graphics engine (such as SGL), etc.
[0093] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0094] like Figure 2 As shown, the kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0095] For example, Figure 3 A schematic diagram of the structure of a window manager provided in an embodiment of the present application.
[0096] like Figure 3 As shown, the window manager may include: application windows, child windows (not shown) and system windows.
[0097] The application window corresponds to the application window of a certain application, for example, the application window of a reading application is used to display the content within the reading application, the application window of a translation application is used to display the content within the translation application, and the application window of a memo application is used to display the content within the memo application. The interface of each application is composed of activities, and activities are composed of views. Views are the form of existence of windows, and windows are the carriers of views. When an activity is started, the application process is notified, and any activity belongs to the application process. In other words, for example, the reading application corresponds to an activity, and the memo application corresponds to another activity because it is a different application from the reading application. The default window type for all activities is the base window (TYPE_BASE _APPLICATION), that is, all other types of application windows will appear on top of the base window.
[0098] The child window is attached to the parent window, that is, it cannot exist independently and needs to rely on an application, such as an application input method window, an application prompt box window, etc. When the parent window is invisible, the child window is also invisible.
[0099] System windows are different from application windows and do not need corresponding activities. Unlike child windows, they do not need parent windows. System windows do not belong to any application. They are created by the system and belong only to the system itself. They often require permission to be created, such as shutdown dialog windows, status bar windows, search bar windows, input method windows, warning dialog boxes, system volume bars, etc.
[0100] It should be noted that the level of the system window is generally higher than that of the application window and sub-window.
[0101] Continue to combine Figure 3 As shown, in the embodiment of the present application, a floating ball and a floating window are set in the system window. From the above analysis, it can be seen that the floating ball and the floating window are system windows and cannot be set in the application window.
[0102] The essence of floating windows and floating balls is to hand over a view to a window manager for management. Due to the underlying system limitations of Android, the z-axis range of application windows is 1 to 99, the range of sub-windows is 1001 to 1999, and the range of system windows is (2000 to 2999). Therefore, floating windows and floating balls can only be implemented within the system window range. If you want to pop up a custom system-level window, you need to apply for permissions dynamically. The Z-axis is the concept of the Android window hierarchy. The larger the Z-axis, the more the window is at the top level.
[0103] Furthermore, since the interface of each application in the application is composed of various activities and any activity belongs to the application process, the floating ball and floating window set in the system window do not have the function of activity. In order to obtain the floating ball and floating window to obtain the effect similar to the activity in the application window, that is, to display content and based on the user's sliding operation on the floating ball and floating window, it is necessary to set up sliding operations, sliding conflicts, etc. in the system window, and judge the focus of the response window according to the user's click and other operations. The specific description is expanded according to the following content for greater clarity.
[0104] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0105] In the embodiments of the present application, an electronic device is taken as a folding screen mobile phone as an example for illustration, but this example does not constitute a limitation on the embodiments of the present application.
[0106] For example, Figure 4 A schematic diagram of the structure of a foldable screen mobile phone provided in an embodiment of the present application.
[0107] like Figure 4 As shown, the foldable screen mobile phone includes an inner screen and an outer screen. When the foldable screen mobile phone is in a folded state (or understood as a folding angle between 0 degrees and 70 degrees, etc.), the foldable screen mobile phone can use the outer screen to display an interface including a floating window, or when the foldable screen mobile phone is in an unfolded state (or understood as a folding angle between 70 degrees and 180 degrees, etc.), the foldable screen mobile phone can use the inner screen to display an interface including a floating window.
[0108] It can be understood that the folding angle of the foldable screen mobile phone when it is in a folded state or in an unfolded state is only an example and cannot constitute a limitation on the embodiments of the present application.
[0109] It is understandable that before the electronic device performs window interaction, the user can trigger the floating window corresponding to the translation function by copying the translation text. Figure 5 This is a schematic diagram of an interface showing a suspended ball provided in an embodiment of the present application. It can be understood that: Figure 5 This is an example of using the outer screen of a foldable phone to trigger a floating window. The process of triggering a floating window on the inner screen of a foldable phone can be found in Figure 5 The corresponding embodiments will not be described in detail below.
[0110] For example, an option switch such as "Copy triggers translation" can be set in the setting interface of the foldable screen mobile phone. When the user chooses to turn on the copy-triggered translation function, when the user copies text in a language other than the system default language, the foldable screen mobile phone can trigger the translation function and display a floating ball corresponding to the translation function; further, when the user triggers the floating ball, the translation result can be displayed.
[0111] When the foldable screen mobile phone receives an operation from the user to open a news page in the news application, the foldable screen mobile phone can display the following Figure 5 The interface shown in (a) in the figure can display a paragraph of English. Figure 5 In the scenario shown in (a) where translation is required, when the foldable screen mobile phone receives the user's selection of the word "patent", the foldable screen mobile phone can pop up an option bar 501, which can include operation options such as copy and translate.
[0112] In such Figure 5 In the interface shown in (a) of FIG. 1 , when the foldable screen mobile phone receives the user's operation of triggering the "copy" option in the option bar 501 corresponding to the word "patent", the foldable screen mobile phone can recognize the user's intention and display the following Figure 5 The interface shown in (b) in the figure. Figure 5 The interface shown in (b) in the figure may include a floating ball mark 502, which may be used to indicate that the foldable screen mobile phone is recognizing the user's intention, and the user's intention recognized by the foldable screen mobile phone may be translated. It is understandable that during the recognition process of the foldable screen mobile phone, no user operation is required, such as no user clicking on the Figure 5 Any content on the page in (b) can identify the user's intention.
[0113] When the foldable screen mobile phone recognizes that the user intends to translate the word "patent", it can display the following Figure 5 The interface shown in (c) may include a floating ball 503, which is used to provide the user with an entry for displaying the translation result.
[0114] In such Figure 5 In the interface shown in (c) of FIG. 1 , when the folding screen mobile phone receives the user's operation of triggering the floating ball 503, the folding screen mobile phone can display the following Figure 5 The interface shown in (d) in the figure. Figure 5In the interface shown in (d) therein, a floating window 504 can be displayed in this interface, and the translation result of "patent" is shown in the floating window 504. The translation result displayed in the floating window 504 includes the English word "patent" to be queried copied by the user, as well as the translation result of the Chinese definition of this word, that is, "patent". The content displayed in the floating window 504 also includes: a control for voice reading, a control for copying the translation result, a control for switching the translation language, etc.
[0115] It can be understood that the floating window 504 is the initial state of the floating window, that is, the default form displayed after the user clicks the floating ball 503 is a semi-screen state, and the size approximately occupies half of the outer screen of the folding screen mobile phone. Exemplarily, due to the display of the floating window 504, the folding screen mobile phone can cancel the display of the floating ball 503 to achieve a better user experience.
[0116] In possible implementation manners, in addition to being able to open the floating window 504 based on the interfaces shown in (a)-(d) above, the folding screen mobile phone can also open the floating window conveniently based on the following operations. Figure 5 in (a)- Figure 5 in (d) shown above, when the folding screen mobile phone receives an operation in which the user triggers the "translate" option in the option bar 501 corresponding to the "patent" word, the folding screen mobile phone displays
[0117] In the interface shown in (a) as Figure 5 above, when the folding screen mobile phone receives an operation in which the user triggers the "translate" option in the option bar 501 corresponding to the "patent" word, the folding screen mobile phone displays Figure 5 the interface shown in (d) above. For example, the folding screen mobile phone can pop up the floating window 504.
[0118] It can be understood that in the embodiments of the present application, the method for the folding screen mobile phone to open the floating window and the functions corresponding to the floating window are not specifically limited.
[0119] In possible implementation manners, when the floating window is displayed on the outer screen of the folding screen mobile phone and the folding screen mobile phone is in the vertical screen state, the folding screen mobile phone can present three floating window states according to the user's operations on the floating window. Exemplarily, Figure 6 This is a schematic diagram of an interface for displaying a floating window in a vertical screen state provided by an embodiment of the present application.
[0120] Such as Figure 6 the interface shown in (a) above. This interface can be a floating window 601 in a semi-screen state displayed on the outer screen of the folding screen mobile phone when the folding screen mobile phone is in the vertical screen state. Among them, the floating window in the semi-screen state occupies about half of the screen of the current application, and part of the translation result content is displayed. The floating window in the semi-screen state can also be used as the default floating window form exemplarily, that is, the first floating window displayed after the user copies the text.
[0121] For example, in Figure 6 In the interface shown in (a) of FIG. 1 , when the folding screen mobile phone receives the operation of the user touching the floating window 601 and sliding downward, the folding screen mobile phone can display the following Figure 6 The interface shown in (b).
[0122] like Figure 6 The interface shown in (b) in the figure may be a floating window 602 in a bottom state displayed on the outer screen of the foldable screen mobile phone when the foldable screen mobile phone is in a vertical screen state. The floating window in the bottom state is located at the bottom of the screen of the current application and does not display any translation result content, which is conducive to the user continuing to access the content in the current application to improve the user experience.
[0123] For example, in Figure 6 In the interface shown in (b) of FIG. 1 , when the foldable screen mobile phone receives an operation in which the user touches the floating window 602 and slides upward, and slides to the upper edge of the outer screen in the vertical screen state, the foldable screen mobile phone can display the following Figure 6 The interface shown in (c).
[0124] like Figure 6 The interface shown in (c) in the figure may be a floating window 603 in full screen mode displayed on the outer screen of the foldable screen mobile phone when the foldable screen mobile phone is in portrait mode. The floating window in full screen mode may exemplarily occupy the entire screen of the current application, and its expansion is based on the user's dragging operation, and is used to display more translation result content than the floating window in half screen mode, so as to improve the user experience.
[0125] It is understandable that the above Figure 6 The interface shown in (a) Figure 6 The interface shown in (b) and Figure 6 The width of the floating window in the interface shown in (c) is consistent with the width of the external screen.
[0126] It is understandable that foldable screen mobile phones can also be based on other user operations. Figure 6 The interface shown in (a) Figure 6 The interface shown in (b) and Figure 6 Switching is performed in the interface shown in (c) in the figure, which is not specifically limited in the embodiments of the present application.
[0127] In a possible implementation, when the outer screen of a foldable phone displays a floating window and the foldable phone is in landscape mode, the foldable phone can present two floating window states according to the user's operation on the floating window. Figure 7 A schematic diagram of an interface for displaying a floating window in a horizontal screen state provided in an embodiment of the present application.
[0128] like Figure 7 The interface shown in (a) in the figure may be a floating window 701 in a bottom state displayed on the outer screen of the foldable screen mobile phone when the foldable screen mobile phone is in a horizontal state.
[0129] For example, in Figure 7 In the interface shown in (a) of FIG. 1 , when the folding screen mobile phone receives an operation in which the user touches the floating window 701 and slides upward, and slides to the upper edge of the outer screen in the horizontal screen state, the folding screen mobile phone can display the following Figure 7 The interface shown in (b).
[0130] like Figure 7 The interface shown in (b) in the figure may be a floating window 702 in full screen mode displayed on the outer screen of the foldable screen mobile phone when the foldable screen mobile phone is in landscape mode.
[0131] It is understandable that the above Figure 7 The interface shown in (a) and Figure 7 The width of the floating window in the interface shown in (b) is consistent with the height of the external screen.
[0132] It is understandable that foldable screen mobile phones can also be based on other user operations. Figure 7 The interface shown in (a) and Figure 7 Switching is performed in the interface shown in (b) in the figure, which is not specifically limited in the embodiments of the present application.
[0133] based on Figure 6 The corresponding embodiments and Figure 7 The corresponding embodiment enables the floating window to display different forms according to different operations of the user. In this way, the different needs of users for the external screen display of the floating window of the folding screen mobile phone are met, and the user's experience of using the floating window function in the folding screen mobile phone is improved.
[0134] In a possible implementation, the floating window displayed on the outer screen of the foldable screen mobile phone can be flexibly adjusted according to the user's flipping needs, thereby improving the user's experience of using the floating window function in the foldable screen mobile phone. Specifically, when the foldable screen mobile phone is in portrait mode, when the user flips the screen while the floating window on the outer screen of the foldable screen mobile phone is in the bottom state, the floating window on the outer screen of the foldable screen mobile phone can be in the bottom state (such as Figure 8 Corresponding embodiments); or, when the user flips the screen when the floating window in the outer screen of the folding screen mobile phone is in a half-screen state, the floating window in the outer screen of the folding screen mobile phone can be in a full-screen state (such as Fig. 9Corresponding embodiments); or, when the user flips the screen when the floating window in the outer screen of the folding screen mobile phone is in the full screen state, the floating window in the outer screen of the folding screen mobile phone can be in the full screen state (such as Fig.10 corresponding embodiments).
[0135] In one implementation, the foldable screen mobile phone is in portrait mode. When the user flips the screen while the floating window in the outer screen of the foldable screen mobile phone is in the bottom state, the floating window in the outer screen of the foldable screen mobile phone can be in the bottom state.
[0136] For example, Figure 8 A schematic diagram of an interface for flipping the outer screen of a foldable screen mobile phone provided in an embodiment of the present application. Figure 8 In the case where the floating window in the outer screen of the foldable screen mobile phone shown in (a) is in the bottom state, when the foldable screen mobile phone receives an operation of the user flipping the screen, for example, the user flips the foldable screen mobile phone from the vertical screen state to the horizontal screen state of the foldable screen mobile phone, the foldable screen mobile phone can display the following Figure 8 In the interface shown in (b), the Figure 8 In the interface shown in (b), the floating window in the outer screen of the foldable screen mobile phone can be in the bottom state.
[0137] In another implementation, when the user flips the screen when the floating window in the outer screen of the foldable screen mobile phone is in a half-screen state, the floating window in the outer screen of the foldable screen mobile phone can be in a full-screen state.
[0138] For example, Fig. 9 This is a schematic diagram of an interface for flipping the outer screen of another folding screen mobile phone provided in an embodiment of the present application. Fig. 9 In the case where the floating window in the outer screen of the foldable screen mobile phone shown in (a) is in a half-screen state, when the foldable screen mobile phone receives an operation of a user flipping the screen, for example, the user flips the foldable screen mobile phone from the vertical screen state to the horizontal screen state of the foldable screen mobile phone, the foldable screen mobile phone can display the following Fig. 9 In the interface shown in (b), the Fig. 9 In the interface shown in (b), the floating window in the outer screen of the foldable screen mobile phone can be in full screen mode.
[0139] It can be understood that since the floating window of the folding screen mobile phone in the landscape state has only two states, namely the bottom state and the full-screen state, when the folding screen mobile phone in the portrait state is switched to the landscape state, the half-screen floating window in the portrait state can be switched to the full-screen floating window in the landscape state, so that the folding screen mobile phone can meet the user's needs for the use of the floating window when the screen is switched.
[0140] In another implementation, when the user flips the screen when the floating window in the outer screen of the foldable screen mobile phone is in full screen mode, the floating window in the outer screen of the foldable screen mobile phone can be in full screen mode.
[0141] For example, Fig.10 A schematic diagram of an interface for flipping the outer screen of another folding screen mobile phone provided in an embodiment of the present application. Fig.10 In the case where the floating window in the outer screen of the foldable screen mobile phone shown in (a) is in full screen mode, when the foldable screen mobile phone receives an operation of a user flipping the screen, for example, the user flips the foldable screen mobile phone from the vertical screen mode to the horizontal screen mode of the foldable screen mobile phone, the foldable screen mobile phone can display the following Fig.10 In the interface shown in (b), the Fig.10 In the interface shown in (b), the floating window in the outer screen of the foldable screen mobile phone can be in full screen mode.
[0142] It is understandable that when the folding screen receives the user's operation of flipping the folding screen mobile phone from the horizontal screen state to the vertical screen state of the folding screen mobile phone, the display mode of the floating window in the inner screen of the folding screen mobile phone can be compared to Figure 8 (or Fig. 9 or Fig.10 ) The description in the corresponding embodiment will not be repeated here.
[0143] In possible implementations, the inner screen of a folding screen mobile phone can also be based on Figure 5 The method described in the corresponding embodiment opens the floating window. When the folding screen mobile phone is in the vertical screen state, the inner screen of the folding screen mobile phone can present three floating window states according to the user's operation on the floating window. For example, Fig.11 A schematic diagram of an interface for displaying a floating window in a vertical screen state provided in another embodiment of the present application.
[0144] like Fig.11 The interface shown in (a) in the figure may be a floating window 1101 in a half-screen state displayed on the inner screen of the folding screen mobile phone when the folding screen mobile phone is in a vertical screen state. The floating window 1101 in a half-screen state may be displayed in the center at the bottom of the screen, and a certain blank area is left on both the left and right sides of the floating window 1101 and the inner screen of the folding screen mobile phone. It is understandable that due to the large size of the inner screen, the floating window displayed in the middle of the bottom of the screen may not affect the user's viewing of other corresponding content and meet the user's demand for the use of the floating window.
[0145] For example, in Fig.11 In the interface shown in (a) of FIG. 1 , when the folding screen mobile phone receives the operation of the user touching the floating window 1101 and sliding downward, the folding screen mobile phone can display the following Fig.11 The interface shown in (b).
[0146] like Fig.11 The interface shown in (b) may be a floating window 1102 in a bottom state displayed on the inner screen of the foldable screen mobile phone when the foldable screen mobile phone is in a vertical state.
[0147] For example, in Fig.11 In the interface shown in (b) of FIG. 1 , when the folding screen mobile phone receives an operation in which the user touches the floating window 1102 and slides upward, and slides to the upper edge of the inner screen in the vertical screen state, the folding screen mobile phone can display the following Fig.11 The interface shown in (c).
[0148] like Fig.11 The interface shown in (c) may be a floating window 1103 in full screen mode displayed on the inner screen of the foldable screen mobile phone when the foldable screen mobile phone is in portrait mode.
[0149] It is understood that the interface shown in (a) of 11, the interface shown in (b) of 11, and Fig.11 In the interface shown in (c), the width of the floating window is smaller than the width of the inner screen, and the floating window is centered at the bottom of the screen.
[0150] It is understandable that foldable screen mobile phones can also be based on other user operations. Fig.11 The interface shown in (a) Fig.11 The interface shown in (b) and Fig.11 Switching is performed in the interface shown in (c) in the figure, which is not specifically limited in the embodiments of the present application.
[0151] In possible implementations, the inner screen of a folding screen mobile phone can also be based on Figure 5 The method described in the corresponding embodiment opens the floating window. When the folding screen mobile phone is in the horizontal screen state, the inner screen of the folding screen mobile phone can present three floating window states according to the user's operation on the floating window. For example, Fig.12 A schematic diagram of an interface for displaying a floating window in a vertical screen state provided in another embodiment of the present application.
[0152] like Fig.12 The interface shown in (a) in the figure may be a floating window 1201 in a half-screen state displayed on the inner screen of the foldable screen mobile phone when the foldable screen mobile phone is in a horizontal state.
[0153] For example, in Fig.12 In the interface shown in (a) of FIG. 1 , when the folding screen mobile phone receives the operation of the user touching the floating window 1201 and sliding downward, the folding screen mobile phone can display the following Fig.12 The interface shown in (b).
[0154] like Fig.12 The interface shown in (b) may be a floating window 1202 in a bottom state displayed on the inner screen of the foldable screen mobile phone when the foldable screen mobile phone is in a horizontal state.
[0155] For example, in Fig.12 In the interface shown in (b) of FIG. 1 , when the folding screen mobile phone receives an operation in which the user touches the floating window 1202 and slides upward, and slides to the upper edge of the inner screen in the horizontal screen state, the folding screen mobile phone can display the following Fig.12 The interface shown in (c).
[0156] like Fig.12 The interface shown in (c) may be a floating window 1203 in full screen mode displayed on the inner screen of the foldable screen mobile phone when the foldable screen mobile phone is in landscape mode.
[0157] It is understood that the interface shown in (a) of 12, the interface shown in (b) of 12, and Fig.12 In the interface shown in (c), the width of the floating window is smaller than the height of the inner screen, and the floating window is centered at the bottom of the screen.
[0158] It is understandable that foldable screen mobile phones can also be based on other user operations. Fig.12 The interface shown in (a) Fig.12 The interface shown in (b) and Fig.12 Switching is performed in the interface shown in (c) in the figure, which is not specifically limited in the embodiments of the present application.
[0159] based on Fig.11 The corresponding embodiments and Fig.12 The corresponding embodiment enables the floating window to display different forms according to different user operations. In this way, the different needs of users for the inner screen display of the floating window of the folding screen mobile phone are met, and the user's experience of using the floating window function in the folding screen mobile phone is improved.
[0160] In a possible implementation, the floating window displayed on the inner screen of a foldable screen mobile phone can be flexibly adjusted according to the user's flipping needs, thereby improving the user's experience of using the floating window function in the foldable screen mobile phone. Specifically, when the foldable screen mobile phone is in portrait mode, when the user flips the screen while the floating window on the inner screen of the foldable screen mobile phone is in half-screen mode, the floating window on the inner screen of the foldable screen mobile phone can be in half-screen mode (such as Fig.13 corresponding embodiments).
[0161] For example, Fig.13A schematic diagram of an interface for flipping the inner screen of a folding screen mobile phone provided in an embodiment of the present application. Fig.13 In the case where the floating window in the inner screen of the foldable screen mobile phone shown in (a) is in a half-screen state, when the foldable screen mobile phone receives an operation of the user flipping the screen, for example, the user flips the foldable screen mobile phone from the vertical screen state to the horizontal screen state of the foldable screen mobile phone, the inner screen of the foldable screen mobile phone can display the following Fig.13 In the interface shown in (b), the Fig.13 In the interface shown in (b), the floating window in the inner screen of the foldable screen mobile phone can be in a half-screen state.
[0162] It is understandable that since the area of the inner screen of the foldable screen mobile phone is large and the difference between the width and height of the inner screen is small, the state of the floating window will not change when the foldable screen mobile phone is flipped. For example, the foldable screen mobile phone cannot switch the floating window in the inner screen from half-screen state to full-screen state according to the user's operation of flipping the screen.
[0163] Specifically, when the floating window in the inner screen of the foldable screen mobile phone is in the bottom state, when the foldable screen mobile phone receives an operation of flipping the screen by the user, for example, flipping the foldable screen mobile phone from the portrait state to the landscape state of the foldable screen mobile phone, the floating window in the inner screen of the foldable screen mobile phone may be in the bottom state; or, when the floating window in the inner screen of the foldable screen mobile phone is in the full-screen state, when the foldable screen mobile phone receives an operation of flipping the screen by the user, for example, flipping the foldable screen mobile phone from the portrait state to the landscape state of the foldable screen mobile phone, the floating window in the inner screen of the foldable screen mobile phone may be in the full-screen state.
[0164] It is understandable that when the folding screen receives the user's operation of flipping the folding screen mobile phone from the horizontal screen state to the vertical screen state of the folding screen mobile phone, the display mode of the floating window in the inner screen of the folding screen mobile phone can be compared to Fig.13 The description in the corresponding embodiments will not be repeated here.
[0165] In a possible implementation, the floating window displayed on the foldable screen mobile phone can be flexibly displayed in different interfaces of the foldable screen mobile phone according to the user's folding requirements for the foldable screen mobile phone. Specifically, when the foldable screen mobile phone is always in the vertical screen state, when the user unfolds the mobile phone when the floating window on the outer screen of the foldable screen mobile phone is in the half-screen state, the floating window displayed on the inner screen of the foldable screen mobile phone can be in the half-screen state (such as Fig.14 corresponding embodiments).
[0166] For example, Fig.14 This is a schematic diagram of an interface of an unfolded folding screen mobile phone provided in an embodiment of the present application. Fig.14In the case where the foldable screen mobile phone shown in (a) is always in the vertical screen state, and the floating window in the outer screen of the foldable screen mobile phone is in the half-screen state, when the foldable screen mobile phone receives the user's operation of unfolding the foldable screen mobile phone, the inner screen of the foldable screen mobile phone can display Fig.14 In the interface shown in (b), the Fig.14 The floating window in the interface shown in (b) may be in a half-screen state.
[0167] It is understandable that when the horizontal and vertical screen states of the foldable screen mobile phone do not switch, even if the foldable screen mobile phone receives the user's operation of unfolding or folding the mobile phone, the state of the floating window in the display screen of the foldable screen mobile phone does not change.
[0168] Specifically, when the foldable screen mobile phone is always in the portrait state, and the floating window in the outer screen of the foldable screen mobile phone is in the bottom state, when the foldable screen mobile phone receives the operation of the user to unfold the foldable screen mobile phone, the floating window in the inner screen of the foldable screen mobile phone can be in the bottom state; or, when the foldable screen mobile phone is always in the portrait state, and the floating window in the outer screen of the foldable screen mobile phone is in the full-screen state, when the foldable screen mobile phone receives the operation of the user to unfold the foldable screen mobile phone, the floating window in the inner screen of the foldable screen mobile phone can be in the full-screen state.
[0169] In a possible implementation, the floating window displayed on the foldable screen mobile phone can be flexibly displayed in different interfaces of the foldable screen mobile phone according to the user's folding requirements and screen rotation requirements. Specifically, when the foldable screen mobile phone is in landscape mode, and the user unfolds the phone and rotates the screen when the floating window on the outer screen of the foldable screen mobile phone is at the bottom, the foldable screen mobile phone is in a balanced state, and the floating window displayed on the inner screen of the foldable screen mobile phone can be in a half-screen state (such as Fig.15 corresponding embodiments).
[0170] For example, Fig.15 This is another interface diagram of an unfolded folding screen mobile phone provided in an embodiment of the present application. Fig.15 In the case where the foldable screen mobile phone shown in (a) is in a horizontal state, and the floating window in the outer screen of the foldable screen mobile phone is in a bottom state, when the foldable screen mobile phone receives an operation that the user unfolds the foldable screen mobile phone and the user flips the screen, for example, an operation for flipping the foldable screen mobile phone from the horizontal state to the vertical state of the foldable screen mobile phone, the inner screen of the foldable screen mobile phone can display the following Fig.15 In the interface shown in (b), the Fig.15 The floating window in the interface shown in (b) may be in the bottom state.
[0171] It is understandable that when the horizontal and vertical screen states of the foldable screen mobile phone are switched and the folded state of the foldable screen mobile phone is switched, the state of the floating window in the display screen of the foldable screen mobile phone may not change. For example, the foldable screen mobile phone cannot switch the floating window in the outer screen from a half-screen state to a full-screen state in the inner screen according to the user's operations of flipping the screen and folding (or unfolding) the phone.
[0172] In a possible implementation, the floating window in the outer screen of a foldable screen mobile phone can satisfy the non-modal (or called non-modal dialog box). Fig.16 A non-modal interface diagram provided in an embodiment of the present application. The non-modal interface can be understood as a user being able to touch or click an area outside the floating window when the floating window exists.
[0173] When a non-modal dialog box is displayed, you can execute other tasks in the program without closing the dialog box. At this time, the window attribute of the floating window is set to FLAG_NOT_TOUCH_MODAL, so in this mode, the system will pass touch / click events outside the current window area to the underlying window, and single click events within the current window area will be processed by the current window.
[0174] Specifically, when the floating window is in half-screen state and full-screen state, the window attribute of the floating window is set to FLAG_NOT_TOUCH_MODAL to control the focus event processing; when the floating window is in the bottom state, the window attribute of the floating window is set to FLAG_NOT_FOCUSABLE to hand over the focus event to the original text processing of the current application. The current application is the reading application currently being used by the user in the implementation mode of this application.
[0175] FLAG_NOT_FOCUSABLE: Indicates that the current window does not need to obtain the focus, nor does it need to receive various input events. This flag will also enable FLAG_NOT_TOUCH_MODAL, and the final event will be passed directly to the underlying window with specific focus.
[0176] FLAG_NOT_TOUCH_MODAL: In this mode, the system will pass touch / click events outside the current window area to the underlying window, and click events within the current window area will be processed by the current window. This flag is very important and generally needs to be turned on, otherwise other windows will not receive touch / click events.
[0177] In such Fig.16 In the case where the floating window in the outer screen of the folding screen mobile phone shown in (a) is in a half-screen state, when the folding screen mobile phone receives a user trigger to trigger an area outside the floating window (such as Fig.16When the dotted box in (a) is operated, the folding screen mobile phone can display the following Fig.16 In the interface shown in (b), the Fig.16 The floating window in the interface shown in (b) may be in the bottom state.
[0178] It is understandable that the non-modal floating window allows users to browse and trigger areas other than the floating window without closing the floating window on the outer screen of the folding screen mobile phone, thereby improving the user experience.
[0179] In a possible implementation, a floating window in the inner screen of a foldable screen mobile phone can satisfy the non-modal state. For example, Fig.17 Another non-modal interface schematic diagram provided for an embodiment of the present application.
[0180] In such Fig.17 In the case where the floating window in the inner screen of the folding screen mobile phone shown in (a) is in a half-screen state, when the folding screen mobile phone receives a user trigger to trigger an area outside the floating window (such as Fig.17 When the dotted box in (a) is operated, the folding screen mobile phone can display the following Fig.17 In the interface shown in (b), the Fig.17 The floating window in the interface shown in (b) may be in the bottom state.
[0181] It is understandable that the non-modal floating window allows users to browse and trigger areas other than the floating window on the inner screen of the folding screen mobile phone without closing the floating window, thereby improving the user experience.
[0182] For example, Fig.18 A schematic diagram of a window interaction process provided by an embodiment of the present application. Fig.18 In a corresponding embodiment, the software architecture of the electronic device may include multiple layers, such as an application layer, an application framework layer, and a hardware layer; the application layer may include a business presentation module, and the application framework layer may include a window manager and a device status management module; the window management module may include: an external screen management module for managing the external screen display, and an internal screen management module for managing the internal screen display; the hardware layer may include a gyroscope sensor and an angle chain sensor.
[0183] like Fig.18 As shown, the window interaction method may include the following steps:
[0184] S1801. The user triggers a translation event on the inner screen.
[0185] The translation event may be an event in which copying the text to be translated triggers the display of a floating window corresponding to the translation function.
[0186] S1802: In response to a user triggering a translation event, the inner screen management module sends a message to the business presentation module for instructing display of a floating window in the inner screen.
[0187] S1803. The business presentation module calls the display to display a floating window on the inner screen.
[0188] S1804: The user triggers a flip event on the inner screen.
[0189] The flip event may be a flip event of the screen by the user, such as a flip event when the portrait screen state of the electronic device is flipped to the landscape screen state, or a flip event when the landscape screen state of the electronic device is flipped to the portrait screen state.
[0190] S1805: In response to the user triggering a flip event in the inner screen, the gyroscope sensor sends angular acceleration data to the device state management module.
[0191] The angular acceleration data may be used to indicate the horizontal or vertical screen state of the electronic device.
[0192] S1806. The device status management module sends the angular acceleration data to the internal screen management module.
[0193] S1807. The internal screen management module updates the page according to the angular acceleration data and the floating window to obtain a flipped page.
[0194] For example, when the internal screen management module determines that the current state of the screen is flipped from the portrait state to the landscape state based on the angular acceleration data, the internal screen management module can respond to the flipping of the floating window, update the page, and obtain the flipped page. Fig.13 The description in the corresponding embodiment performs page update in the inner screen.
[0195] S1808. The internal screen management module sends a message to the business presentation module to instruct the display of the flipped page.
[0196] S1809. The business presentation module calls the display to display the flipped page.
[0197] Based on the steps shown in S1804-S1809, the electronic device can reasonably display the floating window according to the user's flipping.
[0198] It is understandable that when the user triggers a flip event in the external screen, in response to the user triggering the flip event in the external screen, the method of displaying the floating window in the external screen can be similar to the steps shown in S1804-S1809, which will not be repeated here. Figure 8-Figure 10The description in the corresponding embodiment performs page update in the external screen.
[0199] In a possible implementation, based on the steps shown in S1801-S1809 above, when the user folds the mobile phone with the floating window displayed on the inner screen, the electronic device can reasonably display the floating window according to the change in the folding angle when the user folds the mobile phone. For details, please refer to the steps shown in S1810-S1816.
[0200] S1810. The user triggers a folding event when a floating window is displayed on the inner screen.
[0201] Among them, the folding event can be an event in which the user folds the inner screen (or understood as an event when the folding angle satisfies 0 degrees-70 degrees), or the folding event can also be an event in which the user unfolds the inner screen (or understood as an event when the folding angle satisfies 70 degrees-180 degrees).
[0202] S1811. In response to a user triggering a folding event when a floating window is displayed on the inner screen, the corner chain sensor sends folding angle data to the device status management module.
[0203] S1812. The device status management module determines whether to display the floating window in the inner screen or in the outer screen according to the folding angle.
[0204] In the embodiment of the present application, when the device state management module determines to display a floating window in the outer screen according to the folding angle, the steps shown in S1813-S1816 can be executed. Alternatively, when the device state management module determines to display a floating window in the inner screen according to the folding angle, the execution logic of the module in the electronic device can be analogous to the description in the steps shown in the following S1813-S1816, which will not be repeated in the following text.
[0205] Exemplarily, when the device status management module determines that the folding angle is 0 degrees-70 degrees, the device status management module can determine to display a floating window on the external screen and execute the steps shown in S1812; or, when the device status management module determines that the folding angle is 70 degrees-180 degrees, the device status management module can determine to continue to display the floating window on the internal screen.
[0206] S1813. The device status management module sends a message to the external screen management module to instruct the external screen to display a floating window.
[0207] S1814. The external screen management module updates the page to obtain a folded page.
[0208] Exemplarily, the external screen management module can be based on Fig.14 The description in the corresponding embodiment performs page update in the external screen to obtain a folded page.
[0209] S1815. The external screen management module sends a message to the business presentation module to instruct the external screen to display the folded page.
[0210] S1816. The business presentation module calls the display to display the folded page on the external screen.
[0211] In a possible implementation, when the user triggers a flip event and a folding event almost simultaneously in the inner screen (or outer screen) interface, the module in the electronic device may first respond to the flip event (such as steps shown in S1804-S1809), and then respond to the folding event (such as steps shown in S1810-S1816); alternatively, the module in the electronic device may first respond to the folding event (such as steps shown in S1810-S1816) and then respond to the flip event (such as steps shown in S1804-S1809); alternatively, the module in the electronic device may also respond to the folding event at the same time.
[0212] Based on the steps shown in S1801-S1816, the electronic device can reasonably display the floating window in different pages or in the states of different electronic devices, thereby enhancing the user experience of using the floating window.
[0213] It should be understood that the interface provided in the embodiment of the present application is merely an example and cannot constitute a further limitation on the embodiment of the present application.
[0214] For example, Fig.19 A schematic diagram of the structure of a window interaction device provided in an embodiment of the present application.
[0215] like Fig.19 As shown, the window interaction device 190 can be used in a communication device, circuit, hardware component or chip, and the window interaction device includes: a display unit 1901, a processing unit 1902 and a communication unit 1903. Among them, the display unit 1901 is used to support the display step of exiting the resource allocation method; the processing unit 1902 is used to support the window interaction device to perform information processing steps; and the communication unit 1903 is used to support the data sending and data receiving steps of the resource allocation method.
[0216] In a possible embodiment, the communication unit 1903 may be an input or output interface, a pin or a circuit, etc.
[0217] In a possible embodiment, the window interaction device may further include: a storage unit 1904. The processing unit 1902, the communication unit 1903, and the storage unit 1904 are connected via a line.
[0218] The storage unit 1904 may include one or more memories, and the memory may be a device in one or more devices or circuits for storing programs or data.
[0219] The storage unit 1904 can exist independently and be connected to the processing unit 1902 of the window interaction device through a communication line. The storage unit 1904 can also be integrated with the processing unit 1902.
[0220] The storage unit 1904 may store computer-executable instructions of the method in the electronic device, so that the processing unit 1902 executes the method in the above embodiment.
[0221] The storage unit 1904 may be a register, a cache, or a RAM, etc. The storage unit 1904 may be integrated with the processing unit 1902. The storage unit 1904 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 1904 may be independent of the processing unit 1902.
[0222] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.
[0223] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium may include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
[0224] The embodiments of the present application also provide a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.
[0225] As a possible design, the computer readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line may also be appropriately referred to as a computer readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically using lasers.
[0226] The above combinations should also be included in the scope of computer-readable media. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A window interaction method, characterized in that: Applied to an electronic device, the electronic device comprises a first display screen and a second display screen, the second display screen is foldable, and the method comprises: The electronic device displays a first interface using the first display screen; wherein the first interface includes a first floating window; the width of the first floating window is the same as the width of the first display screen, the first floating window satisfies a first state, and the first floating window is a non-modal dialog box; In response to a first operation on the electronic device, the electronic device displays a second interface using the second display screen; wherein the second interface includes a second floating window; a width of the second floating window is smaller than a width of the second display screen, the second floating window satisfies the first state, the first floating window and the second floating window have the same state, and the second floating window is the non-modal dialog box; The second interface also includes a first area, and the first area is an area of the second interface excluding the second floating window. The method further includes: In response to a third operation on the first area, the electronic device displays a fourth interface; the fourth interface includes a fourth floating window, and the fourth floating window satisfies a second state; the second state is different from or the same as the first state; wherein the second state includes a bottom state.
2. The method according to claim 1, characterized in that The method further comprises: In response to a second operation on the electronic device, the electronic device displays a third interface using the second display screen; wherein the third interface includes a third floating window; the width of the third floating window is smaller than the height of the second display screen, and the third floating window satisfies the first state.
3. The method according to claim 2, characterized in that When the second interface is an interface of the electronic device in a portrait state, the third interface is an interface of the electronic device in a landscape state.
4. The method according to claim 1, characterized in that: The first state includes any one of a half-screen state, a full-screen state or a bottom state.
5. The method according to claim 1, characterized in that After the electronic device displays the first interface using the first display screen, the method further includes: In response to a fourth operation on the electronic device, the electronic device displays a fifth interface using the first display screen; wherein the fifth interface includes a fifth floating window; and a width of the fifth floating window is the same as a height of the first display screen.
6. The method according to claim 5, characterized in that When the first interface is an interface of the electronic device in a portrait state, the fifth interface is an interface of the electronic device in a landscape state.
7. The method according to claim 6, characterized in that The first state includes any one of a half-screen state, a full-screen state or a bottom state; when the first floating window is in a half-screen state, the fifth floating window is in a full-screen state; when the first floating window is in a bottom state, the fifth floating window is in a bottom state; when the first floating window is in a full-screen state, the fifth floating window is in a full-screen state.
8. The method according to claim 6, characterized in that The first interface also includes a second area, and the second area is an area of the first interface other than the first floating window. After the electronic device displays the first interface using the first display screen, the method further includes: In response to a fifth operation on the second area, the electronic device displays a sixth interface; the sixth interface includes a sixth floating window, and the sixth floating window satisfies the second state.
9. The method according to claim 1, characterized in that: In response to the first operation on the electronic device, the electronic device displays a second interface using the second display screen, including: In response to a first operation on the electronic device, the electronic device acquires first data; the first data includes folding angle data; the folding angle data is obtained based on detection by an angle chain sensor; When the electronic device determines that the folding angle data meets the first preset condition, the electronic device displays the second interface using the second display screen.
10. The method according to claim 1, characterized in that The second floating window is displayed centered at the bottom of the second display screen; the first floating window is displayed at the bottom of the first display screen.
11. The method according to claim 1, characterized in that: The electronic device displays a first interface using the first display screen, including: The electronic device displays a seventh interface using the first display screen; the seventh interface includes a first text; In response to a sixth operation on the first text, the electronic device displays a first control; the first control includes a copy option and a translation option; In response to a seventh operation on the copy option, the electronic device displays a floating ball control; In response to an eighth operation on the floating ball control, the electronic device displays the first interface using the first display screen.
12. The method according to claim 1, characterized in that The electronic device displays a first interface using the first display screen, including: The electronic device displays an eighth interface using the first display screen; the eighth interface includes a second text; In response to a ninth operation on the second text, the electronic device displays a second control; the second control includes a copy option and a translation option; In response to a tenth operation on the translation option, the electronic device displays the first interface using the first display screen.
13. An electronic device, characterized in that: The electronic device comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method according to any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 12.
15. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Browsing interactive processing method and device
CN107153541A
System navigation bar display method, system navigation bar control method, graphical user interface, and electronic device
US20210342044A1
