WO2022089208A1 - 一种文件拖拽方法及电子设备 - Google Patents

一种文件拖拽方法及电子设备 Download PDF

Info

Publication number
WO2022089208A1
WO2022089208A1 PCT/CN2021/123511 CN2021123511W WO2022089208A1 WO 2022089208 A1 WO2022089208 A1 WO 2022089208A1 CN 2021123511 W CN2021123511 W CN 2021123511W WO 2022089208 A1 WO2022089208 A1 WO 2022089208A1
Authority
WO
WIPO (PCT)
Prior art keywords
window
file
icon
user
electronic device
Prior art date
Application number
PCT/CN2021/123511
Other languages
English (en)
French (fr)
Inventor
王梦
赵绍华
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP21884937.0A priority Critical patent/EP4220365A4/en
Priority to US18/251,076 priority patent/US20230384919A1/en
Publication of WO2022089208A1 publication Critical patent/WO2022089208A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04803Split screen, i.e. subdividing the display area or the window area into separate subareas
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to a file dragging method and electronic device.
  • the present application provides a file dragging method and electronic device, which are used to improve user experience in the file dragging process.
  • the present application provides a method for dragging a file, the method comprising: displaying a first window and a second window in response to a user's first operation; operation, displaying a first interface in the first window, wherein the first interface includes the icon of the target file; in response to the third operation of the user, when it is detected that the icon of the target file is removed from the first interface
  • the first identification information or the second identification information is displayed in the second window; wherein, the third operation is used to change the icon of the target file from the first
  • the first identification information is used to identify that the icon of the target file can be added to the second window
  • the second identification information is used to identify that the icon of the target file cannot be added. added to the second window.
  • the identification information can be used to identify whether the target window can receive the dragged file, so that the user can intuitively see whether the file is successfully dragged. Especially when the target window cannot receive the dragged file, repeated operations by the user can be avoided, and the user experience can be improved.
  • the method further includes: when detecting that the icon of the target file is dragged from the first window to the second window, displaying a third logo in the second window information, and the third identification information is used to identify the number of icons of the target file.
  • the number of dragged files can be displayed when the files are dragged to the target window, so that the user can intuitively see the number of dragged files, which can make the actual number of successfully dragged files smaller than the actual number of dragged files.
  • the user can know the reason for the missing number, thereby improving the user experience.
  • the number of target files may be one or more.
  • the object file includes the first file. It can be understood that the number of target files is one.
  • the target file when the number of target files is multiple, for example, the target file includes a first file and a second file, and the file type of the first file is the first type, the second file The file type is the second type.
  • the method further includes: when detecting that the icon of the target file is dragged from the first window to the second window, displaying fourth identification information in the second window, the fourth identification information An icon for identifying that the second window cannot add a second file of the second type.
  • the method further includes: displaying first prompt information, where the first prompt information is used to prompt the user that the icon of the target file is in a dragging state.
  • the target file after the user selects the target file, it can be displayed that the target file is in a dragging state, which can avoid the situation that the user loses his hand by mistake during the operation process, thereby improving the user experience.
  • the method further includes: if it is detected that the height of the icon of the target file is greater than the first set height, adjusting the height of the icon of the target file to the second set height, And displayed in the second window, the second set height is N times the first set height, and the N satisfies: 0 ⁇ N ⁇ 1.
  • the height of the target file when the height of the target file is greater than the set height, the height of the target file can be scaled, which can facilitate the user to check whether the file is missing, and avoid the confusion of file dragging when there are too many windows.
  • the present application provides an electronic device, the electronic device comprising: a display screen; one or more processors; a memory; a plurality of applications; and one or more computer programs;
  • the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions that, when invoked for execution by the one or more processors, cause the electronic device.
  • the present application further provides an electronic device, the electronic device includes modules/units for implementing the first aspect or any possible design method of the first aspect; these modules/units may be implemented by hardware, or The corresponding software implementation is performed by hardware.
  • an embodiment of the present application further provides a chip, which is coupled to a memory in an electronic device, and implements the first aspect of the embodiment of the present application and any possible design technical solutions of the first aspect; an embodiment of the present application "Coupled" means that two components are directly or indirectly coupled to each other.
  • a computer-readable storage medium includes a computer program, when the computer program runs on an electronic device, the electronic device is made to execute the first embodiment of the present application.
  • a sixth aspect a computer program product of the embodiments of the present application, when the computer program product runs on an electronic device, enables the electronic device to execute the first aspect of the embodiments of the present application and any possibility of the first aspect thereof designed technical solutions.
  • a graphical user interface on an electronic device having a display screen, one or more memories, and one or more processors configured to execute storage in a The one or more computer programs in the one or more memories, the graphical user interface comprising the graphical user interface displayed when the electronic device executes the method as provided in the first aspect above.
  • FIG. 1 is a schematic structural diagram of an electronic device according to an embodiment of the application.
  • 2A is a block diagram of a software structure of an electronic device provided by an embodiment of the present application.
  • FIG. 2B is a block diagram of another software structure provided by an embodiment of the present application.
  • FIG. 2C is a processing flowchart provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of a method for dragging and dropping files provided by an embodiment of the present application
  • FIGS. 4A to 4C are schematic diagrams of user interfaces provided by embodiments of the present application.
  • 5A-5B are schematic diagrams of user interfaces provided by embodiments of the present application.
  • FIGS. 6A to 6C are schematic diagrams of user interfaces provided by an embodiment of the present application.
  • FIG. 7 is a flowchart of another method for dragging and dropping files provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
  • the application (application, App) involved in the embodiments of the present application is a software program capable of implementing one or more specific functions.
  • multiple applications may be installed in an electronic device.
  • camera application SMS application
  • mailbox application WeChat (WeChat), WhatsApp Messenger, Link (Line), photo sharing (instagram), Kakao Talk, DingTalk, etc.
  • the application mentioned below may be an application that has been installed when the electronic device is shipped from the factory, or may be an application downloaded from a network or acquired by a user during the use of the electronic device.
  • the file dragging method provided by the embodiments of the present application can be applied to electronic devices with display screens, such as mobile phones, tablet computers, wearable devices (for example, watches, wristbands, smart helmets, etc.), vehicle-mounted devices, etc. , smart home, augmented reality (AR)/virtual reality (VR) device, laptop, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (personal digital assistant, PDA), etc.
  • the embodiments of the present application are not limited.
  • the electronic device involved in the embodiments of the present application may also be a foldable electronic device, such as a foldable mobile phone, a foldable tablet computer, etc., which is not limited in this application.
  • the following takes a mobile phone as an example to introduce the structure of a mobile phone.
  • the structure of the electronic device is described below by taking the electronic device as a mobile phone as an example.
  • the mobile phone 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, Antenna 1, Antenna 2, Mobile Communication Module 150, Wireless Communication Module 160, Audio Module 170, Speaker 170A, Receiver 170B, Microphone 170C, Headphone Interface 170D, Sensor Module 180, Key 190, Motor 191, Indicator 192, Camera 193, Display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM subscriber identification module
  • 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • the controller may be the nerve center and command center of the mobile phone 100 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the mobile phone 100, and can also be used to transmit data between the mobile phone 100 and peripheral devices.
  • the charging management module 140 is used to receive charging input from the charger.
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the wireless communication function of the mobile phone 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in handset 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the mobile phone 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the wireless communication module 160 can provide applications on the mobile phone 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • frequency modulation frequency modulation, FM
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves
  • the antenna 1 of the mobile phone 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the display screen 194 is used to display the display interface of the application and the like.
  • 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 (active-matrix organic light).
  • emitting diode, AMOLED organic light-emitting diode
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the handset 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the display screen 194 may be used to display multiple application interfaces at the same time.
  • Camera 193 is used to capture still images or video.
  • the camera 193 may include a front camera and a rear camera.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the mobile phone 100 by executing the instructions stored in the internal memory 121 .
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area may store the operating system, and the software code of at least one application (eg, iQIYI application, WeChat application, etc.).
  • the storage data area can store data (eg, images, videos, etc.) generated during the use of the mobile phone 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. Such as saving pictures, videos and other files in an external memory card.
  • the mobile phone 100 can implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor. Such as music playback, recording, etc.
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the gyroscope sensor 180B can be used to determine the motion attitude of the mobile phone 100 .
  • the angular velocity of cell phone 100 about three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the air pressure sensor 180C is used to measure air pressure.
  • the mobile phone 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the mobile phone 100 can use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the mobile phone 100 when the mobile phone 100 is a flip machine, the mobile phone 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the mobile phone 100 in various directions (generally three axes). When the mobile phone 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the cell phone 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the mobile phone 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The mobile phone 100 emits infrared light through the light emitting diodes. Cell phone 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone 100 .
  • LEDs light emitting diodes
  • the mobile phone 100 emits infrared light through the light emitting diodes.
  • Cell phone 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone 100 .
  • the cell phone 100 may determine that there is no object near the cell phone 100 .
  • the mobile phone 100 can use the proximity light sensor 180G to detect that the user holds the mobile phone 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the mobile phone 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the mobile phone 100 is in the pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the mobile phone 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the cell phone 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the mobile phone 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the mobile phone 100 heats the battery 142 to avoid abnormal shutdown of the mobile phone 100 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the mobile phone 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the mobile phone 100 , which is different from the position where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the cell phone 100 can receive key input and generate key signal input related to user settings and function control of the cell phone 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the mobile phone 100 by being inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 .
  • FIG. 1 do not constitute a specific limitation on the mobile phone, and the mobile phone may also include more or less components than those shown in the figure, or combine some components, or separate some components, or different components. component layout.
  • the software system of the mobile phone 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the mobile phone 100 .
  • FIG. 2A is a block diagram of a software structure of a mobile phone 100 according to an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
  • the application layer can include a series of application packages. As shown in Figure 2A, applications such as browsers, Youku, Tencent Video, Maps, and iQiyi can be installed in the application layer.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a display policy service, a power management service (power manager service, PMS), and a display management service (display manager service, DMS).
  • the application framework layer may also include an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, and the like.
  • the window manager provides a window manager service for the window, so as to control and manage the interface displayed on the display screen.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build the interface of an application.
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
  • the Android runtime includes core libraries and a virtual machine.
  • Android runtime is the runtime environment of the Android operating system, responsible for the scheduling and management of the Android operating system.
  • the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of the Android operating system.
  • the application layer and the application framework layer run in virtual machines.
  • 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 lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of audio and video in multiple formats, and supports opening of still images in multiple formats.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between the hardware and software of an electronic device.
  • the kernel layer at least includes display drivers, sensor drivers, camera drivers, audio drivers, etc., which are used to drive the hardware in the hardware layer.
  • the hardware layer may include various types of sensors (such as touch sensors, etc.), display screens, cameras, and the like.
  • the application layer may include at least one application.
  • one of the applications is a sending application (or called a drag-out application, that is, the application where the element is located when the element is dragged out)
  • the other application is the receiving application (ie the application that receives the dragged element).
  • the electronic device can detect the user's long-press operation to enter the drag processing event, and store the drag data selected by the user (for example, save it to ClipDescription), and then pass the system (application framework layer (Framework)) ACTION_DRAG_STARTED event Send the drag data to the receiving application.
  • the sending application can draw the corner marker when the system calls back to draw the layer.
  • the corner labels here include the icon for the number of elements and whether the element supports icons added to the receiving window.
  • the receiving application can declare the interface, and declare the file type that each control (or called window) of the application can receive. After receiving the ACTION_DRAG_STARTED event, the receiving application can match the number of files it can receive according to the drag information carried in the ACTION_DRAG_STARTED event, and save the matching result.
  • the receiving control When the user drags an element to the releasable area of the receiving application (the interface of the receiving application), the receiving control receives the ACTION_DRAG_ENTERED notification. Then the receiving application feeds back the matching result to the system, and the system transmits the matching result to the sending application. Correspondingly, the sending application can update the index after receiving the matching result. It can be understood that, the superscript here can be understood as whether the file supports the icon added to the receiving window and the number of dragged files in the following embodiment.
  • the receivable control of the receiving application receives the ACTION_DRAG_EXITED notification and feeds back a "leave” notification to the system (that is, the dragging action leaves the receiving application). Then the receiving application feeds back the "leave” notification to the system, and the system transmits the "leave” notification to the sending application.
  • the sending application restores the corner icon after receiving the "leave” notification.
  • FIG. 2C a processing flowchart is provided in this embodiment of the present application.
  • FIG. 2B For the implementation of the specific steps in the flowchart, reference may be made to the introduction of the embodiment shown in FIG. 2B , which will not be repeated here.
  • the receivable control registered with the ACTION_DRAG_STARTED broadcast can match the number of files that the receiving control can receive according to the ClipDescription information (that is, the drag information) carried in the broadcast.
  • At least one involved in the following embodiments includes one or more; wherein, multiple refers to greater than or equal to two.
  • words such as “first” and “second” are only used for the purpose of distinguishing the description, and should not be understood as indicating or implying relative importance, nor should it be understood as indicating or implied order.
  • electronic devices support a multi-window mode, that is, multiple tasks can be displayed on one display screen at the same time, so as to avoid the trouble of users switching windows frequently.
  • users can drag and drop files from one window to another to share resources.
  • the user can only know whether the file drag and drop is successful only after the file drag and drop process is completed. If the file drag and drop fails, the user cannot distinguish whether it is an operation error or other reasons, resulting in a poor user experience.
  • an embodiment of the present application provides a method for dragging a file, by feeding back the dragging state in real time during the dragging process of a file, such as displaying the state of dragging, the number of files being dragged, and whether the file supports dragging, etc. , to improve the user experience.
  • the method may include the following steps:
  • S301 The electronic device displays the first window and the second window on the display screen in response to the user's first operation.
  • the first operation of the user may be an operation of opening a multitasking window for the user.
  • the first operation may be an operation that triggers a split-screen display, for example, the display screen displays a first application interface, and on the first application interface, the electronic device may respond to the user's first operation, such as along the display screen. Swipe inward from the left edge to bring up the application bar of the smart split screen, and then click the application icon that you want to split screen in the split screen application bar to achieve split screen.
  • the operation to trigger the split screen display can also be other gesture operations, for example, you can also open the split screen by pulling down the shortcut switch in the notification bar, or you can also open the split screen by voice control, etc.
  • the application is not limited in this regard.
  • the sizes of the two windows displayed in the split screen may be the same or different, and the window displayed in the split screen may be displayed on the display screen in the form of a floating window.
  • the first window and the second window may also be freely displayed on the display screen of the electronic device, which is not limited in the present application.
  • the application interface 400 of the gallery is displayed on the display screen of the electronic device.
  • the user can slide inward along the right edge of the interface 400 to call up the application bar of the split screen.
  • the display screen can display the user interface 410.
  • the interface 410 includes a split-screen application bar 411, and then click the application icon “email” 412 in the application bar 411, and the user interface 420 can be displayed on the display screen at this time.
  • two application windows can be displayed on the display screen, such as the application window 421 including the gallery and the application window 422 of the email.
  • first window and “second window”.
  • multiple windows may be displayed on the display screen of the electronic device, and the multiple windows may be multiple windows of one application program or multiple windows of multiple application programs, which is not limited in this application.
  • the first window and the second window are displayed on the display screen.
  • the first window may be the display window of the first application
  • the second window may be the display window of the second application.
  • the first window may be the first display window of the first application
  • the second window may be the second display window of the first application. That is to say, in this application, files can be dragged and dropped between application windows of two applications, or files can be dragged and dropped between two application windows of one application.
  • the files may include pictures, videos, texts, audios, and the like.
  • the user selects a file, he or she may select one file or multiple files.
  • S302 The electronic device responds to the user's second operation on the first window.
  • the second operation here may be an operation for the user to select a file.
  • the second operation may be a user's long-press operation on a picture or video in the gallery, for example, the user long-presses a certain picture for a preset duration (for example, After 2s), the picture can be selected.
  • the first window is the interface of the application gallery
  • the second window is the interface of the application mail.
  • the user wants to drag and drop the picture of the first window to the second window.
  • the user selects two pictures in the gallery of the schematic diagram shown in (a) of FIG. 4B
  • the user can long press the selected picture, and then the gallery can display
  • the interface shown in (b) of FIG. 4B that is, after the user presses the picture for a long time, the picture can be in a selection state, for example, a check mark can be displayed in the lower right corner of the picture.
  • the application window in this application may be placed left and right, and may also be placed up and down, which is not limited in this application.
  • the mobile phone is in a horizontal screen state, and the application is placed left and right as an example for description.
  • the selected picture and the unselected picture may visually look different from the user.
  • the upper layer of the selected picture may display a blurred layer , of course, it may not be displayed when the actual product is realized, which is not limited in this application.
  • step S301 and step S302 do not limit the sequence of their execution.
  • the user can also select the file to be dragged and then open the multitasking window, which is not limited in this application.
  • S303 The electronic device drags the first file from the first window to the second window in response to the third operation of the user.
  • the third operation here may be the user's dragging operation on the first file, for example, the user's dragging operation on the picture, the user's dragging operation on the video, or the user's dragging operation on the picture and video. Operations, etc., are not limited in this application. Of course, the dragging operation may be a user's dragging operation on one picture, or a user's dragging operation on multiple pictures. After the user selects the first file in the first window, the user may drag and drop the file selected in the first window to the second window.
  • the electronic device may pre-save a file that supports drag and drop in each window.
  • the first window includes multiple files, for example, file 1, file 2, and file 4 corresponding to identification information 1, 2, and 4 are files that support drag and drop, and identification information is 3, 5, and 6, respectively.
  • the corresponding file 3, file 5, and file 6 are files that do not support drag and drop.
  • drag and drop is supported when the file format is XML format; when the file format is JSON format, drag and drop is not supported.
  • whether drag and drop is supported can also be distinguished according to the suffix name of the file, which is not limited in this application.
  • a prompt may be displayed information, the prompt information can be used to prompt that the file supports drag and drop and is in the drag state.
  • the user can long press (eg, 2s) and drag the selected file in the schematic diagram shown in (b) of FIG. 4B , and then the file can enter the dragging state.
  • the user may drag and drop the selected file to other positions on the interface, for example, as shown in the figure.
  • the prompt information shown in FIG. 4C may be displayed on the display screen of the electronic device, for example, "a file supports dragging and is in a dragging state" may be displayed.
  • a prompt message may also be displayed, for example, "The file does not support drag and drop", or "The file is too large” may be displayed. Large, drag-and-drop is not supported”, etc., to avoid the user dragging multiple times, no response, and the problem of dragging failure due to unknown reasons, thereby improving the user experience.
  • the above-mentioned prompt information may be displayed in the first window, that is, the window where the dragged file is located, so as to prompt the user that a file is in a dragging state.
  • S304 The electronic device determines whether the second window supports receiving the first file.
  • the electronic device may pre-store the files supported by each window to be received.
  • the second window is a receiving window
  • the second window supports receiving files 1, 2, and 3 corresponding to identification information 1, 2, and 3, respectively, but does not support receiving identification information corresponding to 4, 5, and 6, respectively.
  • the file 4, file 5, and file 6 of the second window; or the second window supports receiving files of picture type, but does not support receiving files of video type; or the second window supports receiving files of the first format (for example, XML), not Supports receiving files in the second format (for example, JSON), etc.
  • a data declaration interface may be provided, and the data declaration interface may be used to declare files that the window can receive.
  • the data declaration interface can be used to declare the file types that each window can receive.
  • each declaration interface may correspond to a data declaration.
  • the receiving window may determine whether it can receive the dragged file according to the data declaration of its own window. For example, if the file type of the dragged file belongs to the data declaration scope of the receiving window, the receiving window can receive the dragged file; if the file type of the dragged file does not belong to the data declaration scope of the receiving window, the receiving window cannot receive the dragged file. dragged file.
  • prompt information when the second window does not support receiving the first file, prompt information may be displayed in the second window, where the prompt information is used to prompt the user that the second window does not support receiving the first file, so that the user can timely understand dragging Drag state, avoid problems such as repeated attempts without knowing the reason for the failure when the drag fails, thereby improving the user experience.
  • Scenario 1 When dragging a single image, you can add identification information to the image to identify whether the image supports adding to the second window.
  • a picture supports adding can be distinguished by the identification as shown in the figure. For example, when the picture supports adding to the second window, the upper left corner of the picture can be marked with "+"; when the picture does not support adding to the second window, the upper left corner of the picture can be marked with " ⁇ ".
  • whether the picture supports adding can be identified by the color (or transparency) of the picture. For example, when the picture supports adding to the second window, the color of the picture can remain unchanged, that is, the picture keeps the original color; when the picture does not support adding to the second window, the color of the picture can be gray, or it can be in the upper layer of the original picture Displays a floating layer.
  • the floating layer refers to another interface located on the current display interface, the floating layer may be translucent, and the floating layer may make the current display interface visually viewed by the user to be blurred. For example, a floating layer may be displayed on top of the picture dragged by the user, so that the picture visually viewed by the user is blurred.
  • whether the picture supports adding to the receiving window can also be identified by the logo in the upper left corner of the picture and the color of the picture at the same time. For example, when there is a "+" mark in the upper left corner of the picture and the color of the picture does not change, it means that the picture supports adding to the receiving window; when there is a " ⁇ " mark in the upper left corner of the picture, and there is a layer of translucent on the picture When the layer is floating, it can indicate that the picture does not support adding to the receiving window.
  • the picture selected by the user in the first window is a picture that supports dragging
  • the second window supports adding the picture
  • the second window The thumbnail of the picture dragged by the user can be displayed on the thumbnail, and the identification information that supports adding can be displayed on the thumbnail.
  • FIG. 5A it is assumed that the user drags a picture from the first window to the second window along the direction of the arrow shown in the figure, and the second window can display the interface shown in FIG. 5A .
  • the dragged picture may be displayed on the interface, and a "+" may be displayed in the upper left corner to prompt the user that the second window can receive the picture.
  • the data declaration of the receiving window can be actively declared or not declared.
  • the area where the identification information "+" is located is marked with green, it means that the receiving window actively declares the data declaration of the window where it is located.
  • the area where the identification information "+" is located is marked with yellow, it means that the receiving window has not actively declared the data declaration of the window where it is located.
  • the above is just an example, and other colors can also be used to identify the actual product.
  • the second window when the user drags the picture from the first window to the second window along the direction of the arrow shown in the figure, the second window will The interface shown in Figure 5B can be displayed.
  • the dragged picture may be displayed on the interface, and " ⁇ " may be displayed in the upper left corner to prompt the user that the second window cannot receive the picture.
  • the above schematic diagram is only an illustration.
  • the second window does not support receiving the picture dragged by the user, when the picture is dragged to the second window, the second window will be displayed on the second window.
  • the upper layer of the displayed picture can be gray, and the circular area where the identification information " ⁇ " is located is also gray. This display mode enables the user to intuitively see that the dragged picture cannot be added to the receiving window, which can improve the user experience.
  • Scenario 2 When dragging multiple images, the number of dragged images is displayed.
  • identification information when dragging multiple pictures, identification information may be added to the upper right corner of the pictures, where the identification information is used to identify the number of pictures selected by the user.
  • identification information can also be added to the upper right corner of the picture, for example, the number "1" is displayed, which is not limited in this application.
  • the identification information (for example, a number) for determining the number of dragged files is a system-level capability of the electronic device, not an application-level capability.
  • adding identification information in the upper left corner of the picture to identify whether the picture supports adding to the receiving window and adding identification information in the upper right corner of the picture to identify the number of pictures are only a schematic description. A number is added to the upper left corner to identify the number of pictures selected by the user, or a number may be added to the lower left corner or lower right corner of the picture to identify the number of pictures selected by the user, etc., which is not limited in this application.
  • the identification information may also be located at a certain distance from the upper left corner/lower left corner/lower right corner/upper right corner of the picture, which is not limited in this application.
  • FIG. 6A it is assumed that the user selects multiple pictures in the window where the gallery is located. For example, as shown in (a) in FIG. 6A , two pictures are selected, and then the user presses any one of the multiple pictures for a long time, so that The picture is in a dragging state, for example, it can be dragged to the position shown in (b) of FIG. 6A . Then the user can drag and drop the plurality of pictures along the direction of the arrow shown in the figure to the window where the email is located. At this time, if the window where the mail is located supports receiving multiple pictures, the schematic diagram shown in (c) of FIG. 6A can be displayed.
  • the identification information of the supporting file and the identification information of the number of files can be displayed in the receiving window, for example, "+” and "2" can be displayed.
  • “+” indicates that the window where the email is located supports adding dragged pictures
  • “2" indicates that the number of dragged pictures is 2.
  • a schematic diagram as shown in (d) in FIG. 6A may be displayed. That is, if the receiving window does not support adding the dragged picture, the identification information of the file that does not support adding and the identification information of the number of files can be displayed in the receiving window, for example, " ⁇ " and "2" can be displayed. Among them, “ ⁇ ” means that the window where the email is located does not support adding dragged pictures, and “2" means that the number of dragged pictures is 2.
  • the oblique line on the upper layer of the picture is only an illustration, and in an actual product, the picture may be translucent, which is not limited in this application.
  • Scenario 3 When dragging and dropping multiple files of various file types, a prompt message is displayed for files that do not support dragging and dropping.
  • the file selected by the user includes multiple files and includes different file types (for example, the dragged file includes two types of pictures and videos). If the receiving window only supports adding pictures, then drag pictures and videos to After the second window, prompt information may be displayed in the second window, for example, prompt information of "adding video is not supported" may be displayed.
  • Fig. 6B suppose the user selects a picture and a video in the gallery, such as shown in (a) of Fig. 6B, when the user selects a picture and a video along the graph After dragging in the direction of the arrow of the email to the window where the email is located, the user can drop his hand, that is, after releasing the dragging state, if the window where the email is located does not support adding videos, the picture selected by the user can be loaded and displayed in the window where the email is located. , and the prompt message "Adding video is not supported" is displayed, for example, please refer to (b) in FIG. 6B .
  • Scenario 4 When dragging the text content, the height of the displayed text content can be scaled according to the height of the text content.
  • the text content when the text content is dragged, if the height of the text content is greater than the set height (for example, recorded as the first set height), the text content can be scaled when dragging, For example scaling to a second set height.
  • the relationship between the first set height and the second set height may be: the second set height is N times the first set height, 0 ⁇ N ⁇ 1.
  • the user can long press in the memo A paragraph of text makes the text enter the dragging state. Then, the user can drag and drop the selected text in the memo to the editing interface of the email along the direction of the arrow shown in the figure. For example, after dragging to the editing interface of the email, the height of the text can be displayed on the user's visual interface at 30% of the actual height of the text content, such as shown in (b) in FIG. 6C . That is to say, after the text is dragged to the editing interface of the email, the height of the text content displayed on the editing interface of the email is 30% of the actual height of the text content.
  • real-time feedback of the file dragging state can be performed, which is convenient for the user to control the dragging process according to the dragging state, and can predict the dragging result and improve the user's operation friendliness.
  • an embodiment of the present application further provides a method for dragging and dropping files.
  • the method may include the following steps:
  • S701 Display a first window and a second window in response to the user's first operation.
  • S702 In response to the user's second operation of selecting the icon of the target file in the first window, display the first interface in the first window.
  • the first interface includes the icon of the target file.
  • S703 In response to the third operation of the user, when it is detected that the icon of the target file is dragged from the first window to the second window, display the first identification information or the second identification information in the second window.
  • the third operation is used to drag and drop the icon of the target file from the first window to the second window, and the first identification information is used to identify that the icon of the target file can be added to the second window. the second window, and the second identification information is used to identify that the icon of the target file cannot be added to the second window.
  • the methods provided by the embodiments of the present application are introduced from the perspective of an electronic device as an execution subject.
  • the electronic device may include a hardware structure and/or software modules, and implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above functions is performed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
  • the device may be an electronic device with a display screen.
  • the electronic device may be a mobile phone.
  • the electronic device 800 includes: a display screen 801; one or more processors 802; a memory 803; a plurality of applications 804 (not shown in the figure); not shown), the above-mentioned devices may be connected through one or more communication buses 806.
  • the display screen 801 is used to display the display interface of the application in the electronic device, and the like.
  • one or more computer programs are stored in the memory 803, and the one or more computer programs include instructions; the processor 802 invokes the instructions stored in the memory 803, so that the electronic device 800 performs the following steps:
  • the first window and the second window are displayed; in response to the user's second operation of selecting the icon of the target file in the first window, the first interface is displayed in the first window, wherein the first An interface includes the icon of the target file; in response to the third operation of the user, when it is detected that the icon of the target file is dragged from the first window to the second window, the second window Display the first identification information or the second identification information; wherein, the third operation is used to drag and drop the icon of the target file from the first window to the second window, and the first identification information is used for An icon identifying the target file can be added to the second window, and the second identification information is used to identify an icon of the target file that cannot be added to the second window.
  • the electronic device when the instruction is invoked and executed by the one or more processors, the electronic device is caused to further perform the following step: when it is detected that the icon of the target file is changed from the first When a window is dragged to the second window, third identification information is displayed in the second window, where the third identification information is used to identify the number of icons of the target file.
  • the target file includes the first file.
  • the target file includes a first file and a second file
  • the file type of the first file is the first type
  • the file type of the second file is the second type
  • the electronic device When the instruction is invoked and executed by the one or more processors, the electronic device is caused to further perform the following step: when it is detected that the icon of the target file is dragged from the first window to the second window When the window is opened, fourth identification information is displayed in the second window, and the fourth identification information is used to identify that the icon of the second file of the second type cannot be added to the second window.
  • the electronic device when the instruction is invoked and executed by the one or more processors, the electronic device is caused to further perform the following step: displaying first prompt information, where the first prompt information is used for The user is prompted that the icon of the target file is in a dragging state.
  • the electronic device when the instruction is invoked and executed by the one or more processors, the electronic device is caused to further perform the following step: if it is detected that the height of the icon of the target file is greater than the first Set the height, then adjust the height of the icon of the target file to a second set height, and display it in the second window, and the second set height is N times the first set height, The N satisfies: 0 ⁇ N ⁇ 1.
  • the processor 802 may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, which may implement Alternatively, each method, step, and logic block diagram disclosed in the embodiments of the present application are executed.
  • a general purpose processor may be a microprocessor or any conventional processor or the like.
  • the steps of the methods disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • the software module may be located in the memory 803, and the processor 802 reads the program instructions in the memory 803, and completes the steps of the above method in combination with its hardware.
  • the memory 803 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory (volatile memory), For example RAM.
  • the memory may also be, but is not limited to, any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and that can be accessed by a computer.
  • the memory in this embodiment of the present application may also be a circuit or any other device capable of implementing a storage function, for storing instructions and/or data.
  • the embodiments of the present application further provide a chip, which is coupled with a memory in an electronic device to execute the file dragging method provided by the embodiments of the present application; “coupled” in the embodiments of the present application refers to two The components are directly or indirectly bonded to each other.
  • the present application further provides a computer storage medium, where a computer program is stored in the computer storage medium, and when the computer program is executed by a computer, the computer executes the file dragging method provided by the above embodiment. .
  • Embodiments of the present application also provide a computer program product, including instructions, which, when executed on a computer, cause the computer to execute the method for dragging and dropping files provided by the above embodiments.
  • the present application also provides a graphical user interface on an electronic device, the electronic device has a display screen, one or more memories, and one or more processors, the one or more processors are used for One or more computer programs stored in the one or more memories are executed, and the graphical user interface includes a graphical user interface displayed when the electronic device executes the file dragging method provided by the above embodiment.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • the apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种文件拖拽方法及电子设备,该方法通过在多窗口模式下,对于文件的拖拽过程进行实时的反馈,包括反馈文件的拖拽状态、拖拽的文件个数以及目标窗口是否支持添加拖拽文件的提示信息等,使得文件在拖拽过程中增加了与用户的交互,这样能够便于用户对于拖拽动作进行预判,避免用户误操作,从而提升用户体验。

Description

一种文件拖拽方法及电子设备
相关申请的交叉引用
本申请要求在2020年10月31日提交中国专利局、申请号为202011198501.7、申请名称为“一种文件拖拽方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种文件拖拽方法及电子设备。
背景技术
为了提升视觉体验,各种电子设备的屏幕越来越大,更能满足用户在电子设备上同时运行多个任务的需求。
当多个任务以多个窗口显示在显示屏时,用户可以将一个窗口内的文件拖拽到其它窗口,以实现文件共享。但是,目前在对文件拖拽的过程中,只有当用户完成拖拽动作之后才能知道文件是否拖拽成功。并且,当文件拖拽失败时,用户不知道失败的原因,可能会使得用户反复操作,进而使得用户体验较差。
发明内容
本申请提供一种文件拖拽方法及电子设备,用以提升文件拖拽过程中的用户体验。
第一方面,本申请提供一种文件拖拽方法,该方法包括:响应用户的第一操作,显示第一窗口和第二窗口;响应用户在所述第一窗口选择目标文件的图标的第二操作,在所述第一窗口显示第一界面,其中,所述第一界面中包括所述目标文件的图标;响应用户的第三操作,当检测到所述目标文件的图标被从所述第一窗口拖拽到所述第二窗口时,在所述第二窗口显示第一标识信息或第二标识信息;其中,所述第三操作用于将所述目标文件的图标从所述第一窗口拖拽到所述第二窗口,所述第一标识信息用于标识所述目标文件的图标能够添加到所述第二窗口,所述第二标识信息用于标识所述目标文件的图标不能添加到所述第二窗口。
通过上述技术方案,在文件被拖拽到目标窗口时,可以通过标识信息来标识目标窗口是否能够接收被拖拽的文件,这样用户可以直观的看到文件是否拖拽成功。特别在目标窗口不能接收被拖拽的文件时,能够避免用户反复操作,可以提升用户体验。
在一种可能的设计中,所述方法还包括:当检测到所述目标文件的图标被从所述第一窗口拖拽到所述第二窗口时,在所述第二窗口显示第三标识信息,所述第三标识信息用于标识所述目标文件的图标的数量。
在上述技术方案中,可以在文件拖拽到目标窗口时,显示被拖拽的文件数量,这样用户可以直观的看到拖拽的文件数量,能够使得在实际成功拖拽文件个数小于实际拖拽文件个数时,用户能够知道个数遗漏的原因,从而提升用户体验。
本申请实施例中,目标文件的个数可以为一个或多个。在一种可能的设计中,所述目 标文件包括第一文件。可以理解为目标文件的个数为一个。
在一种可能的设计中,当目标文件的个数为多个时,比如目标文件包括第一文件和第二文件,且所述第一文件的文件类型为第一类型,所述第二文件的文件类型为第二类型。
所述方法还包括:当检测到所述目标文件的图标被从所述第一窗口拖拽到所述第二窗口时,在所述第二窗口显示第四标识信息,所述第四标识信息用于标识所述第二窗口不能添加所述第二类型的第二文件的图标。
通过上述技术方案,在被拖拽的文件数量为多个时,如果目标窗口只能接收特定文件类型的文件,那么在被拖拽的文件中可能会存在目标窗口不能接收的文件,此时可以显示提示信息,以提醒用户目标窗口不能接收其它类型的文件。
在一种可能的设计中,所述方法还包括:显示第一提示信息,所述第一提示信息用于提示用户所述目标文件的图标处于拖拽状态。
通过上述技术方案,可以在用户选择目标文件之后,显示目标文件处于拖拽状态,这样能够避免用户在操作过程中失误丢手的情况,从而提升用户体验。
在一种可能的设计中,所述方法还包括:若检测到所述目标文件的图标的高度大于第一设定高度,则将所述目标文件的图标的高度调整为第二设定高度,并显示在所述第二窗口,所述第二设定高度为所述第一设定高度的N倍,所述N满足:0<N<1。
通过上述技术方案,可以在目标文件的高度大于设定高度时,对目标文件的高度进行缩放,这样能够便于用户检查文件是否有遗漏,避免窗口过多时,文件拖拽出现混乱的情况发生。
第二方面,本申请提供一种电子设备,该电子设备包括:显示屏;一个或多个处理器;存储器;多个应用;以及一个或多个计算机程序;
其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述一个或多个处理器调用执行时,使得所述电子设备执行上述第一方面及其第一方面任一可能设计的技术方案。
第三方面,本申请还提供一种电子设备,该电子设备包括执行第一方面或者第一方面的任意一种可能的设计的方法的模块/单元;这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。
第四方面,本申请实施例还提供一种芯片,所述芯片与电子设备中的存储器耦合,执行本申请实施例第一方面及其第一方面任一可能设计的技术方案;本申请实施例中“耦合”是指两个部件彼此直接或间接地结合。
第五方面,本申请实施例的一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在电子设备上运行时,使得所述电子设备执行本申请实施例第一方面及其第一方面任一可能设计的技术方案。
第六方面,本申请实施例的中一种计算机程序产品,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行本申请实施例第一方面及其第一方面任一可能设计的技术方案。
第七方面,还提供一种电子设备上的图形用户界面,所述电子设备具有显示屏、一个或多个存储器、以及一个或多个处理器,所述一个或多个处理器用于执行存储在所述一个或多个存储器中的一个或多个计算机程序,所述图形用户界面包括所述电子设备执行如上述第一方面提供的方法时显示的图形用户界面。
上述第二方面至第七方面中的各个方面以及各个方面可能达到的技术效果请参照上述针对第一方面中的各种可能方案可以达到的技术效果说明,这里不再重复赘述。
附图说明
图1为本申请实施例的一种电子设备的结构示意图;
图2A为本申请实施例提供的电子设备的软件结构框图;
图2B为本申请实施例提供的另一种软件结构框图;
图2C为本申请实施例提供的一种处理流程图;
图3为本申请实施例提供的一种文件拖拽方法流程图;
图4A~图4C为本申请实施例提供的用户界面示意图;
图5A~图5B为本申请实施例提供的用户界面示意图;
图6A~图6C为本申请实施例提供的用户界面示意图;
图7为本申请实施例提供的另一种文件拖拽方法流程图;
图8为本申请实施例提供的另一种电子设备的结构示意图。
具体实施方式
下面将结合本申请以下实施例中的附图,对本申请实施例中的技术方案进行详尽描述。
以下,首先对本申请实施例中的部分用语进行解释说明,以便于本领域技术人员理解。
本申请实施例涉及的应用程序(application,App),简称应用,为能够实现某项或多项特定功能的软件程序。通常,电子设备中可以安装多个应用。比如,相机应用、短信应用、邮箱应用、微信(WeChat)、WhatsApp Messenger、连我(Line)、照片分享(instagram)、Kakao Talk、钉钉等。下文中提到的应用,可以是电子设备出厂时已安装的应用,也可以是用户在使用电子设备的过程中从网络下载或其他电子设备获取的应用。
需要说明的是,本申请实施例提供的文件拖拽方法,可以适用于具有显示屏的电子设备,诸如手机、平板电脑、可穿戴设备(例如,手表、手环、智能头盔等)、车载设备、智能家居、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等,本申请实施例不作限定。本申请实施例涉及到的电子设备也可以是可折叠式的电子设备,比如可折叠式手机,可折叠式平板电脑等,本申请对此不作限定。
下面以手机为例,介绍手机的结构。
下面以电子设备为手机为例,介绍电子设备的结构。
如图1所示,手机100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感 器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。其中,控制器可以是手机100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为手机100充电,也可以用于手机100与外围设备之间传输数据。充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。
手机100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。手机100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在手机100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
无线通信模块160可以提供应用在手机100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,手机100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得手机100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
显示屏194用于显示应用的显示界面等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机100可以包括1个或N个显示屏194,N为大于1的正整数。在本申请实施例中,显示屏194可用于同时显示多个应用界面。
摄像头193用于捕获静态图像或视频。摄像头193可以包括前置摄像头和后置摄像头。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行手机100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,以及至少一个应用程序(例如爱奇艺应用,微信应用等)的软件代码等。存储数据区可存储手机100使用过程中所产生的数据(例如图像、视频等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将图片,视频等文件保存在外部存储卡中。
手机100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。陀螺仪传感器180B可以用于确定手机100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定手机100围绕三个轴(即,x,y和z轴)的角速度。
陀螺仪传感器180B可以用于拍摄防抖。气压传感器180C用于测量气压。在一些实施例中,手机100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。磁传感器180D包括霍尔传感器。手机100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当手机100是翻盖机时,手机100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。加 速度传感器180E可检测手机100在各个方向上(一般为三轴)加速度的大小。当手机100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。手机100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,手机100可以利用距离传感器180F测距以实现快速对焦。接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。手机100通过发光二极管向外发射红外光。手机100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定手机100附近有物体。当检测到不充分的反射光时,手机100可以确定手机100附近没有物体。手机100可以利用接近光传感器180G检测用户手持手机100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。手机100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测手机100是否在口袋里,以防误触。指纹传感器180H用于采集指纹。手机100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,手机100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,手机100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,手机100对电池142加热,以避免低温导致手机100异常关机。在其他一些实施例中,当温度低于又一阈值时,手机100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于手机100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。手机100可以接收按键输入,产生与手机100的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和手机100的接触和分离。
可以理解的是,图1所示的部件并不构成对手机的具体限定,手机还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。
上述手机100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构, 或云架构。本申请实施例以分层架构的Android系统为例,示例性说明手机100的软件结构。
图2A是本申请实施例的手机100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。如图2A所示,应用程序层内可以安装浏览器,优酷,腾讯视频,地图,爱奇艺等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2A所示,应用程序框架层可以包括显示策略服务、电源管理服务(power manager service,PMS)、显示管理服务(display manager service,DMS)。当然,应用程序框架层中还可以包括活动管理器、窗口管理器,内容提供器,视图系统,资源管理器,通知管理器等。
其中,窗口管理器,为窗口提供窗口管理服务(window manager service),以对显示屏显示的界面进行控制管理。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用的界面。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
Android runtime包括核心库和虚拟机。Android runtime是Android操作系统的运行时环境,负责Android操作系统的调度和管理。
其中,核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是Android操作系统的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种格式的音频、视频的回放和录制,以及支持打开多种格式的静态图像等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR, JPG,PNG等。
图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。2D图形引擎是2D绘图的绘图引擎。
内核层是电子设备的硬件和软件之间的层。内核层至少包含显示驱动,传感器驱动、摄像头驱动,音频驱动等,用于驱动硬件层中的硬件。
硬件层可以包括各类传感器(例如触摸传感器等)、显示屏、摄像头等。
本申请实施例中,应用程序层可包括至少一个应用程序,以两个应用程序为例,其中一个应用程序为发送应用(或者称为拖出应用,即元素拖出时元素所在的应用),另一个应用程序为接收应用(即接收拖拽元素的应用)。参阅图2B所示,电子设备可检测用户的长按操作进入拖拽处理事件,并存储用户选择的拖拽数据(例如,保存到ClipDescription),然后通过系统(应用框架层(Framework))ACTION_DRAG_STARTED事件将拖拽数据发送给接收应用。另外,发送应用可在系统回调绘制图层时,绘制角标。这里的角标包括元素数量的图标以及元素是否支持添加到接收窗口的图标。
相应的,接收应用可申明接口,并申明应用的每个控件(或者称为窗口)所能接收的文件类型。当接收应用接收到ACTION_DRAG_STARTED事件之后,可根据ACTION_DRAG_STARTED事件中携带的拖拽信息匹配自身能够接收的文件数量,并保存匹配结果。
当用户将元素拖拽到接收应用的可释放区域(接收应用的界面)时,可接收控件收到ACTION_DRAG_ENTERED通知。然后接收应用向系统反馈匹配结果,系统再将匹配结果传递给发送应用。相应的,发送应用接收到匹配结果后可更新角标。可以理解的是,这里的角标可以理解为下述实施例中文件是否支持添加到接收窗口的图标和拖拽文件的数量。
当拖拽动作离开可释放区域时,接收应用的可接收控件收到ACTION_DRAG_EXITED通知,向系统反馈“离开”通知(即拖拽动作离开接收应用)。然后接收应用向系统反馈“离开”通知,系统再将“离开”通知传递给发送应用。相应的,发送应用接收到“离开”通知后恢复角标。
可以理解的是,元素即为下述实施例中的文件,本申请中有时候两者会混用,应理解,其含义一致。
如图2C所示,为本申请实施例提供的处理流程图,该流程图的具体步骤实现可参阅图2B所示实施例的介绍,此处不再重复赘述。
需要说明的是,当用户触发拖拽动作时,注册了ACTION_DRAG_STARTED广播的可接收控件,可以根据广播中携带的ClipDescription信息(即拖拽信息),匹配接收控件能够接收的文件数量。
以下实施例以应用在图1所示的手机100所示的架构中为例进行描述。
此外,下述实施例涉及的至少一个,包括一个或者多个;其中,多个是指大于或者等于两个。另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
目前,为了满足用户同时处理多个任务的需求,电子设备支持多窗口模式,即可以将多个任务同时显示在一个显示屏上,以避免用户频繁切换窗口的麻烦。在此场景下,用户可以将一个窗口内的文件拖拽到另一个窗口,以实现资源共享。在文件拖拽过程中,由于显示屏上没有提示信息,只有当文件拖拽完成之后,用户才能知道文件是否拖拽成功。如 果文件拖拽失败,用户也无法区分是操作有误还是其它原因,使得用户体验较差。
有鉴于此,本申请实施例提供了一种文件拖拽方法,通过在文件拖拽过程中,实时反馈拖拽状态,例如显示拖拽的状态、拖拽的文件数量以及文件是否支持拖拽等,以提升用户体验。
以下,将结合附图对本申请实施例提供的一种文件拖拽方法进行具体介绍。
如图3所示,为本申请实施例提供的一种文件拖拽方法流程图,参阅图3所示,该方法可包括如下步骤:
S301:电子设备响应用户的第一操作,在显示屏上显示第一窗口和第二窗口。
这里,用户的第一操作可以为用户开启多任务窗口的操作。示例性的,该第一操作可以为触发分屏显示的操作,例如显示屏显示第一应用界面,在此第一应用界面上,电子设备可以响应用户的第一操作,例如沿着显示屏的左边缘向内滑动,调出智慧分屏的应用栏,然后点击分屏应用栏中想要进行分屏的应用图标即可实现分屏。当然可以理解的是,触发分屏显示的操作还可以为其它的手势操作,比如也可以通过下拉通知栏中的快捷开关开启分屏,或者还可以通过语音控制的方式开启分屏等等,本申请对此不作限定。
需要说明的是,分屏显示的两个窗口的大小可以相同,也可以不同,并且,分屏显示的窗口可以以悬浮窗的形式显示在显示屏上。本申请实施例中,第一窗口和第二窗口也可以自由显示在电子设备的显示屏上,本申请对此不作限定。
参阅图4A所示,假设电子设备的显示屏上显示图库的应用界面400,此时用户可沿着界面400的右边缘向内滑动,调出分屏的应用栏,例如显示屏上可显示用户界面410。其中界面410中包括分屏的应用栏411,然后在应用栏411中点击应用图标“电子邮件”412,此时显示屏上可显示用户界面420。这样显示屏上即可显示两个应用窗口,比如包括图库的应用窗口421和电子邮件的应用窗口422。
以下,为了描述方便,可将显示屏上显示的窗口记为“第一窗口”和“第二窗口”。
本申请实施例中,电子设备的显示屏上可显示多个窗口,并且多个窗口可以为一个应用程序的多个窗口,也可以为多个应用程序的多个窗口,本申请对此不作限定。示例性的,显示屏上显示第一窗口和第二窗口。其中,第一窗口可以为第一应用的显示窗口,第二窗口可以为第二应用的显示窗口。另一示例,第一窗口可以为第一应用的第一显示窗口,第二窗口可以为第一应用的第二显示窗口。也就是说,本申请中,可以在两个应用的应用窗口之间拖拽文件,也可以在一个应用的两个应用窗口之间拖拽文件。
需要说明的是,文件可以包括图片、视频、文本、音频等。另外,用户在选择文件时,可以选择一个文件,也可以选择多个文件。
S302:电子设备响应用户在第一窗口的第二操作。
这里的第二操作可以为用户选择文件的操作,示例性的,该第二操作可以为用户在图库中对图片或者视频的长按操作,比如用户长按某一张图片预设时长(例如,2s)之后,可选中该图片。
参阅图4B所示,假设第一窗口为应用程序图库的界面,第二窗口为应用程序邮件的界面。假设用户要将第一窗口的图片拖拽到第二窗口,比如用户在图4B中的(a)所示示意图的图库中选择了两张图片,则可长按选择的图片,然后图库可显示如图4B中的(b)所示的界面,即当用户长按图片之后,图片可处于选择状态,例如图片的右下角可显示对号。
应理解,本申请中的应用窗口可以左右放置,也可以上下放置,本申请对此不作限定。以下实施例中以手机处于横屏状态,且应用为左右放置为例进行介绍。
需要说明的是,当图片处于选择状态时,被选择的图片和未被选择的图片从用户视觉上看起来可能会有所不同,例如,被选择的图片的上层可能会显示一层模糊的层,当然,在实际产品实现时,也可能不显示,本申请对此不作限定。
可以理解的是,步骤S301和步骤S302在实际应用中,并不限定其执行的前后顺序,用户也可以先选择要拖拽的文件,然后开启多任务窗口,本申请对此不作限定。
S303:电子设备响应用户的第三操作,将第一文件从第一窗口拖拽到第二窗口。
这里第三操作可以为用户对第一文件的拖拽操作,例如可以为用户对图片的拖拽操作,也可以为用户对视频的拖拽操作,或者也可以为用户对图片和视频的拖拽操作等,本申请对此不作限定。当然,拖拽操作可以为用户对一张图片的拖拽操作,也可以用户对多张图片的拖拽操作。当用户在第一窗口中选择第一文件之后,可以将在第一窗口选择的文件拖拽到第二窗口。
在一些实施例中,电子设备可以预先保存每一个窗口中支持拖拽的文件。示例性的,假设第一窗口内包括多个文件,比如标识信息为1、2、4分别对应的文件1、文件2、文件4为支持拖拽的文件,标识信息为3、5、6分别对应的文件3、文件5、文件6为不支持拖拽的文件。当然,也可以针对文件类型来区分是否支持拖拽,比如,当文件类型为图片时,支持拖拽;当文件类型为视频时,不支持拖拽。或者,还可以根据文件的格式来区分,例如,当文件的格式为XML格式时,支持拖拽;当文件的格式为JSON格式时,不支持拖拽。或者,还可以根据文件的后缀名来区分是否支持拖拽等,本申请对此不作限定。
由于用户操作时可能会出现失误丢手(可以理解为,松开拖拽状态),为了避免文件在拖拽过程中的这种问题,本申请实施例中若文件支持拖拽,则可显示提示信息,该提示信息可用于提示文件支持拖拽,且处于拖拽状态。
示例性,参阅图4C所示,用户可在图4B中的(b)所示的示意图中长按(例如,2s)并拖拽所选择的文件,然后文件可进入拖拽状态。示例性的,用户可将选择的文件拖拽到界面上的其它位置,例如图中的示意。此时电子设备的显示屏上可显示图4C所示的提示信息,例如可显示“一个文件支持拖拽,且处于拖拽状态”。
另一示例,若选择的文件不支持拖拽(比如,由于文件太大的原因不支持拖拽),则也可以显示提示信息,例如可显示“文件不支持拖拽”,或者显示“文件太大,不支持拖拽”等,以避免用户拖拽多次,没有响应,不知道由于什么原因导致的拖拽失败问题,从而提升用户体验。
需要说明的是,上述提示信息可显示在第一窗口,也就是被拖拽文件所在的窗口,以提示用户有文件处于拖拽状态。
S304:电子设备判断第二窗口是否支持接收第一文件。
对于每个窗口而言,窗口内的文件可以拖拽到其它的窗口,相应的,也可以接收用户从其它窗口拖拽的文件。在另一些实施例中,电子设备中可以预先保存每一个窗口所支持接收的文件。示例性的,假设第二窗口为接收窗口,第二窗口支持接收标识信息为1、2、3分别对应的文件1、文件2、文件3,不支持接收标识信息为4、5、6分别对应的文件4、文件5、文件6;或者第二窗口支持接收图片类型的文件,不支持接收视频类型的文件;或者还可以为第二窗口支持接收第一格式(例如,XML)的文件,不支持接收第二格式(例 如,JSON)的文件等,或者,还可以根据文件的后缀名来判断窗口是否支持接收,或者根据文件的大小判断窗口是否支持接收等,本申请对此不作限定。
作为一种可能的实施方式,本申请实施例中针对每一个窗口,可提供一个数据申明接口,该数据声明接口可用于申明窗口能够接收的文件。具体来说,该数据声明接口可以用于声明每个窗口所能够接收的文件类型。示例性,可参阅表1所示,每一个声明接口都可对应一个数据声明。
表1接口与数据声明的对应关系
声明接口 数据声明
接口1 声明窗口1只能接收文本类型的文件
接口2 声明窗口2能够接收文本类型的文件以及图片
接口3 声明窗口3能够接收各种类型的文件
可以理解的是,上述表1仅是一种示意性说明,不同的声明接口可对应不同的数据声明。当然,不同的声明接口也可对应相同的数据声明,本申请对此不作限定。
本申请实施例中,接收窗口可以根据自身窗口的数据声明确定是否能够接收拖拽的文件。比如,拖拽的文件的文件类型属于接收窗口的数据声明范围,则接收窗口可以接收拖拽的文件;若拖拽的文件的文件类型不属于接收窗口的数据声明范围,则接收窗口不能接收拖拽的文件。
S305:若第二窗口支持接收第一文件,则将第一文件添加到第二窗口。
S306:若第二窗口不支持接收第一文件,则在第二窗口显示提示信息。
在一些实施例中,当第二窗口不支持接收第一文件时,可以在第二窗口内显示提示信息,该提示信息用于提示用户第二窗口不支持接收第一文件,以便用户及时了解拖拽状态,避免在拖拽失败时不清楚失败原因多次尝试等问题,进而提升用户体验。
以下以拖拽图库中的文件为例,结合不同场景对该步骤的用户界面示意图进行详细介绍。
场景一:拖拽单张图片时,可以通过在图片上添加标识信息来标识图片是否支持添加到第二窗口。
示例性的,可以通过如图所示的标识来区分图片是否支持添加。例如,当图片支持添加到第二窗口时,图片的左上角可标识“+”;当图片不支持添加到第二窗口时,图片的左上角可标识“\”。
另一示例,可以通过图片的颜色(或者透明度)来标识图片是否支持添加。例如,当图片支持添加到第二窗口时,图片的颜色可以不变,即图片保持原来的颜色;当图片不支持添加到第二窗口时,图片的颜色可以为灰色,或者可以在原图的上层显示一层浮层。
其中,浮层是指位于当前显示界面上的另一个界面,该浮层可以是半透明的,该浮层可以使得用户从视觉上看到的当前显示界面为模糊的。例如,可以在用户拖拽的图片上层显示一层浮层,使得用户从视觉上看到的图片为模糊不清的。
当然,可以理解的是,也可以通过图片左上角的标识和图片的颜色来同时标识图片是否支持添加到接收窗口内。例如,当图片的左上角有“+”标识,且图片的颜色没有变化时,说明该图片支持添加到接收窗口内;当图片的左上角有“\”标识,且图片上有一层半透明的浮层时,可以说明该图片不支持添加到接收窗口内。
举例来说,假设用户在第一窗口选择的图片为支持拖拽的图片,则当用户将图片从第 一窗口拖拽到第二窗口时,如果第二窗口支持添加该图片,则第二窗口上可显示用户所拖拽的图片的缩略图,并且该缩略图上可显示支持添加的标识信息。参阅图5A所示,假设用户从第一窗口沿着图示所示的箭头方向将图片拖拽到第二窗口,此时第二窗口可显示如图5A所示的界面。该界面上可显示有所拖拽的图片,并且左上角可显示有“+”,以提示用户第二窗口可以接收该图片。
可以理解的是,接收窗口的数据声明可以主动声明,也可以不声明。当标识信息“+”所在的区域用绿色标识时,说明接收窗口主动声明其所在窗口的数据声明。当标识信息“+”所在的区域用黄色标识时,说明接收窗口未主动声明其所在窗口的数据声明。当然,上述仅是一种示例,实际产品实现时,也可以用其他颜色来标识。
参阅图5B所示,假设第二窗口不支持添加用户所拖拽的图片,则当用户从第一窗口沿着图示所示的箭头方向将图片拖拽到第二窗口时,第二窗口内可显示如图5B所示的界面。该界面上可显示有所拖拽的图片图,并且左上角可显示有“\”,以提示用户第二窗口不能接收该图片。
可以理解的是,上述示意图中仅是一种示意,在实际产品实现时,如果第二窗口不支持接收用户所拖拽的图片,则当图片被拖拽到第二窗口时,第二窗口上显示的图片上层可以是灰色的,并且标识信息“\”所在的圆形区域也是灰色的。这种显示方式可以使得用户直观的看到接收窗口不能添加所拖拽的图片,能够提升用户体验。
场景二:对多张图片进行拖拽时,显示拖拽的图片数量。
本申请实施例中,当拖拽多张图片时,可以在图片的右上角上添加标识信息,该标识信息用于标识用户选择的图片的数量。当然,如果拖拽一张图片,也可以在图片的右上角添加标识信息,例如显示数字“1”,本申请对此不作限定。
需要说明的是,在本申请实施例中,确定拖拽的文件数量的标识信息(例如,数字),是电子设备的系统级能力,并不是应用程序级的能力。
可以理解的是,在图片的左上角添加标识信息来标识图片是否支持添加到接收窗口以及在图片右上角添加标识信息来标识图片的数量仅是一种示意性说明,例如,也可以在图片的左上角添加数字,以标识用户选中的图片数量,或者也可以在图片的左下角或者右下角添加数字,以标识用户选中的图片数量等,本申请对此不作限定。
在另一些实施例中,标识信息还可以在距离图片的左上角/左下角/右下角/右上角一定距离的位置处,本申请对此不作限定。
参阅图6A所示,假设用户在图库所在的窗口选择了多张图片,例如图6A中的(a)所示,选择了2张图片,然后用户长按多张图片的任意一张图片,使得图片处于拖拽状态,例如可拖拽到如图6A中的(b)所示的位置。然后用户可将多张图片沿着图中所示的箭头方向将多张图片拖拽到邮件所在的窗口。此时如果邮件所在的窗口支持接收多张图片,则可显示如图6A中的(c)所示的示意图。即若接收窗口支持添加所拖拽的图片,则可在接收窗口显示支持添加文件的标识信息以及文件数量的标识信息,例如可显示“+”和“2”。其中,“+”表示邮件所在的窗口支持添加拖拽的图片,“2”表示拖拽的图片数量为2张。
如果邮件所在的窗口不支持接收多张图片,则可显示如图6A中的(d)所示的示意图。即若接收窗口不支持添加所拖拽的图片,则可在接收窗口显示不支持添加文件的标识信息以及文件数量的标识信息,例如可显示“\”和“2”。其中,“\”表示邮件所在的窗口不支持添加拖拽的图片,“2”表示拖拽的图片数量为2张。
可以理解的是,图6A中的(d)所示的示意图中,图片上层的斜线仅是一种示意,在实际产品时,该图片可能是半透明的,本申请对此不作限定。
场景三:对多种文件类型的多个文件拖拽时,对于不支持拖拽的文件,显示提示信息。
示例性的,假设用户选中的文件包括多个,且包括不同的文件类型(比如拖拽的文件包括图片和视频两种类型),如果接收窗口仅支持添加图片,那么在拖拽图片和视频到第二窗口之后,第二窗口内可显示提示信息,比如可显示“不支持添加视频”的提示信息。
举例来说,参阅图6B所示,假设用户在图库中选择了一张图片和一个视频,例如图6B中的(a)所示,当用户将选择的一张图片和一个视频沿着图示的箭头方向拖拽到邮件所在的窗口之后,用户可丢手,即松开拖拽状态之后,如果邮件所在的窗口不支持添加视频,则可将用户选择的图片加载并显示在邮件所在的窗口,并且显示“不支持添加视频”的提示信息,例如可参阅图6B中的(b)所示。
场景四:对于文本内容拖拽时,可以根据文本内容的高度对显示的文本内容的高度进行缩放。
作为一种可能的实现方式,对于文本内容拖拽时,如果文本内容的高度大于设定高度(例如,记为第一设定高度)时,可在拖拽时可以将文本内容的进行缩放,例如缩放为第二设定高度。其中,第一设定高度和第二设定高度之间的关系可以为:第二设定高度为第一设定高度的N倍,0<N<1。示例性的,当文本内容的高度<=第一设定高度(比如,屏幕高度的30%)时,可以不缩放文本内容;当文本内容的高度>第一设定高度(比如,屏幕高度的30%)时,可以将文本内容缩放到屏幕高度的30%进行显示,这样能够避免文本内容过高时,遗漏信息,能够方便用户检查。
举例来说,参阅图6C所示,假设用户在应用程序备忘录中选择了一段文字(比如,文本内容高度大于设定高度),例如图6C中的(a)所示,用户可以长按备忘录中的一段文字,使得文字进入拖拽状态。然后用户可沿着图示箭头方向将备忘录中选择的文字拖拽到邮件的编辑界面。例如,当拖拽到邮件的编辑界面后,文字的高度可以以文本内容实际高度的30%显示在用户的可视化界面上,例如图6C中的(b)所示。也就是说,当文本拖拽到邮件的编辑界面后,邮件的编辑界面显示的文本内容的高度为文本内容实际高度的30%。
通过本申请实施例的方案,可以对文件拖拽状态进行实时反馈,方便用户根据拖拽状态对拖拽过程进行控制,并且能够预判拖拽结果,提升用户的操作友好性。
基于上述实施例,如图7所示,本申请实施例还提供一种文件拖拽方法,参阅图7所示,该方法可包括如下步骤:
S701:响应用户的第一操作,显示第一窗口和第二窗口。
S702:响应用户在第一窗口选择目标文件的图标的第二操作,在第一窗口显示第一界面。
其中,所述第一界面中包括目标文件的图标。
S703:响应用户的第三操作,当检测到目标文件的图标被从第一窗口拖拽到第二窗口时,在第二窗口显示第一标识信息或第二标识信息。
其中,所述第三操作用于将所述目标文件的图标从所述第一窗口拖拽到所述第二窗口,所述第一标识信息用于标识所述目标文件的图标能够添加到所述第二窗口,所述第二标识 信息用于标识所述目标文件的图标不能添加到所述第二窗口。
对于上述步骤的具体实现可参阅前述实施例中的详细介绍,此处不再赘述。
上述本申请提供的实施例中,从电子设备作为执行主体的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,电子设备可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。
如图8所示,为本申请实施例提供的一种电子设备的结构示意图,该设备可以是具有显示屏的电子设备。示例性的,该电子设备可以为手机。参阅图8所示,所述电子设备800包括:显示屏801;一个或多个处理器802;存储器803;多个应用804(图中未示出);以及一个或多个计算机程序805(图中未示出),上述各器件可以通过一个或多个通信总线806连接。
其中,显示屏801用于显示电子设备中的应用的显示界面等。
其中,存储器803中存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令;处理器802调用存储器803中存储的所述指令,使得电子设备800执行以下步骤:
响应用户的第一操作,显示第一窗口和第二窗口;响应用户在所述第一窗口选择目标文件的图标的第二操作,在所述第一窗口显示第一界面,其中,所述第一界面中包括所述目标文件的图标;响应用户的第三操作,当检测到所述目标文件的图标被从所述第一窗口拖拽到所述第二窗口时,在所述第二窗口显示第一标识信息或第二标识信息;其中,所述第三操作用于将所述目标文件的图标从所述第一窗口拖拽到所述第二窗口,所述第一标识信息用于标识所述目标文件的图标能够添加到所述第二窗口,所述第二标识信息用于标识所述目标文件的图标不能添加到所述第二窗口。
在一种可能的实现方式中,当所述指令被所述一个或多个处理器调用执行时,使得所述电子设备还执行以下步骤:当检测到所述目标文件的图标被从所述第一窗口拖拽到所述第二窗口时,在所述第二窗口显示第三标识信息,所述第三标识信息用于标识所述目标文件的图标的数量。
在一种可能的实现方式中,所述目标文件包括第一文件。
在一种可能的实现方式中,所述目标文件包括第一文件和第二文件,且所述第一文件的文件类型为第一类型,所述第二文件的文件类型为第二类型。
当所述指令被所述一个或多个处理器调用执行时,使得所述电子设备还执行以下步骤:当检测到所述目标文件的图标被从所述第一窗口拖拽到所述第二窗口时,在所述第二窗口显示第四标识信息,所述第四标识信息用于标识所述第二窗口不能添加所述第二类型的第二文件的图标。
在一种可能的实现方式中,当所述指令被所述一个或多个处理器调用执行时,使得所述电子设备还执行以下步骤:显示第一提示信息,所述第一提示信息用于提示用户所述目标文件的图标处于拖拽状态。
在一种可能的实现方式中,当所述指令被所述一个或多个处理器调用执行时,使得所述电子设备还执行以下步骤:若检测到所述目标文件的图标的高度大于第一设定高度,则将所述目标文件的图标的高度调整为第二设定高度,并显示在所述第二窗口,所述第二设定高度为所述第一设定高度的N倍,所述N满足:0<N<1。
在本申请实施例中,处理器802可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储器803中,处理器802读取存储器803中的程序指令,结合其硬件完成上述方法的步骤。
在本申请实施例中,存储器803可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如RAM。存储器还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器还可以是电路或者其它任意能够实现存储功能的装置,用于存储指令和/或数据。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
基于以上实施例,本申请实施例还提供一种芯片,所述芯片与电子设备中的存储器耦合,执行本申请实施例提供的文件拖拽方法;本申请实施例中“耦合”是指两个部件彼此直接或间接地结合。
基于以上实施例,本申请还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机程序,所述计算机程序被计算机执行时,使得所述计算机执行以上实施例提供的文件拖拽方法。
本申请实施例中还提供一种计算机程序产品,包括指令,当其在计算机上运行时,使得计算机执行以上实施例提供的文件拖拽方法。
基于以上实施例,本申请还提供一种电子设备上的图形用户界面,所述电子设备具有显示屏、一个或多个存储器、以及一个或多个处理器,所述一个或多个处理器用于执行存储在所述一个或多个存储器中的一个或多个计算机程序,所述图形用户界面包括所述电子设备执行以上实施例提供的文件拖拽方法时显示的图形用户界面。
本申请实施例是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。

Claims (13)

  1. 一种文件拖拽方法,其特征在于,应用于电子设备中,所述方法包括:
    响应用户的第一操作,显示第一窗口和第二窗口;
    响应用户在所述第一窗口选择目标文件的图标的第二操作,在所述第一窗口显示第一界面,其中,所述第一界面中包括所述目标文件的图标;
    响应用户的第三操作,当检测到所述目标文件的图标被从所述第一窗口拖拽到所述第二窗口时,在所述第二窗口显示第一标识信息或第二标识信息;
    其中,所述第三操作用于将所述目标文件的图标从所述第一窗口拖拽到所述第二窗口,所述第一标识信息用于标识所述目标文件的图标能够添加到所述第二窗口,所述第二标识信息用于标识所述目标文件的图标不能添加到所述第二窗口。
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    当检测到所述目标文件的图标被从所述第一窗口拖拽到所述第二窗口时,在所述第二窗口显示第三标识信息,所述第三标识信息用于标识所述目标文件的图标的数量。
  3. 如权利要求1或2所述的方法,其特征在于,所述目标文件包括第一文件。
  4. 如权利要求1或2所述的方法,其特征在于,所述目标文件包括第一文件和第二文件,且所述第一文件的文件类型为第一类型,所述第二文件的文件类型为第二类型;
    所述方法还包括:
    当检测到所述目标文件的图标被从所述第一窗口拖拽到所述第二窗口时,在所述第二窗口显示第四标识信息,所述第四标识信息用于标识所述第二窗口不能添加所述第二类型的第二文件的图标。
  5. 如权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:
    显示第一提示信息,所述第一提示信息用于提示用户所述目标文件的图标处于拖拽状态。
  6. 如权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:
    若检测到所述目标文件的图标的高度大于第一设定高度,则将所述目标文件的图标的高度调整为第二设定高度,并显示在所述第二窗口,所述第二设定高度为所述第一设定高度的N倍,所述N满足:0<N<1。
  7. 一种电子设备,其特征在于,所述电子设备包括显示屏;一个或多个处理器;存储器;多个应用;以及一个或多个计算机程序;
    其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述一个或多个处理器调用执行时,使得所述电子设备执行以下步骤:
    响应用户的第一操作,在所述显示屏显示第一窗口和第二窗口;
    响应用户在所述第一窗口选择目标文件的图标的第二操作,在所述第一窗口显示第一界面,其中,所述第一界面中包括所述目标文件的图标;
    响应用户的第三操作,当检测到所述目标文件的图标被从所述第一窗口拖拽到所述第二窗口时,在所述第二窗口显示第一标识信息或第二标识信息;
    其中,所述第三操作用于将所述目标文件的图标从所述第一窗口拖拽到所述第二窗口,所述第一标识信息用于标识所述目标文件的图标能够添加到所述第二窗口,所述第二标识 信息用于标识所述目标文件的图标不能添加所述第二窗口。
  8. 如权利要求7所述的电子设备,其特征在于,当所述指令被所述一个或多个处理器调用执行时,使得所述电子设备还执行以下步骤:
    当检测到所述目标文件的图标被从所述第一窗口拖拽到所述第二窗口时,在所述第二窗口显示第三标识信息,所述第三标识信息用于标识所述目标文件的图标的数量。
  9. 如权利要求7或8所述的电子设备,其特征在于,所述目标文件包括第一文件。
  10. 如权利要求7或8所述的电子设备,其特征在于,所述目标文件包括第一文件和第二文件,且所述第一文件的文件类型为第一类型,所述第二文件的文件类型为第二类型;
    当所述指令被所述一个或多个处理器调用执行时,使得所述电子设备还执行以下步骤:
    当检测到所述目标文件的图标被从所述第一窗口拖拽到所述第二窗口时,在所述第二窗口显示第四标识信息,所述第四标识信息用于标识所述第二窗口不能添加所述第二类型的第二文件的图标。
  11. 如权利要求7-10任一项所述的电子设备,其特征在于,当所述指令被所述一个或多个处理器调用执行时,使得所述电子设备还执行以下步骤:
    显示第一提示信息,所述第一提示信息用于提示用户所述目标文件的图标处于拖拽状态。
  12. 如权利要求7-11任一项所述的电子设备,其特征在于,当所述指令被所述一个或多个处理器调用执行时,使得所述电子设备还执行以下步骤:
    若检测到所述目标文件的图标的高度大于第一设定高度,则将所述目标文件的图标的高度调整为第二设定高度,并显示在所述第二窗口,所述第二设定高度为所述第一设定高度的N倍,所述N满足:0<N<1。
  13. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-6中任一项所述的文件拖拽方法。
PCT/CN2021/123511 2020-10-31 2021-10-13 一种文件拖拽方法及电子设备 WO2022089208A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21884937.0A EP4220365A4 (en) 2020-10-31 2021-10-13 FILE TRAGGING METHOD AND ELECTRONIC DEVICE
US18/251,076 US20230384919A1 (en) 2020-10-31 2021-10-13 File Dragging Method and Electronic Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011198501.7 2020-10-31
CN202011198501.7A CN114527901A (zh) 2020-10-31 2020-10-31 一种文件拖拽方法及电子设备

Publications (1)

Publication Number Publication Date
WO2022089208A1 true WO2022089208A1 (zh) 2022-05-05

Family

ID=81383621

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/123511 WO2022089208A1 (zh) 2020-10-31 2021-10-13 一种文件拖拽方法及电子设备

Country Status (4)

Country Link
US (1) US20230384919A1 (zh)
EP (1) EP4220365A4 (zh)
CN (1) CN114527901A (zh)
WO (1) WO2022089208A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115237297A (zh) * 2022-09-21 2022-10-25 荣耀终端有限公司 显示日程的方法及相关装置
CN116700554A (zh) * 2022-10-24 2023-09-05 荣耀终端有限公司 信息的显示方法、电子设备及可读存储介质
WO2023226975A1 (zh) * 2022-05-24 2023-11-30 华为技术有限公司 一种显示方法与电子设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114895815A (zh) * 2022-06-17 2022-08-12 维沃移动通信有限公司 数据处理方法和电子设备
CN116700555B (zh) * 2022-10-25 2023-12-05 荣耀终端有限公司 动效处理方法及电子设备
CN116974446A (zh) * 2023-09-18 2023-10-31 荣耀终端有限公司 一种动画效果的显示方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5745112A (en) * 1994-12-16 1998-04-28 International Business Machine Corp. Device and method for a window responding to a drag operation
CN101452403A (zh) * 2008-12-19 2009-06-10 北京数码大方科技有限公司 拖拽支持方法和装置
CN107066172A (zh) * 2017-02-16 2017-08-18 北京小米移动软件有限公司 移动终端的文件传输方法及装置
CN110703966A (zh) * 2019-10-17 2020-01-17 广州视源电子科技股份有限公司 文件共享方法、装置、系统、相应设备及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160299656A1 (en) * 2015-04-08 2016-10-13 Thomas M. Isaacson System and method for saving an open file
CN110874276B (zh) * 2018-08-31 2023-02-28 杭州海康威视系统技术有限公司 一种跨进程通信方法、装置及计算机可读存储介质
CN109462692A (zh) * 2018-10-29 2019-03-12 努比亚技术有限公司 分屏显示操作方法、移动终端及计算机可读存储介质
CN109782976B (zh) * 2019-01-15 2020-12-22 Oppo广东移动通信有限公司 文件处理方法、装置、终端及存储介质
CN110196973B (zh) * 2019-05-27 2021-07-13 珠海格力电器股份有限公司 一种备注显示方法及设备
CN111158543B (zh) * 2019-12-24 2023-10-24 华为技术有限公司 一种文件处理方法、电子设备、系统和存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5745112A (en) * 1994-12-16 1998-04-28 International Business Machine Corp. Device and method for a window responding to a drag operation
CN101452403A (zh) * 2008-12-19 2009-06-10 北京数码大方科技有限公司 拖拽支持方法和装置
CN107066172A (zh) * 2017-02-16 2017-08-18 北京小米移动软件有限公司 移动终端的文件传输方法及装置
CN110703966A (zh) * 2019-10-17 2020-01-17 广州视源电子科技股份有限公司 文件共享方法、装置、系统、相应设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4220365A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023226975A1 (zh) * 2022-05-24 2023-11-30 华为技术有限公司 一种显示方法与电子设备
CN115237297A (zh) * 2022-09-21 2022-10-25 荣耀终端有限公司 显示日程的方法及相关装置
CN116700554A (zh) * 2022-10-24 2023-09-05 荣耀终端有限公司 信息的显示方法、电子设备及可读存储介质
CN116700554B (zh) * 2022-10-24 2024-05-24 荣耀终端有限公司 信息的显示方法、电子设备及可读存储介质

Also Published As

Publication number Publication date
EP4220365A4 (en) 2024-03-13
US20230384919A1 (en) 2023-11-30
CN114527901A (zh) 2022-05-24
EP4220365A1 (en) 2023-08-02

Similar Documents

Publication Publication Date Title
WO2021057868A1 (zh) 一种界面切换方法及电子设备
WO2022089208A1 (zh) 一种文件拖拽方法及电子设备
WO2021013158A1 (zh) 显示方法及相关装置
EP4024183B1 (en) Method for split-screen display and electronic apparatus
EP3872807A1 (en) Voice control method and electronic device
WO2021036571A1 (zh) 一种桌面的编辑方法及电子设备
WO2021063097A1 (zh) 一种显示方法及电子设备
WO2021036628A1 (zh) 一种具有折叠屏的设备的触控方法与折叠屏设备
WO2021000804A1 (zh) 锁定状态下的显示方法及装置
US20200249821A1 (en) Notification Handling Method and Electronic Device
US20210342044A1 (en) System navigation bar display method, system navigation bar control method, graphical user interface, and electronic device
WO2021037223A1 (zh) 一种触控方法与电子设备
WO2021063090A1 (zh) 一种建立应用组合的方法与电子设备
EP3964932A1 (en) Learning-based keyword search method, and electronic device
US11861382B2 (en) Application starting method and apparatus, and electronic device
EP4024828A1 (en) Method for quickly entering application, and folding screen electronic device
US20240028175A1 (en) Window display method and related apparatus
EP4373062A1 (en) Display method, electronic device, and storage medium
EP4198709A1 (en) Navigation bar display method, display method and first electronic device
WO2021190524A1 (zh) 截屏处理的方法、图形用户接口及终端
WO2023029983A1 (zh) 一种控件内容的拖拽方法、电子设备及系统
WO2023078088A1 (zh) 一种显示方法及电子设备
WO2024046237A1 (zh) 一种应用热启动方法及电子设备
CN117215446B (zh) 一种显示方法及电子设备
WO2023160455A1 (zh) 删除对象的方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21884937

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021884937

Country of ref document: EP

Effective date: 20230424

NENP Non-entry into the national phase

Ref country code: DE