CN117608711A - Window display form adjusting method and electronic equipment - Google Patents
Window display form adjusting method and electronic equipment Download PDFInfo
- Publication number
- CN117608711A CN117608711A CN202310604736.9A CN202310604736A CN117608711A CN 117608711 A CN117608711 A CN 117608711A CN 202310604736 A CN202310604736 A CN 202310604736A CN 117608711 A CN117608711 A CN 117608711A
- Authority
- CN
- China
- Prior art keywords
- window
- component
- application
- task stack
- activity
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000000694 effects Effects 0.000 claims abstract description 171
- 230000004044 response Effects 0.000 claims abstract description 16
- 238000007667 floating Methods 0.000 claims description 8
- 230000006870 function Effects 0.000 description 28
- 230000000875 corresponding effect Effects 0.000 description 27
- 238000010586 diagram Methods 0.000 description 24
- 238000004891 communication Methods 0.000 description 11
- 230000003993 interaction Effects 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 3
- 230000003044 adaptive effect Effects 0.000 description 2
- 239000002131 composite material Substances 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000004760 accelerator mass spectrometry Methods 0.000 description 1
- 239000011230 binding agent Substances 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000001276 controlling effect Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 210000001503 joint Anatomy 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000026676 system process Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application provides a window display form adjustment method and electronic equipment, wherein the method comprises the following steps: and receiving an adjustment operation of a user for the popup window, and if the popup window cannot respond to the adjustment operation, searching a task stack to which a Dialog component carrying the popup window belongs. After the task stack to which the Dialog component belongs is found, component parameters of at least one Activity component included in the found task stack are adjusted in response to the adjustment operation, so that window display parameters of an application window borne by the Activity component are correspondingly adjusted, and the display form of the application window is adjusted according to the adjusted window display parameters. Therefore, even if the popup window cannot respond to the adjustment operation, the Activity assembly contained in the task stack and the display form of the application window borne by the Activity assembly can be adjusted according to the searched task stack, so that the effect of responding to the adjustment operation is achieved.
Description
Technical Field
The present invention relates to the field of application technologies, and in particular, to a window display form adjustment method and an electronic device.
Background
The Activity component is a container of application pages of the application program, that is, the application pages are all composed of the Activity component. And popup window pages can be popped up in the application pages, and the electronic equipment prompts the user for messages by popping up popup window pages on the screen. The popup pages are typically carried by a Dialog component, i.e., the Dialog component is the container of the popup page. The dialogs in the above scenario are implemented in dependence on the Activity component, and the dialogs may also be implemented in non-dependence on the Activity component, for example, a popup window page popped up by a service, where the dialogs in the scenario are not in dependence on any Activity component.
The application of multi-window application technology of Android (Android) system is becoming wider and wider, and Freeform (free) window mode is a typical multi-window application technology. In the Freeform mode, free zooming and free movement of the window can be realized, and in the Freeform mode, a popup window page can also be popped up. However, the Freeform mode implements an inherent drawback of the framework, resulting in a number of problems with the operation of the popup page.
For example, in Freeform mode, both the application page and the popup page are displayed in windowed form, and the system automatically adds to both the application window (the window of the application page) and the popup window (the window of the popup page) for supporting a toolbar to adjust the window. However, although a popup window is added to support a toolbar that adjusts the window display form, the dialogs component lacks the specific implementation of the Activity component with respect to the window display form modification. Thus, in Freeform mode, if the user operates the toolbar of the popup window, the electronic device cannot present the user with the intended window adjustment results.
Disclosure of Invention
The application provides a window display form adjusting method and electronic equipment, and if a popup window does not have specific implementation for changing the window display form, the window display form can be adjusted in response to adjustment operation of a user.
In a first aspect, some embodiments of the present application provide an electronic device, including:
a display configured to display a pop-up window;
a controller configured to:
receiving adjustment operation of a user on a popup window displayed on the display;
if the popup window cannot respond to the adjustment operation, searching a task stack to which a Dialog component bearing the popup window belongs;
and adjusting component parameters of at least one Activity component in the task stack in response to the adjustment operation, so as to correspondingly adjust window display parameters of an application window, and adjusting the display form of the application window according to the adjusted window display parameters, wherein the application window is a window borne by the Activity component.
In a second aspect, some embodiments of the present application provide a window display form adjustment method, including:
receiving adjustment operation of a user on a popup window displayed on a display;
If the popup window cannot respond to the adjustment operation, searching a task stack to which a Dialog component bearing the popup window belongs;
and adjusting component parameters of at least one Activity component in the task stack in response to the adjustment operation, so as to correspondingly adjust window display parameters of an application window, and adjusting the display form of the application window according to the adjusted window display parameters, wherein the application window is a window borne by the Activity component.
As can be seen from the above technical solutions, the method for adjusting a window display form and the electronic device provided in the above embodiments, the method includes: and receiving an adjustment operation of a user for the popup window, and if the popup window cannot respond to the adjustment operation, searching a task stack to which a Dialog component carrying the popup window belongs. After a task stack to which a Dialog component bearing the popup window belongs is found, component parameters of at least one Activity component contained in the found task stack are adjusted in response to an adjustment operation, so that window display parameters of an application window borne by the Activity component are correspondingly adjusted, and a display form of the application window is adjusted according to the adjusted window display parameters. Therefore, even if the popup window cannot respond to the adjustment operation, the Activity assembly contained in the task stack and the display form of the application window borne by the Activity assembly can be adjusted according to the searched task stack, so that the effect of responding to the adjustment operation is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an operation scenario between an electronic device and a control device provided in an embodiment of the present application;
fig. 2 is a hardware configuration block diagram of the control device 100 provided in the embodiment of the present application;
fig. 3 is a hardware configuration block diagram of an electronic device 200 provided in an embodiment of the present application;
fig. 4 is a software configuration diagram of an electronic device 200 according to an embodiment of the present application;
fig. 5 is a schematic view of a window level of an Android system in a Freeform mode according to an embodiment of the present application;
fig. 6 is a schematic diagram of a user interface of an electronic device according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a user interface of another electronic device according to an embodiment of the present application;
fig. 8 is a flowchart illustrating a method for adjusting a window display form performed by the electronic device 200 according to the embodiment of the present application;
FIG. 9 is a flowchart of a method for searching a task stack to which a Dialog component carrying a popup window belongs according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a data channel between an Activity component and a Dialog component according to an embodiment of the present application;
FIG. 11 is a flowchart of another method for searching a task stack to which a Dialog component carrying a popup window belongs according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a user interface of another electronic device according to an embodiment of the present application;
fig. 13 is a flow chart of a method for creating a correspondence between a component identifier and a task stack identifier according to an embodiment of the present application;
FIG. 14 is a schematic diagram of a task stack and Activity component relationship provided in an embodiment of the present application;
FIG. 15 is a schematic view of a user interface of another electronic device according to an embodiment of the present disclosure;
FIG. 16 is a schematic diagram of a user interface of another electronic device according to an embodiment of the present application;
FIG. 17 is a schematic diagram of a user interface of another electronic device according to an embodiment of the present application;
FIG. 18 is a schematic diagram of a correspondence between an Activity component and an application window provided in an embodiment of the present application;
FIG. 19 is a schematic diagram of a user interface of another electronic device according to an embodiment of the present application;
FIG. 20 is a schematic diagram of a user interface of another electronic device according to an embodiment of the present application;
FIG. 21 is a schematic diagram of a correspondence between an Activity component and an application window according to an embodiment of the present disclosure;
FIG. 22 is a schematic diagram of a user interface of another electronic device according to an embodiment of the present application;
fig. 23 is a schematic diagram of an application flow of a window display form adjustment method provided in an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the exemplary embodiments of the present application will be clearly and completely described below in connection with the exemplary embodiments of the present application and the corresponding drawings. It will be apparent that the exemplary embodiments described are only some, but not all, of the embodiments of the present application.
It should be noted that the brief description of the terms in the present application is only for convenience of understanding the embodiments described below, and is not intended to limit the embodiments of some examples of the present application. Unless otherwise indicated, these terms should be construed in their ordinary and customary meaning.
The terms "first," second, "" third and the like in the description and in the claims and in the above-described figures are used for distinguishing between similar or similar objects or entities and not necessarily for limiting a particular order or sequence, unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to all elements explicitly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
Fig. 1 and 2 are specific embodiments of an electronic device of the present application. In the embodiment of the application, the electronic device may be a terminal device with a display, such as a television, a mobile phone, a tablet computer, and the like, and capable of being provided with an Android system.
Fig. 1 is a schematic diagram of an operation scenario between an electronic device and a control device in an exemplary embodiment of the present application. As shown in fig. 1, a user may operate the electronic device 200 through the smart device 300 and the control device 100.
In some embodiments, the control device 100 may be a remote controller, and the communication between the remote controller and the electronic device includes infrared protocol communication or bluetooth protocol communication, and other short-range communication modes, and the electronic device 200 is controlled by a wireless or wired mode. The user may control the electronic device 200 by inputting user instructions through keys on a remote control, voice input, control panel input, etc.
In some embodiments, the smart device 300 (e.g., mobile terminal, tablet, computer, notebook, etc.) may also be used to control the electronic device 200. For example, the electronic device 200 is controlled using an application running on a smart device.
In some embodiments, the electronic device may not receive instructions using the smart device or control device described above, but rather receive control of the user by touch or gesture, or the like.
In some embodiments, the electronic device 200 may further perform control in a manner other than the control apparatus 100 and the smart device 300, for example, the module configured inside the electronic device 200 for obtaining the voice command may directly receive the voice command control of the user, or the voice command control of the user may also be received through a voice control device set outside the electronic device 200.
In some embodiments, the electronic device 200 is also in data communication with a server 400. Electronic device 200 may be permitted to communicate over a Local Area Network (LAN), a Wireless Local Area Network (WLAN), and other networks. The server 400 may provide various content and interactions to the electronic device 200. The server 400 may be a cluster, or may be multiple clusters, and may include one or more types of servers.
Fig. 2 exemplarily shows a hardware configuration block diagram of the control apparatus 100 in accordance with an exemplary embodiment. As shown in fig. 2, the control device 100 includes a controller 110, a communication interface 130, a user input/output interface 140, a memory, and a power supply. The control device 100 may receive an input operation instruction from a user, and convert the operation instruction into an instruction that the electronic apparatus 200 can recognize and respond to, so as to perform an interaction between the user and the electronic apparatus 200. As shown in fig. 3, the electronic apparatus 200 includes at least one of a modem 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface.
In some embodiments the controller includes a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, a first interface for input/output to an nth interface. The display 260 includes a display screen component for presenting a picture, and a driving component for driving an image display, a component for receiving an image signal from the controller output, displaying video content, image content, and a menu manipulation interface, and a user manipulation UI interface. The display 260 may be a liquid crystal display, an OLED display, a projection device, or a projection screen.
The communicator 220 is a component for communicating with external devices or servers according to various communication protocol types. For example: the communicator may include at least one of a Wifi module, a bluetooth module, a wired ethernet module, or other network communication protocol chip or a near field communication protocol chip, and an infrared receiver. The display device 200 may establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.
A user interface, which may be used to receive control signals from the control device 100 (e.g., an infrared remote control, etc.).
The detector 230 is used to collect signals of the external environment or interaction with the outside. For example, detector 230 includes a light receiver, a sensor for capturing the intensity of ambient light; alternatively, the detector 230 includes an image collector such as a camera, which may be used to collect external environmental scenes, user attributes, or user interaction gestures, or alternatively, the detector 230 includes a sound collector such as a microphone, or the like, which is used to receive external sounds.
The external device interface 240 may include, but is not limited to, the following: high Definition Multimedia Interface (HDMI), analog or data high definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, etc. The input/output interface may be a composite input/output interface formed by a plurality of interfaces.
The modem 210 receives broadcast television signals through a wired or wireless reception manner, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.
In some embodiments, the controller 250 and the modem 210 may be located in separate devices, i.e., the modem 210 may also be located in an external device to the main device in which the controller 250 is located, such as an external set-top box or the like.
The controller 250 controls the operation of the display device and responds to the user's operations through various software control programs stored on the memory. The controller 250 controls the overall operation of the display apparatus 200. For example: in response to receiving a user command to select a UI object to be displayed on the display 260, the controller 250 may perform an operation related to the object selected by the user command.
In some embodiments, the controller includes at least one of a central processing unit (Central Processing Unit, CPU), a video processor, an audio processor, a graphics processor (Graphics Processing Unit, GPU), RAM (Random AccessMemory, RAM), ROM (Read-Only Memory, ROM), a first interface to an nth interface for input/output, a communication Bus (Bus), and the like.
The user may input a user command through a Graphical User Interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the Graphical User Interface (GUI). Alternatively, the user may input the user command by inputting a specific sound or gesture, and the user input interface recognizes the sound or gesture through the sensor to receive the user input command.
A "user interface" is a media interface for interaction and exchange of information between an application or operating system and a user, which enables conversion between an internal form of information and a user-acceptable form. A commonly used presentation form of the user interface is a graphical user interface (Graphic User Interface, GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It may be an interface element such as an icon, a window, a control, etc. displayed in a display screen of the electronic device, where the control may include a visual interface element such as an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc.
As shown in fig. 4, the system of the electronic device is divided into three layers, namely an application layer, a middleware layer and a hardware layer from top to bottom.
The application layer mainly comprises common applications, and an application framework (Application Framework), wherein the common applications are mainly applications developed based on Browser, such as: HTML5 APPs; and Native applications (Native APPs).
The application framework (Application Framework) is a complete program model with all the basic functions required by standard application software, such as: file access, data exchange, and the interface for the use of these functions (toolbar, status column, menu, dialog box).
Native applications (Native APPs) may support online or offline, message pushing, or local resource access.
The middleware layer includes middleware such as various multimedia protocols and system components. The middleware can use basic services (functions) provided by the system software to connect various parts of the application system or different applications on the network, so that the purposes of resource sharing and function sharing can be achieved.
The hardware layer mainly comprises a HAL interface, hardware and a driver, wherein the HAL interface is a unified interface for the butt joint of main chips of all electronic equipment, and specific logic is realized by each chip. The driving mainly comprises: audio drive, display drive, bluetooth drive, camera drive, WIFI drive, USB drive, HDMI drive, sensor drive (e.g., fingerprint sensor, temperature sensor, pressure sensor, etc.), and power supply drive, etc. The power amplifier device is mainly a device that can be connected to the electronic device 200, so that the audio output is not limited to the sound built in the electronic device 200, and the audio is amplified and output. In general, the power amplifier device may be an audio device, etc., and the embodiment of the present application does not limit a specific type of the power amplifier device. The audio is played by using the power amplifier, so that the high requirement of a user on audio tone quality playing can be met.
The Activity component is one of four components provided by the Android system, the Activity component is a carrier of an interface in the application program, namely, the Activity component is a container of an application page of the application program, and the application page is formed by realizing the Activity component. When a user clicks an application icon from the desktop, the application will launch and display the application page carried by the main Activity component. When the application program is operated, the display of a plurality of application pages can be completed by calling a plurality of Activity components.
For example, using a mail application, a main interface entering the mail application needs to start an Activity component for carrying and displaying the main interface; when filling in the new mail content, a new Activity component is required to be started and used for bearing and displaying a mail filling content interface; when the jumping contact list is used for inserting the recipient information, a new Activity component is required to be started and used for bearing and displaying a contact list interface.
Popup window pages can also be popped up in the application pages, and the electronic device 200 prompts a message to a user by popping up popup window pages on a screen. The popup page is carried by a Dialog component, i.e., the Dialog component is the container of the popup page. In the scenario, the dialogs are implemented in dependence on the Activity component.
Freeform mode is a typical type of multi-window application technology, in which free scaling and free movement of windows can be achieved, and in which popup window pages can also be popped up. However, the Freeform mode implements an inherent drawback of the framework, resulting in a number of problems with the operation of the popup page. In Freeform mode, both the application page and the popup page are displayed in windowed form.
In the window level diagram of the Android system in the Freeform mode shown in fig. 5, the bearing components of the application page and the popup page are an Activity component and a Dialog component, respectively. In fig. 5, each Activity component holds a Window object, but Window is an abstract class, so the Android system provides a unique implementation class Phonewindow for Window. That is, the Window instance in the Activity component is a PhoneWindow object. The PhonewIndow object inherits from the Window class and can draw windows specifically through the class.
The PhoneWindow object also includes a DecorView instance, which is the root View of all application windows (Activity interfaces). The PhoneWindow object wraps a DecorView instance as the root View for the application window and provides a set of generic window operation interfaces. Based on the DecoreView instance, a Title View instance, a content View instance, an mView instance, etc. may also be added to the Activity component.
ViewRootImpl is a tie of WMS (Window manager service) and DecoreView connections, which can be used to handle View events and logic, measure, layout and draw various View instances.
In Freeform mode, the system automatically adds a toolbar in the DecorView layer, wherein the toolbar supports the operation of receiving a user and performs corresponding adjustment operation on a window where the toolbar is located. This toolbar is named DecoreCaptisView (illustrative example), which will be added to the uppermost part of DecoreView by default. In Freeform mode, the Dialog component and the Activity component belong to a hierarchy of components, so that the Activity component and the Dialog component each have independent DecoreView.
In a user interface schematic diagram of the electronic device 200 shown in fig. 6, a scenario of popup window carried by a Dialog component in an application window carried by an Activity component is shown. When a new Dialog component is created, the system creates a new DecorView that belongs to the Dailog component and adds a new DecorCaptionView to the DecorView. Thus, two toolbars (both the application window and the popup window have toolbars) appear in the current interface, one of which belongs to the Activity component and one of which belongs to the Dialog component.
The toolbar shown in fig. 6 includes a maximize button, a minimize button, and a close button. If the user performs an adjustment operation for the maximize button in the window, the currently operated window may be maximally displayed in response to the adjustment operation for the maximize button. If the user performs an adjustment operation for the minimize button in the window, the currently operated window may be minimized to be displayed in response to the adjustment operation for the minimize button. If the user performs an adjustment operation for a close button in the window, the window currently being operated may be closed in response to the adjustment operation for the close button. If the user performs a drag operation on the window, the position of the currently operated window in the interface may be changed in response to the drag operation.
It should be noted that, the adjustment operation performed for each button may be an operation performed by controlling the electronic device 200 through the intelligent device or the control device; or an operation performed by touching each button on the user interface of the electronic device 200; operations performed by electronic device 200 may also be performed using gestures or voice. Therefore, the manner in which the adjustment operation for each button is implemented is not limited in the embodiments of the present application.
If the user adjusts the maximizing button of the application window carried by the Activity component, the logic actually executed by the system is as follows: the method comprises the steps of obtaining a clientController object of an Activity component, transmitting a Token object of the Activity component to a toggle function of an AMS (Activity manager service) through the clientController object, identifying the Activity component according to the Token object of the Activity component by the AMS, and maximizing the Activity component by utilizing the toggle function, namely maximizing an application window borne by the Activity component.
However, if the user performs the adjustment operation on the maximizing button of the popup window carried by the Dialog component, the Dialog component does not have a clientController object in the Dialog component, the Token object of the Activity component cannot be transferred to the toggle function of the AMS through the clientController object, and the AMS cannot identify the Dialog component, so that the maximization of the Dialog component cannot be achieved by using the toggle function, and the maximization of the popup window carried by the Dialog component cannot be achieved.
In a user interface schematic diagram in the electronic device 200 shown in fig. 7, a scenario in which a Dialog component is popped up in one service component is shown. A service component is an application component that can perform long-running operations in the background without a user interface. The service component may be launched by other application components, which once launched will run in the background. Even if the component for starting the service component is destroyed, the operation of the service component is not affected. In this scenario, there is no clientController object in the dialogs component, the Token object of the Activity component cannot be transferred to the toggle function of the AMS by the clientController object, and the AMS cannot identify the dialogs component, so that the maximization of the dialogs component cannot be achieved by the toggle function, and the maximization of the popup window carried by the dialogs component cannot be achieved.
In view of the above, some embodiments of the present application provide a window display form adjustment method applied to an electronic device 200. In order to facilitate understanding of the technical solutions in some embodiments of the present application, the following details of each step are described with reference to some specific embodiments and the accompanying drawings. Fig. 8 is a flowchart illustrating a method for adjusting a window display form performed by the electronic device 200 according to some embodiments of the present application. As shown in fig. 8, the controller 250 in some embodiments of the present application is configured to perform the following steps S100-S400, which are specifically described as follows:
step S100: and receiving adjustment operation of a user on the popup window displayed on the display.
The application program needs to be started first on the display, and the application window and the popup window are windows for displaying the content of the application program. It should be noted that, the application of the embodiment of the present application is that the application program to be started is displayed in the manner of a Freeform window. The starting of the application program may be that after the electronic device 200 receives a starting instruction of the application program, it is determined whether the application program to be started currently is displayed in the Freeform window mode. And if the application program to be started currently is judged to be displayed in the Freeform window mode, executing the steps of the window display form adjustment method. If it is determined that the application program to be started is not displayed in the Freeform window mode, the steps of the window display form adjustment method in the embodiment of the application are not executed.
The starting instruction of the application program can be sent out by clicking or double clicking the application program, the electronic device 200 is provided with a multi-window user scene, and the operating system is an Android system.
The Freeform window mode is a multi-window mode introduced by an Android system, free scaling and free movement of the Freeform window can be realized under the Freeform window, and the Freeform window comprises the characteristics of complete Activity, window, focus, input and other Activity windows. In addition, the Freeform window can be displayed on another application after opening, closing and other operations are performed by the user. In the Android system, the Freeform window is different from the normal Activity window in that the Freeform window is positioned in task stacks (stacks) of different AMSs, and the different stacks are used for realizing the function operation of display and scheduling.
After receiving a starting instruction of an application program, starting the application program, and simultaneously creating an Activity component according to the starting instruction, so that an Activity window can be opened on an interface. The specific creation step of the Activity window is that a setContentView is called from onCreate to set a main view, and the main view DecorView (the root view of the current Activity) is created, and addView is added into a view list. And then judging the LayoutParams (layout parameters) width and height attributes of the DecoreView.
The wide-high attribute is used for representing the size of the Activity window, the LayoutParams attribute is an object of the window attribute, and the Android system draws windows with different sizes by using the LayoutParams object. The LayoutParams have x (abscissa) and y (ordinate) variables representing the position of the View display, and the width and height of LayoutParams represent the size of the View display. The Activity component may further include two different wide-high attributes, including layoutparameters_part and layoutparameters_content, respectively representing an automatic full-screen display and an adaptive interface size, where the automatic full-screen display displays the application interface full-screen according to a resolution size of the device, and the adaptive size displays according to a width-height size defined by the view. If a specific width and height are not defined, the size is self-adaptive according to factors such as a background diagram of the View.
The application of the embodiment of the application to the Activity component defines a scene of wide-high-size display, namely, the Activity window is not automatically displayed in full screen and the self-adaptive interface size, but is displayed in a user interface in the defined wide-high-size, for example, in the display form of an application window as shown in fig. 6.
The popup page is carried by a Dialog component, i.e., the Dialog component is the container of the popup page. In the scenario, the dialogs are implemented in dependence on the Activity component. For example, in the user interface in fig. 9, an application window carried by the Activity component is displayed, where the application window is a window of the application program a. When the user clicks the button for exiting the application program A, a Dialog box for confirming whether to exit is popped up on the basis of the application window, and the Dialog box is a popup page borne by a Dialog component. The dialogs component attaches to the current Activity component.
In fig. 6, a toolbar is added above the application window and the popup window, and the toolbar specifically includes a maximize button, a minimize button and a close button. If the user clicks a button in the toolbar, an adjustment operation for the application window or the popup window is input to the electronic device 200. For example, if the user clicks the maximize button of the application window, a maximize operation for the application window is input to the electronic device 200, and if the user clicks the close button of the application window, a close operation for the application window is input to the electronic device 200. If the user clicks the maximize button of the popup window, a maximize operation for the popup window is input to the electronic device 200. The maximizing operation refers to adjusting the window to occupy the whole screen, the minimizing operation refers to hiding the window, and the closing operation refers to closing the window.
Step S200: and if the popup window cannot respond to the adjustment operation, searching a task stack to which a Dialog component bearing the popup window belongs.
If the user clicks the maximize button in the toolbar above the application window, a maximizing operation for the application window is input to the electronic device 200, and since the Activity component carrying the application window has execution logic for implementing the maximizing operation, the electronic device 200 can respond to the maximizing operation and correspondingly adjust the application window to be displayed in the maximum size. However, if the user clicks the maximize button in the toolbar above the popup window, then a maximize operation for the popup window is entered into the electronic device 200, and the electronic device 200 cannot respond to the maximize operation because the dialogs component carrying the popup window does not have execution logic to implement the maximize operation, and therefore cannot adjust the popup window to maximize display.
The popup window functions as a window for making a decision (cancellation, determination) or for inputting information (e.g., payment code), so that the popup window cannot be displayed in a maximum manner in practical applications. At the same time, the popup window is used for prompting a user, and the user needs to close the popup window to perform other operations, so that the popup window cannot be displayed in a minimized manner. Thus if the user clicks on the maximize button and the minimize button of the pop-up window, the pop-up window cannot respond to the corresponding maximize and minimize operations. However, if the user clicks on a close button of the popup window or drags the popup window, the popup window may respond to the corresponding close operation and drag operation.
That is, if the adjustment operation is a closing operation or a dragging operation, the popup window can respond to the adjustment operation, and the display form of the popup window can be directly adjusted without searching the task stack to which the Dialog component carrying the popup window belongs. If the adjustment operation is the maximizing operation or the minimizing operation, the popup window cannot respond to the adjustment operation, and then the step of searching the task stack to which the Dialog component carrying the popup window belongs is needed.
When executing the task stack to which the Dialog component of the bearing popup window belongs, the electronic device 200 includes two cases:
the first case is that the Dialog component is a component created based on the Activity component of the application, i.e. the popup window is a window popup on the basis of the application window. As shown in the flowchart of fig. 9, searching the task stack to which the Dialog component carrying the popup window belongs may include the following steps:
step S201: acquiring a Token of the Activity component by using a data channel between the Dialog component and the Activity component, wherein the data channel is a channel created when the Dialog component is created in the Activity component;
step S202: and searching a task stack to which the Dialog component belongs according to the token of the Activity component.
The Activity component actually executes the maximizing operation logic to obtain a clientController object of the Activity component, the Token object of the Activity component is transmitted to a toggle function of an AMS through the clientController object, the AMS identifies the Activity component according to the Token object of the Activity component, and then the maximization of the Activity component is realized by utilizing the toggle function, namely, the maximization operation of an application window borne by the Activity component is realized. Because the current popup window is a popup window based on the application window, a Dialog component bearing the popup window is attached to a corresponding Activity component, and since the Token of the Dialog component cannot be acquired, the Token of the Activity component can be acquired through the association relationship between the Dialog component and the Activity component. And then searching a task stack to which the Activity belongs by using the Token of the Activity component, namely searching the task stack to which the dialogs component belongs.
It should be noted that, when creating a Dialog component, the construction method must be Context (Context variable) of the Activity type. If the construction method is not the Context of the Activity type, the Token of the Activity component cannot be obtained, which eventually results in authentication failure in the AMS. In the embodiment of the application, the loading and obtaining of the resource can be obtained by transferring the Context, for example, the Token of the Activity component is obtained, and the Context is equivalent to the encapsulation of the resource and the method.
A system interface gettargetactactactioncontrol may be added on the Context for the parent class of the Activity component. The Activity component initializes its own clientController when creating, records the clientController in a variable when initializing the clientController, and implements the gettargetactactioncontroller method to obtain the variable. The opportunity to record a clientController is after the Activity component is initialized and before a new Dialog component is created.
When creating a dialogcomponent in the Activity component, a Context needs to be transferred to the dialogcomponent, and then a system interface getTargetActityController added on the Context is utilized to inquire whether the Context is empty, if so, the dialogcomponent is not created by the corresponding Activity component (in this case, the dialogcomponent may be created by other Activity components or by a Service component). If the query Context is not null with the getTargetActivityController, i.e., the query to the Context includes a variable with a recorded clientController, then it is stated that the Dialog component is created by the corresponding Activity.
After inquiring that the Context includes the variable recorded with the clientController, the clientController information corresponding to the Activity component is transferred to Window belonging to the current dialogs through the interface function setdialogTargetActivController. Therefore, when the DecorView of the dialogcomponent cannot acquire the corresponding clientController, the corresponding clientController of the Activity component to which the dialogcomponent belongs can be acquired through the getTargetActivityController and the setDialTargetActivityController methods. After the clientController of the Activity component is obtained, the clientController can transfer the Token of the Activity component to the toggle function of the AMS.
As shown in the schematic diagram of FIG. 10, in the embodiment of the present application, the data channel between the Dialog component and the Activity component is actually a getTargetActivController interface added to the Context of the Activity component, for querying the client controllers in the Context, and then transmitting the client controllers to the DecorView of the Dialog component through the setDialTargetActivController function. The Token of the Activity component is acquired by using the channel, namely, the Token of the Activity component is transmitted to the Dialog component. And finally, searching a task stack to which the Activity belongs according to the Token of the Activity component, namely searching the task stack in which the dialogs component is located.
The Token is a static internal class of the Activity component, is created by the AMS for the newly started Activity component, and is a Binder (communication mechanism) with a Token representing the Activity, that is, the Token is a unique identifier created by the AMS for the Activity component, and the Activity component can be identified by the Token of the Activity component. The Activity component is displayed through a window, and the WMS (windows manager service) is responsible for managing all windows in the current system. The Activity component is managed in the AMS in the form of a task stack. In WMS, the data structure and AMS data result are in one-to-one correspondence, and Token is used as the unique identification of the Activity component and can be used as the basis of window grouping. Therefore, the Token can be utilized to find the corresponding window information, wherein the window information comprises the task stack where the Activity component is located.
The second case is that the Dialog component is a component created based on a service component, i.e. the popup window is not a window that pops up on any application window basis. As shown in the flowchart of fig. 11, searching the task stack to which the Dialog component carrying the popup window belongs may include the following steps:
step S301: acquiring a component identifier of the dialogs component;
Step S302: and searching a task stack corresponding to the component identifier from the corresponding relation between the component identifier and the task stack identifier of the task stack according to the component identifier, wherein the corresponding relation is generated when the dialogs component is created.
If the Dialog component carrying the current popup window is not created on the basis of an Activity component, that is, the current Dialog component is not attached to any Activity component. The current Dialog component may be created on the basis of a service component. For the application programs of the Android system, only one application program is usually allowed to be in an active state due to the limitation of hardware resources, a user interface is presented, information is interacted with a user, and other application programs are all in an inactive state. In practical applications, however, there are applications such as music players that may not display a user interface, but that may also run for a long period of time.
The music player can still continue to be used when the play interface of the music player is exited and other applications of the system are used. To meet this application requirement, the Android system provides a service component. The music playing function is realized in the service component, so that the music player can always run in the background. If the popup window is in this case, the dialogs component bearing the popup window is not attached to any Activity component, so that the task stack to which the dialogs component belongs cannot be searched by acquiring the Token of the Activity component according to the first case. In the user interface shown in fig. 12, the music player is operated in the background, and a popup window related to the music player is popped up, and is used for prompting the user that the current song is a pay song, so that the popup window cannot respond to the maximizing operation and the minimizing operation (even if the popup window is provided with the maximizing button and the minimizing button).
In this case, a correspondence between the component identifier of the Dialog component and the task stack identifier of the task stack to which the Dialog component belongs needs to be acquired, and then the task stack to which the Dialog component belongs can be found.
In the flowchart shown in fig. 13, the process of creating the correspondence between the component identifier and the task stack identifier includes:
step S2011: by using an interface of adding the getTargetActivityController on the Context, when the content contained in the Context is queried and a Dialog component is created in the service component, the clientController of the Activity component is not found.
Step S2012: when the clientController is not found, a markup parameter setting function setTargetDialog and a markup parameter acquiring function getTargetDialog may be added to the Context class and the Window class at the same time, and unique identification information (component identification) of the dialogs is recorded to the markup parameter setting function setTargetDialog and the markup parameter acquiring function getTargetDialog at the same time.
Step S2013: after the creation of the Dialog component, WMS will add the window corresponding to the Dialog component to the screen, and when the system creates a window object, the Dialog component type can be checked by the getTargetDialog method first. If the run getTargetDialog method has a value, it is thus determined that the type of the current Dialog component is the Dialog type created by the service component (the component identification of the Dialog has been recorded in the getTargetDialog in step S2012, that is, the scene of the Dialog component created by the service component of interest to the present application). If the run getTargetDialog method has a value, then the operation of recording the component identification of the Dialog in the getTargetDialog is possible and performed in step S2012, which may not be the scene of the Dialog component created by the service component of interest to the present application.
Step S2014: when the WMS creates the window of the Dialog component, the information of the task stack of the window needs to be recorded, so that the information of the task stack of the window, namely the information of the task stack of the current Dialog component, can be queried by using a standard interface, and the task stack identification of the task stack of the current Dialog component and the window type of the task stack are recorded specifically.
Step S2015: if the window type of the task stack is Freeform type, the component identification of the current Dialog component and the task stack identification of the task stack are transferred to the database by using the setTargetDialog function. And creating a corresponding relation between the component identifier and the task stack identifier in the database, and storing the corresponding relation in the database.
For example, taking the component identifier of the Dialog component as a memory address as an example, the getTargetDialog function is used to obtain the task stack identifier 105 of the task stack where the component identifier of the current Dialog component is 0×10102 and the windows suo of the Dialog component is located. Thus, the correspondence between component identifications and task stack identifications can be recorded as 0×10102:105. in the embodiment of the present application, a plurality of correspondence connection records may be recorded, for example, 0×10102:105,0 ×10322:133. therefore, in this scenario, the task stack to which the current Dialog component belongs may be obtained by using the correspondence between the component identifier and the task stack identifier.
In practical application, when receiving an adjustment operation of a user for a popup window, if a client controller corresponding to a Dialog component carrying a current popup window cannot be obtained, a getTargetdialog interface may be used to obtain a component identifier of the current Dialog component. And then generating query broadcast carrying the component identifier according TO the component identifier, for example, the broadcast name is hmct.intent.RECTORER_TO_FULL, and the carried parameter is the unique identification information of the current dialogcomponent: 0 x 10102.
Then a new independent system service is realized TO accept the above-mentioned RECOVER_TO_FULL broadcast, after the system service receives the broadcast, according TO the identification information: 0×10102, searching a database for a correspondence relation containing the identification information: 0 x 10102:105. from the correspondence 0×10102:105, the dialogs component attaches to the task stack identified as 105.
Step S300: and adjusting component parameters of at least one Activity component in the task stack in response to the adjustment operation, so as to correspondingly adjust window display parameters of an application window, wherein the application window is carried by the Activity component.
Step S400: and adjusting the display form of the application window according to the adjusted window display parameters.
In the AMS service of the system process, a Task stack (Task) exists, where the Task stack is a set of a series of activetyrecord (class at AMS end, records a started Activity component), and the activetyrecord can be mapped to a "really started Activity component" in the application process through a Token. The AMS service may simultaneously create a plurality of task stacks, which respectively manage different Activity components. One task stack may include only all the Activity components corresponding to the same application program, or one task stack may include Activity components corresponding to different application programs, that is, different Activity components of one application program may be dispersed in different task stacks. For example, the payment software may be invoked in the chat software, and then the Activity component of the payment software and the Activity of the chat software may be located in the same task stack in order to complete the same item.
In fig. 14, a plurality of task stacks are shown, wherein the task stack 101 is a task stack corresponding to chat software, the task stack 102 is a task stack corresponding to a desktop, and the task stack 103 is a task stack corresponding to shopping software. The task stack corresponding to the application program which is usually in the foreground is located at the forefront of all task stacks. Therefore, the embodiment of the application can also determine whether the dialogs carrying the current popup window belong to the task stack at the forefront by determining whether the current popup window belongs to the foreground application program. The popup window may also not belong to a foreground application, for example, a popup window popped up by a program running in the background, in which case the Diaolg component carrying the current popup window does not belong to the task stack located at the forefront. It is necessary to determine the task stack to which the Diaolg component carrying the current popup window belongs according to the method of the present application.
Based on the method for determining the task stack, after determining the task stack to which the Dialog component bearing the current popup window belongs, the task stack may include one Activity component or multiple Activity components.
If the determined task stack comprises an Activity component, the current task is indicated to only comprise an application window, so that component parameters of the Activity component in the task stack only need to be adjusted, and correspondingly, window display parameters of only one application window need to be adjusted. It is also only necessary to adjust the display form of one application window.
For example, as shown in the user interface shown in fig. 15, an application interface of shopping software is displayed, and only one application window, that is, a homepage window of the shopping software is opened in the scene, where the task stack includes only one Activity component. In FIG. 15, a popup window is also popped up in the home page window of the purchase software, which is used to prompt the user for related shopping activities. After the method in the above embodiment responds to the maximizing operation on the popup window, only the window display parameters of the homepage window need to be adjusted, the homepage window is maximally displayed, and the popup window is still displayed on the homepage window, and the adjusted user interface is shown in fig. 16.
If the determined task stack comprises a plurality of Activity components and the Activity components belong to the same application program, the current task is indicated to comprise a plurality of application windows, so that the component parameters of all the Activity components in the task stack need to be adjusted, and the corresponding window display parameters of all the application windows need to be adjusted, and the display forms of all the application windows also need to be adjusted.
For example, as shown in the user interface shown in fig. 17, a commodity introduction interface for shopping software is displayed, in which a homepage window (window 3, window 3 is in a hidden state) and a plurality of commodity introduction windows (window 1 and window 2, wherein window 1 and window 2 are in a display state) of the shopping software are opened, and at this time, the task stack includes a plurality of Activity components: activity1, activity2, activity3, these Activity components are used for bearing homepage window and commodity introduction window, activity component and application window correspondence are as shown in FIG. 18 respectively. After the method in the above embodiment responds to the maximizing operation on the popup window, window display parameters of all application windows need to be adjusted, the application windows are maximally displayed, the popup window is still displayed on the application window, and the adjusted user interface is shown in fig. 19 (although only window 1 is in a display state, in fact, window 1, window 2 and window 3 are maximally adjusted).
If the determined task stack comprises a plurality of Activity components, the Activity components belong to different application programs. At this time, component parameters of all the Activity components in the task stack still need to be adjusted, and correspondingly window display parameters of all the application windows need to be adjusted, and display forms of all the application windows also need to be adjusted.
For example, the user interface shown in fig. 20 is a payment interface (window 1, window 1 is in a display state), and a homepage window (window 3, window 3 is in a hidden state) and a commodity introduction window (window 2, window 2 is in a display state) of the shopping software are also opened in the scene, that is, the scene of calling the payment software when the shopping software runs. At this time, the task stack includes a plurality of Activity components: activity1, activity2, and Activity4, which are used to carry a homepage window, a commodity introduction window, and a payment window, respectively, and the correspondence between the Activity components and the application window is shown in FIG. 21. After the method in the above embodiment responds to the maximizing operation on the popup window, window display parameters of all application windows need to be adjusted, the application windows are maximized and displayed, and the popup window is still displayed on the payment window, and the adjusted user interface is shown in fig. 22 (although only window 1 is in a display state, in fact, window 1, window 2 and window 3 are all maximized).
In some embodiments, the window display parameters include a window size parameter for adjusting a window size of the application window and a window type parameter including at least a floating window and a full screen window. After adjusting the component parameters of the Activity component according to the adjustment operation, correspondingly adjusting the window size parameters of the application window, namely correspondingly adjusting the display form of the application window. For example, when the adjustment operation is the maximizing operation, the current window size of the application window may be adjusted to the size of the full screen display of the application window according to the size of the screen in response to the maximizing operation, and the application window may implement the maximizing display. Here, in response to the maximizing operation, the current window size of the application window may also be adjusted to a preset size instead of the size of the full screen display. For example, the maximized window size is preset such that the window width is smaller than the window width size at full screen display and the window height is equal to the window height size at full screen display. Thus, even in response to the maximizing operation, the application window can display the size according to the preset size, and the requirement of personalized window display can be met.
In some embodiments, if the adjustment operation is a maximize operation and the current application window is not a maximize display, then the window type parameter of the application window also needs to be adjusted from a floating window to a full screen window when adjusting the window size of the application window. In the Android system, the display priority of the application window of the floating window type is higher than that of the application window of the full-screen window type, so that the floating window can be kept to be displayed at the uppermost layer. Therefore, if the application window is adjusted from non-full screen display to full screen display, the floating window type needs to be changed to full screen window type, so that the system logic error can be avoided.
If the adjustment operation is a minimizing operation and the current application window is not a minimizing display, i.e. the current application window is a full screen display, if the application window is adjusted from a full screen display to a non-full screen display in response to the minimizing operation, the full screen window type needs to be changed to a floating window type, so that a system logic error can be avoided as well.
Based on the window display form adjustment method described in the foregoing embodiment, as shown in the flowchart of fig. 23, the following is a specific application flow of the window display form adjustment method provided in the embodiment of the present application, where the flow specifically includes:
step S3010: when the Android system is in the Freeform mode, receiving adjustment operation for a popup window;
step S3011: judging whether a clientController object exists, and if so, performing step S3012;
step S3012: if the clientController object exists, the component bearing the popup window is actually an Activity component, the clientController object can be directly utilized to transfer Token, the Token is utilized to call a Token function in the AMS to modify parameters of a task stack to which the Activity component belongs, and then step S3021 is performed;
Step S3013: if the clientController object does not exist, searching the clientController object of the Activity component of the Dialog by using the getTargetActivController function, if the clientController object of the Activity component of the Dialog exists, performing step S3014, and if the clientController object of the Activity component of the Dialog does not exist, performing step S3015;
step S3014: if a client controller object of the Activity component to which the Dialog component belongs exists, judging that the Dialog component belongs to the Activity component, transmitting a client controller of the Activity component to a decorView of the Dialog component through a setDialTargetActivController function, transmitting a Token by using the client controller object, and modifying parameters of a task stack to which the Activity component belongs by using the Token to call a Token function in the AMS, and then performing step S3021;
step S3015: if there is no client controller object of the Activity component to which the Dialog component belongs, inquiring whether the interface getTargetDialog has a value, if so, performing step S3017 (if so, it indicates that the getTargetDialog records the component identification of the Dialog component), and if not, performing step S3016 (if not, it indicates that the getTargetDialog does not record the component identification of the Dialog component);
Step S3016: taking other application scenes into consideration, modifying parameters of the task stack, and then performing step S3021;
step S3017: generating a query broadcast carrying the component identifier according to the component identifier of the dialogs;
step S3018: the system service monitors the inquiry broadcast;
step S3019: searching a task stack identifier with a corresponding relation with the component identifier in a database according to the component identifier carried by the query broadcast, and determining a task stack to which the dialogs component belongs according to the task stack identifier;
step S3020: carrying out parameter modification on a task stack where the dialogs component is located by utilizing an AMS interface, and then carrying out step S3021;
step S3021: and adjusting the window display form according to the task stack after the parameters are modified.
The same and similar parts of the embodiments in this specification are referred to each other, and are not described herein.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied essentially or in parts contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the embodiments or parts of the embodiments of the present invention.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
The foregoing description, for purposes of explanation, has been presented in conjunction with specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the embodiments to the precise forms disclosed above. Many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles and the practical application, to thereby enable others skilled in the art to best utilize the embodiments and various embodiments with various modifications as are suited to the particular use contemplated.
Claims (10)
1. An electronic device, the electronic device comprising:
A display configured to display a pop-up window;
a controller configured to:
receiving adjustment operation of a user on a popup window displayed on the display;
if the popup window cannot respond to the adjustment operation, searching a task stack to which a Dialog component bearing the popup window belongs;
responding to the adjustment operation, adjusting component parameters of at least one Activity component in the task stack so as to correspondingly adjust window display parameters of an application window, wherein the application window is a window borne by the Activity component;
and adjusting the display form of the application window according to the adjusted window display parameters.
2. The electronic device of claim 1, wherein if the Dialog component belongs to at least one of the Activity components included in the task stack, the controller is configured to, in looking up the task stack to which the Dialog component carrying the pop-up window belongs:
acquiring a Token of the Activity component by using a data channel between the Dialog component and the Activity component, wherein the data channel is a channel created when the Dialog component is created in the Activity component;
And searching a task stack to which the Dialog component belongs according to the token of the Activity component.
3. The electronic device of claim 2, wherein the controller, utilizing a data channel between the Dialog component and the Activity component, obtains a Token for the Activity component, configured to:
acquiring a clientController of the Activity component by using a getTargetActivityController interface;
transmitting the clientController of the Activity component to the dialogcomponent through a setdialogTargetActivController interface;
and acquiring the token of the Activity component by using the clientController of the Activity component.
4. The electronic device of claim 1, wherein if the Dialog component belongs to at least one service component, the controller is configured to, in looking up a task stack to which the Dialog component carrying the pop-up window belongs:
acquiring a component identifier of the dialogs component;
and searching a task stack corresponding to the component identifier from the corresponding relation between the component identifier and the task stack identifier of the task stack according to the component identifier, wherein the corresponding relation is generated when the dialogs component is created.
5. The electronic device of claim 4, wherein the correspondence is stored in a database, and wherein the controller, upon locating the correspondence, is configured to:
generating a query broadcast carrying the component identifier according to the component identifier;
and searching the corresponding relation matched with the component identifier in the database according to the query broadcast.
6. The electronic device of claim 4, wherein the controller is configured to generate a correspondence between component identifications and task stack identifications:
determining a task stack identifier of the task stack to which the window belongs according to the window to which the Dialog component belongs;
acquiring a component identification of the dialogs component by using a getTargetdialog interface;
and generating a corresponding relation between the task stack identifier and the component identifier according to the task stack identifier and the component identifier.
7. The electronic device of claim 1, wherein the window display parameters include a window size parameter and a window type parameter, wherein the window size parameter is used to adjust a window size of the application window, and the window type parameter includes at least a hover window and a full screen window.
8. The electronic device of claim 7, wherein the adjustment operation comprises at least a maximize operation, a minimize operation, and a drag operation.
9. The electronic device of claim 8, wherein the controller, when adjusting the window display parameter, is configured to:
if the adjustment operation is a maximization operation, adjusting the window type of the application window from a floating window to a full-screen window while adjusting the window size of the application window;
if the adjustment operation is a minimizing operation, adjusting the window type of the application window from a full-screen window to a floating window while adjusting the window size of the application window;
and if the adjustment operation is a dragging operation, not adjusting the window type of the application window while adjusting the window size of the application window.
10. A window display form adjustment method, which is applied to an electronic device, the window display form adjustment method comprising:
receiving adjustment operation of a user on a popup window displayed on a display;
if the popup window cannot respond to the adjustment operation, searching a task stack to which a Dialog component bearing the popup window belongs;
And adjusting component parameters of at least one Activity component in the task stack in response to the adjustment operation, so as to correspondingly adjust window display parameters of an application window, and adjusting the display form of the application window according to the adjusted window display parameters, wherein the application window is a window borne by the Activity component.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310604736.9A CN117608711A (en) | 2023-05-25 | 2023-05-25 | Window display form adjusting method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310604736.9A CN117608711A (en) | 2023-05-25 | 2023-05-25 | Window display form adjusting method and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117608711A true CN117608711A (en) | 2024-02-27 |
Family
ID=89943019
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310604736.9A Pending CN117608711A (en) | 2023-05-25 | 2023-05-25 | Window display form adjusting method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117608711A (en) |
-
2023
- 2023-05-25 CN CN202310604736.9A patent/CN117608711A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114302194B (en) | Display device and playing method during multi-device switching | |
CN112905210B (en) | Server and gray level publishing method | |
CN113038160B (en) | Display device and audio/video data playing method | |
CN113810746B (en) | Display equipment and picture sharing method | |
CN113507646B (en) | Display equipment and browser multi-label page media resource playing method | |
CN113784200B (en) | Communication terminal, display device and screen projection connection method | |
CN113395556A (en) | Display device and method for displaying detail page | |
CN112165641A (en) | Display device | |
CN112203154A (en) | Display device | |
CN112597110B (en) | Display equipment and file display method | |
WO2024174732A1 (en) | Display device and speech control method | |
CN117608711A (en) | Window display form adjusting method and electronic equipment | |
CN112584210B (en) | Display device, video recording method and recorded file display method | |
CN112911359B (en) | Resource display method, display equipment and remote controller | |
CN114915810B (en) | Media resource pushing method and intelligent terminal | |
CN112749033B (en) | Display device and system notification calling method | |
CN112416214B (en) | Display equipment | |
CN114866636B (en) | Message display method, terminal equipment, intelligent equipment and server | |
CN114915818B (en) | Media resource pushing method and intelligent terminal | |
CN113766164B (en) | Display equipment and signal source interface display method | |
CN115396717B (en) | Display device and display image quality adjusting method | |
CN113076042B (en) | Local media resource access method and display device | |
CN115412751B (en) | Display equipment and visual menu control method | |
CN113593613B (en) | Automatic registration and de-registration method for recording disk | |
CN113784198B (en) | Display device, intelligent device and program recording control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |