Text dragging method and related device
By using a timer in an electronic device to determine the intention of the user's long press and display the drag box, the problem of cumbersome content delivery operations is solved and the user experience is improved.
Patent Information
- Application Number
- CN202311148544.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-06
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2043-09-06
AI Technical Summary
In the prior art, the operation of transferring content between different applications is more cumbersome, which reduces the user's experience of using electronic devices.
By introducing a timer mechanism into the electronic device, we can judge the true intention of the user's long press operation. When it is determined that the drag intention is, a drag box containing the target text content is displayed, prompting the user that the copy has been completed and can drag and drop.
Reduce the number of operations to copy target text content and improve the user's experience of electronic devices.
Smart Images

Figure CN119620906A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a text dragging method and related devices. Background Art
[0002] With the development of terminal technology, electronic devices provide a copy and paste function for content in applications. In a possible implementation, a user can copy content in an application on an electronic device and paste the copied content into another application, thereby realizing the transfer and processing of content between different applications.
[0003] However, the operation of transferring content between different applications is rather cumbersome, which may reduce the user experience of using electronic devices. Summary of the invention
[0004] The embodiment of the present application provides a text dragging method, which is applied to the field of terminal technology. Through a timer whose timing duration is longer than the system long press duration of the native system of the electronic device, the real intention of the user's long press operation is judged. When it is judged that the user's operation intention of long pressing the target text content is to drag, the electronic device displays a drag box containing the target text content, so as to prompt the user that the copying of the target text content is completed and can be dragged when the user keeps long pressing, thereby reducing the number of operations for copying the target text content and improving the user's experience of using the electronic device.
[0005] In a first aspect, an embodiment of the present application provides a text dragging method, the method comprising:
[0006] The electronic device displays the first interface of the first application, the first interface includes a first view, and the first view includes a first text content. In response to the first touch operation on the first text content, the electronic device starts a first timer and a second timer, the timing duration of the first timer is the first duration, the timing duration of the second timer is the second duration, and the second duration is the sum of the first duration and the delay duration. In the case where the first touch operation is kept long pressed, in response to the first timer reaching the first duration, the electronic device displays a first pop-up window around the first text content, and the first pop-up window includes one or more controls. In the case where the first touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device displays a drag box, and the drag box includes the first text content.
[0007] In this way, the second duration can be used to determine whether the user intention corresponding to the first touch operation is a drag intention. When the first touch operation is kept long pressed, if the second timer reaches the second duration, it can be determined that the user intention corresponding to the first touch operation is a drag intention, and the electronic device can display a drag box containing the first text content, so as to prompt the user that the copying of the first text content has been completed and can be dragged when the first touch operation is not lifted or moved, which can reduce the number of operations for copying the first text content, thereby improving the user's experience of using the electronic device. The second duration is the sum of the first duration and the delay duration, and can also achieve compatibility between the display logic of the drag box and the display logic of the pop-up window.
[0008] In a possible implementation, before the electronic device displays the drag box, the method further includes: when the second timer reaches the second duration, the electronic device queries that the electronic device displays the first pop-up window in response to the first touch operation. The electronic device starts a third timer, and the timing duration of the third timer is the third duration. The third duration is greater than or equal to the delay duration. When the third timer reaches the third duration, the electronic device processes the first text content to obtain the drag box.
[0009] Exemplarily, the electronic device may include a content recognition filling framework. Before the electronic device displays the drag box, the method further includes: when the second timer reaches the second duration, the content recognition filling framework queries whether the electronic device displays the first pop-up window. When the content recognition filling framework queries that the electronic device displays the first pop-up window, the content recognition filling framework may start a third timer. When the third timer reaches the third duration, the content recognition filling framework processes the first text content to obtain the drag box.
[0010] The electronic device displays a pop-up window, and the user intention corresponding to the first touch operation may be the intention to operate the pop-up window, or it may be the intention to drag. Therefore, when judging that the electronic device displays a pop-up window in response to the first touch operation, the third timer and the third duration can be used to further accurately judge whether the user intention corresponding to the first touch operation is the intention to drag. If the first touch operation is not moved or lifted when the third timer reaches the third duration, it means that the user intention corresponding to the first touch operation is the intention to drag, and the electronic device obtains a drag box to display the drag box to prompt the user to drag.
[0011] In a possible implementation, in response to a first touch operation on the first text content, the method further includes: in response to a down event of the first touch operation on the first view, the electronic device determines whether the view name of the first view is in a preset list. The preset list includes one or more view names of views that support system dragging. When the electronic device determines that the view name of the first view is in the preset list, the electronic device stores the first text content in a memory.
[0012] Exemplarily, when the first view obtains a down event corresponding to the first touch operation, the first view transmits the view name and the first text content of the first view to the content recognition and filling framework of the electronic device. The content recognition and filling framework determines whether the view name of the first view is in the preset list. When the content recognition and filling framework determines that the view name of the first view is in the preset list, the content recognition and filling framework stores the first text content of the first view in the memory.
[0013] In this way, when the format of the first view is the textview format, the first view actively reports the view name and the first text content of the first view, so that when it is subsequently determined that the user intention corresponding to the first touch operation is a drag intention, the first text content is quickly used to create a drag box. The textview format can represent an implementation method that inherits the native text view of Android.
[0014] In a possible implementation, when the third timer reaches the third duration, the electronic device processes the first text content to obtain a drag box, including: when the third timer reaches the third duration, the electronic device determines whether the first text content exists in the memory. When the electronic device determines that the first text content exists in the memory, the electronic device uses preset configuration parameters and the first text content to create a drag box. The preset configuration parameters include the length and width of the drag box, the position of the touch position on the drag box, the shadow format of the drag box, the shadow color of the drag box, and the rounded corners of the drag box.
[0015] Exemplarily, when the third timer reaches the third duration, the content recognition and filling framework of the electronic device determines whether the first text content exists in the memory. When the content recognition and filling framework determines that the first text content exists in the memory, the content recognition and filling framework uses the preset configuration parameters and the first text content to create a drag box.
[0016] In this way, the creation of the drag box is achieved, so that the drag box contains the first text content.
[0017] In a possible implementation, when the third timer reaches the third duration, the electronic device processes the first text content to obtain a drag box, including: when the third timer reaches the third duration, the electronic device determines whether the first text content exists in the memory. When the electronic device determines that the first text content does not exist in the memory, the electronic device searches for the view corresponding to the down event of the first touch operation from the root layout of the page to which the first text content belongs, and obtains the view name of the first view. The root layout includes a storage level of the first view. The electronic device determines whether the view name of the first view is in a preset list, and the preset list includes one or more view names of views that support system dragging. When the electronic device determines that the view name of the first view is in the preset list, the electronic device obtains the first text content of the first view. The electronic device uses the preset configuration parameters and the first text content to create a drag box. The preset configuration parameters include the length and width of the drag box, the position of the touch position on the drag box, the shadow format of the drag box, the shadow color of the drag box, and the rounded corners of the drag box.
[0018] Exemplarily, the electronic device also includes a view framework. When the third timer reaches the third duration, the electronic device processes the first text content to obtain a drag box, including: when the third timer reaches the third duration, the content recognition filling framework determines whether the first text content exists in the memory. When the content recognition filling framework determines that the first text content does not exist in the memory, the content recognition filling framework searches for the view corresponding to the down event of the first touch operation from the root layout of the page to which the first text content belongs, and obtains the view name of the first view. The content recognition filling framework determines whether the view name of the first view is in the preset list. When the content recognition filling framework determines that the view name of the first view is in the preset list, the content recognition filling framework calls the view framework to obtain the first text content of the first view. The content recognition filling framework uses the preset configuration parameters and the first text content to create a drag box.
[0019] In this way, when the format of the first view is not the textview format but other view formats, the first view cannot actively report the view name and the first text content of the first view, and the electronic device cannot obtain the view name and the first text content of the first view from the memory, it is possible to traverse the root layout to find the control corresponding to the touch position of the down event of the first touch operation and call the view framework to obtain the first text content of the found control, that is, the target control.
[0020] In a possible implementation, the method further includes: the electronic device obtains a new list. The electronic device determines whether the new list is a list that updates the preset list. When the electronic device determines that the new list is a white list that updates the preset list, the electronic device updates the preset list to the new list.
[0021] In this way, the electronic device can obtain a new list from the server or other devices to update the preset list on the electronic device.
[0022] In a possible implementation, the method further includes: in response to the first touch operation moving to the first area of the display screen of the electronic device, the electronic device pulls up the second application and displays the window of the second application in the second area of the display screen. The window of the second application includes one or more icons, each icon corresponding to a service that can receive the first text content. The first touch operation moves to the position of a target icon in the one or more icons, and in response to the first touch operation being lifted, the second application delivers the first text content to the service corresponding to the target icon.
[0023] In this way, the second application is pulled up during the movement of the first touch operation, and one or more icons are included in the window of the second application to facilitate the user to select the target business. The target business corresponds to the target icon. The first touch operation moves to the position of the target icon in one or more icons, and in response to the lifting of the first touch operation, the second application transmits the first text content to the business corresponding to the target icon, realizing the convenient and fast transmission of the first text content between the first application and the target business, reducing the operation steps for the user to start the target business, and can improve the user experience.
[0024] In one possible implementation, when the first touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device displays a drag box, and after the drag box includes the first text content, it also includes: in response to the first touch operation moving to the first area of the display screen of the electronic device, the electronic device pulls up the second application and displays the window of the second application in the second area of the display screen. The window of the second application includes one or more icons, each icon corresponding to a service that can receive the first text content. The first touch operation moves to the third area of the display screen, and the drag box moves to the third area with the first touch operation. In response to the first touch operation being lifted, the electronic device controls the drag box to return to the position where the dragging started. The third area does not include the second area.
[0025] In this way, the second application is pulled up during the movement of the first touch operation, and one or more icons are included in the window of the second application to facilitate the user to select the target business. The target business corresponds to the target icon. In the scenario where the first touch operation is lifted without moving to the second area, in response to the lifting of the first touch operation, the electronic device controls the drag box to return to the position where the dragging started, realizing the view experience of drag cancellation, which can improve the user experience.
[0026] In a possible implementation, the second area is a sidebar on the right side of the display screen. In this way, the second area is a sidebar on the right side of the display screen, which leaves a display space for the window of the first application to be viewed and searched by the user, and also facilitates the user to drag the drag box and select the target icon, thereby improving the user experience.
[0027] In a possible implementation, the method further includes: the electronic device displays a second interface of a third application, the second interface includes a second view, and the second view includes a second text content. In response to a second touch operation on the second text content, the electronic device starts a first timer and a second timer. When the second touch operation is kept long pressed, in response to the first timer reaching a first duration, the electronic device displays a second pop-up window around the second text content, and the second pop-up window includes one or more controls. When the second timer does not reach the second duration, in response to the second touch operation moving, the electronic device turns off the second timer.
[0028] In this way, if the second timer does not reach the second duration, the second touch operation moves, which can indicate that the user intention corresponding to the second touch operation is not a drag intention. When it is determined that the user intention is not a drag intention, the electronic device turns off the second timer, which can terminate the subsequent drag process and reduce the power consumption of invalid dragging.
[0029] In a possible implementation, the method further includes: the electronic device displays a third interface of a fourth application, the third interface includes a third view, and the third view includes a third text content. In response to a third touch operation on the third text content, the electronic device sets and starts a first timer and a second timer. When the third touch operation is kept long pressed, in response to the first timer reaching the first duration, the electronic device displays a third pop-up window around the third text content, and the third pop-up window includes one or more controls. When the second timer does not reach the second duration, in response to the third touch operation being lifted, the electronic device turns off the second timer.
[0030] In this way, if the second timer does not reach the second duration, the third touch operation is lifted, which can indicate that the user intention corresponding to the third touch operation is not a drag intention. When it is determined that the user intention is not a drag intention, the electronic device turns off the second timer, which can terminate the subsequent drag process and reduce the power consumption of invalid dragging.
[0031] In a possible implementation, the method further includes: the electronic device displays a fourth interface of a fifth application, the fourth interface includes a fourth view, and the fourth view includes a fourth text content. In response to a fourth touch operation on the fourth text content, the electronic device starts a first timer and a second timer. In the case where the fourth touch operation is kept long pressed, in response to the first timer reaching the first duration, the electronic device displays a fourth pop-up window around the fourth text content, and the fourth pop-up window includes one or more controls. In the case where the fourth touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device queries that the electronic device displays a fourth pop-up window in response to the fourth touch operation, and the electronic device starts a third timer, and the timing duration of the third timer is the third duration. The third duration is greater than or equal to the delay duration. In the case where the third timer does not reach the third duration, in response to the fourth touch operation moving, the electronic device turns off the third timer.
[0032] In this way, if the third timer does not reach the third duration, the fourth touch operation moves, which can indicate that the user intention corresponding to the fourth touch operation is not a drag intention. When it is determined that the user intention is not a drag intention, the electronic device turns off the second timer, which can terminate the subsequent drag process and reduce the power consumption of invalid dragging.
[0033] In a possible implementation, the method also includes: the electronic device displays a fifth interface of a sixth application, the fifth interface includes a fifth view, and the fifth view includes a fifth text content. In response to the fifth touch operation on the fifth text content, the electronic device starts the first timer and the second timer. In the case where the fifth touch operation is kept long pressed, in response to the first timer reaching the first duration, the electronic device displays a fifth pop-up window around the fifth text content, and the fifth pop-up window includes one or more controls. In the case where the fifth touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device queries that the electronic device displays the fifth pop-up window in response to the fifth touch operation, and the electronic device starts a third timer, and the timing duration of the third timer is the third duration. The third duration is greater than or equal to the delay duration. In the case where the third timer does not reach the third duration, in response to the fifth touch operation being lifted, the electronic device turns off the third timer.
[0034] In this way, when the third timer does not reach the third duration, the fifth touch operation is lifted, which can indicate that the user intention corresponding to the fifth touch operation is not a drag intention. When it is determined that the user intention is not a drag intention, the electronic device turns off the second timer, which can terminate the subsequent drag process and reduce the power consumption of invalid dragging.
[0035] In a second aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor and a memory. The memory stores computer-executable instructions. The processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method of the first aspect.
[0036] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method of the first aspect is implemented.
[0037] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the method of the first aspect.
[0038] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute the method of the first aspect.
[0039] It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application;
[0041] Figure 2 A software structure block diagram of the electronic device 100 provided in an embodiment of the present application;
[0042] Figure 3 A text dragging scene diagram provided for an embodiment of the present application;
[0043] Figure 4 A module interaction flow chart provided for an embodiment of the present application;
[0044] Figure 5 A flowchart of module interaction in a scenario where a finger moves before the second timer times out provided in an embodiment of the present application;
[0045] Figure 6 A flowchart of module interaction in a scenario where a finger is lifted before the second timer times out provided in an embodiment of the present application;
[0046] Figure 7 A scene graph of a new window popping up around a target control provided in an embodiment of the present application;
[0047] Figure 8 A flowchart of module interaction in a finger movement scenario after calling the drag framework interface provided by an embodiment of the present application;
[0048] Fig. 9 A module interaction flow chart for a scenario in which a finger is lifted after calling an interface of a drag frame provided in an embodiment of the present application;
[0049] Fig.10 Another module interaction flow chart in a scenario where a finger is lifted after calling the drag frame interface provided in an embodiment of the present application;
[0050] Fig.11 Another module interaction flow chart provided for an embodiment of the present application;
[0051] Fig.12 A scene diagram of a finger being lifted after calling an interface of a drag frame provided in an embodiment of the present application;
[0052] Fig.13 A schematic diagram of the process of saving and updating the whitelist provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:
[0054] 1. Electronic equipment
[0055] The electronic device of the embodiment of the present application may include a handheld device, a vehicle-mounted device, etc. with an image processing function. For example, some electronic devices are: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (PLANs), and wireless terminals in smart cities. The embodiments of the present application do not limit this.
[0056] As an example but not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as hearing aids, glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.
[0057] In addition, in the embodiments of the present application, the electronic device may also be an electronic device in an Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network that interconnects people and machines and things.
[0058] The electronic devices in the embodiments of the present application may also be referred to as: user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.
[0059] In an embodiment of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system, or Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
[0060] 2. Touch events
[0061] A touch event refers to an event generated by an electronic device when a finger touches the display screen of the electronic device. A touch event includes a touch type, a touch position, and a sampling point. Touch types include down, move, and up. The touch position may be the coordinates of the point where the finger contacts the display screen. The sampling point may represent the timestamp of the touch operation. A touch event includes a down event, a move event, or a lift event. If the touch type of a touch event is down, the touch event may be referred to as a down event. If the touch type of a touch event is move, the touch event may be referred to as a move event. If the touch type of a touch event is up, the touch event may be referred to as a lift event.
[0062] It is understandable that the display screen of the electronic device may be a touch screen.
[0063] 3. Falling events
[0064] A drop event is an event generated by an electronic device when a finger touches the display screen of the electronic device for the first time. A drop event includes a touch type down, a touch position, and a sampling point. The sampling point of a drop event can be the time point when the finger first touches the display screen.
[0065] 4. Mobile events
[0066] A move event is an event generated when a finger touches the display screen of an electronic device and the finger does not leave the display screen, and the electronic device collects the touch position at a fixed sampling frequency. A move event includes the touch type move, the touch position, and the sampling point. When the finger does not leave the display screen, the electronic device generates and transmits a move event each time it collects the touch position at a fixed sampling frequency.
[0067] It is understandable that after a finger touches the display screen for the first time, the finger presses the display screen for a long time, or the finger moves on the display screen, the electronic device will continue to generate and transmit movement events at a fixed sampling frequency.
[0068] Exemplarily, the event processing framework of the electronic device can generate a drop event and a move event in the process of a finger long pressing the display screen, and each time an event is generated, an event is passed to the module that needs the event. When receiving the move event, the module that needs the event can determine whether the operation of the finger on the display screen is a long press operation or a move operation based on the first threshold and the distance between the touch position of the move event and the touch position of the drop event. The distance between the touch position of the move event and the touch position of the drop event can be called an offset. Exemplarily, if the offset does not exceed the first threshold, the electronic device can determine that the operation of the finger on the display screen is a long press operation. If the offset exceeds the first threshold, the electronic device can determine that the operation of the finger on the display screen is a move operation.
[0069] 5. Raise the event
[0070] A lift event refers to an event generated by an electronic device when a finger is lifted from the display screen of an electronic device, that is, when the finger leaves the display screen. A lift event includes a touch type up, a touch position, and a sampling point. The sampling point of a lift event can be the first sampling point where the electronic device does not capture the touch position after the finger is lifted. The touch position in a lift event can be the touch position of the last move event before the finger is lifted. The touch position in a lift event can represent the finger lift position.
[0071] 6. Some terms
[0072] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, 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.
[0073] It should be noted that in the embodiments of the present 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 the present 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.
[0074] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: 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 represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.
[0075] It should be noted that the "at..." in the embodiment of the present application can be the instant when a certain situation occurs, or a period of time after a certain situation occurs, and the embodiment of the present application does not specifically limit this. In addition, the display interface provided in the embodiment of the present application is only an example, and the display interface can also include more or less content.
[0076] In order to better understand the embodiments of the present application, Figure 1 and Figure 2 The structure of the electronic device in the embodiment of the present application is introduced:
[0077] Figure 1 A schematic structural diagram of an electronic device 100 is shown.
[0078] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0079] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0080] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0081] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0082] 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.
[0083] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0084] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.
[0085] Figure 2 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0086] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime and system library, the hardware abstraction layer, and the Linux kernel layer.
[0087] The application layer can include a series of application packages.
[0088] like Figure 2 As shown, the application package may include social, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0089] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0090] like Figure 2 As shown, the application framework layer may include a window management framework, a content-aware fill framework, a view framework, a drag framework, a resource manager, a notification manager, an event processing framework, and the like.
[0091] The window management framework can be used to manage window programs. The window management framework can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0092] The content recognition filling framework is a newly added module in the embodiment of the present application, which can be used to obtain the content of the control and use the content to create a drag box so that the drag frame controls the drag box to move with the movement of the finger, thereby realizing the dragging of the content of the control.
[0093] The view framework may include visual controls, such as text controls for displaying text, image controls for displaying images, etc. The view framework can be used to build applications. The display interface may be composed of one or more views. Both text controls and image controls belong to views. The display interface may also be composed of one or more controls. For example, the display interface presented on the chat page of the WeChat application may include multiple text controls and multiple image controls.
[0094] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0095] The drag frame can be used to monitor the change of the touch position in the window management framework, and control the movement of the drag frame as the touch position changes.
[0096] The event processing framework is used to obtain the original input event corresponding to the touch operation from the kernel layer (including touch coordinates, timestamp of the touch operation and other information), and identify the control corresponding to the input event.
[0097] 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.
[0098] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0099] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0100] 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.
[0101] The system library may include multiple functional modules, such as surface manager, multimedia library, graphics rendering library (such as OpenGL ES), relational database, etc.
[0102] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0103] The multimedia library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0104] The graphics rendering library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0105] Relational databases are used to store preset data.
[0106] The hardware abstraction layer may include an audio abstraction interface, a Bluetooth abstraction interface, etc.
[0107] The Linux kernel layer is the layer between hardware and software. The kernel layer can contain display drivers, camera drivers, Bluetooth drivers, audio drivers, USB drivers, wifi1q drivers, etc.
[0108] The following is an example of the workflow of the software and hardware of the electronic device 100 in conjunction with the social application activation scenario.
[0109] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is a control of a social application icon, the social application calls the interface of the application framework layer to start the social application.
[0110] Some electronic devices provide a copy and paste function for content in applications. In a possible implementation, content in one application can be transferred to another application in the following manner:
[0111] S1. A user clicks on a display screen of an electronic device to open an application on the electronic device, such as application A.
[0112] S2. The electronic device displays a display interface of application A in response to a click operation by the user. The display interface of application A may include at least one control.
[0113] S3. The user long presses a control in the display interface of application A, such as control a.
[0114] S4. In response to the long press operation of the user, the electronic device displays a first pop-up box, where the first pop-up box includes a copy control.
[0115] S5. The user can click the copy control in the first pop-up box to copy the text content of control a.
[0116] S6. The user clicks or slides the display screen to switch application A to the background, or exits application A.
[0117] S7. The user clicks the display screen of the electronic device to open another application on the electronic device, such as application B.
[0118] S8. The electronic device displays a display interface of application B in response to a click operation by the user. The display interface of application B may include an input text box and a confirmation control.
[0119] S9. The user long presses the input text box in the display interface of application B.
[0120] S9. In response to the long press operation of the user, the electronic device displays a second pop-up box, where the second pop-up box includes a paste control.
[0121] S10. The user may click the paste control in the second pop-up box.
[0122] S11. The electronic device pastes the text content of control a into the input text box in the display interface of application B in response to a click operation by the user.
[0123] S12: The user can click to confirm the control. In response to the click operation of the electronic device, the electronic device uses the text content of the control a to perform business processing.
[0124] In this way, the text content of control a is transferred and processed between different applications (such as application A and application B).
[0125] However, to copy the text content of control a, the user needs to long press control a and then click the copy control, that is, the user needs to perform two touch operations to copy the text content of control a, which is cumbersome and may reduce the user's experience of using the electronic device. Similarly, when transferring the copied text content, the user also needs to perform multiple touch operations to transfer the copied text content of control a in application A to application B.
[0126] In view of this, an embodiment of the present application provides a text dragging method, and the electronic device can determine whether the user's operation intention of long pressing the first text content of the first application is a dragging intention through a second duration. When the second duration determines that the user's long pressing operation intention is a dragging intention, the electronic device can display a drag box containing the first text content, so that when the user maintains the long press, the user is prompted that the copying of the first text content has been completed and can be dragged, thereby reducing the number of touch operations for copying the first text content, and can improve the user's experience of using the electronic device.
[0127] The first application may be any application on the electronic device. For example, the first application may be a WeChat application, a QQ application, a note application, a music application, or a map application.
[0128] The text dragging method provided by the present application is described below in conjunction with some embodiments.
[0129] For example, the first application is a WeChat application, and the target page of the first application is a chat page of the WeChat application. Figure 3 A text dragging scene diagram provided by an embodiment of the present application is shown.
[0130] The user can click on the display screen of the electronic device to open the target page of the first application. The electronic device can display Figure 3 The interface shown in a. Figure 3The interface shown in a in , the interface includes control 301, control 302, control 303, control 304, control 305, control 306, control 307, control 308, control 309, control 310, control 313 indicating return, the text "aaa", control 314 indicating more, control 315 indicating voice, input box 316, control 317 indicating expression, and control 318 indicating addition. Among them, control 301, control 303, control 305, control 307 and control 309 can all be picture controls. Picture controls can be controls that contain pictures. Controls 302, control 304, control 306, control 308 and control 310 can all be text controls. Text controls contain text content. Text content can include text and / or identifiable identifiers. Identifiable identifiers can be identifiers that represent expressions. For example Figure 3 As shown in a in FIG. 1 , controls 301, 303, 305, 307 and 309 may be WeChat avatars. Controls 302, 304, 306, 308 and 310 may be chat contents. The word "aaa" may represent a friend's nickname.
[0131] In such Figure 3 In the interface shown in a of FIG. 1 , the user can long press the control 310, and the electronic device can respond to the long press operation by displaying the following Figure 3 The interface shown in b in the figure. Figure 3 The interface shown in b in FIG. 1 may include a long press feedback 311. Figure 3 For other display contents of the interface shown in b, see Figure 3 The content of the interface shown in a in the figure is not repeated here. The long press feedback 311 can be displayed on the interface of the control 310 corresponding to the long press position.
[0132] It is understandable that when a user long presses the display screen of an electronic device, the electronic device will display long press feedback. The long press feedback can be visual feedback or tactile feedback. The visual feedback can be as follows: Figure 3 The long press feedback 311 shown in b in FIG. If the long press feedback is tactile feedback, the long press feedback is not visible.
[0133] In such Figure 3 In the interface shown in b in FIG. 1 , the user can keep touching the display screen with his finger and move the finger. The electronic device responds to the user's moving operation, and the electronic device cancels the display of the long press feedback 311. The electronic device can display the following Figure 3 The interface shown in c in Figure 1 is as follows. Figure 3The interface shown in c in FIG. 3 includes a drag box 312. The interface does not include a long press feedback 311. The location of the drag box 312 is consistent with the touch location of the finger. The drag box 312 includes the text "Address is: XXXX", a drag box shadow and a drag box rounded corner. Figure 3 For other display contents of the interface shown in c, see Figure 3 The content of the interface shown in a in FIG. 1 is not repeated here. The drag box 312 can be an electronic device in response to the user in Figure 3 The long press operation on the interface shown in b is generated based on the text content of the control 310 corresponding to the long press.
[0134] It is understood that a hotspot may be set on the display screen of an electronic device. Figure 3 The hot zone 31 shown in c is not visible. The hot zone can represent a preset area. When the user touches the hot zone, the second application can be pulled up. The second application can be used to provide an entry for the delivery of text content.
[0135] In such Figure 3 In the interface shown in c in FIG. 1 , the user can move the finger to make the drag box 312 move with the finger. When the finger moves to the hot zone 31 of the electronic device display screen, the electronic device can display the following Figure 3 The interface shown in d.
[0136] like Figure 3 The interface shown in d in the figure includes a drag box 312, a page window 30 of the first application, and a sidebar 32. The sidebar 32 includes an icon 321 of a QQ application, an icon 322 of a music application, an icon 323 of a note application, an icon 324 of a map application, an icon 325 of a send to WeChat status service, an icon 326 of a send to WeChat friends service, and an icon 327 of a video application. The drag box 312 is above the page window 30. The drag box 312 can be displayed on the interface above the page window 30. For the contents of the page window 30, see Figure 3 The contents of the interface shown in a are not repeated here.
[0137] The sidebar 32 may represent a window of the second application. The window of the second application includes a plurality of sub-service icons. The sub-service may be any application on the electronic device, or any service provided by the application. For example, the sub-service may be an application such as a QQ application, a WeChat application, a note application, a music application, or a map application, and the sub-service may also be a service provided by the WeChat application such as sending to WeChat status or a service provided by the WeChat application such as sending to WeChat friends.
[0138] The sub-service icons can be displayed in a flowing manner in the sidebar 32. The user can drag the drag box 312 to the top of the target sub-service icon, so that the target sub-service uses the text content of the drag box 312 for service processing.
[0139] For example, taking the target sub-business as a map application, Figure 3 In the interface shown in d in FIG. 1 , the user can move the finger to drag the drag box 312 to the top of the map application icon 324. The electronic device can display Figure 3 The interface shown in e. Figure 3 The contents of the interface shown in e can be found in Figure 3 The content of the interface shown in d. Figure 3 The interface shown in e is the same as Figure 3 The difference between the interface shown in d is that Figure 3 In the interface shown in FIG. 8 e , the drag box 312 is located above the icon 324 of the map application in the sidebar 32 .
[0140] exist Figure 3 In the interface shown in e, the user can lift his finger and the electronic device can display Figure 3 The interface shown in f. Figure 3 The interface shown in f in FIG. 3 includes an input box 341 of a map application, a cancel control 342, a control 343 indicating a voice, a control 344 indicating a return, the text "Address is: XXXX" in the input box 341, a map 345, a location identifier 346, a sharing control 347, a favorites control 348, a surrounding control 349, a taxi control 350, a navigation control 351, and a go here control 352. The location identifier 346 may indicate the location of the address information "Address is: XXXX" in the map 345.
[0141] The user drags the drag box 312 to the top of the map application icon 324, and when the user lifts the finger, the second application receives the lift event and the text content "Address is: XXXX" of the drag box 312. The second application recognizes that the icon corresponding to the touch position of the lift event is the icon of the map application, and the second application can determine that the target sub-service is the map application. The second application can pull up the map application and input the text content "Address is: XXXX" of the drag box 312 into the input box 341 of the map application, so that the electronic device displays Figure 3 f in the page so that users can Figure 3 Continue on the page indicated by f in the figure.
[0142] For example, taking the target sub-service as the WeChat application's send to WeChat friends service as an example, Figure 3In the interface shown in d in FIG. 1 , the user can move the finger to drag the drag box 312 to the top of the icon 326 of the send to WeChat friend service. The electronic device can display Figure 3 The interface shown in g. Figure 3 The interface shown in g includes a page window 30, a sidebar 32, a drag box 308, and a long press feedback 307. The sidebar 32 includes an icon 323 of a note application, an icon 324 of an image processing application, an icon 325 of a send to WeChat status service, an icon 326 of a send to WeChat friends service, an icon 327 of a video application, an icon 328 of a microblog application, and an icon 329 of an album application. Figure 3 In the interface shown in g, the drag box 312 is located above the icon 326 of the send to WeChat friend service in the sidebar 32.
[0143] exist Figure 3 In the interface shown in g, the user can lift his finger and the electronic device can display Figure 3 The interface shown in h. Figure 3 The interface shown in h in FIG. 1 includes a close control 361, text “Select a chat”, a multi-select control 362, a search box 363, a search control 364, text “Recently forwarded”, a friend A control 365, a friend B control 366, a friend C control 367, a friend D control 368, text “Recent chats”, a create chat control 369, a friend E control 370, a group chat A control 371, a group chat B control 372 and a friend F control 373.
[0144] The user drags the drag box 312 to the top of the icon 326 of the send to WeChat friends service. When the user lifts the finger, the second application receives the lift event and the text content of the drag box 312 "Address is: XXXX". The second application recognizes that the icon corresponding to the touch position of the lift event is the icon of the send to WeChat friends service. The second application determines that the target sub-service is the send to WeChat friends service. The second application pulls up the WeChat application and passes the text content of the drag box 312 to the send to WeChat friends service of the WeChat application, so that the electronic device displays Figure 3 h in the interface, so that users can Figure 3 Continue to operate on the interface shown in h. Figure 3 In the interface shown in h in FIG. 1 , the user can select a friend or a group chat by clicking a friend control or a group chat control. The content of the drag box 312 will be sent to the selected friend or group chat. Figure 3 Friend A control 365, friend B control 366, friend C control 367, friend D control 368, friend E control 370 or friend F control 373 in the interface shown in h. Group chat controls such as Figure 3The group chat A control 371 or the group chat B control 372 in the interface shown in h.
[0145] The text dragging method provided in this embodiment is that when the user long presses the target control (such as control 310), the electronic device copies the text content of the target control, and displays a drag box to prompt that the copying of the text content of the target control has been completed and can be dragged. When the drag box is dragged above the target sub-business icon and the user lifts it up, the second application transmits the text content of the target control to the target sub-business, so that the target sub-business can promptly use the text content of the target control for business processing. The overall operation is simple and convenient, which can improve the user experience of using the electronic device.
[0146] Combined with the above Figure 3 The dragging scenario shown illustrates a scenario in which the text content of the target control of the first application is dragged.
[0147] exist Figure 3 In the dragging scenario shown, the format of the text control in the first application may be a preset format or not. The preset format is, for example, a text view (textview) format. The format of the text control in the first application may be a textview format or other view formats. Other view formats are non-textview formats. The textview format may represent an implementation method that inherits the native text control of Android.
[0148] A text control in the textview format can actively report the text content in the text control. Text controls in other view formats cannot actively report the text content in the text control. The format of the text control can be set by the developer of the first application.
[0149] The following describes a text dragging method in a scenario where the text control of the first application can actively report text content and a text dragging method in a scenario where the text control of the first application cannot actively report text content.
[0150] For the scenario where the text control of the first application can actively report the text content, Figure 4 A module interaction flow chart provided in an embodiment of the present application is shown.
[0151] like Figure 4 As shown, the text dragging method provided in the embodiment of the present application includes:
[0152] S100: A user opens a first application interface.
[0153] Exemplarily, the user may click on the display screen of the electronic device to open the target page of the first application.
[0154] S101. An application (APP) loads the content of each view (view) in a target page into a view framework (view framework).
[0155] In this way, it is convenient to display each control and the content of each control in the target page. The target page displayed by the electronic device can be as follows Figure 3 The interface shown in a.
[0156] It is understandable that each time a user opens a page of the first application, the application loads the contents of each view in the page through the view framework. For example, when a user opens page A of the first application, the application loads the contents of each view in page A through the view framework. When the user switches page A of the first application to page B, the application loads the contents of each view in page B through the view framework.
[0157] S102: The view framework transmits the root layout of the target page to the content-aware filling framework.
[0158] Exemplarily, when the view framework obtains the content of each view in the target page, it can generate the root layout of the target page. The root layout can include DecorView. The view framework transfers the root layout to the content recognition filling framework.
[0159] It is understandable that every time a user opens a page, the view framework can pass the root layout of the page opened by the user to the content recognition filling framework.
[0160] The content-aware filling framework obtains the root layout of the target page so as to subsequently find the required text control from the root layout. It can be understood that the text control belongs to a view.
[0161] S103: The content recognition filling framework determines whether the application package name and / or page name of the target page is in the whitelist.
[0162] Exemplarily, the whitelist may include multiple application package names (package name) that support system drag, multiple page names (activity name) that support system drag, and multiple control names (view name) that support system drag. Optionally, the whitelist may also include the type of control corresponding to the control name. For example, the whitelist style may be as follows:
[0163]
[0164] Among them, com.XXX.uu is the application package name. com.XXX.mm is the application package name. com.XXX.uu.YYY is the page name. com.XXX.uu.ZZZ is the page name. com.XXX.mm.HHH is the page name. bbView is the control name. ddView is the control name. ccTextView is the control name. eeView is the control name. ffView is the control name. The control name can indicate the category (class) of the control in the page to which it belongs. type is the type. text in type="text" indicates the text type. image in type="image" indicates the image type.
[0165] Controls with different control names can have different or the same types. For example,<view name=“bbView”type=“text” / > It can indicate that the type of the control named bbView is a text type, or that the control named bbView is a text control.<view name=“ddView”type=“image” / > It can indicate that the type of the control named ddView is a picture type, or that the control named ddView is a picture control.<viewname=“ccTextView”type=“text” / > It can indicate that the type of the control named ccTextView is also a text type, or that the control named ccTextView is a text control.
[0166] The names of different controls can be the same or different. Figure 3 Take the page name of the interface shown in b as com.XXX.uu.ZZZ as an example. The control names of controls 301, 303, 305, 307 and 309 can all be ddView. The control names of controls 302, 304, 306, 308 and 310 can all be ccTextView.
[0167] The content-aware fill framework can determine whether the application package name and / or page name of the root layout is in the whitelist. For example, based on the application package name and / or page name of the root layout, the content-aware fill framework checks whether the application package name and / or page name is included in a pre-stored whitelist.
[0168] S104: The content recognition filling framework transmits the judgment result to the view framework.
[0169] Exemplarily, the judgment result may include a negative judgment result or a positive judgment result. A negative judgment result is, for example, false. A positive judgment result is, for example, true.
[0170] If the application package name and page name of the target page are not in the whitelist, the content-aware fill framework can transmit false to the view framework. In this way, after the view framework subsequently receives a drop event of touching the control of the first application, it is not necessary to pass the drop event to the content-aware fill framework to terminate the subsequent drag process. If the application package name and page name of the target page are not in the whitelist, it can be said that the first application does not support system drag. The fact that the first application does not support system drag can indicate that the first application is a protected application. When it is determined that the application package name and page name of the root layout are not in the whitelist, subsequent drag-related actions may not be performed to save power consumption of the electronic device caused by invalid dragging, and the protected first application will not be spread due to the user's random dragging.
[0171] If the application package name and / or page name of the target page is in the whitelist, the content-aware fill framework can transmit true to the view framework. In this way, after receiving the drop event of the control of the first application being touched, the view framework can transmit the drop event to the content-aware fill framework to continue the subsequent drag process.
[0172] S200: The event processing framework obtains a touch event of a target control being touched.
[0173] For example, the target control can be any text control in the target page. Figure 3 The control 310 in the interface shown in b in FIG. 3 is used as an example for explanation. The touch event of the target control being touched may include a drop event and a move event. For example, when the user presses the target control with a finger for a long time and does not lift the finger, the event processing framework may obtain a drop event and at least one move event in sequence.
[0174] S201: The event processing framework transmits a touch event to the window management framework.
[0175] Exemplarily, in response to a long press operation by the user, the event processing framework sequentially transmits a drop event and a move event to the window management framework.
[0176] It can be understood that as long as the finger is not lifted, the event processing framework will continue to transmit the movement event to the window management framework.
[0177] S202: The window management framework transmits the touch event to the view framework.
[0178] S203: If the view framework has received a positive result of the determination transmitted by the content-recognizing and filling framework, the view framework transmits the touch event to the content-recognizing and filling framework.
[0179] For example, if the view framework receives true transmitted by the content recognition filling framework in step S104, when the view framework receives a drop event, the view framework transmits the drop event to the content recognition transmission framework. When the view framework receives a move event, the view framework transmits the move event to the content recognition transmission framework.
[0180] Optionally, if the view framework receives false transmitted by the content recognition filling framework in step S104, when the view framework receives a drop event, the view framework does not transmit the drop event to the content recognition filling framework to terminate the subsequent drag process. When the view framework receives a move event, the view framework does not transmit the move event to the content recognition transmission framework either.
[0181] S204: The content recognition filling framework responds to the drop event and sets a second timer.
[0182] Exemplarily, the second timing duration of the second timer is the sum of the system long press duration of the electronic device and the first extended duration, that is, the second timing duration = system long press duration + first extended duration. The second timer may be a message processing class handler.
[0183] The system long press duration is a duration used in the native system of the electronic device to determine the long press intention. The system long press duration may be 400 milliseconds. The first extended duration may be 50 milliseconds.
[0184] The second timing duration is greater than the system long press duration. On the one hand, it can achieve compatibility between the text dragging method provided in the embodiment of the present application and the native system logic of the electronic device. On the other hand, it can be used to determine whether the user's long press intention is a drag intention, and can also be used to guide further judgment of the user's long press intention.
[0185] Exemplarily, if the user's long press duration reaches the system long press duration, a new window pops up at the long press position of the electronic device, then when the second timer reaches the second timing duration, the content recognition filling framework can execute steps S209-S213 to further determine whether the user's real intention of long pressing is to drag or to operate the new window.
[0186] If the user's long press duration reaches the system long press duration, and no new window pops up at the long press position of the electronic device, then when the second timer reaches the second timing duration, the content recognition fill framework can determine that the user's real intention of the long press is a drag intention. The content recognition fill framework does not need to further judge the user's long press intention and directly executes drag-related actions.
[0187] For example, after the second timer is set, there may be a scenario where the finger is long pressed, the finger is moved, or the finger is lifted, and the content recognition filling framework may receive a movement event or a lift event.
[0188] After the second timer is set and before the second timer exceeds the second timing duration, if the content recognition filling framework receives a move event, the content recognition filling framework can determine whether the distance between the touch position of the move event and the touch position of the drop event exceeds a second threshold. Optionally, the second threshold can be the same as or different from the first threshold.
[0189] If the distance between the touch position of the move event and the touch position of the drop event exceeds the second threshold, it may indicate that the user's operation is a move operation or a finger movement, or it may indicate that the user's operation intention is not a drag intention. The content recognition filling framework cancels the second timer to terminate subsequent drag-related actions.
[0190] If the distance between the touch position of the moving event and the touch position of the dropping event does not exceed the second threshold, it may indicate that the user's operation is a long press operation or a long press of a finger. It may also indicate that the user's operation intention may be a drag intention, or it may be an intention to make the electronic device pop up a new window. In this case, the content recognition filling frame will not be processed.
[0191] The module interaction flow chart in the finger movement scenario before the second timer exceeds the second timing duration is as follows Figure 5 For ease of understanding, Figure 5 The module interaction process shown is described later.
[0192] After the second timer is set and before the second timer exceeds the second timing duration, if the content recognition fill framework receives a lift event, it can indicate that the user's operation is a lift operation or finger lift, and it can also indicate that the user's operation intention is not a drag intention. In this case, the content recognition fill framework cancels the second timer to terminate the execution of subsequent drag-related steps. The process of the content recognition fill framework receiving a lift event is similar to the process of the content recognition fill framework receiving a drop event, and will not be repeated here.
[0193] The module interaction flow chart in the scenario where the finger is lifted before the second timer exceeds the second timing duration is as follows Figure 6 For ease of understanding, Figure 6 The module interaction process shown is described later.
[0194] When the second timer reaches the second timing duration, the content recognition filling framework executes step S209.
[0195] Optionally, before the second timer exceeds the second timing duration and before the drag box is created, if the content recognition filling framework determines that the user's operation is a moving operation or a lifting operation based on the moving event or the lifting event, indicating that the user's operation intention is not a dragging intention, then the content recognition filling framework can terminate the execution of subsequent drag-related steps.
[0196] Both the moving operation and the lifting operation indicate that the user's operation intention is not a dragging intention. When the content recognition filling framework determines that the user's operation intention is not a dragging intention, the second timer is canceled or the subsequent dragging-related steps are terminated. In this way, the power consumption of the electronic device can also be reduced.
[0197] S205: The touch event is transmitted internally in the view framework.
[0198] Exemplarily, after receiving the drop event, the view framework transmits the drop event in the root layout of the target page based on the touch position of the event.
[0199] For example, the drop event can be transmitted layer by layer in the order of application → page → control.
[0200] In this way, accurate matching of the user intention and the target control in the first application can be achieved.
[0201] It is understandable that when the user long presses the target control, the events include drop events and move events. The specific implementation method of the internal transmission of the move event in the view framework is similar to the specific implementation method of the internal transmission of the drop event in the view framework, which will not be repeated here.
[0202] Optionally, steps S203 and S205 may be performed concurrently.
[0203] S206: The target control in the view frame receives the drop event, and the target control reports the text content of the target control to the content recognition and filling framework.
[0204] Exemplarily, in this embodiment, the control format of the first application is the textview format, and the target control of the first application supports text content reporting. Therefore, the target control can report the entity corresponding to the target control to the content recognition and filling framework. The entity can be a package or a container. The entity corresponding to the target control includes the control name of the target control, the text content of the target control, and the layout of the target control. The layout may include the control height, control width, text content, number of text lines, starting point characters for each line, ending point characters for each line, text margins, text paths, text colors, and font sizes. The content recognition and filling framework obtains the control name of the target control, the text content of the target control, and the layout of the target control from the entity.
[0205] For example, the target control is Figure 3 Taking the control 310 in the interface shown in b as an example, the content recognition filling framework obtains the control name of the target control, the text content of the target control, and the layout of the target control from the entity corresponding to the target control as follows:
[0206] android:id="@123456".
[0207] ccTextView=textView.getClass().getSimpleName().
[0208] CharSequence=textView.getText().
[0209] int width=textView.getWidth().
[0210] int height=textView.getHeight().
[0211] int line cout=textView.getLineCout().
[0212] int selection start=textView.getSelectionStart().
[0213] int selection end=textView.getSelectionEnd().
[0214] int text size=textView.getTextSize().
[0215] int line spacing extra=textView.getLineSpacingExtra().
[0216] int current text color=textView.getCurrentTextColor().
[0217] Among them, ccTextView=textView.getClass().getSimpleName() means that the control name of the target control is obtained as ccTextView through the control name acquisition method (textView.getClass().getSimpleName()).
[0218] android:id="@123456" means that the ID attribute of the target control is 123456. @123456 can also be expressed as textView123456. Each control has a unique ID attribute. The ID attribute can also indicate the position of the control on the page to which it belongs, or the text path.
[0219] The CharSequence address is: XXXX = textView.getText() indicates that the text content CharSequence of the target control is obtained through the text content acquisition method (textView.getText()). This text content CharSequence is, for example, "The address is: XXXX".
[0220] int width = textView.getWidth() indicates that the control width value width of the target control is obtained through the control width acquisition method (textView.getWidth()). This width value width is, for example, 400.
[0221] int height = textView.getHeight() indicates that the control height value height of the target control is obtained through the control height acquisition method (textView.getHeight()). This height value height is, for example, 200.
[0222] int line cout = textView.getLineCout() indicates that the number of lines of text line cout of the target control is obtained through the number of lines of text acquisition method (textView.getLineCout()). This number of lines line cout is, for example, 1.
[0223] int selection start = textView.getSelectionStart() indicates that the starting character of the first line selection start of the target control is obtained through the starting character of the line acquisition method (textView.getSelectionStart()). This starting character of the first line selection start is, for example, "地".
[0224] int selection end = textView.getSelectionEnd() indicates that the ending character of the first line selection end of the target control is obtained through the ending character of the line acquisition method (textView.getSelectionEnd()). This ending character of the first line selection end is, for example, "X".
[0225] int text size = textView.getTextSize() indicates that the font size value text size of the target control is obtained through the font size acquisition method (textView.getTextSize()). This font size value textsize is, for example, 5.
[0226] int line spacing extra = textView.getLineSpacingExtra() means obtaining the line spacing value line spacingextra of the target control through the line spacing acquisition method (textView.getLineSpacingExtra()). The line spacing value line spacing extra is, for example, 2, and the line spacing belongs to the text margin.
[0227] int current text color = textView.getCurrentTextColor() means obtaining the color value current text color of the text color of the target control through the text color acquisition method (textView.getCurrentTextColor()). The color value current text color is 100. The color value contains information of the three components of red, green and blue. The color value can be used to convert into other color representation forms (such as RGB or RGBA).
[0228] The content recognition filling framework obtains the text content reported by the target control so that the content recognition filling framework can subsequently use the text content to quickly generate a drag box.
[0229] S207: The content recognition filling framework determines whether the text reported by the target control is valid text.
[0230] Exemplarily, the content-aware fill framework may determine whether the control name of the target control is in the whitelist.
[0231] If so, the content recognition filling framework determines that the reported text is valid text, and can store the text content and the layout of the target control in memory to facilitate subsequent execution of drag-related steps.
[0232] If not, the content recognition filling framework determines that the reported text is invalid text. The content recognition filling framework cancels the second timer, clears the obtained text content, the layout of the target control and the touch event, so as to terminate the execution of subsequent drag-related actions. In this way, the power consumption of invalid dragging can be saved.
[0233] S208: The view framework responds to the touch event.
[0234] Exemplarily, the view framework may set a first timer in response to the drop event, and the timing duration of the first timer is a first timing duration, which is equal to the system long press duration.
[0235] Before the first timer reaches the system long press duration (or the first timing duration), if the view framework receives a move event, the view framework determines whether the distance between the touch position of the move event and the touch position of the drop event exceeds the first threshold. If so, the view framework cancels the first timer. If not, the view framework does not process.
[0236] If the view framework receives a lift event before the first timer reaches the system long press duration, the view framework cancels the first timer.
[0237] When the first timer reaches the system long press duration, the view framework executes the long press related steps of the native system of the electronic device. For example, the view framework can execute the related steps of popping up a new window around the target control.
[0238] The view framework executes a scenario in which a new window pops up around the target control. For details, please refer to the detailed description in the subsequent step S210.
[0239] The relevant steps performed by the view framework in response to the touch event are the logic of the native system of the electronic device. The content recognition filling framework determines the user's long press operation intention as the dragging intention through the second timer, and the view framework determines the user's long press operation intention as the intention to pop up a new window through the first timer, and the timing duration of the second timer of the content recognition filling framework is greater than the timing duration of the first timer. In this way, the text dragging method provided in the embodiment of the present application is compatible with the logic of the native system, and the text dragging method provided in the embodiment of the present application will not affect the execution logic of the native system of the electronic device.
[0240] Optionally, S206 and S208 may be executed concurrently.
[0241] S209: When the second timer reaches the second timing duration, the content recognition filling framework queries the window management framework whether a new window pops up around the target control.
[0242] For example, when the user's long press duration of the target control reaches the system long press duration, the electronic device may or may not pop up a new window around the target control. Therefore, when the second timer reaches the second timing duration, it is necessary for the content recognition filling framework to query the window management framework whether a new window pops up around the target control, so as to determine whether the real intention of the user's long press operation is to make the electronic device pop up a new window or to drag the control according to whether the new window pops up.
[0243] The second timing duration is greater than the system long press duration, so that the content recognition filling framework executes this step later than the electronic device pops up a new window around the target control. This can reduce the probability of inaccurate query results in the new window popping up due to the query timing of the new window popping up being earlier than the new window popping up.
[0244] S210: The window management framework determines whether a new window pops up around the target control.
[0245] For example, Figure 7 The electronic device provided by the embodiment of the present application pops up a new window around the target control. When the first timer reaches the system long press time, the electronic device can display Figure 7 The interface shown in the figure. Figure 7 The interface shown in FIG. 1 includes a new window 71. The pop-up position of the new window 71 is around the target control. The new window 71 may include a copy control 711, a forwarding control 712, a favorite control 713, a multi-select control 714, a reference control 715, and a delete control 716. For other contents in this interface, see Figure 3 The contents of the interface shown in b will not be repeated here.
[0246] After the window management framework determines that a new window pops up around the target control, the window management framework may execute step S211.
[0247] Optionally, if the window management framework determines that no new window pops up around the target control, the window management framework can notify the content recognition filling framework that no new window pops up, and the content recognition filling framework can determine that the real intention of the user's long press operation is a drag intention, and the content recognition filling framework does not execute steps S212-S213, and directly executes step S214a. In this way, the power consumption of executing steps S212-S213 can be reduced, and the drag box can be generated in time to improve the user experience.
[0248] S211. The window management framework notifies the content recognition filling framework to pop up a new window.
[0249] If a new window pops up around the target control, the user's long press operation intention may be a drag intention or a non-drag intention. For example, the user may operate the new window that pops up. Therefore, it is necessary for the content recognition filling framework to perform step S212 to further determine the user's actual operation intention.
[0250] S212: The content recognition filling framework sets a third timer, wherein a third timing duration of the third timer is equal to the second extension duration.
[0251] The second extension time length may be the same as or different from the first extension time length.
[0252] Exemplarily, the second extension time length may be greater than the first extension time length. For example, the second extension time length may be 100 milliseconds.
[0253] S213: When the third timer reaches a third timing duration, the content recognition filling framework determines that the user's finger has not moved or been lifted.
[0254] Exemplarily, the third timer may be a message processing class handler.
[0255] After the third timer is set, there may be a scenario where the finger is long pressed, the finger is moved, or the finger is lifted, and the content-aware fill framework may receive a move event or a lift event.
[0256] After setting the third timer and before the third timer exceeds the third timing duration, if the content recognition filling framework receives a move event, the content recognition filling framework can determine whether the distance between the touch position of the move event and the touch position of the drop event exceeds the second threshold.
[0257] If the distance between the touch position of the move event and the touch position of the drop event exceeds the second threshold, it may indicate that the user's operation is a move operation, or it may indicate that the user's operation intention is not a drag intention. The content recognition filling framework cancels the third timer to terminate the execution of subsequent drag-related steps.
[0258] If the distance between the touch position of the move event and the touch position of the drop event does not exceed the second threshold, it may indicate that the user's operation is a long press operation, or that the user's operation intention may be a drag intention or an intention to operate a new window, then the content recognition filling frame will not be processed.
[0259] After setting the third timer and before the third timer exceeds the third timing duration, if the content recognition fill framework receives a lift event, indicating that the user operation is a lift operation or finger lift, and may also indicate that the user's operation intention is not a drag intention, the content recognition fill framework cancels the third timer to terminate the execution of subsequent drag-related steps.
[0260] When the first event received by the content recognition filling framework after the third timer reaches the third timing duration is a move event, the content recognition filling framework can determine whether the distance between the touch position of the move event and the touch position of the drop event exceeds a second threshold.
[0261] If the distance between the touch position of the move event and the touch position of the drop event exceeds the second threshold, it may indicate that the user's operation is a move operation or a finger movement, or it may indicate that the user's operation intention is not a drag intention or that the user's operation intention is to switch windows. The content recognition filling framework terminates the execution of subsequent drag-related steps.
[0262] If the distance between the touch position of the move event and the touch position of the drop event does not exceed the second threshold, it can indicate that the user's operation is a long press operation, and it can also indicate that the real intention of the long press operation is a drag intention, then the content recognition fill frame executes step S214a. The long press operation means that the finger is neither moved nor lifted.
[0263] When the first event received by the content-recognizing fill framework after the third timer reaches the third timing duration is a lift event, indicating that the user's operation is a lift operation or finger lift, the content-recognizing fill framework terminates the execution of subsequent drag-related steps.
[0264] Both the moving operation and the lifting operation indicate that the user's operation intention is not a dragging intention. When the content recognition filling framework determines that the user's operation intention is not a dragging intention, the third timer is canceled or the subsequent dragging-related steps are terminated, so that the power consumption of the electronic device can be reduced. The third timer can be used to accurately determine whether the real intention of the user's long press operation is a dragging intention in the scenario where a new window pops up on the electronic device, which can improve the accuracy of identifying the user's operation intention.
[0265] It can be understood that the user's finger not moving may also mean that the user's finger is not lifted.
[0266] Optionally, if the content-recognizing filling framework determines that the user's finger is moved or lifted, the content-recognizing filling framework may also clear the stored text content and the layout of the target control, and clear the second timer and the third timer.
[0267] S214a: There is text content in the memory, and the content recognition filling framework obtains the text content from the memory.
[0268] Optionally, S213 and S214a may be executed concurrently.
[0269] S215, the content-aware filling framework creates a drag box including a shadow and rounded corners according to the text content.
[0270] Exemplarily, the content-aware fill framework may include a drag box creation module (drag shadow builder). The content-aware fill framework may transmit text content and the layout of target controls to the drag box creation module. The drag box creation module uses the text content, the layout of target controls and the configuration parameters preset in the drag box creation module to create a drag box including shadows and rounded corners. The configuration parameters preset in the drag box creation module may include the length and width of the drag box (out shadowsize), the position of the finger on the drag box (out shadow touch point), the shadow format of the drag box, the shadow color of the drag box and the rounded corners of the drag box. The drag box created by the drag box creation module is as follows: Figure 3As shown in the drag box 312 in the interface shown in c, the text content of the drag box 312 "Address is: XXXX" is the same as the text content of the target control (i.e., control 310). The number of text lines in the drag box 312 is the same as the number of text lines in the control 310. The starting character of each line of text in the drag box 312 is the same as the starting character of each line of text in the control 310. The ending character of each line of text in the drag box 312 is the same as the ending character of each line of text in the control 310. The drag box 312 also includes a drag box shadow and a drag box rounded corner. The shadow and rounded corners of the drag box 312 are as shown in FIG. Figure 3 The drag box shadow and the drag box rounded corners of the drag box 312 in the interface shown in c.
[0271] In this way, after determining that the user's intention of the long press operation is a dragging intention, a drag box is generated to complete the copying of the text content of the target control. The electronic device can display the drag box to prompt the user that the text content of the target control has been copied, which can improve the user's experience of dragging text, and thereby improve the user's experience of using the electronic device.
[0272] It is understandable that, since the text dragging method provided in the embodiment of the present application does not affect the execution logic of the native system of the electronic device, the text dragging method provided in the embodiment of the present application does not affect the new window popped up by the electronic device. Exemplarily, the new window popped up by the electronic device will not disappear due to the display of the drag box.
[0273] S216: The content recognition filling framework calls the interface of the dragging framework.
[0274] Exemplarily, the content recognition filling framework calls the interface of the drag frame, and passes the acquired text content of the target control and the created drag box to the drag frame interface, so that the drag frame controls the movement of the drag box as the finger moves, and passes the text content of the target control to the second application when the finger moves into the window of the second application.
[0275] The text content of the target control is, for example, Figure 3 The text content of the control 310 in the interface shown in c. Drag the box, for example Figure 3 The drag box 312 in the interface shown in c.
[0276] It is understandable that the text content of the target control is the text content of the drag box.
[0277] S217: The drag frame monitors the window management frame and controls the drag frame to move along with the movement of the finger.
[0278] Exemplarily, after the content recognition filling framework calls the interface of the dragging framework, a scene of finger movement may occur. In this scene, the dragging framework monitors the window management framework, obtains the touch position of the finger in real time, and controls the dragging frame 312 to move with the movement of the finger.
[0279] For example, after the content recognition filling framework calls the interface of the dragging framework, the electronic device may display the following Figure 3 The interface shown in c. Figure 3 In the interface shown in c in FIG. , if the user moves his finger, the electronic device may display the following Figure 3 The interface shown in d. Figure 3 As shown in the interfaces c and d in FIG. 1 , the position of the drag box 312 is consistent with the touch position of the finger, so that the drag box 312 moves with the movement of the finger. In this way, the user's experience of using the electronic device can be improved.
[0280] After calling the drag framework interface, the module interaction flow chart in the finger movement scenario is as follows Figure 8 For ease of understanding, Figure 8 The module interaction process shown is described later.
[0281] Optionally, after the content recognition filling framework calls the interface of the drag frame, a scene of the finger being lifted may also occur. In the scene of the finger being lifted, the drag frame can perform different steps according to different lift positions. Exemplarily, if the lift position of the finger (or the position where the display screen was last touched) is within the sidebar, step S218 can be executed. If the position where the finger is lifted is within the window of the target page, the drag frame controls the drag frame to return to the drag start position. The drag start position is, for example, the position where the target control is located or the long press position.
[0282] After calling the drag framework interface, a module interaction flow chart in the finger lift scenario is as follows Fig. 9 After calling the drag framework interface, another module interaction flow chart in the finger lift scenario is shown in the following Fig.10 For ease of understanding, Fig. 9 and Fig.10 The module interaction process shown is described later.
[0283] S218: The window management framework launches the second application, so that the second application launches the sub-service.
[0284] Exemplarily, when the finger moves to the hot zone, the window management framework pulls up the second application, and the display screen displays the sidebar (or the window of the second application). Figure 3The sidebar 32 in the interface shown in d in FIG. The user can continue to move the finger, drag the drag box to the top of the target sub-business icon and lift the finger. The second application can obtain the lift event and the text content of the target control from the drag frame. The second application can determine that the sub-business of the icon corresponding to the touch position of the lift event is the target sub-business. The second application can pull up the target sub-business and pass the text content of the target control to the target sub-business, so that the target sub-business uses the text content of the target control for business processing.
[0285] For example, Figure 3 As shown, in Figure 3 In the interface shown in c in FIG. 1 , the user can move the finger. When the finger moves into the hot zone 31 of the electronic device display screen, the window management framework pulls up the second application so that the electronic device can display the following Figure 3 The sidebar 32 may display multiple sub-service icons in a flowing manner, so that the user can drag the drag box 312 to the top of the target sub-service icon and then lift the finger, so that the target sub-service uses the text content of the drag box 312 for service processing.
[0286] For example, taking the target sub-business as a map application, Figure 3 In the interface shown in d in FIG. 1 , the user moves a finger to drag the drag box 312 to the top of the map application icon 324. The electronic device may display Figure 3 The interface shown in e.
[0287] exist Figure 3 In the interface shown in e, the user can lift his finger and the electronic device can display Figure 3 The interface shown in f in FIG. When the user lifts his finger, the drag frame can determine that the touch position of the lift event is within the sidebar 32. The touch position of the lift event can indicate the position where the user's finger is lifted. The drag frame transmits the lift event and the text content of the drag frame 312 to the second application. The second application can identify that the sub-business icon corresponding to the touch position of the lift event is the icon of the map application. The second application can determine that the target sub-business is the map application. The second application pulls up the map application and inputs the text content of the drag frame 312 into the input box 341 of the map application, so that the electronic device displays Figure 3 f in the page so that users can Figure 3 Continue on the page indicated by f in the figure.
[0288] For example, taking the target sub-service as the WeChat application's send to WeChat friends service as an example, Figure 3 In the interface shown in d in FIG. 1 , the user moves the finger and drags the drag box 312 to the top of the icon 326 of the send to WeChat friend service. The electronic device can display Figure 3 The interface shown in g.
[0289] exist Figure 3 In the interface shown in g, the user can lift his finger and the electronic device can display Figure 3 The interface shown in h in . When the user lifts his finger, the drag frame can recognize that the touch position of the lift event is within the sidebar 32. The touch position of the lift event can represent the finger lift position. The drag frame passes the lift event and the text content of the drag frame 312 to the second application. The second application can recognize that the icon corresponding to the touch position of the lift event is an icon for the send to WeChat friends service. The second application can determine that the target sub-service is the send to WeChat friends service. The second application pulls up the WeChat application and passes the text content of the drag frame 312 to the send to WeChat friends service, so that the electronic device displays Figure 3 h in the page so that users can Figure 3 Continue on the page indicated by h in . Figure 3 In the interface shown in h in FIG. 1 , the user can select a friend or a group chat by clicking the friend control or the group chat control so as to send the text content of the drag box 312 to the selected friend or group chat.
[0290] The module interaction process in the scenario where the user drags the drag box 312 to the top of the target sub-business icon and lifts his finger can also be found in the following Fig. 9 Detailed description of the embodiments.
[0291] The text dragging method provided in this embodiment, in a scenario where the text control of the first application can actively report the text content, reports an entity including the control name of the target control, the text content of the target control and the layout of the target control through the target control. If it is determined that the reported text is valid text, when the second timer and the third timer accurately determine that the real intention of the user's long press operation is the dragging intention, a drag box is generated based on the text content of the valid text, and the drag box is displayed to prompt the user that the copying of the text content of the target control has been completed and the user can drag when the target control is long pressed. The drag frame controls the drag box to move with the movement of the finger, visually realizing the dragging of the text of the target control. When the drag box is dragged above the target sub-business icon, the second application pulls up the target sub-business and passes the text content of the drag box (or the text content of the target control) to the target sub-business, so that the target sub-business uses the text content of the target control to perform business processing in a timely manner, thereby realizing that the text content is quickly transferred between the first application and the target sub-business when the text dragging method is compatible with the logic of the native system, which can improve the user's experience of using the electronic device.
[0292] The above describes the module interaction process in the scenario where the text control of the first application can actively report the text content. The following describes the module interaction process in the scenario where the text control of the first application cannot actively report the text content.
[0293] For the scenario where the text control of the first application cannot actively report the text content, Fig.11 Another module interaction flow chart provided in an embodiment of the present application is shown.
[0294] Fig.11 and Figure 4 The difference is Fig.11 Not included Figure 4 Steps S206, S207 and S214a in the embodiment, Fig.11 It also includes steps S214b-1, S214b-2 and S214b-3. Steps S206, S207 and S214a may represent a method of obtaining text content by filling the frame with content recognition in a scenario where the target control supports text content reporting. Steps S214b-1, S214b-2 and S214b-3 may represent a method of obtaining text content by filling the frame with content recognition in a scenario where the target control does not support text content reporting. Fig.11 The remaining steps are Figure 4 The corresponding steps in the embodiment are similar, and similar steps will not be repeated in this embodiment.
[0295] like Fig.11 As shown, the text dragging method provided in the embodiment of the present application includes:
[0296] S100: A user opens a first application interface.
[0297] S101. An application (APP) loads the contents of each view in a target page into a view framework.
[0298] S102: The view framework transmits the root layout of the target page to the content-aware filling framework.
[0299] S103: The content recognition filling framework determines whether the application package name and / or page name of the target page is in the whitelist.
[0300] S104: The content recognition filling framework transmits the judgment result to the view framework.
[0301] S200: The event processing framework obtains a touch event of a target control being touched.
[0302] S201: The event processing framework transmits a touch event to the window management framework.
[0303] S202: The window management framework transmits the touch event to the view framework.
[0304] S203: If the view framework has received a positive result of the determination transmitted by the content-recognizing and filling framework, the view framework transmits the touch event to the content-recognizing and filling framework.
[0305] S204: The content recognition filling framework responds to the drop event and sets a second timer.
[0306] S205: The touch event is transmitted internally in the view framework.
[0307] Optionally, steps S203 and S205 may be performed concurrently.
[0308] S208: The view framework responds to the touch event.
[0309] S209: When the second timer reaches the second timing duration, the content recognition filling framework queries the window management framework whether a new window pops up around the target control.
[0310] S210: The window management framework determines whether a new window pops up around the target control.
[0311] S211. The window management framework notifies the content recognition filling framework to pop up a new window.
[0312] S212: The content recognition filling framework sets a third timer, wherein a third timing duration of the third timer is equal to the second extension duration.
[0313] S213: When the third timer reaches a third timing duration, the content recognition filling framework determines that the user's finger has not moved or been lifted.
[0314] S214b-1. There is no text content in the memory. The content recognition filling framework traverses the root layout to find the control corresponding to the touch position according to the touch position of the drop event.
[0315] Exemplarily, since the target control is a control in other view formats, in step S206, when the target control receives a drop event, the target control cannot report the text content of the target control to the content recognition filling framework. Therefore, the text content does not exist in the memory, and the content recognition filling framework cannot obtain the text content from the memory. The content recognition filling framework can traverse the root layout to find the control corresponding to the touch position of the drop event, and obtain the control name of the found control. The found control is the target control.
[0316] Optionally, if there is no text content in the memory, the content-aware fill framework can also traverse the root layout to find the control corresponding to the touch position of the most recently received move event.
[0317] Optionally, S213 and S214b-1 may be executed concurrently.
[0318] S214b-2. The content recognition filling framework determines whether the control name of the found control is in the whitelist.
[0319] Exemplarily, the content-aware fill framework may determine whether the control name of the found control is in the whitelist.
[0320] If so, the content recognition filling framework executes S214b-3.
[0321] If not, the content-aware fill framework does not execute subsequent drag-related steps, and the content-aware fill framework can clear the second timer, the third timer, and the obtained events.
[0322] S214b-3. The content recognition filling framework obtains the text content of the found control from the view framework.
[0323] Exemplarily, the content recognition filling framework controls the found control to call the accessibility node information method (oninitialize accessibility node info). The accessibility node information method is provided by the view framework. The view framework executes the relevant steps of the accessibility node information method to obtain the text content corresponding to the found control and the layout of the found control. The view framework transmits the text content corresponding to the found control and the layout of the found control to the content recognition filling framework.
[0324] In this way, when the target control cannot report text content to the content-aware filling framework, the content-aware filling framework obtains the text content and layout of the target control corresponding to the touch position through traversal search, so as to subsequently generate a drag view and transfer the text content of the target control to realize dragging of the text content of the target control.
[0325] S215, the content-aware filling framework creates a drag box including a shadow and rounded corners according to the text content.
[0326] S216: The content recognition filling framework calls the interface of the dragging framework.
[0327] S217: The drag frame monitors the window management frame and controls the drag frame to move along with the movement of the finger.
[0328] S218: The window management framework launches the second application, so that the second application launches the sub-service.
[0329] The text dragging method provided in this embodiment, in a scenario where the text control of the first application cannot actively report the text content, when the second timer and the third timer accurately determine that the real intention of the user's long press operation is the dragging intention, the root layout is traversed to find the control corresponding to the touch position of the drop event (i.e., the target control), or the root layout is traversed to find the control corresponding to the touch position of the latest received move event (i.e., the target control), and when it is determined that the control name of the found control is in the whitelist, the text content of the found control and the layout of the found control are obtained from the view frame to generate a drag box, display the drag box, and when the target control is long pressed. The prompt that the copying of the text content of the target control has been completed and the user is prompted that they can drag. The drag frame controls the drag box to move with the movement of the finger, thereby realizing the dragging of the text of the target control. When the drag box is dragged above the target sub-business icon, the second application pulls up the target sub-business and passes the text content of the drag box (or the text content of the target control) to the target sub-business, so that the target sub-business uses the text content of the target control to perform business processing in a timely manner. When the text dragging method is compatible with the logic of the native system, the text content can be quickly transferred between the first application and the target sub-business, which can improve the user experience of using the electronic device.
[0330] For ease of understanding, the following are Figure 5 , Figure 6 , Figure 8 , Fig. 9 and Fig.10 Provide explanation.
[0331] Figure 5 The module interaction flow chart in the scenario of finger movement before the second timer exceeds the second timing duration in the embodiment of the present application is shown. Figure 5 As shown, the text dragging method provided in the embodiment of the present application may also include the following steps:
[0332] S300a, after step S204 and before step S209, the event processing framework receives a movement event.
[0333] S301: The event processing framework transmits a moving event to the window management framework.
[0334] S302: The window management framework transmits a moving event to the view framework.
[0335] S303a: The view framework transmits the moving event to the content recognition filling framework.
[0336] S304. The content recognition filling framework determines whether the distance between the touch position of the move event and the touch position of the drop event is greater than a second threshold. If it is less than or equal to the second threshold, no processing is performed. If it is greater than the second threshold, the second timer is canceled.
[0337] Exemplarily, the distance between the touch position of the move event and the touch position of the drop event may be referred to as the move distance. The second threshold may be 10 pixels.
[0338] The moving distance being less than or equal to the second threshold may indicate that the user's operation is a long press operation. At this time, the second timer has not timed out, so the content recognition filling framework does not process it.
[0339] The moving distance being greater than the second threshold may indicate that the user's intention is other intentions, not the dragging intention. Other intentions may include the intention to switch pages. The content-aware fill framework may cancel the second timer to terminate the execution of subsequent drag-related steps. The content-aware fill framework may also clear the obtained text content and touch events.
[0340] It is understandable that after step S204 and before step S209, if the user's finger does not leave the display screen and moves, the electronic device may execute the following steps once for each movement event generated. Figure 5 The steps shown in the example.
[0341] It can be understood that before the third timer exceeds the third timing duration, if the finger moves, the module interaction process in this scenario is the same as Figure 5 The module interaction process shown is similar and will not be repeated here.
[0342] The text dragging method provided in this embodiment is that after the content recognition and filling framework sets the timer and before the set timer times out, if the user's finger moves, the content recognition and filling framework obtains the moving distance by comparing the touch position of the moving event with the touch position of the drop event. If the moving distance is less than or equal to the second threshold, it can be judged that the user's operation intention may be a dragging intention, and the content recognition and filling framework can do nothing. If the moving distance is greater than the second threshold, it can be judged that the user's operation intention is not a dragging intention, and the content recognition and filling framework can cancel the set timer to terminate the execution of subsequent drag-related actions. In this way, by comparing the moving distance with the second threshold, the user's operation intention can be accurately judged. Based on the comparison result of the moving distance and the second threshold, the electronic device does not process or terminates the execution of subsequent drag-related actions, which can reduce the power consumption of the electronic device caused by invalid dragging, and thus can improve the user's experience of using the electronic device.
[0343] Figure 6 The module interaction flow chart in the scenario of the finger being lifted before the second timer exceeds the second timing duration in the embodiment of the present application is shown. Figure 6 As shown, the text dragging method provided in the embodiment of the present application may also include the following steps:
[0344] S400a, after step S204 and before step S209, the event processing framework receives a lift event.
[0345] S401: The event processing framework transmits a lift event to the window management framework.
[0346] S402: The window management framework transmits a lift event to the control framework.
[0347] S403a: The control framework transmits the lift event to the content-aware filling framework.
[0348] S404: The content recognition filling framework cancels the second timer.
[0349] If the finger is lifted before the second timer exceeds the second timing duration, it can indicate that the user's intention is not to drag. The content recognition filling framework can cancel the second timer and terminate the execution of subsequent drag-related steps to reduce the power consumption of the electronic device caused by invalid dragging.
[0350] It can be understood that before the third timer exceeds the third timing duration, if the finger is lifted, the module interaction process in this scenario is the same as Figure 6 The module interaction process shown is similar and will not be repeated here.
[0351] In the text dragging method provided in the present embodiment, after the content recognition filling framework sets a timer, before the set timer times out, if the user's finger is lifted up, the content recognition filling framework can determine that the user's operation intention is not a dragging intention. The content recognition filling framework can cancel the timer to cause the electronic device to terminate the execution of subsequent dragging-related steps, thereby reducing the power consumption of the electronic device caused by invalid dragging, and can improve the user's experience of using the electronic device.
[0352] Figure 8 FIG. 1 shows a flow chart of module interaction in a finger movement scenario after calling the drag frame interface in an embodiment of the present application. Figure 8 As shown, the text dragging method provided in the embodiment of the present application also includes:
[0353] S300b, after step S216, the event processing framework receives a movement event of the user's finger movement.
[0354] S301: The event processing framework transmits a moving event to the window management framework.
[0355] S302: The window management framework transmits a moving event to the view framework.
[0356] S303b: The view framework transmits the moving event to the drag framework.
[0357] S305 , the drag frame controls the drag frame to move along with the movement of the touch position.
[0358] When the finger does not leave the display screen and moves on the display screen, the drag frame will continue to receive the movement events transmitted by the event processing frame at a fixed sampling frequency through steps S301, S302 and S303b. The drag frame can control the drag frame to move as the touch position moves. The specific implementation and technical effect of the drag frame moving as the touch position moves can be seen in Figure 4 Step S217 in the embodiment will not be described in detail in this embodiment.
[0359] The text dragging method provided in this embodiment can improve the user's intuitive feeling of flexible dragging and moving of the drag frame by controlling the drag frame to move with the movement of the touch position in the scene after calling the drag frame interface. The user can flexibly move the drag frame to the top of the icon of the target sub-service in the sidebar so that the target sub-service can promptly use the content in the drag frame for service processing, thus improving the user's experience of using the electronic device.
[0360] Fig. 9 A flow chart of module interaction in the scenario of a finger being lifted after calling the interface of the drag frame in an embodiment of the present application is shown. Fig. 9 As shown, the text dragging method provided in the embodiment of the present application also includes:
[0361] S400b, after step S216, the event processing framework receives a lift event.
[0362] Exemplarily, after step S216, if the second application is pulled up, the electronic device displays a sidebar. When the user's finger moves to above the target sub-service icon in the sidebar, the finger is lifted up. The event processing framework receives the lift event.
[0363] S401: The event processing framework transmits a lift event to the window management framework.
[0364] S402: The window management framework transmits a lift event to the view framework.
[0365] S403b: The view framework transmits the lift event to the drag framework.
[0366] S405a: When the drag frame determines that the finger is lifted within the sidebar (or the window of the second application), the text content of the drag frame is transmitted to the second application.
[0367] For example, the touch position in the lift event indicates the position of the last touch on the display screen (or the position where the user's finger was lifted). The drag framework can determine whether the touch position of the lift event is within the sidebar. If so, the drag framework transmits the lift event and the text content of the drag box to the second application. If not, the drag framework can control the drag box to return to the drag start position. For details, please refer to the subsequent Fig.10 Step S405b in the embodiment.
[0368] S406: The second application starts the target sub-service.
[0369] Exemplarily, the finger lift position is in the sidebar (or the window of the second application), which may include the finger lift position being above the sub-service icon in the sidebar. The second application may identify the sub-service icon corresponding to the touch position of the lift event. The second application determines that the sub-service corresponding to the identified sub-service icon is the target sub-service. The second application pulls up the target sub-service and passes the text content of the drag box to the target sub-service. The target sub-service uses the text content of the drag box for service processing.
[0370] The specific implementation of steps S405a to S406 can be found in Figure 4 Step S218 in the embodiment will not be described in detail here.
[0371] The text dragging method provided in this embodiment, in the scenario where the finger is lifted above the target sub-business icon after calling the interface of the drag frame, by judging that the finger is lifted above the target sub-business icon, the text content of the drag box is transmitted to the target sub-business, thereby improving the accuracy of identifying the user's operation intention, so that the target sub-business can use the text content of the drag box to perform business processing in a timely manner, thereby improving the user's experience of using the electronic device.
[0372] Fig.10 The module interaction flow chart in the embodiment of the present application is shown in the scenario where the finger is lifted above the window of the target page after calling the interface of the drag frame. Fig.10 As shown, the text dragging method provided in the embodiment of the present application also includes:
[0373] S400b, after step S216, the event processing framework receives a lift event.
[0374] S401: The event processing framework transmits a lift event to the window management framework.
[0375] S402: The window management framework transmits a lift event to the view framework.
[0376] S403b: The view framework transmits the lift event to the drag framework.
[0377] S405b: The dragging framework determines that the finger lift position is within the window of the dragging application (ie, the first application), and controls the dragging frame to return to the dragging start position.
[0378] For example, Fig.12 The scene diagram of the finger being lifted after calling the drag frame interface is shown. After step S216, if the user's finger moves to the hot zone, the sidebar is pulled up, and the electronic device can display the following Fig.12 The interface shown in a. Fig.12 The contents of the interface shown in a can be found in Figure 3 The contents of the interface shown in d are not repeated here.
[0379] exist Fig.12 In the interface shown in a of FIG. 1 , if the user lifts the finger when the finger touches the page window 30 of the first application, the electronic device may display Fig.12 The interface shown in b. Fig.12 The contents of the interface shown in b can be found in Figure 3 The contents in the interface shown in c will not be repeated here. Fig.12 The interface shown in b is the same as Figure 3 The difference between the interface shown in c is that Fig.12 In the interface shown in b, the position of the drag box 312 is consistent with the position of the control 310.
[0380] from Fig.12 As shown in the interfaces a and b in FIG. 1 , after step S216, if the user lifts his finger from above the page window 30, it means that the finger lift position is within the dragging application window, and the dragging frame can control the dragging frame 312 to return to the dragging position, which is the position of the control 310. Fig.12 In the interface shown in a in FIG. 1 , if the finger is lifted, the finger leaves the hot zone, so the sidebar disappears, and the electronic device only displays the following Fig.12 The window of the target page shown in b.
[0381] The text dragging method provided in this embodiment can determine that the user cancels the dragging by judging that the last touch position is within the window of the dragging application (i.e., the first application) in a scenario where the finger is lifted up after calling the interface of the dragging frame. The dragging frame can then be controlled to return to the dragging starting position, thereby improving the user experience of the electronic device.
[0382] Optionally, the whitelist in the embodiment of the present application may be built-in to the system of the electronic device, or may be obtained by the electronic device from a server.
[0383] Fig.13 The schematic diagram of the process of storing a whitelist of an electronic device is shown. Fig.13As shown, the process includes:
[0384] S600, turn on electronic equipment.
[0385] S601, electronic device starts list loading service.
[0386] Exemplarily, the electronic device obtains a built-in whitelist of the system, and / or the electronic device obtains a cloud-tested push whitelist from a server.
[0387] Exemplarily, the built-in whitelist may include a first whitelist identifier, a first whitelist version, and a first whitelist content. The first whitelist content includes multiple application package names that support system dragging, multiple page names that support system dragging, and multiple control names that support system dragging. The cloud test push whitelist may include a second whitelist identifier, a second whitelist version, and a second whitelist content. The second whitelist content includes multiple application package names that support system dragging, multiple page names that support system dragging, and multiple control names that support system dragging.
[0388] S602: The electronic device parses the obtained whitelist.
[0389] Exemplarily, the format of the built-in whitelist can be in XML format or in non-XML format. If the format of the built-in whitelist is in non-XML format, the electronic device converts the obtained format of the built-in whitelist into XML format. The electronic device can read the first whitelist identifier, the first whitelist version, and the first whitelist content from the built-in whitelist in XML format.
[0390] In order to reduce the amount of data transmitted when the server transmits the cloud-test push whitelist to the electronic device, the format of the cloud-test push whitelist obtained by the electronic device may be non-xml format, so the electronic device converts the format of the obtained cloud-test push whitelist into xml format. The electronic device can read the second whitelist identifier, the second whitelist version, and the second whitelist content from the cloud-test push whitelist in xml format.
[0391] S603: The electronic device determines whether the obtained white list is updated.
[0392] Exemplarily, if the electronic device obtains the built-in whitelist and the cloud-tested push whitelist in step S601, the electronic device may determine whether the cloud-tested push whitelist has been updated compared to the built-in whitelist.
[0393] For example, the electronic device determines whether the first whitelist identifier is the same as the second whitelist identifier.
[0394] If they are the same, the electronic device determines whether the first whitelist version is the same as the second whitelist version.
[0395] If they are different, the electronic device determines that the cloud-tested whitelist has been updated compared to the built-in whitelist, and the electronic device can execute S604 and S605 in sequence.
[0396] If they are the same, the electronic device determines that the cloud-tested whitelist has not been updated compared to the built-in whitelist, and the electronic device can execute S605.
[0397] Exemplarily, if the electronic device obtains a built-in whitelist in step S601, the electronic device determines whether the whitelist exists in the memory.
[0398] If not, the electronic device executes step S604.
[0399] If so, the electronic device determines whether the built-in white list has been updated compared to the white list in the memory, and if not, executes step S605.
[0400] Exemplarily, if the electronic device obtains the cloud test push whitelist in step S601, the electronic device determines whether the whitelist exists in the memory.
[0401] If not, the electronic device executes step S604.
[0402] If it exists, the electronic device determines whether the cloud test push whitelist has been updated compared to the whitelist in the memory. If it has been updated, step S604 is executed; if it has not been updated, step S605 is executed.
[0403] It is understandable that the method for an electronic device to determine whether a built-in whitelist has been updated compared to a whitelist in memory is similar to the method for an electronic device to determine whether a cloud-tested whitelist has been updated compared to a built-in whitelist, and will not be repeated. The method for an electronic device to determine whether a cloud-tested whitelist has been updated compared to a whitelist in memory is similar to the method for an electronic device to determine whether a cloud-tested whitelist has been updated compared to a built-in whitelist, and will not be repeated.
[0404] S604: The electronic device saves the updated white list.
[0405] Exemplarily, the electronic device may store the whitelist content of the updated whitelist in a memory.
[0406] Optionally, the electronic device may also save the updated whitelist in XML format in the memory.
[0407] S605: The electronic device ends the whitelist saving process.
[0408] Exemplarily, the electronic device determines whether there is a whitelist in the memory.
[0409] If so, the electronic device can clear the information obtained in steps S601-S603 and end the whitelist saving process.
[0410] If not, the electronic device stores the whitelist content or the whitelist in XML format read in step S602 in the memory, clears the information obtained in steps S601-S603, and ends the whitelist saving process.
[0411] The server can periodically update the cloud test push whitelist stored in the server and notify the electronic devices under the server.
[0412] For example, Fig.13 As shown in S700-S701:
[0413] S700. The server periodically updates the cloud test push whitelist stored in the server.
[0414] S701. After the server completes the update of the cloud test push whitelist, the server may send a push success broadcast to the electronic devices under its jurisdiction. The push success broadcast may be used to prompt the electronic device that the cloud test push whitelist stored in the server has been updated. In this way, when the electronic device receives the push success broadcast, the electronic device may sequentially execute steps S601-S605, or the electronic device may sequentially execute steps S601, S602, S603, and S605.
[0415] The whitelist saving method proposed in this embodiment can enable electronic devices to obtain updated whitelists in a timely manner, so that electronic devices can drag and drop texts of more third-party applications that do not support dragging themselves according to the whitelist, thereby improving the application scope of the text dragging method provided in the embodiment of the present application, and further improving the user experience of the electronic device.
[0416] It can be seen from the embodiments shown above that the text dragging method provided in the embodiments of the present application is a system-level dragging method. Regardless of whether the application itself supports dragging, and regardless of whether the text control of the application is in textview format, as long as the page name of the target page and the control name of the text control are in the whitelist, the text dragging method provided in the embodiments of the present application can be used to drag the text content of the text control, so that the text content of the text control can be conveniently and quickly transferred between the application and the sub-service to which it belongs, thereby improving the user experience of the electronic device.
[0417] The embodiment of the present application also provides a text dragging method, which includes S801-S804:
[0418] S801. An electronic device displays a first interface of a first application, where the first interface includes a first view, and the first view includes first text content.
[0419] S802: In response to a first touch operation on a first text content, the electronic device starts a first timer and a second timer, wherein the timing duration of the first timer is a first duration, and the timing duration of the second timer is a second duration, and the second duration is the sum of the first duration and the delay duration.
[0420] S803: When the first touch operation is kept long pressed, in response to the first timer reaching a first duration, the electronic device displays a first pop-up window around the first text content, where the first pop-up window includes one or more controls.
[0421] S804: When the first touch operation is maintained for a long time, in response to the second timer reaching a second duration, the electronic device displays a drag box including the first text content.
[0422] In this embodiment, the electronic device may be Figure 4 In the electronic device of the embodiment, the first application may be Figure 4 In the first application of the embodiment, the first interface may be Figure 4 In the display interface of the target page in the embodiment, the first view may be Figure 4 In the target control of the embodiment, the first text content can be Figure 4 In the embodiment, the text content of the target control, the first timer can be Figure 4 In the embodiment, the first timer and the second timer can be Figure 4 In the embodiment, the second timer, the first duration can be Figure 4 In the embodiment, the first timing duration or the system long press duration, the second duration can be Figure 4 The second timing duration in the embodiment, the delay duration can be Figure 4 In the first extended time of the embodiment, the first pop-up window may be Figure 4 In the embodiment, the new window, the first pop-up window can also be Figure 7 In the embodiment, the new window 71, the first pop-up window includes controls that may be Figure 7 In the new window 71 of the embodiment, the drag box can be Figure 4 In the embodiment, the drag box may also be Figure 3 In an embodiment, a drag box 312 is shown.
[0423] It is understandable that the first view in this embodiment may also be Fig.11 The target control in the embodiment. The first text content in this embodiment can also be Fig.11 The text content of the target control in the embodiment.
[0424] It can be understood that the touch operation of maintaining a long press can be understood as the touch operation neither moving nor lifting.
[0425] For specific implementations of S801-S804 of this embodiment, please refer to Figure 4 For specific implementations of steps S100-S215 in the embodiment, see Fig.11 The specific implementation of steps S100-S215 in the embodiment will not be repeated here. In this embodiment, the second duration can be used to determine whether the user intention corresponding to the first touch operation is a drag intention. When the first touch operation is kept long pressed, if the second timer reaches the second duration, it can be determined that the user intention corresponding to the first touch operation is a drag intention, and the electronic device can display a drag box containing the first text content, so that when the first touch operation is not lifted or moved, it prompts the user that the copying of the first text content has been completed and can be dragged, which can reduce the number of operations for copying the first text content, thereby improving the user's experience of using the electronic device. The second duration is the sum of the first duration and the delay duration, and can also achieve compatibility between the display logic of the drag box and the display logic of the pop-up window.
[0426] Optionally, the embodiment of the present application further provides a text dragging method which may also include S805-S806.
[0427] S805: In response to the first touch operation moving to the first area of the display screen of the electronic device, the electronic device pulls up the second application and displays a window of the second application in the second area of the display screen. The window of the second application includes one or more icons, each icon corresponding to a service capable of receiving the first text content.
[0428] S806: The first touch operation is moved to a position of a target icon among the one or more icons, and in response to the first touch operation being lifted, the second application delivers the first text content to a service corresponding to the target icon.
[0429] For example, the first region may be Figure 4 The hot zone in the embodiment may be, for example, Figure 3 In the embodiment, the hot zone 31 is not visible, and the second application can be Figure 4 In the embodiment, the second application, the second area is for example Figure 3 In the embodiment, in the area where the sidebar 32 is located, the window of the second application includes one or more icons such as Figure 3 In the embodiment, the icons included in the sidebar 32 and the services corresponding to the icons included in the window of the second application are as follows. Figure 3 The specific implementation principle and technical effect of S805-S806 are as follows: Figure 4 The specific implementation principle and technical effect of S218 in the embodiment are similar. Optionally, the first region may include the second region, and the area of the first region may be greater than or equal to the area of the second region. The first region may also be the second region.
[0430] In this way, the second application is pulled up during the movement of the first touch operation, and one or more icons are included in the window of the second application to facilitate the user to select the target business. The target business is the business corresponding to the target icon. The first touch operation moves to the position of the target icon in one or more icons, and in response to the lifting of the first touch operation, the second application transmits the first text content to the business corresponding to the target icon, realizing the convenient and fast transmission of the first text content between the first application and the target business, reducing the operation steps for the user to start the target business, and can improve the user experience.
[0431] Optionally, before the electronic device displays the drag box, the text dragging method provided by the embodiment of the present application further includes:
[0432] When the second timer reaches the second duration, the electronic device inquires that the electronic device displays the first pop-up window in response to the first touch operation.
[0433] The electronic device starts a third timer, and the timing duration of the third timer is a third duration, which is greater than or equal to the delay duration.
[0434] When the third timer reaches the third duration, the electronic device processes the first text content to obtain a drag box.
[0435] In this embodiment, the electronic device queries the electronic device to display the first pop-up window in response to the first touch operation, and starts the third timer, and obtains the drag box when the third timer reaches the third time. For a specific implementation principle, see Figure 4 The specific implementation principle shown in steps S209-S215 of the embodiment can also be seen in Fig.11 The specific implementation principles shown in steps S209-S215 of the embodiment are not described in detail in this embodiment.
[0436] The electronic device displays a pop-up window, and the user intention corresponding to the first touch operation may be the intention to operate the pop-up window, or it may be the intention to drag. Therefore, when judging that the electronic device displays a pop-up window in response to the first touch operation, the third timer and the third duration can be used to further accurately judge whether the user intention corresponding to the first touch operation is the intention to drag. If the first touch operation is not moved or lifted when the third timer reaches the third duration, it means that the user intention corresponding to the first touch operation is the intention to drag, and the electronic device obtains a drag box to display the drag box to prompt the user that the drag can be performed.
[0437] Optionally, in response to a first touch operation on the first text content, the method further includes:
[0438] In response to a down event of a first touch operation on a first view, the electronic device determines whether the view name of the first view is in a preset list. The preset list includes one or more view names of views that support system dragging.
[0439] When the electronic device determines that the view name of the first view is in the preset list, the electronic device stores the first text content in the memory.
[0440] In this embodiment, the view name of the first view can be Figure 4 The control name of the target control in the embodiment, the preset list can be Figure 4 In the embodiment, the whitelist, the preset list includes one or more view names that support system dragging, which can be Figure 4 The whitelist in the embodiment includes one or more control names of controls that support system dragging. In this embodiment, the electronic device determines whether the view name of the first view is in the preset list. When the electronic device determines that the view name of the first view is in the preset list, the specific implementation method of the electronic device storing the first text content in the memory is as follows: Figure 4 The specific implementation methods of steps S206-S207 in the embodiment are similar and will not be repeated here.
[0441] In this way, when the format of the first view is the textview format, the first view actively reports the view name and the first text content of the first view, and the electronic device obtains the view name and the first text content reported by the first view, and stores the first text content in the memory, so that when it is subsequently determined that the user intention corresponding to the first touch operation is a drag intention, the first text content is quickly used to create a drag box. The textview format can represent an implementation method that inherits the native text view of Android.
[0442] Optionally, when the third timer reaches the third duration, the electronic device may process the first text content according to steps S8041-S8042 to obtain a drag box, including:
[0443] S8041: When the third timer reaches a third duration, the electronic device determines whether there is a first text content in the memory.
[0444] S8042: When the electronic device determines that the first text content exists in the memory, the electronic device uses the preset configuration parameters and the first text content to create a drag box. The preset configuration parameters include the length and width of the drag box, the position of the touch position on the drag box, the shadow format of the drag box, the shadow color of the drag box, and the rounded corners of the drag box.
[0445] The specific implementation principles and technical effects of the steps shown in S8041-S8042 are Figure 4The specific implementation principles and technical effects of steps S214a and S215 in the embodiment are similar. In this way, the creation of the drag box is achieved, so that the drag box contains the first text content.
[0446] Optionally, when the third timer reaches the third duration, the electronic device processes the first text content, and a method for obtaining the drag box may also be as shown in S8043-S8047 below.
[0447] S8043: When the third timer reaches the third duration, the electronic device determines whether the first text content exists in the memory.
[0448] S8044: When the electronic device determines that the first text content does not exist in the memory, the electronic device searches for a view corresponding to the down event of the first touch operation from the root layout of the page to which the first text content belongs, and obtains a view name of the first view. The root layout includes a storage hierarchy of the first view. The specific implementation principle of this step is the same as Fig.11 The specific implementation principle of S214b-1 in the embodiment is similar and will not be repeated here.
[0449] S8045: The electronic device determines whether the view name of the first view is in a preset list, where the preset list includes one or more view names of views that support system dragging. Fig.11 The specific implementation principle and technical effect of S214b-2 in the embodiment are similar and will not be repeated here.
[0450] S8046: When the electronic device determines that the view name of the first view is in the preset list, the electronic device obtains the first text content of the first view. Fig.11 The specific implementation principle and technical effect of S214b-3 in the embodiment are similar and will not be repeated here.
[0451] S8047: The electronic device uses the preset configuration parameters and the first text content to create a drag box. The preset configuration parameters include the length and width of the drag box, the position of the touch position on the drag box, the shadow format of the drag box, the shadow color of the drag box, and the rounded corners of the drag box. The specific implementation principle and technical effect of this step are the same as Fig.11 The specific implementation principle and technical effect of S215 in the embodiment are similar and will not be repeated here.
[0452] In this way, when the format of the first view is not the textview format but other view formats, the first view cannot actively report the view name and the first text content of the first view, and the electronic device cannot obtain the view name and the first text content of the first view from the memory, it is possible to traverse the root layout to find the control corresponding to the touch position of the down event of the first touch operation and call the view framework to obtain the first text content of the found control, that is, the target control.
[0453] Optionally, the electronic device may obtain a new list from a server or other device, and update the preset list on the electronic device in the following manner: the electronic device obtains a new list. The electronic device determines whether the new list is a white list updated to the preset list. When the electronic device determines that the new list is a white list updated to the preset list, the electronic device updates the preset list to the new list.
[0454] The specific implementation principle and technical effect of updating the preset list in this embodiment are as follows: Fig.13 The specific implementation principle and technical effect of the whitelist update in the embodiment are similar and will not be repeated here.
[0455] Optionally, in response to the second timer reaching the second duration, after the electronic device displays the drag box, in response to the first touch operation moving to the first area of the display screen of the electronic device, the electronic device pulls up the second application and displays the window of the second application in the second area of the display screen.
[0456] The first touch operation moves to the third area of the display screen, the drag box moves to the third area with the first touch operation, and in response to the first touch operation being lifted, the electronic device controls the drag box to return to the position where the dragging starts. The third area does not include the second area.
[0457] Exemplarily, the third region may be Figure 4 The display window of the target page in the embodiment, for example Figure 3 The page window 30 in the embodiment. In response to the first touch operation moving to the first area of the display screen of the electronic device, the electronic device pulls up the second application and displays the window of the second application in the second area of the display screen. The specific implementation principle and technical effect are similar to Figure 3 The corresponding implementation principles and technical effects in the embodiments are similar and will not be described in detail here. Fig.10 The specific implementation principles and technical effects of the embodiments are similar and will not be repeated here.
[0458] In this way, the second application is pulled up during the movement of the first touch operation, and one or more icons are included in the window of the second application to facilitate the user to select the target business. The target business is the business corresponding to the target icon. In the scenario where the first touch operation is lifted without moving to the second area, in response to the lifting of the first touch operation, the electronic device controls the drag box to return to the position where the dragging started, realizing the view experience of drag cancellation, which can improve the user experience.
[0459] Optionally, the second area is a sidebar on the right side of the display screen. Figure 3 The sidebar 32 in the embodiment. In this way, a display space is reserved for the window of the first application to facilitate the user to view and search, and it is also convenient for the user to drag the drag box and select the target icon, which can improve the user experience.
[0460] Optionally, the text dragging method provided in this embodiment further includes S807-S810:
[0461] S807: The electronic device displays a second interface of a third application, where the second interface includes a second view, and the second view includes second text content.
[0462] S808: In response to a second touch operation on a second text content, the electronic device starts a first timer and a second timer.
[0463] S809: When the second touch operation is kept long pressed, in response to the first timer reaching a first duration, the electronic device displays a second pop-up window around the second text content, where the second pop-up window includes one or more controls.
[0464] S810: When the second timer has not reached the second duration, in response to the second touch operation moving, the electronic device turns off the second timer.
[0465] Exemplarily, the third application may be Figure 4 In the first application of the embodiment, the second interface can be Figure 4 In the display interface of the target page in the embodiment, the second view may be Figure 4 In the target control of the embodiment, the second text content can be Figure 4 In the embodiment, the text content of the target control, the second pop-up window can be Figure 4 In the embodiment, the new window, the second pop-up window can also be Figure 7 In the embodiment, the new window 71 and the second pop-up window may include the following controls: Figure 7 The specific implementation principle and technical effects of S807-S809 can be found in Figure 4 The specific implementation principles and technical effects of S100-S208 in the embodiment. The specific implementation principles and technical effects of S810 can be found in Figure 5 The specific implementation principles and technical effects of the embodiments.
[0466] In this way, if the second timer does not reach the second duration and the second touch operation moves, it can indicate that the user intention corresponding to the second touch operation is not a drag intention. When it is determined that the user intention is not a drag intention, the electronic device turns off the second timer, which can terminate the subsequent drag process and reduce the power consumption of invalid dragging.
[0467] Optionally, the text dragging method provided in this embodiment further includes S811-S814:
[0468] S811. The electronic device displays a third interface of a fourth application, where the third interface includes a third view, and the third view includes third text content.
[0469] S812: In response to a third touch operation on a third text content, the electronic device sets and starts a first timer and a second timer.
[0470] S813. When the third touch operation is maintained for a long time, in response to the first timer reaching a first duration, the electronic device displays a third pop-up window around the third text content, where the third pop-up window includes one or more controls.
[0471] S814: When the second timer has not reached the second duration, in response to the third touch operation being lifted, the electronic device turns off the second timer.
[0472] Exemplarily, the fourth application may be Figure 4 In the first application of the embodiment, the third interface can be Figure 4 In the display interface of the target page in the embodiment, the third view may be Figure 4 In the target control of the embodiment, the third text content can be Figure 4 In the embodiment, the text content of the target control, the third pop-up window can be Figure 4 In the embodiment, the new window, the third pop-up window can also be Figure 7 In the embodiment, the new window 71 and the third pop-up window may include the following controls: Figure 7 The specific implementation principle and technical effects of S811-S813 can be found in Figure 4 The specific implementation principles and technical effects of S100-S208 in the embodiment. The specific implementation principles and technical effects of S814 can be found in Figure 6 The specific implementation principles and technical effects of the embodiments.
[0473] In this way, if the second timer does not reach the second duration and the third touch operation is lifted, it can be indicated that the user intention corresponding to the third touch operation is not a drag intention. After determining that the user intention is not a drag intention, the electronic device turns off the second timer, which can terminate the subsequent drag process and reduce the power consumption of invalid dragging.
[0474] Optionally, the text dragging method provided in this embodiment further includes S815-S819:
[0475] S815. The electronic device displays a fourth interface of a fifth application, where the fourth interface includes a fourth view, and the fourth view includes fourth text content.
[0476] S816: In response to a fourth touch operation on a fourth text content, the electronic device starts a first timer and a second timer.
[0477] S817. When the fourth touch operation is maintained for a long time, in response to the first timer reaching a first duration, the electronic device displays a fourth pop-up window around the fourth text content, where the fourth pop-up window includes one or more controls.
[0478] S818: When the fourth touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device queries that the electronic device displays a fourth pop-up window in response to the fourth touch operation, and the electronic device starts a third timer, the timing duration of the third timer is the third duration, and the third duration is greater than or equal to the delay duration.
[0479] S819: When the third timer has not reached the third duration, in response to the fourth touch operation movement, the electronic device turns off the third timer.
[0480] Exemplarily, the fifth application may be Figure 4 In the first application of the embodiment, the fourth interface can be Figure 4 In the display interface of the target page in the embodiment, the fourth view may be Figure 4 In the target control of the embodiment, the fourth text content can be Figure 4 In the embodiment, the text content of the target control, the fourth pop-up window can be Figure 4 In the embodiment, the new window, the fourth pop-up window can also be Figure 7 In the embodiment, the new window 71 and the fourth pop-up window may include the following controls: Figure 7 The specific implementation principle and technical effects of S815-S818 can be found in Figure 4 The specific implementation principles and technical effects of S100-S212 in the embodiment and the specific implementation principles and technical effects of S819 can be the specific implementation principles and technical effects of S810.
[0481] In this way, if the third timer does not reach the third duration and the fourth touch operation moves, it can indicate that the user intention corresponding to the fourth touch operation is not a drag intention. When it is determined that the user intention is not a drag intention, the electronic device turns off the second timer, which can terminate the subsequent drag process and reduce the power consumption of invalid dragging.
[0482] Optionally, the text dragging method provided in this embodiment further includes S820-S824:
[0483] S820: The electronic device displays a fifth interface of a sixth application, where the fifth interface includes a fifth view, and the fifth view includes fifth text content.
[0484] S821: In response to a fifth touch operation on a fifth text content, the electronic device starts a first timer and a second timer.
[0485] S822. When the fifth touch operation is maintained for a long time, in response to the first timer reaching a first duration, the electronic device displays a fifth pop-up window around the fifth text content, where the fifth pop-up window includes one or more controls.
[0486] S823: When the fifth touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device queries that the electronic device displays a fifth pop-up window in response to the fifth touch operation, and the electronic device starts a third timer, the timing duration of the third timer is the third duration, and the third duration is greater than or equal to the delay duration.
[0487] S824: When the third timer has not reached the third duration, in response to the fifth touch operation being lifted, the electronic device turns off the third timer.
[0488] Exemplarily, the sixth application may be Figure 4 In the first application of the embodiment, the fifth interface can be Figure 4 In the display interface of the target page in the embodiment, the fifth view may be Figure 4 In the target control of the embodiment, the fifth text content can be Figure 4 In the embodiment, the text content of the target control, the fifth pop-up window can be Figure 4 In the embodiment, the new window, the fifth pop-up window can also be Figure 7 In the embodiment, the new window 71, the fifth pop-up window includes controls that may be Figure 7 The specific implementation principle and technical effects of S820-S823 can be found in Figure 4 The specific implementation principle and technical effect of S100-S212 in the embodiment. The specific implementation principle and technical effect of S824 can be the specific implementation principle and technical effect of S814.
[0489] In this way, if the third timer does not reach the third duration and the fifth touch operation is lifted, it can be indicated that the user intention corresponding to the fifth touch operation is not a drag intention. After determining that the user intention is not a drag intention, the electronic device turns off the second timer, which can terminate the subsequent drag process and reduce the power consumption of invalid dragging.
[0490] The text dragging method provided in the embodiment of the present application can be applied to electronic devices with communication functions. The electronic devices include terminal devices, and the specific device form of the terminal devices can refer to the above related descriptions, which will not be repeated here.
[0491] An embodiment of the present application provides an electronic device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the above method.
[0492] The embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above related embodiments, and will not be repeated here.
[0493] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The above method is implemented when the computer program is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.
[0494] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.
[0495] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.
[0496] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0497] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.
Claims
1. A text dragging method, characterized in that: The method comprises: The electronic device displays a first interface of a first application, where the first interface includes a first view, and the first view includes first text content; In response to a first touch operation on the first text content, the electronic device starts a first timer and a second timer, the timing duration of the first timer is a first duration, the timing duration of the second timer is a second duration, and the second duration is the sum of the first duration and a delay duration; In a case where the first touch operation is kept long pressed, in response to the first timer reaching the first duration, the electronic device displays a first pop-up window around the first text content, where the first pop-up window includes one or more controls; In a case where the first touch operation is maintained for a long time, in response to the second timer reaching the second duration, the electronic device displays a drag box, where the drag box includes the first text content.
2. The method according to claim 1, characterized in that Before the electronic device displays the drag box, the method further includes: When the second timer reaches the second duration, the electronic device queries that the electronic device displays the first pop-up window in response to the first touch operation; The electronic device starts a third timer, the timing duration of the third timer is a third duration; the third duration is greater than or equal to the delay duration; When the third timer reaches the third duration, the electronic device processes the first text content to obtain the drag box.
3. The method according to claim 2, characterized in that In response to a first touch operation on the first text content, the method further includes: In response to a down event of the first touch operation on the first view, the electronic device determines whether the view name of the first view is in a preset list; the preset list includes one or more view names of views supporting system drag; When the electronic device determines that the view name of the first view is in the preset list, the electronic device stores the first text content in a memory.
4. The method according to claim 3, characterized in that When the third timer reaches the third duration, the electronic device processes the first text content to obtain the drag box, including: When the third timer reaches the third duration, the electronic device determines whether the first text content exists in the memory; When the electronic device determines that the first text content exists in the memory, the electronic device uses preset configuration parameters and the first text content to create the drag box; the preset configuration parameters include the length and width of the drag box, the position of the touch position on the drag box, the shadow format of the drag box, the shadow color of the drag box and the rounded corners of the drag box.
5. The method according to claim 2, characterized in that: When the third timer reaches the third duration, the electronic device processes the first text content to obtain the drag box, including: When the third timer reaches the third duration, the electronic device determines whether the first text content exists in the memory; When the electronic device determines that the first text content does not exist in the memory, the electronic device searches for a view corresponding to the down event of the first touch operation from a root layout of a page to which the first text content belongs, and obtains a view name of the first view; the root layout includes a storage hierarchy of the first view; The electronic device determines whether the view name of the first view is in a preset list, where the preset list includes one or more view names of views supporting system drag; When the electronic device determines that the view name of the first view is in the preset list, the electronic device obtains the first text content of the first view; The electronic device uses preset configuration parameters and the first text content to create the drag box; the preset configuration parameters include the length and width of the drag box, the position of the touch position on the drag box, the shadow format of the drag box, the shadow color of the drag box and the rounded corners of the drag box.
6. The method according to any one of claims 3 to 5, characterized in that: Also includes: The electronic device obtains a new list; The electronic device determines whether the new list is an update of the preset list; When the electronic device determines that the new list is a white list updated from the preset list, the electronic device updates the preset list to the new list.
7. The method according to any one of claims 1 to 6, characterized in that: Also includes: In response to the first touch operation moving to the first area of the display screen of the electronic device, the electronic device pulls up a second application and displays a window of the second application in the second area of the display screen; The window of the second application includes one or more icons, each of which corresponds to a service capable of receiving the first text content; The first touch operation is moved to a position of a target icon among the one or more icons, and in response to the first touch operation being lifted, the second application delivers the first text content to a service corresponding to the target icon.
8. The method according to any one of claims 1 to 6, characterized in that In the case where the first touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device displays a drag box, and after the drag box includes the first text content, further includes: In response to the first touch operation moving to the first area of the display screen of the electronic device, the electronic device pulls up a second application and displays a window of the second application in the second area of the display screen; the window of the second application includes one or more icons, each of which corresponds to a service capable of receiving the first text content; The first touch operation moves to a third area of the display screen, the drag box moves to the third area along with the first touch operation, and in response to the first touch operation being lifted, the electronic device controls the drag box to return to the position where the dragging starts; the third area does not include the second area.
9. The method according to claim 7 or 8, characterized in that: The second area is a sidebar on the right side of the display screen.
10. The method according to any one of claims 1 to 9, characterized in that Also includes: The electronic device displays a second interface of a third application, the second interface includes a second view, and the second view includes second text content; In response to a second touch operation on the second text content, the electronic device starts the first timer and the second timer; In a case where the second touch operation is kept long pressed, in response to the first timer reaching the first duration, the electronic device displays a second pop-up window around the second text content, where the second pop-up window includes one or more controls; When the second timer has not reached the second duration, in response to the second touch operation moving, the electronic device turns off the second timer.
11. The method according to any one of claims 1 to 10, characterized in that Also includes: The electronic device displays a third interface of a fourth application, the third interface includes a third view, and the third view includes third text content; In response to a third touch operation on the third text content, the electronic device is configured to start the first timer and the second timer; In a case where the third touch operation is kept long pressed, in response to the first timer reaching the first duration, the electronic device displays a third pop-up window around the third text content, where the third pop-up window includes one or more controls; When the second timer has not reached the second duration, in response to the third touch operation being lifted, the electronic device turns off the second timer.
12. The method according to any one of claims 1 to 11, characterized in that Also includes: The electronic device displays a fourth interface of a fifth application, the fourth interface includes a fourth view, and the fourth view includes fourth text content; In response to a fourth touch operation on the fourth text content, the electronic device starts the first timer and the second timer; In a case where the fourth touch operation is kept long pressed, in response to the first timer reaching the first duration, the electronic device displays a fourth pop-up window around the fourth text content, where the fourth pop-up window includes one or more controls; In the case where the fourth touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device inquires that the electronic device displays the fourth pop-up window in response to the fourth touch operation, and the electronic device starts a third timer, the timing duration of the third timer is a third duration; the third duration is greater than or equal to the delay duration; When the third timer does not reach the third duration, in response to the fourth touch operation movement, the electronic device turns off the third timer.
13. The method according to any one of claims 1 to 12, characterized in that Also includes: The electronic device displays a fifth interface of a sixth application, the fifth interface includes a fifth view, and the fifth view includes fifth text content; In response to a fifth touch operation on the fifth text content, the electronic device starts the first timer and the second timer; In a case where the fifth touch operation is kept long pressed, in response to the first timer reaching the first duration, the electronic device displays a fifth pop-up window around the fifth text content, where the fifth pop-up window includes one or more controls; In the case where the fifth touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device inquires that the electronic device displays the fifth pop-up window in response to the fifth touch operation, and the electronic device starts a third timer, the timing duration of the third timer is a third duration; the third duration is greater than or equal to the delay duration; When the third timer has not reached the third duration, in response to the fifth touch operation being lifted, the electronic device turns off the third timer.
14. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 13.
15. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Content copying method and apparatus in instant messaging software
CN105278818A
Interface element display method and device
CN114756151A
Application interaction method and electronic equipment
CN115033142A
Dragging method of control content, electronic equipment and system
CN115729431A
Method for providing contents for mobile terminal on the basis of user touch and hold time
US20210089177A1