Picture dragging method and related device

By re-drawing and copying the image content of the user when he long presses the target control and creating a drag and drop box, the problem of cumbersome content delivery operations is solved, improving the user experience and operation efficiency.

CN119620898APending Publication Date: 2025-03-14HONOR DEVICE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311150709.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-06
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

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.

Method used

By long pressing the target control, if the electronic device determines that the format of the drawable object of the target control is not the first format, the electronic device re-draws the drawn picture based on the drawable object of the target control, and creates a drag box to display the drag box to prompt the user that the image content of the target control has been copied and stored, and the user can drag and drop.

Benefits of technology

The number of operations for copying the image content of the target control is reduced, the user's experience of using the electronic device is improved, and the second application can be pulled up during the movement process, reducing the number of operations for receiving the image content service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119620898A_ABST
    Figure CN119620898A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a picture dragging method and a related device, and is applied to the technical field of terminals. According to the method, when a user presses a target control for a long time, if the electronic equipment judges that the format of a drawable object of the target control is not a first format, a drawn picture is obtained through redrawing according to the drawable object of the target control, and the content of the drawn picture comprises the picture content of the target control; the picture content of the target control can be copied and stored, the operation frequency of copying the content of the target control can be reduced, a dragging frame can be created, the drawn picture is displayed in the dragging frame, a user is prompted that the picture content of the target control is copied and stored by displaying the dragging frame, the user can drag the picture content, and the user experience is improved. The dragging frame can move along with the first touch operation, and the electronic equipment can pull up the second application in the moving process, so that the number of starting operation times of a service for receiving the picture content of the target control is reduced, and the use experience of a user on the electronic equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a picture 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 forward content in one application on an electronic device to another application, thereby achieving 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] An embodiment of the present application provides a method for dragging an image, which is applied to the field of terminal technology. When a user long presses a target control, if the electronic device determines that the format of a drawable object of the target control is not a first format, the electronic device redraws the drawn image according to the drawable object of the target control. The content of the drawn image includes the image content of the target control, thereby copying and storing the image content of the target control. This can reduce the number of operations for copying the image content of the target control, and can also create a drag box to display the drawn image in the drag box. By displaying the drag box, the user is prompted that the image content of the target control has been copied and stored, and the user can drag. The drag box can move with the first touch operation, and the electronic device can also pull up a second application during the movement to reduce the number of operations for opening a service that receives the image content of the target control, thereby improving the user's experience of using the electronic device.

[0005] In a first aspect, an embodiment of the present application provides a method for dragging a picture, the method comprising:

[0006] The electronic device displays a first interface of a first application, the first interface includes a first view, and the first view includes a first picture. The electronic device receives a first touch operation on the first picture. When the first touch operation is kept pressed for a long time, when the electronic device determines that the format of the drawable object of the first picture is not the first format, the electronic device obtains the drawable object of the first picture, redraws the second picture according to the drawable object of the first picture, and creates a drag box. Among them, the content of the second picture includes the content of the first picture. The second picture is displayed in the drag box. When the first touch operation moves, the drag box moves with the first touch operation. 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 picture displayed by the drag box. The first format is, for example, a bitmap format.

[0007] In this way, when the first touch operation is maintained for a long time, if the electronic device determines that the format of the drawable object of the first picture is not the first format, the electronic device obtains the drawable object of the first picture, redraws the second picture according to the drawable object of the first picture, and creates a drag box. The content of the second picture is the same as the content of the first picture. The electronic device can display the drag box, and the second picture is displayed in the drag box to prompt the user that the content of the first picture has been copied and stored. The user can drag and drop, which can reduce the number of operations to copy the content of the first picture. The drag box can move with the first touch operation, and the second application can be pulled up during the movement of the first touch operation. The window of the second application includes one or more icons to facilitate the user to select the target business. The target business is the business corresponding to the target icon. In this way, the user's experience of using the electronic device can be improved.

[0008] In one possible implementation, before the electronic device obtains the drawable object of the first image, the method further includes: the electronic device determines whether the format of the first view is the second format. When the electronic device determines that the format of the first view is the second format, the electronic device determines whether the format of the drawable object of the first image is the first format. Alternatively, when the electronic device determines that the format of the first view is not the second format, the electronic device obtains the display area resources of the first view, redraws the third image based on the display area resources of the first view, and creates a drag box. The third image can be displayed in the drag box. The display area resources of the first view include the drawable object and the blank area of ​​the first image, and the content of the third image includes the content of the first image. The second format is, for example Figure 4 Inherited ImageView format in the example.

[0009] In this way, when the format of the first view is not the second format, the electronic device obtains the display area resource of the first view, and the third picture redrawn by the electronic device according to the display area resource of the first view can not only contain the content of the first picture, but also contain a blank area, so that the content of the first picture can be copied and stored when the user long presses, and the number of operations for copying the content of the first picture can be reduced. The third picture can also be displayed in the created drag box, and the display of the drag box can prompt the user that the copying and storage of the content of the first picture has been completed, and the user can drag.

[0010] In a possible implementation, the method further includes: when the electronic device determines that the format of the drawable object of the first picture is the first format, the electronic device acquires the first picture and creates a drag box in which the first picture can be displayed.

[0011] In this way, when the format of the first view is the second format and the format of the drawable object of the first picture is the first format, the electronic device obtains the drawable object of the first picture, that is, obtains the bitmap corresponding to the first picture, and creates a drag box so that the drag box displays the first picture. When the user long presses, the content of the first picture can be copied and stored without redrawing the image resources of the first view. This not only reduces the number of operations for copying the content of the first picture, but also allows the drag box to be created more quickly than when the drawable object of the first picture needs to be redrawn, thereby prompting the user earlier that the copying and storage of the content of the first picture has been completed and the user can drag.

[0012] In a possible implementation, the first format is a bitmap format. The second format represents an implementation that inherits the native image view of Android.

[0013] In this way, by judging the form of the image resource of the first view, different acquisition methods can be used to obtain the picture displayed in the drag box. By judging the format of the first view, different acquisition methods can be used to obtain the picture displayed in the drag box.

[0014] In a possible implementation, the method further includes: when the electronic device redraws the second picture according to the drawable object of the first picture, the electronic device starts a first timer, the timing duration of the first timer is a first duration. When the first timer reaches the first duration, the electronic device deletes the stored second picture.

[0015] In this way, sufficient storage space can be provided for the next storage of picture content, and the probability of malicious spread of pictures stored in the electronic device can be reduced.

[0016] It is understandable that if the electronic device stores the first picture, when the first timer reaches the first duration, the electronic device deletes the stored first picture. If the electronic device stores the third picture, when the first timer reaches the first duration, the electronic device deletes the stored third picture.

[0017] In a possible implementation, the method further includes: when the first touch operation moves to the position of the target icon in the one or more icons, in response to the first touch operation being lifted, the second application transmits the universal resource identifier Uri of the image displayed in the drag box to the service corresponding to the target icon. The service corresponding to the target icon obtains the image displayed in the drag box according to the Uri.

[0018] In this way, the first touch operation moves to the position of the target icon in one or more icons. In response to the first touch operation being lifted, the second application passes the Uri to the business corresponding to the target icon. The business corresponding to the target icon obtains the content of the first picture according to the Uri, thereby realizing convenient and fast transmission of the content of the first picture between the first application and the target business, reducing the operation steps for users to start the target business, and improving the user experience.

[0019] In a possible implementation, the method further includes: when the first touch operation moves to the third area of ​​the display screen and the drag box moves to the third area along 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 starts, and the electronic device deletes the stored picture displayed by the drag box. The third area does not include the second area.

[0020] In this way, in a scenario where the first touch operation is lifted without moving to the second area, 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, thereby realizing a view experience of drag cancellation, which can improve the user experience. The electronic device deletes the stored pictures included in the drag box to provide sufficient storage space for the next storage of the picture content, and can also reduce the probability of pictures stored in the electronic device being maliciously spread.

[0021] In a possible implementation, the second area is a sidebar on the right side of the display screen.

[0022] In this way, a display space is reserved for the window of the first application so that the user can easily view and search for the display space, and it is also convenient for the user to drag the drag box and select the target icon, thereby improving the user experience.

[0023] In a possible implementation, before the electronic device obtains the drawable object of the first picture, it also includes: in response to the first touch operation, the electronic device starts the second timer and the third timer, the timing duration of the second timer is the second duration, the timing duration of the third timer is the third duration, and the third duration is the sum of the second duration and the delay duration. 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 first pop-up window around the first picture, 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 third timer reaching the third duration, the electronic device inquires that the electronic device displays the first pop-up window in response to the first touch operation, and the electronic device starts the fourth timer, and the timing duration of the fourth timer is the fourth duration. The fourth duration is greater than or equal to the delay duration. The electronic device obtains the drawable object of the first picture, redraws the second picture according to the drawable object of the first picture, and creates a drag box, including: in response to the fourth timer reaching the fourth duration, the electronic device obtains the drawable object of the first picture, redraws the second picture according to the drawable object of the first picture, creates a drag box, and displays the drag box.

[0024] In this way, the third 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 third timer reaches the third duration, 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 a drag intention. The fourth timer and the fourth duration can be used to further accurately determine whether the user intention corresponding to the first touch operation is a drag intention. If the first touch operation is not moved or lifted when the fourth timer reaches the fourth duration, it can be determined that the user intention corresponding to the first touch operation is a drag intention. The electronic device can display a drag box to prompt the user that the copying of the content of the first picture has been completed and can be dragged when the first touch operation is not lifted or moved, which can reduce the number of operations on the content of the first picture, thereby improving the user's experience of using the electronic device. The third duration is the sum of the second 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.

[0025] 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 fourth picture. In response to a second touch operation on the fourth picture, the electronic device starts a second timer and a third timer. In the case where the second touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device displays a second pop-up window around the fourth picture, and the second pop-up window includes one or more controls. In the case where the third timer does not reach the third duration, in response to the second touch operation moving or lifting, the electronic device turns off the third timer.

[0026] In this way, if the third timer does not reach the third duration, the second touch operation moves or the second touch operation is lifted, it can indicate that the user intention corresponding to the second touch operation is not a drag intention. After determining that the user intention is not a drag intention, the electronic device turns off the third timer, which can terminate the subsequent drag process and reduce the power consumption of invalid dragging.

[0027] 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 fifth picture. In response to the third touch operation on the fifth picture, the electronic device starts the second timer and the third timer. In the case where the third touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device displays a third pop-up window around the fifth picture, and the third pop-up window includes one or more controls. In the case where the third touch operation is kept long pressed, in response to the third timer reaching the third duration, the electronic device queries that the electronic device displays the third pop-up window in response to the third touch operation, and the electronic device starts a fourth timer, and the timing duration of the fourth timer is the fourth duration. The fourth duration is greater than or equal to the delay duration. In the case where the fourth timer does not reach the fourth duration, in response to the third touch operation moving or lifting, the electronic device turns off the fourth timer.

[0028] In this way, if the fourth timer does not reach the fourth time length, the third touch operation moves or 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 fourth timer, which can terminate the subsequent drag process and reduce the power consumption of invalid dragging.

[0029] 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.

[0030] 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.

[0031] 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.

[0032] 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.

[0033] 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

[0034] Figure 1 A schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application;

[0035] Figure 2 A software structure block diagram of the electronic device 100 provided in an embodiment of the present application;

[0036] Figure 3 A picture dragging scene diagram provided in an embodiment of the present application;

[0037] Figure 4 A module interaction flow chart provided for an embodiment of the present application;

[0038] Figure 5 A flowchart of module interaction in a finger movement scenario before the third timer times out provided in an embodiment of the present application;

[0039] Figure 6 A flowchart of module interaction in a scenario where a finger is lifted before the third timer times out provided in an embodiment of the present application;

[0040] Figure 7 A scene graph of a new window popping up around a target control provided in an embodiment of the present application;

[0041] Figure 8 A schematic diagram of the process of obtaining a bitmap provided in an embodiment of the present application;

[0042] Fig. 9 A flowchart of module interaction in a finger movement scenario after calling the drag framework interface provided by an embodiment of the present application;

[0043] Fig.10 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;

[0044] Fig.11 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;

[0045] Fig.12 Another module interaction flow chart provided for an embodiment of the present application;

[0046] Fig.13 A schematic diagram of a display interface provided in an embodiment of the present application;

[0047] Fig.14A scene diagram of a finger being lifted after the interface of the drag frame is called, provided in an embodiment of the present application;

[0048] Fig.15 A schematic diagram of the process of saving a whitelist provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] 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:

[0050] 1. Electronic equipment

[0051] 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.

[0052] 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.

[0053] 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.

[0054] 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.

[0055] 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.

[0056] 2. Touch events

[0057] 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.

[0058] It is understandable that the display screen of the electronic device may be a touch screen.

[0059] 3. Falling events

[0060] 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.

[0061] 4. Mobile events

[0062] 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.

[0063] 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.

[0064] 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.

[0065] 5. Raise the event

[0066] 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.

[0067] 6. Bitmap

[0068] A bitmap is a representation of an image in memory. A bitmap is a collection of multiple pixels. Any image loaded into memory is a bitmap object.

[0069] 7. Drawable

[0070] A drawable can have multiple formats. For example, a drawable can be a bitmap format drawable object (BitmapDrawable), a vector format drawable object (VectorDrawable), or a custom drawable object (custom drawable).

[0071] 8. 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 2As shown, the application framework layer may include a window management framework, a content recognition filling framework, a content storage service, a view framework, a drag and drop 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 content storage service is also a new module added to the embodiment of the present application. The content storage service can be used to store the bitmap of the image and clear the stored bitmap regularly. The bitmap can be used to create a drag box and process the business. The content storage service is a system service. Unauthorized applications cannot obtain the information stored in the content storage service. Therefore, the content storage service can improve the security of the stored information.

[0094] 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. The display interface may be composed of one or more views. Both text controls and image controls belong to views. For example, the display interface presented on the chat page of the WeChat application may include multiple text controls and multiple image controls.

[0095] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0096] 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.

[0097] 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.

[0098] 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.

[0099] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0100] 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.

[0101] 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.

[0102] The system library may include multiple functional modules, such as surface manager, multimedia library, graphics rendering library (such as OpenGL ES), relational database, etc.

[0103] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0104] 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.

[0105] The graphics rendering library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0106] Relational databases are used to store preset data.

[0107] The hardware abstraction layer may include an audio abstraction interface, a Bluetooth abstraction interface, etc.

[0108] 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.

[0109] 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.

[0110] 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.

[0111] Some electronic devices provide a function to forward content in applications. In a possible implementation, content in one application can be transferred to another application in the following ways:

[0112] S1. A user clicks on a display screen of an electronic device to open an application on the electronic device, such as application A. In response to the user's click operation, the electronic device displays a display interface of application A, and the display interface of application A may include at least one control, such as a picture control a. Application A may be a WeChat application.

[0113] S2. The user clicks on the picture control a. In response to the user's click operation, the electronic device displays the picture of the picture control a and the download control in full screen.

[0114] S3. The user can click the download control to save the picture of the picture control a to the album application.

[0115] S4. The user clicks or slides the display screen to switch application A to the background, or exits application A.

[0116] S5. The user clicks on the display screen of the electronic device to open another application on the electronic device, such as application B. Application B may be an image processing application or other applications, such as a note-taking application. In response to the user's click operation, the electronic device displays the display interface of application B, and the display interface of application B may include an add button.

[0117] S6. The user clicks the add button. In response to the user's click operation, the electronic device displays a display interface of the photo album application, and the display interface of the photo album application includes the picture of the picture control a.

[0118] S7: The user may click on the picture of the picture control a in the display interface of the album application. In response to the user's click operation, the electronic device adds the picture of the picture control a to the display interface of application B.

[0119] S8. The user can operate on the display interface of application B to process the image of the image control a.

[0120] In this way, the image of the image control a is transferred and processed between different applications (such as application A and application B).

[0121] However, the transfer of the picture of picture control a between application A and application B requires the user to click the picture of picture control a twice to complete the copying and storage of the picture of picture control a. The operation is relatively cumbersome and may reduce the user's experience of using the electronic device.

[0122] In view of this, an embodiment of the present application provides a method for dragging a picture. When a user long presses a target control, if the electronic device determines that the format of a drawable object of the target control is not a first format (for example, a bitmap format), the electronic device redraws the drawn picture according to the drawable object of the target control. The content of the drawn picture includes the picture content of the target control, thereby copying and storing the picture content of the target control. The number of operations for copying the picture content of the target control can be reduced, and a drag box can be created so that the drag box displays the drawn picture. The drag box is displayed to prompt the user that the picture content of the target control has been copied and stored, and the user can drag. The drag box can move with the first touch operation, and the electronic device can also pull up the second application during the movement of the first touch operation. The number of operations for opening the service of receiving the picture content of the target control can also be reduced, thereby improving the user's experience of using the electronic device.

[0123] 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 an image processing application.

[0124] The image dragging method provided by this application is described below in conjunction with some embodiments.

[0125] 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 picture dragging scene diagram provided in an embodiment of the present application is shown.

[0126] 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 figure includes control 301, control 302, control 303, control 304, control 305, control 306, control 309, the text "aaa", control 310, control 311, input box 312, control 313 and control 314. Among them, control 301, control 303, control 305 and control 306 can all be picture controls. Picture controls can be controls containing pictures. Control 302 and control 304 can both be text controls. Text controls contain text content. Figure 3 As shown in a in , controls 301, 303 and 305 can be WeChat avatars. Controls 302, 304 and 306 can be chat contents, wherein control 306 can be a picture taken by a user using an electronic device. Control 309 is a control indicating return. aaa indicates a friend's nickname. Control 310 is a control indicating more. Control 311 is a control indicating voice. Control 313 is a control indicating emoticons. Control 314 is a control indicating addition.

[0127] In such Figure 3 In the interface shown in a of FIG. 1 , the user can long press the control 306, and the electronic device can display the following in response to the long press operation: 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 307, Figure 3 For other display contents of the interface shown in b, see Figure 3 The contents of the interface shown in a in the figure are not repeated here. The long press feedback 307 can be displayed on the interface of the control 306 corresponding to the long press position. Figure 3 In the interface shown in b, the control 306 displays a shadow. The control 306 displays a shadow to prompt the user that the electronic device is generating a drag box.

[0128] 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 307 shown in b in FIG. If the long press feedback is tactile feedback, the long press feedback is not visible.

[0129] In such Figure 3 In the interface shown in b in FIG. 1 , the user can keep pressing the finger, and the electronic device can display the following Figure 3 The interface shown in c in Figure 1 is as follows. Figure 3 The interface shown in c in FIG. 1 includes a drag box 308, and the location of the drag box 308 is consistent with the touch location of the finger. The drag box 308 includes the image content of the control 306, the drag box shadow, and the drag box rounded corners. The drag box 308 can be a portion of the electronic device that responds to the user's touch. Figure 3 The long press operation on the interface shown in b is generated using the image content of control 306. Figure 3 For other display contents of the interface shown in c, see Figure 3 The contents of the interface shown in b in the figure will not be described here. Figure 3 In the interface shown in c, control 306 does not display a shadow.

[0130] 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 transfer of the drag box content.

[0131] In such Figure 3 In the interface shown in c in FIG. 1 , the user can move the finger to make the drag box 308 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.

[0132] like Figure 3 The interface shown in d in the figure includes a drag box 308, a page window 30 of the first application, a sidebar 32, and an invisible hot zone 31. The sidebar 32 includes an icon 321 of a QQ application, an icon 322 of a music application, an icon 323 of an image processing application, an icon 324 of a note application, an icon 325 of a send to WeChat status service, an icon 326 of a send to QQ friends service, and an icon 327 of a video application. The drag box 308 is above the page window 30. The drag box 308 can be displayed on the interface above the page window 30. For the content in the page window 30, see Figure 3 The contents of the interface shown in a are not repeated here.

[0133] 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 an image processing application. The sub-service may also be a service provided by the WeChat application to send to WeChat status or a service provided by the QQ application to send to QQ friends.

[0134] The sub-service icons can be displayed in a flowing manner in the sidebar 32. The user can drag the drag box 308 to the top of the target sub-service icon, so that the target sub-service uses the image content of the control 306 to perform service processing.

[0135] For example, taking the target sub-business as a note processing application, Figure 3 In the interface shown in d in FIG. 1 , the user can move the finger to drag the drag box 308 to the top of the note 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 308 is located above the icon 324 of the note application in the sidebar 32 .

[0136] 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. 1 includes a control 341 indicating return, a control 342 indicating the previous step, a control 343 indicating the next step, a control 344 indicating selection, a title input box 345, the text "Today 8:00", a control 346 indicating classification, and a picture content 347 of the control 306.

[0137] The user drags the drag box 308 to the top of the note application icon 324, and when the user lifts the finger, the second application recognizes that the icon corresponding to the touch position of the lift event is the note application icon, and the second application can determine that the target sub-service is the note application. The second application can pull up the note application, so that the note application obtains the picture content of the control 306, and then 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.

[0138] For example, taking the target sub-service as the send-to-QQ-friend service provided by the QQ application as an example, Figure 3 In the interface shown in d in FIG. 1 , the user can move the finger to drag the drag box 308 to the top of the icon 326 of the send to QQ 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 an image processing application, an icon 324 of a note application, an icon 325 of a send to WeChat status service, an icon 326 of a send to QQ 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 3In the interface shown in FIG. 8 , the drag box 308 is located above the icon 326 of the send to QQ friend service in the sidebar 32 .

[0139] 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 “Send to”, a multiple-selection control 362, a search box 363, text “Recent Chats”, a create new chat control 364, a My Computer control 365, a Friend B control 366, a group chat A control 367, a Friend C control 368 and a group chat B control 369.

[0140] The user drags the drag box 308 to the top of the icon 326 of the send to QQ friends service. When the user lifts the finger, the second application recognizes that the icon corresponding to the touch position of the lift event is the icon of the send to QQ friends service. The second application determines that the target sub-service is the send to QQ friends service. The second application pulls up the QQ application, so that the QQ application pulls up the send to QQ friends service, and then the send to QQ friends service can obtain the picture content of the control 306, 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 picture of control 306 will be sent to the selected friend or group chat. Figure 3 Friend B control 366 or friend C control 368 in the interface shown in h. Group chat control, for example Figure 3 The group chat A control 367 or the group chat B control 369 in the interface shown in h.

[0141] The picture dragging method provided in this embodiment realizes the copying of the picture content of the target control when the user long presses the target control (such as control 306). By displaying the drag box, the user can be prompted that the copying of the picture content of the target control has been completed. The user can drag the drag box. When the user drags the drag box and moves it above the target sub-business icon, the user can lift it up. In response to the user's lifting operation, the second application identifies the target sub-business and pulls up the target sub-business, so that the sub-business obtains the picture content of the target control in time for business processing. The picture dragging method provided in this embodiment realizes that the picture content of the target control is transferred to the target sub-business after the user long presses the target control and moves the finger. The picture of the target control can be copied without clicking the picture of the target control twice. The target sub-business can be pulled up through the second application without the user performing multiple clicks on the application corresponding to the target sub-business, so that the target sub-business obtains the picture content of the target control. The overall operation is simple and convenient, which can improve the user's experience of using the electronic device.

[0142] Combined with the above Figure 3 The dragging scenario shown illustrates a scenario in which a picture of a target control of a first application is dragged.

[0143] exist Figure 3 In the drag scene shown, the format of the picture control in the first application may be the second format or not. The format of the picture control is the second format, for example, the format of the picture control is the inherited ImageView format. Inheriting ImageView can mean inheriting the implementation method of the native picture control (ImageView) of Android. The implementation method of the native picture control (ImageView) of Android, for example, the code writing method and design pattern of the native picture control (ImageView) of Android. The format of the picture control of the first application is the inherited ImageView format, which can be understood as the implementation method of the picture control of the first application inherits the implementation method of the native picture control (ImageView) of Android. It can be understood that the format of the picture control of the first application is the inherited ImageView format, the implementation method of the picture control of the first application inherits the implementation method of the native picture control (ImageView) of Android, and the implementation method of the picture control of the first application can also extend the function of the native ImageView. The format of the picture control is not the second format, for example, the format of the picture control is not the inherited ImageView format, or the format of the picture control is the non-inherited ImageView format. The non-inherited ImageView format can be a format customized by the application developer (or third party).

[0144] The picture control that inherits the ImageView format can actively report the picture content of the picture control. The picture control that does not inherit the ImageView format cannot actively report the picture content of the picture control. The format of the picture control can be set by the developer of the first application.

[0145] The following describes a method for dragging an image in a scenario where the image control of the first application can actively report image content and a method for dragging an image in a scenario where the image control of the first application cannot actively report image content.

[0146] For the scenario where the image control of the first application can actively report the image content, Figure 4 A module interaction flow chart provided in an embodiment of the present application is shown.

[0147] like Figure 4 As shown, the picture dragging method provided in the embodiment of the present application includes:

[0148] S100: A user opens a first application interface.

[0149] Exemplarily, the user may click on the display screen of the electronic device to open the target page of the first application.

[0150] S101. An application (APP) loads the content of each view (view) in a target page into a view framework (view framework).

[0151] 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.

[0152] 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.

[0153] S102: The view framework transmits the root layout of the target page to the content-aware filling framework.

[0154] 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.

[0155] It is understandable that each time a user opens a page, the view framework can transmit the root layout of the page opened by the user to the content recognition filling framework.

[0156] The content-aware filling framework obtains the root layout of the target page so as to subsequently find the required image control from the root layout. It can be understood that the image control belongs to a view.

[0157] S103: The content recognition filling framework determines whether the application package name and / or page name of the target page is in the whitelist.

[0158] 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:

[0159] <? xml version="1.0" encoding="ut f-8"? >

[0160] <package_config>

[0161] <whitelist>

[0162] <package name="com.XXXXX.xhs”>

[0163]

[0164] <package name="com.XXX.uu”>

[0165] <activity name="com.XXX.MainActivity”>

[0166] <view name="activitya_viewa”type="text” / >

[0167] <view name="activitya_viewb”type="image” / >

[0168]

[0169] <activity name="com.XXX.TextMainActivity2”>

[0170]

[0171]

[0172] <package name="com.XXX.XXX”>

[0173] <view name="ccTextView”type="text” / >

[0174] <view name="ddView”type="image” / >

[0175]

[0176]

[0177] < / package_config>

[0178] Among them, version indicates the version. encoding indicates the encoding. whiteList indicates the whitelist. com.XXXXX.xhs is the application package name. com.test.white.demo is the application package name. com.XXX.XXX is the application package name. com.XXX.MainActivity is the page name. com.XXX.TextMainActivity2 is the page name. activitya_viewa is the control name. activitya_viewb is the control name. ccTextView is the control name. ddView 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.

[0179] Controls with different control names can have different or the same types. For example,<view name="activitya_viewa”type="text” / > It can indicate that the type of the control named activitya_viewa is a text type, or that the control named activitya_viewa is a text control.<view name="activitya_viewb”type="image” / > It can indicate that the type of the control named activitya_viewb is a picture type, or that the control named activitya_viewb is a picture control.<view name="ddView”type="image” / > It can indicate that the type of the control named ddView is also a picture type, or that the control named ddView is a picture control.

[0180] 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.MainActivity as an example. The control names of controls 301, 303, 305 and 306 can all be activitya_viewb. The control names of controls 302 and 304 can all be activitya_viewa.

[0181] 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.

[0182] S104: The content recognition filling framework transmits the judgment result to the view framework.

[0183] 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.

[0184] 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.

[0185] 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.

[0186] S200: The event processing framework obtains a touch event of a target control being touched.

[0187] For example, the target control can be any picture control in the target page. Figure 3 The control 306 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.

[0188] S201: The event processing framework transmits a touch event to the window management framework.

[0189] 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.

[0190] 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.

[0191] S202: The window management framework transmits the touch event to the view framework.

[0192] 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.

[0193] 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.

[0194] 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.

[0195] S204: The content recognition filling framework responds to the drop event and sets a third timer.

[0196] Exemplarily, the third timing duration of the third timer is the sum of the system long press duration of the electronic device and the first extended duration, that is, the third timing duration = system long press duration + first extended duration. The third timer may be a message processing class handler.

[0197] 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.

[0198] The third timing duration is greater than the system long press duration. On the one hand, it can achieve compatibility between the image 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 dragging intention, and can also be used to guide further judgment of the user's long press intention.

[0199] Exemplarily, if the user's long press duration reaches the system long press duration, a new window pops up on the electronic device around the target control. When the third timer reaches the third 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.

[0200] If the user's long press duration reaches the system long press duration, and no new window pops up on the electronic device around the target control, then when the third timer reaches the third timing duration, the content recognition filling framework can determine that the user's real intention of the long press is a drag intention. The content recognition filling framework does not need to further judge the user's long press intention, and directly executes drag-related actions without further judging the user's long press intention.

[0201] For example, 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 recognition filling framework may receive a movement event or a lift event.

[0202] After the third timer is set 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 a second threshold. Optionally, the second threshold can be the same as or different from the first threshold.

[0203] 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 third timer to terminate subsequent drag-related actions.

[0204] 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.

[0205] The module interaction flow chart in the finger movement scenario before the third timer exceeds the third timing duration is as follows Figure 5 For ease of understanding, Figure 5 The module interaction process shown is described later.

[0206] After the third timer is set and before the third timer exceeds the third 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. Then the content recognition fill framework cancels the third 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, which will not be repeated here.

[0207] The module interaction flow chart in the scenario where the finger is lifted before the third timer exceeds the third timing duration is as follows Figure 6 For ease of understanding, Figure 6 The module interaction process shown is described later.

[0208] When the third timer reaches the third timing duration, the content recognition filling framework executes step S209.

[0209] Optionally, before the third timer exceeds the third 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.

[0210] 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. In this way, the power consumption of the electronic device can also be reduced.

[0211] S205: The touch event is transmitted internally in the view framework.

[0212] 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.

[0213] For example, the drop event can be transmitted layer by layer in the order of application → page → control.

[0214] In this way, if the format of the target control inherits the ImageView format, when the target control receives the drop event, the target control can execute step S206.

[0215] It is understandable that when the user long presses the target control, the touch event includes a drop event and a move event. The specific implementation method of the internal transmission of the move event in the view frame is similar to the specific implementation method of the internal transmission of the drop event in the view frame, which will not be repeated here.

[0216] Optionally, steps S203 and S205 may be performed concurrently.

[0217] S206: The target control in the view framework receives the drop event, and the target control reports the view entity of the target control to the content recognition filling framework.

[0218] Exemplarily, in this embodiment, the implementation method of the target control of the first application inherits the implementation method of the native image control (imageview), and supports reporting the view entity corresponding to the target control to the content recognition filling framework. The view entity is, for example, Object. The view entity includes information such as the specific name of the target control, the image content, the image width, the image length, and the position of the image in the window. The position of the image in the window can be called the display position of the image or the display position of the target control.

[0219] S207: The content recognition filling framework determines that the view entity reported by the target control is a valid view entity.

[0220] Exemplarily, the content-aware fill framework may call a control name acquisition method to obtain the control name of the target control from the view entity.

[0221] The content-aware fill framework determines whether the control name of the target control is in the whitelist.

[0222] If so, the content recognition filling framework determines that the reported view entity is a valid view entity, and can store the view entity in the memory to facilitate subsequent execution of drag-related steps.

[0223] If not, the content recognition filling framework determines that the reported view entity is an invalid view entity. The content recognition filling framework cancels the third timer, clears the obtained view entity and touch event, and terminates the execution of subsequent drag-related actions. In this way, power consumption of invalid dragging can be saved.

[0224] For example, the target control's control name is activitya_viewb, and the control name acquisition method is Object.getClass().getSimpleName(). For example, the content-aware filling framework can call Object.getClass().getSimpleName() to obtain the control name activitya_viewb from the view entity.

[0225] The content-aware fill framework determines that activitya_viewb is in the whitelist, and the content-aware fill framework determines that the view entity reported by the target control is a valid view entity. The content-aware fill framework stores the view entity reported by the target control in memory.

[0226] S208: The view framework responds to the touch event.

[0227] Exemplarily, the view framework may set a second timer in response to a drop event, and the timing duration of the second timer may be a second timing duration, which is equal to the system long press duration.

[0228] Before the second timer reaches the system long press 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 second timer. If not, the view framework does not process.

[0229] If the view framework receives a lift event before the second timer reaches the system long press duration, the view framework cancels the second timer.

[0230] When the second 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.

[0231] 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.

[0232] 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 third timer, and the view framework determines the user's long press operation intention as the intention to pop up a new window through the second timer, and the third timing duration of the third timer of the content recognition filling framework is greater than the second timing duration of the second timer. In this way, the picture dragging method provided in the embodiment of the present application is compatible with the logic of the native system, and the picture dragging method provided in the embodiment of the present application will not affect the execution logic of the native system of the electronic device.

[0233] Optionally, S206 and S208 may be executed concurrently.

[0234] S209: When the third timer reaches a third timing duration, the content recognition filling framework queries the window management framework whether a new window pops up around the target control.

[0235] 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 third timer reaches the third 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.

[0236] The third 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.

[0237] S210: The window management framework determines whether a new window pops up around the target control.

[0238] 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 second 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 an edit control 711, a forward 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.

[0239] After the window management framework determines that a new window pops up around the target control, the window management framework may execute step S211.

[0240] 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.

[0241] S211. The window management framework notifies the content recognition filling framework to pop up a new window.

[0242] 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.

[0243] S212: The content recognition filling framework sets a fourth timer, wherein a fourth timing duration of the fourth timer is equal to the second extension duration.

[0244] The second extension time may be the same as or different from the first extension time.

[0245] 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.

[0246] S213: When the fourth timer reaches the fourth timing duration, the content recognition filling framework determines that the user's finger is neither moved nor lifted.

[0247] Exemplarily, the fourth timer may be a message processing class handler.

[0248] After the fourth 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.

[0249] After setting the fourth timer and before the fourth timer exceeds the fourth 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.

[0250] 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 fourth timer to terminate the execution of subsequent drag-related steps.

[0251] 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 a long press of a finger. It may also indicate that the user's operation intention may be a drag intention or an intention to operate a new window. In this case, the content recognition filling frame will not be processed.

[0252] After setting the fourth timer and before the fourth timer exceeds the fourth 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 fourth timer to terminate the execution of subsequent drag-related steps.

[0253] When the first event received by the content recognition filling framework after the fourth timer reaches the fourth 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 the second threshold.

[0254] 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.

[0255] 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.

[0256] When the first event received by the content-recognizing fill framework after the fourth timer reaches the fourth 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.

[0257] 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 fourth timer is canceled or the subsequent dragging-related steps are terminated, so that the power consumption of the electronic device can be reduced. The fourth 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.

[0258] It can be understood that the user's finger not moving may also mean that the user's finger is not lifted.

[0259] 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 image content and the layout of the target control, and clear the third timer and the fourth timer.

[0260] S214a, there is a picture in the memory, and the content recognition filling framework obtains the bitmap corresponding to the picture from the memory.

[0261] Exemplarily, the view entity includes picture content. The view entity reported by the target control is stored in the memory, and the picture also exists in the memory. The content-aware filling framework can determine whether there is a view entity of the target control in the memory. If so, the content-aware filling framework can determine whether there is a picture of the target control in the memory.

[0262] The content-aware fill framework can obtain the bitmap corresponding to the image of the target control from the view entity. For details on obtaining the bitmap corresponding to the image of the target control from the view entity, please refer to the subsequent Figure 8 For ease of understanding, Figure 8 The illustrated embodiment is described below.

[0263] S215: The content recognition filling framework transfers the acquired bitmap to the content storage service.

[0264] Exemplarily, the content recognition and filling framework transmits the acquired bitmap to the content storage service, and the content storage service stores the bitmap so that the subsequent target sub-service can acquire the bitmap from the content storage service.

[0265] The content storage service is a system service. Without authorization, other applications and services cannot obtain the bitmap stored in the content storage service from the content storage service. This can reduce the possibility of information diffusion caused by the bitmap of the target control being obtained by other unauthorized applications when the electronic device executes the image dragging method provided in the embodiment of the present application, and can improve the security of the image content storage of the target control.

[0266] S216: After storing the bitmap, the content storage service returns the universal resource identifier (Uri) of the bitmap to the content identification filling framework.

[0267] For example, Uri can represent the storage path of the bitmap. Uri can consist of "content: / / " and the path of the data.

[0268] Optionally, the Uri can consist of "content: / / ", the path of the data, and the identification ID. For example, after the content storage service stores the bitmap corresponding to the image of the target control, the content storage service returns the Uri of the bitmap to the content identification filling framework as content: / / aaa / bbb / ccc / ddd / 123456. Among them, aaa / bbb / ccc / ddd can represent the path of the data. 123456 can represent the identification ID of the target control. The identification ID is a unique identifier assigned by the content storage service to the stored bitmap.

[0269] Optionally, S213 and S214a can be executed concurrently. In this way, the copying and storage of the image content of the target control can be completed as early as possible, so as to create the drag box as early as possible.

[0270] S217, the content-aware filling framework uses the obtained bitmap to create a drag box including a shadow and rounded corners.

[0271] Exemplarily, the content-aware fill framework can call a picture width acquisition method to obtain the picture width of the target control from the view entity of the target control. The content-aware fill framework can call a picture height acquisition method to obtain the picture height of the target control from the view entity of the target control. The content-aware fill framework can call a picture position acquisition method to obtain the display position of the picture from the view entity of the target control.

[0272] For example, the content-aware fill framework may call the imageView.getWidth() method to obtain the image width value of the target control, such as int width=imageView.getWidth(), where width represents the obtained image width value, which may be 350, for example.

[0273] The content-aware fill framework can call the imageView.getHeight() method to obtain the image height value of the target control, such as int height=imageView.getHeight(), where height represents the obtained image height value, which is 600, for example.

[0274] The content-aware fill framework may include a drag shadow builder module. The content-aware fill framework may transmit the acquired bitmap, the display position of the image, the image width, and the image height to the drag shadow builder module.

[0275] The drag box creation module uses the bitmap, the display position of the image, the image width, the image height and the configuration parameters preset in the drag box creation module to create a drag box including a shadow and rounded corners. The configuration parameters preset in the drag box creation module may include the length and width of the drag box (out shadow size), 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 position of the finger on the drag box is related to the width and height of the image. For example, the position of the finger on the drag box can be calculated by the drag box creation module on the width and height of the image.

[0276] The drag box created by the drag box creation module is as follows Figure 3 As shown in the drag box 308 in the interface shown in c, the image content of the drag box 308 is the same as the image content of the target control (i.e., control 306). The ratio of the width to the height of the drag box 308 is the same as the ratio of the image width to the image height of the control 306. The drag start position of the drag box 308 is the same as the display position of the control 306. The drag box 308 also includes a drag box shadow and a drag box rounded corner. The shadow and rounded corners of the drag box 308 are as shown in FIG. Figure 3 The drag box shadow and the drag box rounded corners of the drag box 308 in the interface shown in c.

[0277] After determining that the user's intention of the long press operation is a drag intention, a drag box is generated. The electronic device can display the drag box to prompt the user that the image content of the target control has been copied and stored. The user can drag to complete the copying and storage of the image content of the target control when the user long presses the target control. In this way, the user's experience of dragging pictures can be improved, thereby improving the user's experience of using the electronic device.

[0278] It is understandable that, since the image 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 image 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.

[0279] S218, the content recognition filling framework calls the interface of the dragging framework.

[0280] Exemplarily, the content-aware fill framework calls the interface of the drag frame, and passes the Uri and the created drag box 308 to the drag frame interface, so that the drag frame controls the drag box 308 to move as the finger moves, and passes the Uri to the second application when the finger moves into the window of the second application and is lifted.

[0281] S219, the drag frame monitors the window management frame and controls the drag frame to move along with the movement of the finger.

[0282] 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 308 to move with the movement of the finger.

[0283] 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 in the figure. 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 308 is consistent with the touch position of the finger, so that the drag box 308 moves with the movement of the finger. In this way, the user's experience of using the electronic device can be improved.

[0284] After calling the drag framework interface, the module interaction flow chart in the finger movement scenario is as follows Fig. 9 For ease of understanding, Fig. 9 The module interaction process shown is described later.

[0285] 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 S220 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.

[0286] After calling the drag framework interface, a module interaction flow chart in the finger lift scenario is as follows Fig.10 After calling the drag framework interface, another module interaction flow chart in the finger lift scenario is shown in the following Fig.11 For ease of understanding, Fig.10 and Fig.11 The module interaction process shown is described later.

[0287] S220: The window management framework launches the second application, so that the second application launches a sub-service.

[0288] 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 3 The 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 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. The second application passes the Uri to the target sub-business. The target sub-business obtains the bitmap corresponding to the image of the target control from the content storage service according to the Uri, and uses the bitmap for business processing.

[0289] 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-business icons in a flowing manner, so that the user can drag the drag box 308 to the top of the target sub-business icon and then lift the finger, so that the target sub-business uses the image content of the target control to perform business processing.

[0290] For example, taking the target sub-business as a note application, Figure 3 In the interface shown in d in FIG. 1 , the user moves a finger to drag the drag box 308 to the top of the note application icon 324. The electronic device may display Figure 3 The interface shown in e.

[0291] 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 . When the user lifts his finger, the drag framework can determine that the touch position of the lift event is within the sidebar 32. The touch position of the lift event can represent the position where the user's finger is lifted. The drag framework transmits the lift event and the Uri of the bitmap corresponding to the image of the target control to the second application. The second application recognizes that the sub-business icon corresponding to the touch position of the lift event is the icon of the note application. The second application can determine that the target sub-business is a note application. The second application pulls up the note application. The second application transmits the Uri to the note application. The note application obtains the bitmap according to the Uri, 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.

[0292] For example, taking the target sub-service as the send to QQ friends service of the QQ application as an example, Figure 3 In the interface shown in d in FIG. 1 , the user moves a finger to drag the drag box 308 to the top of the icon 326 of the send to QQ friend service. The electronic device can display Figure 3 The interface shown in g.

[0293] 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 drag frame transmits the lift event and Uri to the second application. The second application recognizes that the icon corresponding to the touch position of the lift event is the icon of the send to QQ friends service. The second application can determine that the target sub-service is the send to QQ friends service. The second application pulls up the QQ application, and then pulls up the send to QQ friends service. The second application transmits the Uri to the send to QQ friends service. The send to QQ friends service obtains the bitmap according to the Uri, 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, the user can select a friend or a group chat by clicking the friend control or the group chat control to send the bitmap to the selected friend or group chat.

[0294] The module interaction process in the scenario where the user drags the drag box 308 to the top of the target sub-business icon and lifts his finger can also be found in the following Fig.10 Detailed description of the embodiments.

[0295] The image dragging method provided in the present embodiment, in a scenario where the image control of the first application can actively report the image content, reports a view entity containing information such as the control name, image content, image width, image length, and image position in the window of the target control through the target control. If the reported view entity is determined to be a valid view entity, when the third timer and the fourth timer accurately determine that the real intention of the user's long press operation is the dragging intention, or when the third timer accurately determines that the real intention of the user's long press operation is the dragging intention, the bitmap corresponding to the image of the target control is obtained from the view entity and stored, so as to complete the copying and safe storage of the image content of the target control when the user long presses the target control, without having to click the image of the target control twice to realize the copying and storage of the image of the target control. The image dragging method provided in the present embodiment also uses the obtained bitmap , picture width, picture length and the position of the picture in the window generate a drag box, and the display of the drag box is used to prompt the user that the copying and storage of the picture content of the target control has been completed. The user can drag and drop, and the drag box is controlled by the drag frame to move with the movement of the finger, thereby realizing the dragging of the picture 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 the target sub-business can be opened without the user performing an opening operation on the target sub-business. The second application obtains the Uri of the bitmap from the drag frame and passes the Uri to the target sub-business, so that the target sub-business obtains the picture content of the target control according to the Uri in order to perform business processing in time, thereby realizing that when the picture dragging method is compatible with the logic of the native system, the picture content is quickly transferred between the first application and the target sub-business, which can improve the user experience of using the electronic device.

[0296] The above describes the module interaction process in the scenario where the image control of the first application can actively report the image content. The following describes the module interaction process in the scenario where the image control of the first application cannot actively report the image content.

[0297] For the scenario where the image control of the first application cannot actively report the image content, Fig.12 Another module interaction flow chart provided in an embodiment of the present application is shown.

[0298] Fig.12 and Figure 4 The difference is Fig.12 Not included Figure 4 Steps S206, S207 and S214a in the embodiment, Fig.12 It also includes steps S214b-1, S214b-2 and S214b-3. Steps S206, S207 and S214a may represent a method of obtaining picture content by filling the frame with content recognition in a scenario where the target control supports picture content reporting. Steps S214b-1, S214b-2 and S214b-3 may represent a method of obtaining picture content by filling the frame with content recognition in a scenario where the target control does not support picture content reporting. Fig.12 The remaining steps are Figure 4 The corresponding steps in the embodiment are similar, and similar steps will not be repeated in this embodiment.

[0299] like Fig.12 As shown, the picture dragging method provided in the embodiment of the present application includes:

[0300] S100: A user opens a first application interface.

[0301] S101. An application (APP) loads the contents of each view in a target page into a view framework.

[0302] S102: The view framework transmits the root layout of the target page to the content-aware filling framework.

[0303] S103: The content recognition filling framework determines whether the application package name and / or page name of the target page is in the whitelist.

[0304] S104: The content recognition filling framework transmits the judgment result to the view framework.

[0305] S200: The event processing framework obtains a touch event of a target control being touched.

[0306] S201: The event processing framework transmits a touch event to the window management framework.

[0307] S202: The window management framework transmits the touch event to the view framework.

[0308] 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.

[0309] S204: The content recognition filling framework responds to the drop event and sets a third timer.

[0310] S205: The touch event is transmitted internally in the view framework.

[0311] Optionally, steps S203 and S205 may be performed concurrently.

[0312] S208: The view framework responds to the touch event.

[0313] S209: When the third timer reaches a third timing duration, the content recognition filling framework queries the window management framework whether a new window pops up at the location of the target control.

[0314] S210: The window management framework determines whether a new window pops up around the target control.

[0315] S211. The window management framework notifies the content recognition filling framework to pop up a new window.

[0316] S212: The content recognition filling framework sets a fourth timer, wherein a fourth timing duration of the fourth timer is equal to the second extension duration.

[0317] S213: When the fourth timer reaches the fourth timing duration, the content recognition filling framework determines that the user's finger is neither moved nor lifted.

[0318] S214b-1. The image does not exist 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, and obtains the control name.

[0319] For example, since the target control is a control that does not inherit the ImageView format, when the target control receives a drop event, the target control cannot report the view entity of the target control to the content recognition filling framework. Therefore, the view entity does not exist in the memory.

[0320] If the content-aware fill framework determines that the view entity of the target control does not exist in the memory, it also determines that the image of the target control does not exist in the memory. The content-aware fill 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.

[0321] Optionally, if the image does not exist 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.

[0322] Optionally, S213 and S214b-1 can be executed concurrently. In this way, the copying and storage of the image content of the target control can be completed as early as possible, so that the drag box can be created as early as possible.

[0323] S214b-2. The content recognition filling framework determines whether the control name of the found control is in the whitelist.

[0324] Exemplarily, the content-aware fill framework may determine whether the control name of the found control is in the whitelist.

[0325] If so, the content recognition filling framework executes step S214b-3.

[0326] If not, the content-aware fill framework does not execute subsequent drag-related steps, and the content-aware fill framework can clear the third timer, the fourth timer, and the obtained events.

[0327] S214b-3. The content recognition filling framework obtains the bitmap corresponding to the image of the target control from the view entity corresponding to the found control.

[0328] It can be understood that the root layout is part of the view framework. The content-aware fill framework finds the target control from the root layout, which means that the content-aware fill framework finds the view entity of the target control from the view framework. The content-aware fill framework can also obtain the bitmap corresponding to the target control from the view entity of the target control.

[0329] The content-aware fill framework obtains the bitmap corresponding to the target control from the view entity of the target control. See the following Figure 8 For ease of understanding, Figure 8 The illustrated embodiment is described in detail later.

[0330] S215: The content recognition filling framework transfers the acquired bitmap to the content storage service.

[0331] S216: After storing the bitmap, the content storage service returns the universal resource identifier (Uri) of the bitmap to the content identification filling framework.

[0332] S217, the content-aware filling framework uses the obtained bitmap to create a drag box including a shadow and rounded corners.

[0333] S218, the content recognition filling framework calls the interface of the dragging framework.

[0334] S219, the drag frame monitors the window management frame and controls the drag frame to move along with the movement of the finger.

[0335] S220: The window management framework launches the second application, so that the second application launches a sub-service.

[0336] The picture dragging method provided in this embodiment, in a scenario where the picture control of the first application cannot actively report the picture content, when the third timer and the fourth timer are used to accurately determine that the real intention of the user's long press operation is the dragging intention, or when the third timer is used to 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 most recently received move event (i.e., the target control), and the view entity of the target control is found from the view frame. If it is determined that the control name of the found control is in the whitelist, the bitmap corresponding to the picture of the target control can be obtained from the view entity of the target control and stored, so that the picture content of the target control is copied and safely stored when the user long presses the target control, without clicking the picture of the target control twice to copy and store the picture of the target control. The image dragging method provided in the embodiment also uses the bitmap, image width, image length and the position of the image in the window to generate a drag box, and displays the drag box to prompt the user that the copying and storage of the image content of the target control has been completed. The user can drag and control the drag box to move with the finger through the drag frame, thereby realizing the dragging of the image 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 the target sub-business can be opened without the user performing an opening operation on the target sub-business. The second application obtains the Uri of the bitmap from the drag frame and passes the Uri to the target sub-business, so that the target sub-business obtains the image content of the target control according to the Uri in order to perform business processing in a timely manner, thereby realizing that the image content is quickly transferred between the first application and the target sub-business when the image dragging method is compatible with the logic of the native system, thereby improving the user experience of using the electronic device.

[0337] Combine the following Figure 8 The method of obtaining the bitmap corresponding to the target control from the view entity of the target control is described. Figure 8 A schematic diagram of the bitmap acquisition process provided in an embodiment of the present application is shown.

[0338] like Figure 8 As shown, if the format of the target control is an inherited ImageView format, the content-aware fill framework can execute steps S801-S804 to obtain the bitmap corresponding to the image of the target control from the view entity in the memory, and the content-aware fill framework can also execute steps S801, S802, S803 and S805 to obtain the bitmap corresponding to the image of the target control from the view entity in the memory. If the format of the target control is not an inherited ImageView format, the content-aware fill framework can execute steps S801, S802 and S806 to obtain the bitmap corresponding to the image of the target control from the view entity of the target control in the view framework.

[0339] S801. The content recognition filling framework has recognized that the target control is a picture control.

[0340] Exemplarily, the content-recognizing fill framework finds the control type (type) corresponding to the control name of the target control from the whitelist. Taking the control name of the target control as activitya_viewb as an example, the content-recognizing fill framework finds the control type of the control named activitya_viewb from the whitelist as image. The content-recognizing fill framework identifies that the type of the target control is a picture type, that is, the content-recognizing fill framework identifies that the target control is a picture control. The content-recognizing fill framework can execute step S802.

[0341] S802: The content-aware filling framework determines whether the format of the target control inherits the ImageView format.

[0342] Exemplarily, the content-aware fill framework may call an inherited ImageView check method to determine whether the format of the target control is an inherited ImageView format.

[0343] For example, the inherited ImageView check method can be the view instanceof ImageView method. If the content-aware fill framework calls the view instanceof ImageView method and gets the result true, the content-aware fill framework determines that the format of the target control is the inherited ImageView format. If the content-aware fill framework calls the view instanceofImageView method and gets the result false, the content-aware fill framework determines that the format of the target control is not the inherited ImageView format, or the content-aware fill framework determines that the format of the target control is not the inherited ImageView format.

[0344] If it is determined that the format of the target control inherits the ImageView format, the content recognition filling framework executes step S803.

[0345] If it is determined that the format of the target control does not inherit the ImageView format, the content recognition filling framework executes step S806.

[0346] S803: The content recognition filling framework determines whether the drawable object of the target control is a drawable object in a bitmap format.

[0347] Exemplarily, the view entity reported by the target control includes a drawable object. The drawable object includes the image content of the target control.

[0348] The content-aware fill framework may call a drawable object format acquisition method to determine whether the format of the drawable object in the view entity is a drawable object in a bitmap format.

[0349] For example, the content-aware fill framework calls the imageview.getDrawable() method.

[0350] If the obtained result is bitmapDrawable, the content-aware fill framework determines that the drawable object of the target control is a drawable object in a bitmap format, and the content-aware fill framework may execute step S804.

[0351] If the obtained result is not bitmapDrawable, the content-aware fill framework determines that the drawable object of the target control is not a drawable object in a bitmap format, and the content-aware fill framework may execute step S805.

[0352] S804. The content-aware filling framework calls the first bitmap acquisition method to acquire the bitmap corresponding to the image of the target control from the view entity.

[0353] Exemplarily, the first bitmap obtaining method is, for example, the drawable.getbitmap() method.

[0354] When the content-aware fill framework determines in step S803 that the format of the drawable object in the view entity is a bitmap format, the content-aware fill framework calls the drawable.getbitmap() method to obtain a drawable object in a bitmap format from the view entity uploaded by the target control. The obtained bitmap-type drawable object is the bitmap of the image corresponding to the target control. For example, get bitmap = drawable.getbitmap().

[0355] S805. The content-aware filling framework calls the second bitmap acquisition method to acquire the bitmap corresponding to the image of the target control from the view entity.

[0356] Exemplarily, the second bitmap acquisition method is, for example, a drawable.draw(canvas) method.

[0357] When the content-aware fill framework determines in step S803 that the format of the drawable object in the view entity is not in bitmap format, the content-aware fill framework can control the target control to call the drawable.draw(canvas) method. The view entity of the target control can extract the drawable, and use the canvas parameter provided by the drawable.draw(canvas) method to draw the extracted drawable to obtain the bitmap corresponding to the drawable. The canvas parameter is used to specify the target canvas for drawing. The target canvas specified by the canvas parameter provided by the drawable.draw(canvas) method is a canvas dedicated to drawing drawables. The bitmap corresponding to the drawable, that is, the bitmap corresponding to the picture of the target control, can also represent the content of the drawable object on the canvas. The target control passes the bitmap obtained by drawing the view entity to the content-aware fill framework. For example, get bitmap = drawable.draw(canvas).

[0358] S806. The content-aware filling framework calls the third bitmap acquisition method to acquire the bitmap corresponding to the image of the target control from the view entity.

[0359] Exemplarily, the third bitmap acquisition method is, for example, a view.draw(canvas) method.

[0360] If the format of the target control does not inherit the ImageView format, no matter whether the view entity of the target control contains a drawable object (drawable), the view entity cannot extract the drawable object (drawable) alone, and it is also impossible to obtain the bitmap corresponding to the image of the target control through the second bitmap acquisition method. The view entity of the target control contains the display area resources of the target control. The display area resources of the target control can include the image content of the target control, and the display area resources of the target control can also include the blank area in the display area of ​​the target control.

[0361] When the content-aware fill framework determines in step S802 that the format of the target control does not inherit the ImageView format, the content-aware fill framework can control the target control to call the view.draw(canvas) method. The view entity of the target control extracts the display area resources of the target control, and uses the canvas parameters provided by the view.draw(canvas) method to draw the extracted display area resources to obtain the bitmap corresponding to the display area resources. The target canvas specified by the canvas parameters provided by the view.draw(canvas) method is a canvas dedicated to drawing display area resources. The bitmap corresponding to the display area resources is the bitmap corresponding to the picture of the target control. The target control passes the bitmap corresponding to the display area resources to the content-aware fill framework. For example, get bitmap = view.draw(canvas).

[0362] If the display area resource of the target control contains the image content of the target control but does not contain any blank area, the content-aware fill framework calls the third bitmap acquisition method to obtain the bitmap corresponding to the image of the target control from the view entity, which contains the image content of the target control but does not contain any blank area.

[0363] If the display area resource of the target control includes the image content and blank area of ​​the target control, the content-aware fill framework calls the third bitmap acquisition method to obtain the bitmap corresponding to the image of the target control from the view entity, which includes the image content and blank area of ​​the target control.

[0364] For example, the first application is the Toutiao application, and an image control in a page in the Toutiao application is used as the target control, and the format of the target control is not inherited from the ImageView format. Fig.13 A schematic diagram of the display interface of the Toutiao application is shown.

[0365] like Fig.13 The interface shown in the figure includes a control 131 indicating return, a control 132 indicating voice playback, a control 133 indicating search, a control 134 indicating more, an icon 135 indicating blogger, a follow control 136, a text control 137, a target control 130, a text control 138, a share control 1391, a message control 1392, a like control 1393 and a favorite control 1394. The target control 130 includes a blank area 1301 in the display area of ​​the target control and a picture content 1302 of the target control. The blank area 1301 and the picture content 1302 are both display area resources of the target control 130.

[0366] Since the format of the target control 130 does not inherit the ImageView format, the content-aware filling framework calls the third bitmap acquisition method to obtain a bitmap from the view entity of the target control that contains not only the image content 1302 but also the blank area 1301 .

[0367] It can be understood that the bitmap obtained by the content-aware fill framework calling the first bitmap acquisition method or the second bitmap acquisition method contains the image content of the target control and does not contain blank areas. The bitmap obtained from the view entity by the content-aware fill framework calling the third bitmap acquisition method can contain the image content of the target control and can also contain blank areas.

[0368] S807: The content-aware filling framework passes the acquired bitmap to the content storage service, and the content storage service returns the Uri of the bitmap to the content-aware filling framework.

[0369] The specific implementation principle and technical effect of this step are Figure 4 The specific implementation principle and technical effect of steps S215-S216 in the embodiment are similar to those in the embodiment. Fig.12 The specific implementation principles and technical effects of steps S215-S216 in the embodiment are similar and will not be repeated here.

[0370] S808: The process of obtaining the bitmap by the content recognition filling framework ends.

[0371] For ease of understanding, the following are Figure 5 , Figure 6 , Fig. 9 , Fig.10 and Fig.11 Provide explanation.

[0372] Figure 5 FIG. 2 shows a flow chart of module interaction in a scenario where a finger moves before the third timer exceeds the third timing duration in an embodiment of the present application. Figure 5 As shown, the picture dragging method provided in the embodiment of the present application may also include the following steps:

[0373] S300a, after step S204 and before step S209, the event processing framework receives a movement event.

[0374] S301: The event processing framework transmits a moving event to the window management framework.

[0375] S302: The window management framework transmits a moving event to the view framework.

[0376] S303a: The view framework transmits the moving event to the content recognition filling framework.

[0377] 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 third timer is canceled.

[0378] 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.

[0379] 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 third timer has not timed out, so the content recognition filling framework does not process it.

[0380] 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 third timer to terminate the execution of subsequent drag-related steps. The content-aware fill framework may also clear the obtained image content and touch events.

[0381] 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.

[0382] It can be understood that before the fourth timer exceeds the fourth 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.

[0383] The picture dragging method provided in this embodiment is that after the content recognition filling framework sets the timer and before the set timer times out, if the user's finger moves, the content recognition 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 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 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.

[0384] Figure 6 FIG. 1 shows a flow chart of module interaction in a scenario where a finger is lifted before the third timer exceeds the third timing duration in an embodiment of the present application. Figure 6 As shown, the picture dragging method provided in the embodiment of the present application may also include the following steps:

[0385] S400a, after step S204 and before step S209, the event processing framework receives a lift event.

[0386] S401: The event processing framework transmits a lift event to the window management framework.

[0387] S402: The window management framework transmits a lift event to the control framework.

[0388] S403a: The control framework transmits the lift event to the content-aware filling framework.

[0389] S404: The content recognition filling framework cancels the third timer.

[0390] If the finger is lifted before the third timer exceeds the third timing duration, it can indicate that the user's intention is not to drag. The content recognition filling framework can cancel the third timer and terminate the execution of subsequent drag-related steps to reduce the power consumption of the electronic device caused by invalid dragging.

[0391] It can be understood that before the fourth timer exceeds the fourth 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.

[0392] In the picture 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.

[0393] Fig. 9 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. Fig. 9 As shown, the picture dragging method provided in the embodiment of the present application also includes:

[0394] S300b, after step S218, the event processing framework receives a movement event.

[0395] S301: The event processing framework transmits a moving event to the window management framework.

[0396] S302: The window management framework transmits a moving event to the view framework.

[0397] S303b: The view framework transmits the moving event to the drag framework.

[0398] S305 , the drag frame controls the drag frame to move along with the movement of the touch position.

[0399] 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 S219 in the embodiment will not be described in detail in this embodiment.

[0400] The picture dragging method provided in this embodiment can improve the user's intuitive feeling of flexible dragging and moving of the drag box by controlling the drag box to move with the movement of the touch position in the scene after calling the interface of the drag frame. The user can flexibly move the drag box to the top of the icon of the target sub-service in the sidebar so that the target sub-service can promptly use the picture content of the target control to perform business processing, which can improve the user's experience of using the electronic device.

[0401] Fig.10 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.10 As shown, the picture dragging method provided in the embodiment of the present application also includes:

[0402] S400b, after step S218, the event processing framework receives a lift event of the user's finger being lifted.

[0403] Exemplarily, after step S218, 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. The event processing framework receives the lift event.

[0404] S401: The event processing framework transmits a lift event to the window management framework.

[0405] S402: The window management framework transmits a lift event to the view framework.

[0406] S403b: The view framework transmits the lift event to the drag framework.

[0407] S405a: When the drag framework determines that the finger lift position is within the sidebar (or the window of the second application), the lift event and Uri are transmitted to the second application.

[0408] 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 passes the lift event and Uri to the second application. If not, the drag framework can control the drag frame to return to the drag start position. For details, please refer to the subsequent Fig.11 Step S405b in the embodiment.

[0409] S406: The second application starts the target sub-service.

[0410] 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 Uri to the target sub-service.

[0411] S407: The target sub-service obtains the image content of the target control from the content storage service through the Uri.

[0412] The target sub-business obtains the bitmap from the content storage service according to the Uri, and the obtained bitmap contains the image content of the target control.

[0413] The target sub-business uses bitmap for business processing.

[0414] The specific implementation of steps S405a to S407 can be found in Figure 4 Step S220 in the embodiment will not be described in detail here.

[0415] S408: The content storage service deletes the stored image content at a fixed time.

[0416] Exemplarily, when the content storage service passes (or returns) Uri to the content identification filling framework, the content storage service sets a first timer, and the timing duration of the first timer is the first timing duration.

[0417] When the first timer reaches the first timing duration, the content storage service deletes the bitmap corresponding to the stored Uri to provide sufficient storage space for the next storage of the image content.

[0418] The image dragging method provided in this embodiment can improve the accuracy of identifying user operation intentions by judging that the finger is lifted above the target sub-business icon in the scenario where the finger is lifted above the target sub-business icon after calling the interface of the dragging framework, and passing the Uri to the target sub-business, so that the target sub-business can obtain the image content of the target control according to the Uri and perform business processing in a timely manner, thereby improving the user experience of using the electronic device.

[0419] Fig.11 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.11 As shown, the picture dragging method provided in the embodiment of the present application also includes:

[0420] S400b, after step S216, the event processing framework receives a lift event.

[0421] S401: The event processing framework transmits a lift event to the window management framework.

[0422] S402: The window management framework transmits a lift event to the view framework.

[0423] S403b: The view framework transmits the lift event to the drag framework.

[0424] 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.

[0425] For example, Fig.14 The scene diagram of the finger being lifted after calling the drag frame interface is shown. After step S218, if the user's finger moves to the hot zone, the sidebar is pulled up, and the electronic device can display the following Fig.14 The interface shown in a. Fig.14 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.

[0426] exist Fig.14 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.14 The interface shown in b in the figure. Fig.14 The interface shown in b in the figure includes control 301, control 302, control 303, control 304, control 305, control 306, drag box 308, control 309, text "aaa", control 310, control 311, input box 312, control 313 and control 314. Since the finger leaves the display screen and the finger leaves the hot zone 31 (hot zone 31 is not visible), the sidebar 32 disappears, so Fig.14 The interface shown in b in FIG. 1 does not include the sidebar 32 and the long press feedback 307. Fig.14 In the interface shown in b, the position of the drag box 308 is consistent with the position of the control 306.

[0427] from Fig.14 As shown in the interfaces a and b in FIG, after step S218, 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 308 to return to the dragging position, which is the position of the control 306. Fig.14 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.14 The page window 30 of the target page shown in b in FIG.

[0428] S409: The dragging framework notifies the content storage service that the image dragging is canceled.

[0429] S410: The content storage service deletes the stored bitmap.

[0430] The picture dragging method provided in this embodiment, in a scenario where the finger is lifted up in the window of the dragging application (i.e., the first application) after calling the interface of the dragging frame, if it is determined that the lifted position is within the dragging application window, it can be determined that the user's dragging is cancelled, and the dragging frame controls the dragging frame to return to the dragging starting position. The dragging frame notifies the content storage service to delete the saved bitmap to provide sufficient storage space for the next storage of the picture, thereby improving the user's experience of using the electronic device.

[0431] 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.

[0432] Fig.15 The schematic diagram of the process of storing a whitelist of an electronic device is shown. Fig.15 As shown, the process includes:

[0433] S600, turn on electronic equipment.

[0434] S601, electronic device starts list loading service.

[0435] 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.

[0436] 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.

[0437] S602: The electronic device parses the obtained whitelist.

[0438] 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.

[0439] 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.

[0440] S603: The electronic device determines whether the obtained white list is updated.

[0441] 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.

[0442] For example, the electronic device determines whether the first whitelist identifier is the same as the second whitelist identifier.

[0443] If they are the same, the electronic device determines whether the first whitelist version is the same as the second whitelist version.

[0444] 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.

[0445] 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.

[0446] Exemplarily, if the electronic device obtains a built-in whitelist in step S601, the electronic device determines whether the whitelist exists in the memory.

[0447] If not, the electronic device executes step S604.

[0448] 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.

[0449] 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.

[0450] If not, the electronic device executes step S604.

[0451] 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.

[0452] 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.

[0453] S604: The electronic device saves the updated white list.

[0454] Exemplarily, the electronic device may store the whitelist content of the updated whitelist in a memory.

[0455] Optionally, the electronic device may also save the updated whitelist in XML format in the memory.

[0456] S605: The electronic device ends the whitelist saving process.

[0457] Exemplarily, the electronic device determines whether there is a whitelist in the memory.

[0458] If so, the electronic device can clear the information obtained in steps S601-S603 and end the whitelist saving process.

[0459] 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.

[0460] The server can periodically update the cloud test push whitelist stored in the server and notify the electronic devices under the server.

[0461] For example, Fig.12 As shown in S700-S701:

[0462] S700. The server periodically updates the cloud test push whitelist stored in the server.

[0463] 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.

[0464] The whitelist saving method in this embodiment can enable the electronic device to obtain an updated whitelist in a timely manner, so that the electronic device can drag and drop pictures of more third-party applications that do not support dragging according to the updated whitelist, thereby improving the application scope of the picture dragging method provided in the embodiment of the present application, and further improving the user experience of the electronic device.

[0465] It can be seen from the embodiments shown above that the picture 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 format of the picture control of the application inherits the ImageView format, as long as the page name of the target page and the control name of the picture control are in the whitelist, or the application package name and the control name are in the whitelist, the picture dragging method provided in the embodiments of the present application can be used to drag the picture of the picture control, so that the picture content of the picture control can be conveniently and quickly transferred between the application and the sub-business to which it belongs, thereby improving the user experience of the electronic device.

[0466] The embodiment of the present application also provides a method for dragging a picture, the method comprising S901-S906:

[0467] S901. An electronic device displays a first interface of a first application, where the first interface includes a first view, and the first view includes a first picture.

[0468] S902: The electronic device receives a first touch operation on a first picture.

[0469] S903: When the first touch operation is long pressed, and the electronic device determines that the format of the drawable object of the first picture is not the first format, the electronic device obtains the drawable object of the first picture, redraws the second picture according to the drawable object of the first picture, and creates a drag box. The content of the second picture includes the content of the first picture. The first format is, for example, a bitmap format.

[0470] S904: Display the second picture in the drag box.

[0471] S905: When the first touch operation moves, the drag box moves along with the first touch operation.

[0472] S906: 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 picture displayed by the drag box.

[0473] 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 picture can be Figure 4 In the embodiment, the target control image, the drag box can be Figure 4 The drag box in the embodiment, for example Figure 3 In the drag box 308 of the embodiment, the drawable object of the first picture can be Figure 8 In the embodiment, the drawable object in the view entity of the target control, the second picture can be Figure 8 In the bitmap obtained in S805 of the embodiment, the first area 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 Sub-service in the embodiment. Optionally, the first area may include the second area, and the area of ​​the first area may be greater than or equal to the area of ​​the second area. The first area may also be the second area. It is understandable that the touch operation of keeping long press can be understood as the touch operation of neither moving nor lifting.

[0474] In this embodiment, when the electronic device determines that the format of the drawable object of the first picture is not the first format, the electronic device obtains the drawable object of the first picture, and redraws the second picture according to the drawable object of the first picture. Figure 8 The specific implementation principles and technical effects of S803, S805 and S807 in the embodiment are similar. The specific implementation principles of S901-S906 can be found in Figure 4 The specific implementation principle of steps S100-S220 in the embodiment will not be repeated here. In this embodiment, when the first touch operation is kept long pressed, if the electronic device determines that the format of the drawable object of the first picture is not the first format, the electronic device obtains the drawable object of the first picture, redraws the second picture according to the drawable object of the first picture, and creates a drag box. The content of the second picture is the same as the content of the first picture. The electronic device can display the drag box, and the second picture is displayed in the drag box to prompt the user that the content of the first picture has been copied and stored. The user can drag and drop, which can reduce the number of operations for copying the content of the first picture. The drag box can move with the first touch operation, and also realize pulling up the second application during the movement of the first touch operation. The window of the second application includes one or more icons to facilitate the user to select the target business. The target business is the business corresponding to the target icon. In this way, the user's experience of using the electronic device can be improved.

[0475] Optionally, before the electronic device obtains the drawable object of the first picture, the method further includes:

[0476] The electronic device determines whether the format of the first view is the second format. The specific implementation principle of this step is the same as Figure 8 The specific implementation principles of S801-S802 in the embodiment are similar and will not be repeated here. The second format, for example, inherits the ImageView format. The second format represents the implementation method that inherits the native picture view of Android.

[0477] When the electronic device determines that the format of the first view is the second format, the electronic device determines whether the format of the drawable object of the first image is the first format. Figure 8 The specific implementation principle of S803 in the embodiment is similar and will not be repeated here.

[0478] Alternatively, when the electronic device determines that the format of the first view is not the second format, the electronic device obtains the display area resources of the first view, redraws the third image based on the display area resources of the first view, and creates a drag box. The third image can be displayed in the drag box. Among them, the display area resources of the first view include the drawable objects and blank areas of the first image, and the content of the third image includes the content of the first image. When the electronic device determines that the format of the first view is not the second format, the electronic device obtains the display area resources of the first view, redraws the third image based on the display area resources of the first view. The specific implementation principle is the same as Figure 8 The specific implementation principles of S806 and S807 in the embodiment are similar and will not be repeated here.

[0479] It is understandable that the first view in this embodiment may also be Fig.12 The target control in the embodiment, the first picture in this embodiment can also be Fig.12 The first view in this embodiment can also be Fig.13 The target control 130 in the embodiment, the first picture in this embodiment can also be Fig.13 The picture content 1302 in the embodiment. The display area resource of the first view may also be Figure 8 In the embodiment, the display area resource of the target control in the view entity of the target control. If the first view is Fig.13 In the embodiment, the target control 130, the display area resources of the first view include Fig.13 In the embodiment, the picture content 1302 and the blank area 1301. If the first view is Fig.12 The target control in the embodiment, Fig.12 The target control in the embodiment is, for example, Figure 3 In the embodiment, the display area resource of the first view includes the picture content of the control 306. The third picture can be Fig.12 The bitmap corresponding to the image of the target control in the embodiment is, for example Figure 8 The specific implementation principle and technical effect of the electronic device using the third picture to create a drag box are as follows: Fig.12 The specific implementation principle and technical effect of S217 in the embodiment are similar and will not be repeated here.

[0480] For the specific implementation principle of S901-S906, please refer to Fig.12 The specific implementation principles of steps S100-S220 in the embodiment are not repeated here.

[0481] In this way, when the format of the first view is not the second format, the electronic device obtains the display area resource of the first view, and the third picture redrawn by the electronic device according to the display area resource of the first view can not only contain the content of the first picture, but also contain a blank area, so that the content of the first picture can be copied and stored when the user long presses, and the number of operations for copying the content of the first picture can be reduced. The third picture can also be displayed in the created drag box, and the display of the drag box can prompt the user that the copying and storage of the content of the first picture has been completed, and the user can drag.

[0482] Optionally, the picture dragging method provided in this embodiment further includes:

[0483] When the electronic device determines that the format of the drawable object of the first picture is the first format, the electronic device obtains the first picture and creates a drag box. The first picture can be displayed in the created drag box.

[0484] When the electronic device determines that the format of the drawable object of the first picture is the first format, the electronic device obtains the specific implementation principle of the first picture. Figure 8 The specific implementation principles of S803, S804 and S807 in the embodiment are similar and will not be repeated here. Figure 4 The specific implementation principle of S217 in the embodiment will not be repeated here.

[0485] In this way, when the format of the first view is the second format and the format of the drawable object of the first picture is the first format, the electronic device obtains the drawable object of the first picture, that is, obtains the bitmap corresponding to the first picture, and creates a drag box so that the drag box displays the first picture. When the user long presses, the content of the first picture can be copied and stored without redrawing the image resources of the first view. This not only reduces the number of operations for copying the content of the first picture, but also allows the drag box to be created more quickly than when the drawable object of the first picture needs to be redrawn, thereby prompting the user earlier that the copying and storage of the content of the first picture has been completed and the user can drag.

[0486] Optionally, the picture dragging method provided in this embodiment further includes: when the electronic device redraws the second picture according to the drawable object of the first picture, the electronic device starts a first timer, and the timing duration of the first timer is a first duration.

[0487] When the first timer reaches the first duration, the electronic device deletes the stored second picture.

[0488] It is understandable that if the electronic device stores the first picture, when the first timer reaches the first duration, the electronic device deletes the stored first picture. If the electronic device stores the third picture, when the first timer reaches the first duration, the electronic device deletes the stored third picture. For example, when the electronic device obtains the first picture, the electronic device starts the first timer, and when the first timer reaches the first duration, the electronic device deletes the stored first picture. When the electronic device redraws the third picture according to the display area resources of the first view, the electronic device starts the first timer, and when the first timer reaches the first duration, the electronic device deletes the stored third picture.

[0489] In this way, sufficient storage space can be provided for the next storage of picture content, and the probability of malicious spread of pictures stored in the electronic device can be reduced.

[0490] Optionally, the picture dragging method provided in this embodiment further includes S907-S908:

[0491] S907: When the first touch operation moves to the position of a target icon in one or more icons, in response to the first touch operation being lifted, the second application transmits the universal resource identifier Uri of the image displayed in the drag box to the service corresponding to the target icon.

[0492] S908. The service corresponding to the target icon obtains the image displayed in the drag box according to Uri.

[0493] It can be understood that if the drag box displays the first picture, the service corresponding to the target icon obtains the first picture according to the Uri. If the drag box displays the second picture, the service corresponding to the target icon obtains the second picture according to the Uri. If the drag box displays the third picture, the service corresponding to the target icon obtains the third picture according to the Uri.

[0494] For example, the specific implementation principle and technical effect of S907-S908 are similar to Figure 4 The specific implementation principle and technical effect of S220 in the embodiment are similar. Fig.10 The specific implementation principles and technical effects of the embodiments are similar.

[0495] In this way, the first touch operation moves to the position of the target icon in one or more icons. In response to the first touch operation being lifted, the second application passes the Uri to the business corresponding to the target icon. The business corresponding to the target icon obtains the content of the first picture according to the Uri, thereby realizing convenient and fast transmission of the content of the first picture between the first application and the target business, reducing the operation steps for users to start the target business, and improving the user experience.

[0496] Optionally, the picture dragging method provided in this embodiment further includes S909:

[0497] S909: When the first touch operation moves to the third area of ​​the display screen and the drag box moves to the third area along 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 starts, and the electronic device deletes the stored picture displayed by the drag box. The third area does not include the second area.

[0498] Exemplarily, the third region may be Figure 4 The display window of the target page in the embodiment, for example Figure 3 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 starts, and the electronic device deletes the stored picture displayed by the drag box. Fig.11 The specific implementation principles and technical effects of the embodiments are similar and will not be repeated here.

[0499] In this way, in a scenario where the first touch operation is lifted without moving to the second area, 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, thereby realizing a view experience of drag cancellation, which can improve the user experience. The electronic device deletes the stored pictures included in the drag box to provide sufficient storage space for the next storage of the picture content, and can also reduce the probability of pictures stored in the electronic device being maliciously spread.

[0500] 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.

[0501] Optionally, before the electronic device obtains the drawable object of the first image, the image dragging method provided by this embodiment further includes:

[0502] In response to the first touch operation, the electronic device starts the second timer and the third timer, the timing duration of the second timer is the second duration, the timing duration of the third timer is the third duration, and the third duration is the sum of the second duration and the delay duration.

[0503] In the case where 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 first pop-up window around the first picture, and the first pop-up window includes one or more controls.

[0504] When the first touch operation is kept long pressed, in response to the third timer reaching the third duration, the electronic device queries that the electronic device displays the first pop-up window in response to the first touch operation, and the electronic device starts the fourth timer, and the timing duration of the fourth timer is the fourth duration. The fourth duration is greater than or equal to the delay duration.

[0505] The electronic device obtains the drawable object of the first picture, redraws the second picture according to the drawable object of the first picture, and creates a drag box, including: in response to a fourth timer reaching a fourth duration, the electronic device obtains the drawable object of the first picture, redraws the second picture according to the drawable object of the first picture, creates a drag box, and displays the drag box.

[0506] Exemplarily, the second timer may be Figure 4 In the embodiment, the second timer and the third timer can be Figure 4 The third timer and the fourth timer in the embodiment can be Figure 4 In the fourth timer of the embodiment, the second duration may be Figure 4 In the embodiment, the second timing duration or the system long press duration, the third duration can be Figure 4 The third 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 Controls in the new window 71 in the embodiment.

[0507] In this embodiment, the third duration can be used to preliminarily determine whether the user intention corresponding to the first touch operation is a drag intention. When the first touch operation is kept pressed for a long time, if the third timer reaches the third duration, 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 a drag intention. The fourth timer and the fourth duration can be used to further accurately determine whether the user intention corresponding to the first touch operation is a drag intention. If the first touch operation is not moved or lifted when the fourth timer reaches the fourth duration, it can be determined that the user intention corresponding to the first touch operation is a drag intention. The electronic device can display a drag box to prompt the user that the copying of the content of the first picture 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 content of the first picture, thereby improving the user's experience of using the electronic device. The third duration is the sum of the second 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.

[0508] Optionally, the picture dragging method provided in the embodiment of the present application further includes S910-S913:

[0509] S910. The electronic device displays a second interface of a third application, where the second interface includes a second view, and the second view includes a fourth picture.

[0510] S911: In response to a second touch operation on a fourth picture, the electronic device starts a second timer and a third timer.

[0511] S912. When the second touch operation is kept long pressed, in response to the second timer reaching a second duration, the electronic device displays a second pop-up window around the fourth picture, where the second pop-up window includes one or more controls.

[0512] S913: When the third timer has not reached the third duration, in response to the second touch operation being moved or lifted, the electronic device turns off the third timer.

[0513] 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 embodiment of the target control, the fourth picture can be Figure 4 In the embodiment, the second pop-up window can be a picture of the target control. 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 S910-S913 can be found in Figure 4 The specific implementation principle and technical effect of S100-S208 in the embodiment. In S913, when the third timer has not reached the third time length, in response to the second touch operation moving, the electronic device turns off the third timer. The specific implementation principle and technical effect can be seen in Figure 5 The specific implementation principle and technical effect of the embodiment. In S913, when the third timer has not reached the third time length, in response to the second touch operation being lifted, the electronic device turns off the third timer. For specific implementation principles and technical effects, see Figure 6 The specific implementation principles and technical effects of the embodiments.

[0514] In this way, if the third timer does not reach the third duration, the second touch operation moves or the second touch operation is lifted, it can indicate that the user intention corresponding to the second touch operation is not a drag intention. After determining that the user intention is not a drag intention, the electronic device turns off the third timer, which can terminate the subsequent drag process and reduce the power consumption of invalid dragging.

[0515] Optionally, the picture dragging method provided in the embodiment of the present application further includes S914-S918:

[0516] S914. The electronic device displays a third interface of a fourth application, where the third interface includes a third view, and the third view includes a fifth picture.

[0517] S915: In response to the third touch operation on the fifth picture, the electronic device starts the second timer and the third timer.

[0518] S916. When the third touch operation is maintained for a long time, in response to the second timer reaching a second duration, the electronic device displays a third pop-up window around the fifth picture, and the third pop-up window includes one or more controls.

[0519] S917: When the third touch operation is long pressed, in response to the third timer reaching the third duration, the electronic device queries that the electronic device displays a third pop-up window in response to the third touch operation, and the electronic device starts a fourth timer, the timing duration of the fourth timer is the fourth duration, and the fourth duration is greater than or equal to the delay duration.

[0520] S918: When the fourth timer has not reached the fourth duration, in response to the third touch operation being moved or lifted, the electronic device turns off the fourth timer.

[0521] 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 embodiment of the target control, the fifth picture can be Figure 4 In the embodiment, the third pop-up window can be a picture of the target control. 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 S914-S918 can be found in Figure 4 The specific implementation principle and technical effect of S100-S212 in the embodiment. In S918, when the fourth timer has not reached the fourth time length, in response to the third touch operation movement, the electronic device turns off the fourth timer. The specific implementation principle and technical effect can be seen in Figure 5 The specific implementation principle and technical effect of the embodiment. In S918, when the fourth timer has not reached the fourth time length, in response to the third touch operation being lifted, the electronic device turns off the fourth timer. For specific implementation principles and technical effects, see Figure 6 The specific implementation principles and technical effects of the embodiments.

[0522] In this way, if the fourth timer does not reach the fourth time length, the third touch operation moves or 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 fourth timer, which can terminate the subsequent drag process and reduce the power consumption of invalid dragging.

[0523] The picture 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.

[0524] 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.

[0525] 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.

[0526] 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.

[0527] 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.

[0528] 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.

[0529] 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.

[0530] 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.< / whitelist>

Claims

1. A picture dragging method, characterized in that: The method comprises: The electronic device displays a first interface of a first application, the first interface includes a first view, and the first view includes a first picture; The electronic device receives a first touch operation on the first picture; In the case where the first touch operation is maintained for a long time, when the electronic device determines that the format of the drawable object of the first picture is not the first format, the electronic device obtains the drawable object of the first picture, redraws the second picture according to the drawable object of the first picture, and creates a drag box; wherein the content of the second picture includes the content of the first picture; Displaying the second picture in the drag frame; When the first touch operation moves, the drag frame moves along with the first touch operation; 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 that can receive the picture displayed by the drag box.

2. The method according to claim 1, characterized in that Before the electronic device obtains the drawable object of the first picture, the method further includes: The electronic device determines whether a format of the first view is a second format; When the electronic device determines that the format of the first view is the second format, the electronic device determines whether the format of the drawable object of the first picture is the first format; or, When the electronic device determines that the format of the first view is not the second format, the electronic device obtains the display area resources of the first view, redraws the third picture according to the display area resources of the first view, and creates the drag box; wherein, the display area resources of the first view include the drawable objects and blank areas of the first picture, and the content of the third picture includes the content of the first picture.

3. The method according to claim 2, characterized in that The method further comprises: When the electronic device determines that the format of the drawable object of the first picture is the first format, the electronic device obtains the first picture and creates the drag box.

4. The method according to claim 2 or 3, characterized in that: The first format is a bitmap format; the second format represents an implementation method that inherits the native image view of Android.

5. The method according to any one of claims 1 to 4, characterized in that Also includes: When the electronic device redraws the second picture according to the drawable object of the first picture, the electronic device starts a first timer, and the timing duration of the first timer is a first duration; When the first timer reaches the first duration, the electronic device deletes the stored second picture.

6. The method according to any one of claims 1 to 5, characterized in that Also includes: When the first touch operation moves to a position of a target icon among the one or more icons, in response to the first touch operation being lifted, the second application transmits a universal resource identifier Uri of the image displayed in the drag box to a service corresponding to the target icon; The service corresponding to the target icon obtains the image displayed in the drag box according to the Uri.

7. The method according to any one of claims 1 to 5, characterized in that Also includes: When the first touch operation moves to the third area of ​​the display screen and the drag box moves to the third area along 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, and the electronic device deletes the stored picture displayed by the drag box; the third area does not include the second area.

8. The method according to any one of claims 1 to 7, characterized in that The second area is a sidebar on the right side of the display screen.

9. The method according to any one of claims 1 to 8, characterized in that Before the electronic device obtains the drawable object of the first picture, the method further includes: In response to the first touch operation, the electronic device starts a second timer and a third timer, the timing duration of the second timer is the second duration, the timing duration of the third timer is the third duration, and the third duration is the sum of the second duration and the delay duration; In a 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 first pop-up window around the first picture, where 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 third timer reaching the third duration, the electronic device inquires that the electronic device displays the first pop-up window in response to the first touch operation, and the electronic device starts a fourth timer, the timing duration of the fourth timer is a fourth duration; the fourth duration is greater than or equal to the delay duration; The electronic device obtains the drawable object of the first picture, redraws the second picture according to the drawable object of the first picture, and creates a drag box, including: In response to the fourth timer reaching the fourth duration, the electronic device obtains the drawable object of the first picture, redraws the second picture according to the drawable object of the first picture, creates the drag box, and displays the drag box.

10. The method according to claim 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 a fourth picture; In response to a second touch operation on the fourth picture, the electronic device starts the second timer and the third timer; In a case where the second touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device displays a second pop-up window around the fourth picture, where the second pop-up window includes one or more controls; When the third timer has not reached the third duration, in response to the second touch operation being moved or lifted, the electronic device turns off the third timer.

11. The method according to claim 9 or 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 a fifth picture; In response to a third touch operation on the fifth picture, the electronic device starts the second timer and the third timer; In a case where the third touch operation is kept long pressed, in response to the second timer reaching the second duration, the electronic device displays a third pop-up window around the fifth picture, where the third pop-up window includes one or more controls; In the case where the third touch operation is kept long pressed, in response to the third timer reaching the third duration, the electronic device inquires that the electronic device displays the third pop-up window in response to the third touch operation, and the electronic device starts a fourth timer, the timing duration of the fourth timer is a fourth duration; the fourth duration is greater than or equal to the delay duration; When the fourth timer has not reached the fourth duration, in response to the third touch operation being moved or lifted, the electronic device turns off the fourth timer.

12. 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 11.

13. 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 11 is implemented.

Citation Information

Cited By

  • Method for dragging and dropping picture, and related apparatus

    EP4752700A1

  • Method for dragging and dropping picture, and related apparatus

    WO2025050868A1