CN116719454A - Folder management method and terminal equipment - Google Patents

Folder management method and terminal equipment Download PDF

Info

Publication number
CN116719454A
CN116719454A CN202211145006.9A CN202211145006A CN116719454A CN 116719454 A CN116719454 A CN 116719454A CN 202211145006 A CN202211145006 A CN 202211145006A CN 116719454 A CN116719454 A CN 116719454A
Authority
CN
China
Prior art keywords
folder
folders
list
icon
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211145006.9A
Other languages
Chinese (zh)
Inventor
林玮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211145006.9A priority Critical patent/CN116719454A/en
Publication of CN116719454A publication Critical patent/CN116719454A/en
Pending legal-status Critical Current

Links

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/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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • 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

Abstract

The application provides a folder management method and terminal equipment, and belongs to the technical field of android systems. The method for managing the folders is realized by aiming atIn addition, when the folders need to be combined, the automatic combination of the two folders can be realized by dragging the selected folders to the position above the target folders needing to be combined and enabling the overlapping relation between the selected folders and the target folders to meet the preset conditionThe method can realize the base without the complicated operation of user inputThe system can manage folders conveniently and efficiently, and can effectively improve the use experience of users.

Description

Folder management method and terminal equipment
Technical Field
The application relates to the technical field of android systems, in particular to a folder management method and terminal equipment.
Background
With the development of terminal technology, more and more functions are provided for users, so that the convenience of life and work of the users is greatly improved. Taking the memo function in the mobile phone as an example, the user can replace the traditional mode of using a paper pen to memo by creating a folder in the memo and editing the content in the folder. For example, when the types of items that the user needs to memorize are more, folders of different titles can be created in the memorized book, subfolders of different titles can be created under the folder of a certain title, so that the user can view the memorized contents of different types according to the title level.
However, there are many limitations on the management of folders in the mobile phone list at present, such as the position of the folders or the hierarchical order of the folders cannot be changed at will, so that in a scene with more folder types, a user cannot obtain a folder layout suitable for self-viewing habits through convenient operation.
Disclosure of Invention
The embodiment of the application provides a folder management method and terminal equipment, wherein the position of a folder is moved through a drag operation, folder list structure information is adaptively modified when the folder moves to a target position, and an updated folder list is displayed based on the updated folder list structure information, and the method can be realized based on the following steps without the need of a user to input complicated operationsThe system can manage folders conveniently and efficiently, and can effectively improve the use experience of users.
In a first aspect, a method for managing folders is provided, which is applied to a terminal device, and includes:
responding to a long-press operation input by a user for a first folder icon in a first folder list, and displaying a first interface, wherein the first interface comprises the first folder icon in a selected state;
Receiving a drag operation input by a user for the first folder icon, and responding to the drag operation to display the second interface, wherein the second interface comprises position change in the process of dragging the first folder icon;
when the dragging is finished, responding to a hand-lifting operation input by a user, and determining a target position of the first folder according to the dragging height and the offset of the first folder relative to a target folder after the first folder is dragged, wherein the target position is inside the target folder or is adjacent to the target folder;
updating preset folder list structure information according to the target position of the first folder, and acquiring first folder list structure information, wherein the first folder list structure information is used for indicating the identification ID, the hierarchy of each folder, the ID of a father folder and the folder arrangement sequence of each folder in the first folder list after the dragging is finished;
and displaying a third interface according to the structure information of the first folder list, wherein the third interface comprises a second folder list, and the second folder list is a folder list corresponding to the first folder icon after being dragged to the target position.
In one possible implementation, the rank order group of the folders may correspond to a user_order of the folders, and may specifically be an order of the folders in the hierarchy in which they are located. For example, assuming that there are 3 folders in the first hierarchy, since the 3 folders are ordered in the folder list, which row is in the first position of the first hierarchy, which row is in the second position of the first hierarchy, and which row is in the third position of the first hierarchy are characterized by user_order.
It should be understood that the arrangement herein is merely the arrangement of folders in the hierarchy in which they are located and does not represent the arrangement throughout the folder list.
According to the folder management method provided by the embodiment of the application, the method is aimed atThe system terminal equipment displays the input drag operation of the folder to be moved, and drags the selected folder to the target position, thus the moving effect of the folder can be realized, and in addition, when the folder needs to be closedWhen the folders are combined, the selected folders are dragged to the position above the target folders to be combined, and the overlapping relation between the selected folders and the target folders meets the preset condition, so that the two folders can be automatically combined, and the method can be based on ++ - >The system can manage folders conveniently and efficiently, and can effectively improve the use experience of users.
With reference to the first aspect, in certain implementation manners of the first aspect, the method further includes:
and generating the folder structure information according to the information of each folder in the first folder list recorded in the database, wherein the information of each folder comprises the IDs of the folders, the hierarchy, the father-son relationship of the folders and the arrangement sequence.
With reference to the first aspect, in some implementations of the first aspect, the generating the folder structure information according to information of each folder in the first folder list recorded in a database specifically includes:
acquiring folders in a first hierarchy in the first folder list according to the hierarchy in which the folders are located;
traversing and inquiring subfolders included in each first-level folder to obtain a corresponding second-level folder;
recursively inquiring subfolders included in the second-level folder to obtain a corresponding third-level folder;
repeating the operation of recursively inquiring the subfolders until the inquired folder of a certain level no longer comprises the subfolders;
And generating folder list structure information according to the hierarchy where each folder is located, the parent-child relationships and the arrangement sequence of the folders.
With reference to the first aspect, in some implementations of the first aspect, the displaying the first interface in response to a long-press operation input by a user for a first folder icon in the first folder list specifically includes:
responding to a long-press operation input by a user for a first folder icon in a first folder list, and determining a first coordinate corresponding to the long-press operation;
determining a first folder according to the first coordinates, wherein the position of the first folder corresponds to the first coordinates;
and setting the first folder icon to be in a selected state, and displaying the first interface.
With reference to the first aspect, in some implementations of the first aspect, when the first folder includes subfolders, displaying the first interface in response to a long press operation input by a user on a first folder icon in the first folder list, further includes:
responding to long-press operation input by a user for a first folder icon in a first folder list, deleting information corresponding to subfolders of the first folder in the preset folder list structure information, and acquiring second folder list structure information;
And displaying a first interface according to the second folder structure information, wherein the first interface comprises the first folder icon in the selected state, and the subfolder included in the first folder is not displayed.
With reference to the first aspect, in some implementations of the first aspect, the receiving a drag operation input by a user for the first folder icon, and determining a position of the first folder icon in a moving process in response to the drag operation specifically includes:
receiving a drag operation input by a user aiming at the first folder icon;
determining at least one second coordinate corresponding to the drag operation;
and determining at least one position of the first folder in the moving process according to the at least one second coordinate.
With reference to the first aspect, in certain implementation manners of the first aspect, the method further includes:
and displaying the position change of the first folder icon in the dragging process according to at least one position of the first folder in the moving process.
With reference to the first aspect, in certain implementation manners of the first aspect, the target folder includes a second target folder and/or a third folder, and the method further includes:
When the dragging is finished, responding to a hand lifting operation input by a user, and determining a second folder and/or a third folder adjacent to the first folder icon according to the dragging height, wherein the second folder is an adjacent folder positioned above the first folder icon, and the third folder is an adjacent folder positioned below the first folder icon;
determining whether to merge folders according to the offset of the first folder relative to the target folder after the first folder is dragged; wherein, the liquid crystal display device comprises a liquid crystal display device,
merging the first folder and the second folder when the overlapping part of the first folder and the second folder is determined to be greater than or equal to a first proportion according to the offset;
when the superposition part of the first folder and the second folder is determined to be smaller than a first proportion according to the offset, not merging the first folder and the second folder;
merging the first folder and the third folder when the overlapping part of the first folder and the third folder is determined to be greater than or equal to a first proportion according to the offset;
when the superposition part of the first folder and the third folder is determined to be smaller than a first proportion according to the offset, not merging the first folder and the third folder;
And when the overlapping parts of the first folder, the second folder and the third folder are smaller than a first proportion according to the offset, moving the icon of the first folder to the position between the icon of the second folder and the icon of the third folder.
With reference to the first aspect, in some implementations of the first aspect, the determining whether to merge folders according to an offset of the first folder relative to the target folder after being dragged specifically includes:
and determining whether to merge the folders according to the offset and the dragging direction of the first folder relative to the target folder after the first folder is dragged.
With reference to the first aspect, in some implementations of the first aspect, the determining whether to merge folders according to an offset and a dragging direction of the first folder relative to the target folder after being dragged specifically includes:
when the superposition part of the first folder and the second folder is determined to be larger than or equal to a first proportion according to the offset, and the direction of the drag operation is upward, merging the first folder and the second folder;
when the superposition part of the first folder and the second folder is determined to be larger than or equal to a first proportion according to the offset, and the direction of the drag operation is downward, the first folder icon is moved to the lower part of the second folder icon;
When the superposition part of the first folder and the third folder is determined to be larger than or equal to a first proportion according to the offset, and the direction of the drag operation is downward, merging the first folder and the third folder;
and when the superposition part of the first folder and the third folder is larger than or equal to a first proportion according to the offset, and the direction of the drag operation is upward, moving the first folder icon to the upper part of the second folder icon.
With reference to the first aspect, in some implementations of the first aspect, the updating the preset folder list structure information according to the target location of the first folder specifically includes:
when the first folder is combined with the second folder, modifying the first folder into subfolders of the second folder in the folder list structure information, and determining the arrangement sequence of the first folder according to the position of the first folder in the second folder;
when the first folder is combined with the third folder, modifying the first folder into a subfolder of the third folder in the folder list structure information, and determining the arrangement sequence of the first folder according to the position of the first folder in the third folder;
When the first folder icon moves between the second folder icon and the third folder icon, the position of the first folder is modified to be between the subfolder of the second folder and the third folder in the folder list structure information.
With reference to the first aspect, in certain implementation manners of the first aspect, the method further includes:
and adjusting the folder information in the database according to the updated folder list structure information, so that the hierarchy and the folder arrangement sequence of folders corresponding to the folders in the database are consistent with those in the updated folder structure information.
With reference to the first aspect, in some implementations of the first aspect, the folder list structure information is an array value, where the array value includes an ID of a folder, a hierarchy where the folder list includes each folder that corresponds to the folder, an ID of a parent folder to which the folder belongs, and an arrangement order of the folders;
the updating the preset folder list structure information according to the target position of the first folder specifically includes:
modifying a position corresponding to the first folder in the array value according to the target position of the first folder after being dragged, so that the position of the first folder in the array value is consistent with the position of the first folder in the folder list after being dragged; the method comprises the steps of,
Modifying the arrangement sequence of the folders corresponding to the first folder in the array value, so that the arrangement sequence of the folders corresponding to the first folder is consistent with the arrangement sequence of the folders in the folder list after the first folder is dragged; the method comprises the steps of,
modifying the hierarchy corresponding to the first folder in the array value, so that the hierarchy corresponding to the first folder is consistent with the hierarchy in the folder list after the first folder is dragged; the method comprises the steps of,
and modifying the ID of the parent folder corresponding to the first folder in the array value, so that the ID of the parent folder corresponding to the first folder is consistent with the ID of the parent folder in the folder list after the first folder is dragged.
In a second aspect, there is provided a terminal device comprising: one or more processors; one or more memories; the one or more memories store one or more computer programs comprising instructions that, when executed by the one or more processors, cause the terminal device to perform the method of any of the implementations of the first aspect described above.
In a third aspect, there is provided a computer readable storage medium storing computer executable program instructions which, when run on a computer, cause the computer to perform a method as described in any one of the implementations of the first aspect above.
In a fourth aspect, there is provided a computer program product comprising computer program code which, when run on a computer, causes the computer to perform the method according to any of the preceding implementation forms of the first aspect.
Drawings
Fig. 1 is a schematic structural diagram of a terminal device 100 according to an embodiment of the present application.
Fig. 2 is a block diagram of a software structure of a terminal device 100 according to an embodiment of the present application.
Fig. 3A to fig. 3D are schematic diagrams of GUIs that may be involved in implementing some methods for managing folders according to embodiments of the present application.
Fig. 4A to fig. 4D are schematic diagrams of GUIs that may be involved in implementing other folder management methods according to embodiments of the present application.
Fig. 5A to fig. 5F are schematic diagrams of GUIs that may be involved in implementing a method for managing folders according to still other embodiments of the present application.
Fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Fig. 7 is a schematic diagram of acquiring a folder ordering in a recursive manner according to an embodiment of the present application.
Fig. 8 is a schematic flow chart of a method for managing folders according to an embodiment of the application.
Fig. 9A and fig. 9B are schematic diagrams of GUIs that may be involved in implementing a method for managing folders according to still other embodiments of the present application.
Fig. 10 is a schematic flow chart of another method for managing folders provided in an embodiment of the application.
Fig. 11 is a schematic flowchart of a method for managing folders according to still another embodiment of the application.
Detailed Description
It should be noted that the terms used in the implementation section of the embodiment of the present application are only used to explain the specific embodiment of the present application, and are not intended to limit the present application. In the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely one association relationship describing an associated obstacle, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, unless otherwise indicated, "a plurality" means two or more, and "at least one", "one or more" means one, two or more.
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a definition of "a first", "a second" feature may explicitly or implicitly include one or more of such features.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
In connection with the description in the background art, one way to move or merge folders is to: copying or cutting the selected folder, pasting the folder to the target position, or opening the target folder, and pasting the folder to be moved into the target folder. This approach requires the user to perform multiple steps of operations, which is cumbersome. With the development of terminal technology, use Terminal devices of operating systems are also widely used, if the touch panel is able to be targeted at the +_ with touch panel in the situation that the touch panel is almost a standard of portable terminal devices>The terminal equipment designs a flexible and simple folder moving method, so that better and convenient experience can be provided for users.
Accordingly, embodiments of the present application provide a folder management method and terminal deviceThe method can be applied to a touch panelIn the terminal equipment of the operating system, when a user needs to manage the folders in the folder list (especially position management), the movement and combination of the folders can be realized only by dragging the selected folders to specific positions, so that the user is improved>Flexibility and convenience of folder management in terminal equipment.
Exemplary, as shown in fig. 1, a schematic structure diagram of a terminal device 100 according to an embodiment of the present application is provided. The terminal device 100 may correspond to the above-described one having a touch panel and being usedAnd operating the terminal equipment of the system.
The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the application, terminal device 100 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural center and a command center of the terminal device 100. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the terminal device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing function of terminal device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display function of the terminal device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the terminal device 100, or may be used to transfer data between the terminal device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other terminals, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiment of the present application is only illustrative, and does not constitute a structural limitation of the terminal device 100. In other embodiments of the present application, the terminal device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. The charging management module 140 may also supply power to the terminal through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the terminal device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the terminal device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied to the terminal device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of terminal device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that terminal device 100 may communicate with a network and other devices via wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The terminal device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The display screen 194 is used to display images, videos, and the like.
The terminal device 100 may implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the terminal device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like. Video codecs are used to compress or decompress digital video. The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to realize expansion of the memory capability of the terminal device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card. The internal memory 121 may be used to store computer executable program code including instructions.
The terminal device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. The gyro sensor 180B may be used to determine a motion gesture of the terminal device 100. The magnetic sensor 180D includes a hall sensor. The terminal device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. The acceleration sensor 180E can detect the magnitude of acceleration of the terminal device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the terminal device 100 is stationary. The method can also be used for identifying the gesture of the terminal, and is applied to the applications such as horizontal and vertical screen switching, pedometers and the like. The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The ambient light sensor 180L is used to sense ambient light level. The terminal device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The fingerprint sensor 180H is used to collect a fingerprint. The temperature sensor 180J is for detecting temperature. The touch sensor 180K, also referred to as a "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, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The bone conduction sensor 180M may acquire a vibration signal.
In addition, the terminal device 100 further includes an air pressure sensor 180C and a distance sensor 180F. Wherein the air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates altitude from barometric pressure values measured by the barometric pressure sensor 180C, aiding in positioning and navigation.
A distance sensor 180F for measuring a distance. The terminal device 100 may measure the distance by infrared or laser. In some embodiments, the terminal device 100 may range using the distance sensor 180F to achieve fast focusing.
For example, the software system of the terminal device 100 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the application, taking an Android system with a layered architecture as an example, a software structure of the terminal device 100 is illustrated. Fig. 2 is a software configuration block diagram of the terminal device 100 of the embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages. As shown in fig. 2, the application package may include applications such as a camera, gallery, calendar, call, map, navigation, WLAN, music, video, short message, a recurview display control, a drag animation callback module (itemtouchhelper. Callback), and the like.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions. As shown in FIG. 2, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, an ItemTouchHelper module, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the terminal device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the terminal vibrates, and an indicator light blinks.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of obstacle life cycle management, stack management, thread management, security and abnormality management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
For a better understanding of the folder management method provided in the embodiment of the present application, the implementation procedure of the folder management method is described below with reference to a graphical user interface (graphical user interface, GUI) shown in the accompanying drawings.
As shown in fig. 3A to 3D, schematic GUI diagrams may be involved in implementing some folder management methods according to embodiments of the present application. The terminal device is a mobile phone, and the movement of folders in the folder list for the memo application (App) in the mobile phone is described here as an example, but the scenario involved in the actual application is not limited thereto.
As shown in fig. 3A, an editing interface in the mobile phone memo App may include a folder list including a plurality of folders. For easy understanding, the present application may be divided into different levels according to the positional relationship between folders. For example, a first level folder may refer to a folder in a root directory that does not have a corresponding parent folder, but may include at least one child folder; the second-level folder may refer to a next-level subfolder included in the first-level folder in the file list; the third level of folders (not shown in fig. 3A) may refer to the next level of subfolders included in the second level of folders in the folder list. As shown in fig. 3A, folders of different levels may be set back at different distances relative to the left edge of the editing interface, and folders of a third level (not shown in fig. 3A) may be set back at a greater distance relative to the left edge than folders of a second level; and the retraction distance of the folders of the second level with respect to the left edge may be greater than the retraction distance of the folders of the first level with respect to the left edge.
As shown in connection with fig. 3A, the folders of the first level include, for example, the "my notes" folder and the "my notes" folder, respectively; the second-level folder list includes, for example, a "personal" folder, a "work" folder, a "life" folder, a "travel" folder, an "show" folder, a "reading" folder, and other folders with third party APP names as titles, such as a "know" folder, a "today's top bar" folder, and a "microblog" folder, respectively. Wherein, the "personal" folder, the "work" folder, the "life" folder, the "travel" folder, the "show" folder, and the "read" folder may be child folders in the "my notes" folder in the first hierarchy, where the "my notes" are parent folders of these child folders. The "know" folder, the "today's top bar" folder, and the "microblog" folder may be used as subfolders in the "my snippet" folder in the first hierarchy, where "my snippet" is used as the parent folder for those subfolders. In addition, the editing interface may further include a new control corresponding to each folder, when the user clicks the new control corresponding to a folder, the mobile phone may be triggered to create a new subfolder of the folder, for example, when the mobile phone detects that the user clicks the new control in the my notes folder as shown in fig. 3A, a subfolder may be created in the my notes folder in response to the clicking operation.
In some embodiments, when a user needs to move a folder in the folder list, the folder icon to be moved may be pressed long by a finger, and the folder may be moved to a target position by a drag action.
For example, assuming that the user needs to move the "read" folder into the "life" folder to merge the two folders, the user may input a preset operation 301 (such as long press of the "read" folder icon) for the "read" folder in the editing interface; after the handset detects that the user has entered the preset operation 301 for the "read" folder icon, the "read" folder icon may be set to a highlight, which means that the "read" folder has been successfully selected. Thereafter, as shown in FIG. 3B, the user enters a preset operation 302 for "reading" the folder icon (e.g., an operation of dragging "the folder in the direction indicated by the arrow in FIG. 3B); after the mobile phone detects the preset operation 302 for entering the "read" folder icon, a process may be displayed in which the "read" folder icon is dragged along the direction indicated by the arrow, which may include a real-time change in the "read" folder icon position as the user's finger (e.g., the user's index finger as shown in FIG. 3B) is dragged.
In some embodiments, as shown in fig. 3C, when the "read" folder icon is dragged over the "live" folder icon and the overlapping portion is greater than the corresponding preset threshold, the user may perform a preset operation 303 (e.g., an operation of releasing the "read" folder icon); when the mobile phone detects that the user releases the icon of the "reading" folder, a merge completion interface as shown in fig. 3D may be displayed, where the merge completion interface may show the effect that the "reading" folder is dragged into the "living" folder, and the effect that the "reading" folder and the "living" folder appear after the user completes merging, specifically, the "reading" folder may be changed to the folder of the third level at this time, that is, the "reading" folder is changed to the subfolder of the "living" folder at this time.
It should be noted that, the folder moving process shown in fig. 3A to 3D is described by taking the folder "read" moving between folders in the same hierarchy and combining with folders in the same hierarchy as an example, but the embodiment of the present application is not limited thereto. In practical applications, the moving range of the folder is not limited to the same level, that is, the folder may also move across levels, or may also move into other folders of a previous level, for example, in the method for managing folders provided in the embodiment of the present application, a "reading" folder may also be moved from a "my notes" folder to a "my notes" folder, and then the "reading" folder and the "learning" subfolder may be combined.
It should be further noted that the interface contents shown in fig. 3A to 3D are only examples, and in practical applications, the folder list may further include more or less folders of other types, which is not limited in the embodiments of the present application.
According to the folder management method provided by the embodiment of the application, the method is aimed atIn addition, when the folders are required to be combined, the automatic combination of the two folders can be realized by dragging the selected folders to the position above the target folders required to be combined and enabling the overlapping relation between the selected folders and the target folders to meet preset conditions, and the method can be realized based on->The system can manage folders conveniently and efficiently, and can effectively improve the use experience of users.
Exemplary, as shown in fig. 4A to fig. 4D, GUI diagrams may be involved in implementing other folder management methods according to embodiments of the present application. The terminal device is a mobile phone, and the folder in the folder list of the memo application (App) in the mobile phone is described herein as an example, but the application is not limited thereto.
As shown in fig. 4A, for an editing interface in a mobile phone memo, the editing interface may include a folder list, where the folder list may include a plurality of folders of different levels, for example, a folder of a first level in the folder list may include folders with titles of "my notes" and "my extracts", respectively; the folders of the second level in the folder list may include folders titled "personal" folder, "work" folder, "life" folder, "travel" folder, "show" folder, "reading" folder, and other folders titled third party APP names, such as "know" folder, "today's top" folder, "microblog" folder, respectively. Wherein, the "personal" folder, the "work" folder, the "life" folder, the "travel" folder, the "show" folder, and the "read" folder may be child folders in the "my notes" folder in the first hierarchy, where the "my notes" are parent folders of these child folders. The "know" folder, the "today's top bar" folder, and the "microblog" folder may be used as subfolders in the "my snippet" folder in the first hierarchy, where "my snippet" is used as the parent folder for those subfolders. In addition, the editing interface may further include a new control corresponding to each folder, when the user clicks the new control corresponding to a folder, the mobile phone may be triggered to create a new subfolder of the folder, for example, when the mobile phone detects that the user clicks the new control in the my note folder as shown in fig. 4A, a subfolder may be created in the my note folder in response to the clicking operation.
In some embodiments, assuming that the user needs to move the location of the "read" folder between the "life" folder and the "work" folder, the user may enter a preset operation 401 (e.g., long press the "read" folder icon) for the "read" folder in the editing interface; after the handset detects that the user has entered the preset operation 401 for the "read" folder, the "read" folder icon may be set to a highlight, which means that the "read" folder has been selected.
Illustratively, as shown in FIG. 4B, the user enters a preset operation 402 for "reading" the folder (e.g., dragging "the" reading "folder in the direction indicated by the arrow in FIG. 4B); after detecting that the mobile phone is used for inputting the preset operation 402 for the 'reading' folder, the mobile phone can display the dynamic change of the position of the 'reading' folder in the process of being dragged along the direction indicated by the arrow; alternatively, a dynamic change in the position of the "reading" folder that is dragged following the user's input long press operation's finger (e.g., the user's index finger as shown in FIG. 4B) may be displayed. Wherein the target position of the drag operation is located between the "life" folder and the "work" folder (e.g., the boundary position of the "life" folder icon and the "work" folder icon).
In some embodiments, as shown in FIG. 4C, when the "read" folder icon is dragged to the boundary line location of the "Life" folder icon and the "work" folder icon, the user may perform a preset operation 403 (e.g., an operation to unclamp the "read" folder icon); when the mobile phone detects that the user stops pressing the "read" folder icon, a movement completion interface as shown in fig. 4D may be displayed, where the movement completion interface may show the interface effect after the "read" folder is dragged to the target position between the "life" folder and the "work" folder, specifically, the "read" folder is still the subfolder of the second level, that is, the "read" folder is still the subfolder in the "my notes" folder, but the position thereof is changed, and the order of presentation of all subfolders in the "my notes" folder in the folder list is also changed.
It should be noted that, the folder moving process shown in fig. 4A to 4D is described only by taking the movement of the "reading" folder inside the corresponding parent folder (i.e. the "my notes" folder) as an example, but the embodiment of the application is not limited thereto. In practical applications, the moving range of the folder is not limited by the range of the same corresponding hierarchy, that is, the folder may also be moved between its parent folder and other folders of the previous hierarchy, for example, in the folder management method provided in the embodiment of the present application, the "reading" folder may also be moved from the "my notes" folder to the "my notes" folder.
It should be further noted that the interface contents shown in fig. 4A to fig. 4D are only examples, and in practical applications, the folder list may further include more or less folders of other types, which is not limited in the embodiments of the present application.
According to the folder management method provided by the embodiment of the application, the method is aimed atIn addition, when the folders are required to be combined, the automatic combination of the two folders can be realized by dragging the selected folders to the position above the target folders required to be combined and enabling the overlapping relation between the selected folders and the target folders to meet preset conditions, and the method can be realized based on->The system can manage folders conveniently and efficiently, and can effectively improve the use experience of users.
In some scenarios, the folder to be moved (or the selected folder) may further include at least one subfolder, and in this case, the folder to be moved may still be moved and/or merged according to the process shown in the embodiments of fig. 3A to 3D or the process shown in the embodiments of fig. 4A to 4D. However, in comparison to the processes described in the embodiments of fig. 3A to 3D or the embodiments of fig. 4A to 4D, the main changes in the case where the folder to be moved includes subfolders are: if the folder to be moved is in an open state, that is, the subfolders included in the folder to be moved are in a display state, when the terminal equipment detects that a user inputs a preset operation (such as an operation of pressing the icon of the folder to be moved for a long time) on the icon of the folder to be moved, the subfolders in the folder to be moved can be automatically deleted, that is, the interface of the terminal equipment still displays the folder to be moved but does not display the subfolders under the folder to be moved any more, for example, the folder to be moved is changed into a folding state; then, the folder to be moved is moved to the target position in a similar dragging manner as in fig. 3A to 3D; when the terminal equipment detects that a user inputs a preset operation (such as a hand-lifting operation) to a folder to be moved at a target position, optionally, the terminal equipment can display a subfolder icon which is included before the folder is not moved under the file to be moved; or when the terminal equipment detects that the user inputs a preset operation (such as a hand-lifting operation) to the folder to be moved at the target position, the terminal equipment displays the folder to be moved at the target position, and does not display the subfolder icons included before the folder is not moved, but only displays the subfolder icons under the folder to be moved when the terminal equipment detects that the user inputs an unfolding operation to the folder to be moved again.
The following describes a process of implementing the folder management method provided by the embodiment of the present application when a folder to be moved includes at least one subfolder with reference to the accompanying drawings. For convenience of description, the following embodiments will be described taking a combination of a "reading" folder and a "living" folder in a memo list of a mobile phone as an example.
Exemplary, as shown in fig. 5A to 5D, GUI diagrams may be involved in implementing the methods for managing folders according to the embodiments of the present application.
For example, as shown in fig. 5A, the memo editing page includes multiple levels of folder icons, such as a first level folder including folder icons titled "my notes", "my snippets", respectively; the second-level folder comprises folder icons with titles of "personal", "work", "life" and "reading", and folder icons with third-party application names of titles, such as "know", "today's top bar" and "microblog" folder icons, wherein the "personal" folder, the "work" folder, the "life" folder and the "reading" folder are all subfolders in the "my notes" folder in the first level; the "know" folder, the "today's top" folder, and the "read" folder are all subfolders in the "my excerpt" folder in the first tier.
It should be noted that, the editing interface shown in fig. 5A further includes a third-level folder, that is, a "literature" subfolder and a "community" subfolder included in the "reading" folder, and both the "literature" subfolder and the "community" subfolder are in a display state.
In some embodiments, as shown in fig. 5B, assuming that the user needs to move the "read" folder into the "life" folder to merge the two folders, the user may enter a preset operation 501 (e.g., long press the "read" folder icon) for the "read" folder in the editing interface. After the handset detects that the user has entered the preset operation 501 for the "read" folder, the "read" folder icon may be highlighted, which means that the "read" folder has been selected. Meanwhile, in response to the preset operation 501, the mobile phone may delete the subfolders ("literature" folder, "community" folder) included in the "reading" folder, and at this time, the "reading" folder to be moved is displayed, but the subfolders in the folder are not displayed any more.
Thereafter, as shown in fig. 5C to 5D, the user may continue to press the "read" folder icon for a long time and drag the folder icon in the arrow direction shown in fig. 5C. The drag action may continue until the "read" folder icon moves to a target position, as shown in fig. 5D, where the target position may overlap with the "live" folder icon and the overlapping portion is greater than a preset threshold.
Thereafter, continuing as shown in FIG. 5D, after the "read" folder icon is dragged to the target location, the user may perform a preset operation 503 (e.g., an operation to unclamp the "read" folder icon). After the mobile phone detects that the user stops pressing the "reading" folder icon, a merge completion interface as shown in fig. 5E may be displayed, and the merge completion interface may display the effect that the "reading" folder is dragged into the "living" folder, and the effect is presented after the combination is completed. Specifically, the "read" folder may be changed to the subfolder of the third hierarchy at this time, that is, the "read" folder is changed to the subfolder of the "live" folder at this time.
In some embodiments, when a user enters an expansion operation (e.g., a click on a "read" folder icon) for a moved "read" folder icon, the "read" folder may expand and display the subfolders it includes.
Alternatively, as shown in fig. 5F, after the mobile phone detects that the user stops pressing the "read" folder icon, the subfolder icon included before the movement of the "read" folder may be displayed directly under the "read" folder in response to the operation, so as to be consistent with the display state presented by the subfolder in the "read" folder before the movement.
According to the folder management method provided by the embodiment of the application, the method is aimed atThe method comprises the steps that a to-be-moved folder input drag operation presented by a system terminal device drags the to-be-moved folder to the position above a target folder to be combined, when the overlapping relation between the to-be-moved folder and the target folder meets the preset condition, automatic combination of the two folders can be achieved, and the method can be based on ++ ->The system can manage folders conveniently and efficiently, and can effectively improve the use experience of users.
The following describes the implementation process of the bottom layer of the folder management method provided by the embodiment of the application in detail by combining with the specific structure of the terminal equipment.
Exemplary, as shown in fig. 6, a schematic structural diagram of a terminal device according to an embodiment of the present application is provided. The terminal device may correspond to the terminal device 100 in fig. 1 and 2, and may include a display screen, a recurrerpiew display control, a drag animation movement module (itemtouchhelter. Callback), a drag animation callback module (itemtouchhelter. Callback), and a data adapter (adapter).
The display screen is used for interacting with a user, for example, for presenting a folder list to be managed or an updated folder list to the user; or, a preset operation for receiving a user input, such as a long press operation, a drag operation, a hand-lift operation, and the like.
The RecycleView display control is used for receiving events transmitted by the display screen, such as long press events, drag events, hand lifting events and the like. The RecycloView display control may also be used to obtain coordinates of a finger pressing on the display screen at different events and pass the coordinates to the ItemTouchHelper. In addition, the RecycloView display control can also realize a drag animation through the ItemTouchHelper, and present the drag animation through the display screen, and the process can refer to the existing flow, and the embodiment of the application is not described in detail.
ItemTouchHelper. Callback is an abstract class that includes abstract methods that some user developers customize, including setting folders that can be dragged in a particular direction, etc. ItemTouchHelper can implement different functions by calling the callback method in ItemTouchHelper. For example, when a user presses a folder icon long, itemTouchHelper may call onSelectedCyanged, delivering the long pressed or dragged view to the application layer. For another example, when a folder moves, itemTouchHelper may call onMove, exchanging the order of two folders in the folder list. After receiving the selected or dragged view, the ItemTouchHelper. Callback module may obtain a view holder corresponding to the view. An update array value notification is then sent to the DataManager based on the location of the viewholder.
The DataManager is used for managing data related to the folder, and can generate folder list structure information corresponding to the folder list and manage the folder list structure information. The folder list structure information in the application is used for representing the structure of a folder list, and can be particularly used for representing the relationship (or understood as the hierarchical relationship) of father and child folders, the folder position and the like among various folders. The folder list structure information can be used as a basis for how to display the folder list, namely, the father-child folder relationship and the folder position among all folders in the displayed folder list are required to meet the regulations in the folder list structure information. The DataManage may store folder list structure information corresponding to the folders in advance, and update the folder list structure information in real time when a parent-child folder relationship (or hierarchical relationship) is changed. In addition, the DataManager may further include a database, where the database includes a unique Identification (ID) value (uuid), a folder name (display_name), an ID value (parent_uuid) of a parent folder, a level (level) of the folder, a retraction distance relative to the left side of the display screen, an arrangement order (user_order) of the folders, and the like. Alternatively, the database may further include content data of each folder, the database may further include subfolders included under the folders, and the like.
Note that, the arrangement order (user_order) of the folders here refers specifically to the arrangement order of the folders in the hierarchy in which they are located. For example, assuming that there are 3 folders in the first hierarchy, since the 3 folders are ordered in the folder list, which folder is arranged in the first position of the first hierarchy, which folder is arranged in the second position of the first hierarchy, and which folder is arranged in the third position of the first hierarchy are characterized by a user_order.
It should be understood that the arrangement herein is merely the arrangement of folders in the hierarchy in which they are located and does not represent the arrangement throughout the folder list.
In some embodiments, the form of the folder list structure information may be embodied as a number of values, for example. For example, the manner in which the DataManager obtains the folder list structure information may be as shown in fig. 7, which includes: (1) All the first-level folders (the levels are marked as level (1)) can be obtained based on the folder IDs stored in the database, and then the first-level folders are ordered according to the arrangement sequence (user_order value) of the folders; (2) Querying subfolders included in each first-level folder, for example, a parent folder of a certain first level includes subfolder ID1, subfolder ID2 and subfolder ID3, and determining that levels corresponding to the subfolders are: level (2) =level (1) +1, and the user_order values of these subfolders are ordered; (3) In a similar manner, the children of each subfolder (subfolders containing subfolders) are recursively queried at a level of level (3) =level (2) +1 until the queried folder no longer includes subfolders; (5) And generating a numerical group according to the relationship between the father and son folders and the arrangement sequence of the folders.
For example, taking the folder shown in fig. 3A as an example, when obtaining the array value, the folder of the first hierarchy, that is, the my notes folder and the my notes folder, is first found according to the hierarchy (level) corresponding to the folder, and then the two folders are ordered according to the arrangement order (user_order) corresponding to the my notes folder and the my notes folder, respectively, and then the array value may be recorded as:
{ name: my notes, level:0,UUID:aaa,user_order:0,parent UUID:bbb },
{ name: my digest, level:0,UUID:aaa,user_order:1,parent UUID:bbb }
Then, according to the hierarchy and the father-son relation of the folders stored in the database, all subfolders respectively included in the my notes folder and the my excerpts folder are obtained, for example, according to the father-son relation of the folders, the subfolders respectively included in the my notes folder can be firstly inquired in the database as follows: the folders of "person", "work", "life", "travel", "exhibition", "reading", then according to the user_order value that these subfolders correspond to separately, can sort the subfolders under "my note" folder, then according to the father-son relationship between the folders, the array value can be recorded at this time as:
{ name: my notes, level:0,UUID:aaa,user_order:0,parent UUID:bbb }
{ name: person, level:1,UUID:xxx,user_order:0,parent UUID:aaa })
{ name: work, level:1,UUID:xxx,user_order:1,parent UUID:aaa })
{ name: life, level:1,UUID:xxx,user_order:2,parent UUID:aaa })
{ name: travel, level:1,UUID:xxx,user_order:3,parent UUID:aaa })
{ name: exhibition, level:1,UUID:xxx,user_order:4,parent UUID:aaa })
{ name: read, level:1,UUID:xxx,user_order:5,parent UUID:aaa })
Similarly, for another "my snippet" folder at the first level, the subfolders included in the "my snippet" folder may be first queried in the database according to the folder parent-child relationship, respectively, as noted: the folders "know" and "top today" and "microblog" may then be sorted according to the user_order values corresponding to the subfolders, respectively, and the subfolders under the "my snippet" folder may then be recorded according to the parent-child relationship between the folders, where the array values may be recorded as:
{ name: my digest, level:0,UUID:aaa,user_order:1,parent UUID:bbb }
{ name: known, level:1,UUID:xxx,user_order:0,parent UUID:aaa })
{ name: today's top, level:1,UUID:xxx,user_order:1,parent UUID:aaa })
{ name: microblog, level:1,UUID:xxx,user_order:2,parent UUID:aaa }
It should be understood that the form of the array values given herein is merely an example, and in practical applications, the form of the array values may also be expressed as: { My notes [ person, work, life, travel, exhibition, reading ], my excerpt [ know, today's top, microblog ] } or, { My notes: individuals, work, life, travel, exhibition, reading; my excerpt: it is understood that the present application is not limited to this example, and the present application is now applicable to the present application. Wherein, in the above example { My notes: individuals, work, life, travel, exhibition, reading; my excerpt: it is known that in the present headnote, microblog, the folders with separate division numbers and preceding the colon are the folders of the first hierarchy; in the folders separated by the spare marks, the folders after the colon are subfolders in the folders before the colon, and the folders separated by the commas are folders of the same hierarchy.
In some embodiments, the DataManager may determine the selected folder from the location of the viewholder in response to the update array value notification, and update the change in the folder location and parent-child folder relationship corresponding to the folder in the array value. The DataManager may then send the updated array values and corresponding folder data content to the adapter.
After the Adapter receives the updated data, the folder list may be updated based on the array value, which may include, for example: and adjusting the position of the selected folder according to the relationship between the father and son folders and the positions of the folders indicated by the array values, filling the contents of the folders and the like. And then, the adapter can instruct the RecycloerView display control to refresh the display content, update the display content of the display control, and the RecycloerView display control can display the updated folder list through the display screen.
Exemplary, as shown in fig. 8, a schematic flowchart of a method for managing folders is provided in an embodiment of the application. The process comprises the following steps:
s801, the display screen receives a long-press operation input by a user.
In some embodiments, when a user needs to move a certain item in an item (item) list, and change its position, a long press operation can be input for the item to be moved by a finger. Specifically, the long press operation here may be an operation by which the user inputs a item icon to be moved in the item list displayed on the display screen. This long press operation corresponds to, for example, operation 301 in fig. 3A, or to operation 401 in fig. 4A, or to operation 501 in fig. 5A. It should be understood that an item in the embodiment of the present application may be a custom call, and an item may be regarded as a view, specifically, an item in the present application may be a folder as described above, but may also be other types of items, which are not limited in this embodiment of the present application. For ease of understanding, the following description will take item as a folder.
It should be understood that the long-press operation performed by the finger of the user in the foregoing description of the present application is merely an exemplary operation for selecting a folder to be moved, and in practical application, the long-press operation may be performed by other manners, such as a stylus, a mouse, etc., which is not limited by the embodiment of the present application.
S802, the display screen transmits a long-press event to a cyclic view display control (RecycloView).
In some embodiments, after receiving a long press operation for a folder to be moved, the display screen may transmit a corresponding long press event to the recurview in response to the long press operation.
It should be appreciated that the RecycloerView is a container that provides a fixed view for a limited window to display a data set, and that the RecycloerView may display data in list form (list) or grid form (grid), such as text or photos. In the folder management method provided by the embodiment of the application, the folder list data is flexibly displayed mainly through the RecycloerView. In some embodiments, the RecycloView may be used to provide default entry animations as well as custom animations, e.g., folder drag animations may be implemented with the ItemTouchHelper of the RecycloView. The data adapter needs to be loaded in the use process of the RecyclerView, and the RecyclerView can acquire data change through the data adapter, so that the operation of refreshing the folder list is executed.
S803, the RecycleView receives the long press event and determines the coordinates (X0, Y0) corresponding to the long press event.
The coordinates (X0, Y0) may refer to coordinates corresponding to a position of the user's finger pressed in the long press event, and the coordinate position may correspond to an icon position of the folder to be moved. The coordinate system in which the coordinates (X0, Y0) are located may be preset as required, wherein the direction of the X axis in the coordinate system may be parallel to the top or bottom edge direction of the terminal device, and the direction of the Y axis in the coordinate system may be parallel to the left or right edge direction of the terminal device. For example, the coordinates (X0, Y0) in this step may correspond to, for example, the coordinates corresponding to the position pressed by the operation 301 shown in fig. 3A, or may correspond to the coordinates corresponding to the position pressed by the operation 401 shown in fig. 4A, or may correspond to the coordinates corresponding to the position pressed by the operation 501 shown in fig. 5B.
S804, the RecycleView display control transmits coordinates (X0, Y0) corresponding to the long press event to the ItemTouchHelper module.
The ItemTouchHelper module in the embodiment of the application is divided into abstract modules for executing ItemTouchHelper, and ItemTouchHelper is a tool class which is mainly used for expanding long-press events of folders in a RecycloView display control and also used for providing operations such as adding drag ordering, sliding deletion and the like for the RecycloView display control.
S805, the ItemTouchHelper module obtains the view that was pressed.
In some embodiments, the itemtouchhelter module may obtain the coordinates (X0, Y0) of the motionEvent, that is, the finger press coordinates, by listening to the touch time of the system; then, by the motionEvent, a corresponding view is found from the finger pressing coordinates (X0, Y0). Wherein, different views correspond to different view holders, and different view holders correspond to different positions (positions).
S806, the ItemTouchHelper module invokes onSelectdCyange to pass the view holder corresponding to the pressed view to the drag animation callback module (ItemTouchHelper. Callback).
It should be appreciated that OnSelectdCHange is a callback method by which ItemTouchHelper. Callback of the application framework layer is registered in ItemTouchHelper. In some embodiments, after the ItemTouchHelper module obtains the view holder, the corresponding view holder of the pressed view may be returned to the ItemTouchHelper.
S807, the drag animation callback module (ItemTouchHelper. Callback) passes the viewholder to the data management module (DataManager).
In some embodiments, itemTouchHelper. Callback receives the view holder corresponding to the selected folder through onSelectChange. After ItemTouchHelper. Callback acquires the view holder, the position corresponding to the view holder can be acquired by calling getposition.
In some embodiments, itemTouchHelper. Callback may pass the location corresponding to the viewholder to the DataManager of the application layer, so that the DataManager determines the selected folder based on the location of the viewholder. In addition, itemTouchHelper. Callback may also notify the DataManager to delete subfolders included in the selected folder.
S808, the DataManager deletes the subfolders of the selected folder from the array values representing the parent-child relationships of the folders according to the position of the view holder.
In some embodiments, after the DataManager receives the viewholder, the selected folder may be determined based on the location of the viewholder and a determination may be made as to whether the selected folder includes subfolders. Specifically, the DataManager determining the selected folder process may include: after the ItemTouchHelper. Callback acquires the position of the view holder, the getAdapterPosition method is called by the RecycloerView to inquire the folder corresponding to the position of the view holder from the adapter, so that the selected folder is acquired. The adapter comprises position information corresponding to different folders respectively. The folder selected here is the folder to be moved or the folder to be dragged.
In some embodiments, after the selected folder is obtained by the DataManager, the relationship between the parent and child folders of the folder may be obtained according to the folder list structure information stored by the DataManager, so as to determine whether the selected folder includes the child folder. If the selected folder includes subfolders, the DataManager may delete subfolders under the folder in the folder list structure information and obtain updated array values. The updated folder list structure information still includes the selected folder, but no longer includes the subfolders it includes.
It should be noted that, the folder list structure information in the present application may be used to characterize the structure of the folder list, and in particular, may be used to characterize the parent-child folder relationship (or may be understood as a hierarchical relationship) between folders, the hierarchy in which the folders are located, the folder position, the folder arrangement order, and so on. The DataManage may store folder list structure information corresponding to the folders in advance, and update the folder list structure information in real time when a parent-child folder relationship (or hierarchical relationship) is changed. In some implementations, the folder list structure information may be embodied in the form of a plurality of values, but may also be embodied in any other form capable of characterizing the folder list structure, such as a tree form, etc., which is not limited by the embodiments of the present application.
It is also to be understood that the folder structure information may include only information for characterizing the folder list structure, and need not include specific content data in each folder. When specific content data in the folder is required, it can be obtained from the database of the DataManager.
In some embodiments, taking the example that the folder structure information is a tuple value, the manner in which the DataManager obtains the tuple value may include: firstly, acquiring all folders of a first level, and sorting according to the user sequence (user_order) of the folders; and then acquiring the subfolders under the folders of each first level in a recursion mode, and sequencing the subfolders included in the subfolders under the parent folder of each first level according to the user_order. Illustratively, the array value may include a plurality of items of information for each folder, such as: file name, hierarchy (level), UUID, arrangement order of folders (user_order), parent folder ID (parent UUID), and the like. For example, taking the first level of "my notes" folder as an example, its corresponding array value data may be represented as { name: my notes, level:0,UUID:aaa,user_order:0,parent UUID:bbb }, where name represents the folder name; level 0 means "My notes folder" is the first level; the UUID is the Key unique ID of the My notes folder; the arrangement order of the folder with the user_order of 0 being My notes in the first level is the first bit; parent UUIDs represent parent folder identifications corresponding to the "My notes" folders, and because "My notes" are the first level, there is no corresponding parent folder, and thus bbb here may represent that there is no parent folder identification.
It should be noted that, according to the folder name included in the array value, the user_order of the folder, and the parent folder ID to which the folder belongs, the display order of each folder in the folder list may be determined. And determining the indentation value corresponding to the folder according to the folder level included in the array value. Wherein, different levels (levels) correspond to different indentation values, where the indentation value may be a distance from a left edge of the folder icon to a left edge of the display screen. For example, as the level increases, the indentation value may increase.
It should be noted that, taking the folder list structure information as an example, in the folder management method provided by the embodiment of the present application, the array value of the folder may be used as a basis for how to display the folder list. Specifically, in displaying the contents of the folder list, the adapter determines the arrangement order of the folders in the folder list based on the folder name, hierarchy, UUID, arrangement order of the folders, parent folder ID, and the like included in the array value. And, the adapter can determine the indentation value corresponding to the folder through the level value of the recursively calling algorithm. For example, when displaying the folder list, the adapter may first traverse the folder of the first level in the array value, that is, traverse the folder with level 0, and may be identified as the parent folder under the root directory because level 0, and display the parent folder according to the indentation value corresponding to level 0; the adapter may then traverse the folders of the second level in the array value, i.e., traverse the folders with level 1, and may be identified as subfolders because of level 1, which may be indented for display according to the indentation distance corresponding to level 1.
When a user drags a selected folder to move the position of the folder, the DataManager updates the data value, so that the information related to the selected folder in the data manager stored in the data manager also changes correspondingly, and specifically, the position of the value corresponding to the selected folder in the data manager also changes correspondingly; the updated array value is then used as a new basis for guiding how to display the folder list, so that the folder list presented to the user is updated accordingly.
Taking the folder list shown in fig. 9A as an example, before the folder is not dragged, the array values may be as follows:
{ name: my notes, level:0,UUID:aaa1,user_order:0,parent UUID:bbb },
{ name: life, level:1,UUID:xxx1,user_order:0,parent UUID:aaa1 })
{ name: travel, level:1,UUID:xxx2,user_order:1,parent UUID:aaa1 })
Then, assuming that the user drags the "travel" folder to the position above the "life" folder, that is, the "travel" folder and the "life" folder exchange positions, the array value is updated accordingly, and the updated array value may be as follows:
{ name: my notes, level:0,UUID:aaa1,user_order:0,parent UUID:bbb },
{ name: travel, level:1,UUID:xxx2,user_order:0,parent UUID:aaa1 })
{ name: life, level:1,UUID:xxx1,user_order:1,parent UUID:aaa1 })
When the dragged folder list is displayed, each folder can be displayed according to the updated array value.
Taking the folder list shown in fig. 9B as an example, before the folder is not dragged, the array values may be as follows:
{ name: my notes, level:0,UUID:aaa1,user_order:0,parent UUID:bbb },
{ name: travel, level:1,UUID:xxx2,user_order:0,parent UUID:aaa1 })
{ name: life, level:1,UUID:xxx1,user_order:1,parent UUID:aaa1 })
{ name: my extract, level:0,UUID:aaa2,user_order:1,parent UUID:bbb }
Then, assuming that the user drags the "travel" folder over the "my excerpt" folder, i.e., drags the "travel" folder to the same level as the "my notes" folder, the array value is updated as follows, and the updated array value may be as follows:
{ name: my notes, level:0,UUID:aaa1,user_order:0,parent UUID:bbb },
{ name: life, level:1,UUID:xxx1,user_order:0,parent UUID:aaa1 })
{ name: travel, level:0,UUID:xxx2,user_order:1,parent UUID:bbb })
{ name: my extract, level:0,UUID:aaa2,user_order:2,parent UUID:bbb }
At this time, the level of the "travel" folder changes to 0, indicating that it changes to the first level; the user_order is changed to 1, which means that the arrangement order of the user_order is the second bit in the first level; the parent UUID changes to bbb, indicating that it does not have the parent folder to which it belongs. Accordingly, the corresponding user_order of the my snippet folder originally arranged at the second position of the first level is changed to 2, which indicates that the arrangement order of the my snippet folder in the first level is changed to the third position.
When the dragged folder list is displayed, each folder can be displayed according to the updated array value.
It should be understood that by introducing the array value as the basis for displaying the folder list, when the folder is changed (such as the relationship between the parent folder and the child folder is changed or the position of the folder is changed), the folder list displayed on the interface can be adjusted correspondingly in real time only according to the array value updated in real time, and the related information of the selected folder does not need to be searched from a large amount of data in the database, and then the displayed folder list is updated, so that timeliness and flexibility of folder management are improved.
In some embodiments, the datamanager may further include a database storing folder data, where the database may include a universally unique identifier (Universally Unique Identifier, UUID) of a folder, a folder name (display_name), an ID value (parent_name) of a parent folder corresponding to the folder, a folder hierarchy (level), an arrangement order (user_order) of the folders, and the like. An exemplary folder data stored in the database may be, for example, as shown in table 1 below:
TABLE 1
Each folder data may include the above information, so after determining the selected folder, particularly after acquiring the name of the selected folder, the ID value of the parent folder of the folder may be found according to the data recorded in the database, and then the name of the parent folder may be found, thereby finding the correspondence.
In some embodiments, the DataManager may obtain a set of values for characterizing parent-child relationships of folders based on information in the database.
S809, the data management module (DataManger) transmits the updated array value to the data adaptation module (adapter).
In some embodiments, the datamanager may send the corresponding array value after deleting the subfolder to a data adaptation module (adapter).
In some embodiments, after the adapter obtains the updated array value, the updated folder parent-child relationship, the folder position, and the like may be obtained according to the updated array value, and the folders in the list are correspondingly adjusted, so that the folder data content corresponding to the updated array value is filled into the position corresponding to the folder list.
S810, the data adaptation module (adapter) informs the RecycloerView display control update list display.
It should be appreciated that when the folder data changes, the adapter may notify the data change to the recurview display control, so that the recurview display control performs a folder list refreshing operation according to the changed data, thereby implementing displaying the updated folder list on the display screen.
S811, the display screen receives drag operation input by a user.
The drag operation may be a drag operation for a folder icon to be moved, which is input by a user through a finger. The drag operation may correspond to, for example, operation 303 shown in fig. 3C, or may correspond to operation 403 shown in fig. 4B, or may correspond to operation 503 shown in fig. 5D.
And S812, the display screen transmits a drag event to the RecycloerView display control.
In some embodiments, after the display screen receives a drag operation for the folder to be moved, which is input by a user, a corresponding drag event may be transferred to the recurview display control in response to the drag operation.
S813, the RecycleView display control receives the drag time and determines coordinates (x, y) corresponding to the drag event.
In some embodiments, the coordinates (x, y) may refer to coordinates corresponding to the position of the user's finger press during the drag. Since drag events are typically continuous processes, there may be multiple coordinates (x, y).
S814, the RecycleView display control transmits coordinates (x, y) corresponding to the drag event to the ItemTouchHelper module.
S815, the ItemTouchHelper module moves the position of the dragged view according to coordinates (x, y).
In some embodiments, the ItemTouchHelper module may determine the location of the dragged view in the current display based on coordinates (x, y).
In some embodiments, the ItemTouchHelper module may also determine the target view that is exchanged during the drag based on coordinates (x, y).
S816, the ItemTouchHelper module invokes onMove to pass the view holder corresponding to the moved view and the view holder corresponding to the swapped view.
It should be appreciated that different views displayed in the display may correspond to different view holders, respectively. In some embodiments, after the ItemTouchHelper module receives the location of the dragged view, onMove may be invoked to pass the corresponding view holder of the dragged view to the ItemTouchHelper.
In some embodiments, the ItemTouchHelper module may also determine a swapped target view holder from the swapped target view, and may pass the swapped target view holder to the ItemTouchHelper. Callback of the application layer by calling onMove.
It should be noted that the views exchanged here may correspond to the folders exchanged. Specifically, in the process that the folder to be moved is dragged, the folder to be moved needs to go over at least one folder in the middle from the initial position thereof to reach the target position, and when the position of the folder to be moved is dragged to the position above a certain middle folder and the overlapping part of the folder to be moved and the middle folder is larger than a preset value, the position of the folder to be moved and the position of the middle folder can be exchanged, so that the position of the folder to be moved is closer to the target position, and the middle folder is the exchanged folder.
S817, the itemtouchhelter. Callback module obtains the positions of the dragged and swapped view holder in the folder list.
In some embodiments, the ItemTouchHelper. Callback module may call getposition to obtain the location of the dragged view holder, and to obtain the location of the swapped view holder.
S818, the ItemTouchHelper. Callback module sends the location of the dragged view holder and the location of the swapped view holder to the DataManger module.
And S819, exchanging the dragged folder and the exchanged folder in the array value by the DataManger module according to the position of the dragged view holder and the position of the exchanged view holder.
In some embodiments, the DataManager may determine the dragged folder based on the position of the dragged view holder after receiving the dragged view holder, and may determine the swapped folder based on the position of the swapped view holder after the DataManager receives the swapped view holder. Specifically, the DataManager process of determining the corresponding folder according to the position of the view holder may include: after the ItemTouchHelper. Callback acquires the position of the dragged view holder, the getAdapter position method is called by the RecycloerView to inquire the folder corresponding to the position from the adapter, and if the position of the view holder is overlapped with a certain middle folder position and the overlapped part is larger than a preset value, the middle folder is determined to be the exchanged folder.
Thereafter, the DataManager module may swap the position of the dragged folder and the position of the swapped folder in the array value.
S820, the DataManager module transmits the updated array value to a data adaptation module (adapter).
The updated array value refers to the array value after the dragged folder and the exchanged folder exchange positions.
In some embodiments, after the adapter receives the updated array value, the updated folder list content may be generated according to the parent-child folder relationship indicated by the array value, where the location of the dragged folder is swapped with the location of the swapped folder.
S821, aatdapter informs the RecycloerView display control update list display.
In some embodiments, after the adapter generates updated folder list content, the RecycloerView display control is instructed to refresh, displaying the new folder list after the dragged folder and the swapped folder swap positions.
S822, the display screen receives the hand-lifting operation input by the user.
In some embodiments, after the user moves the dragged folder to the target position, the long press operation of the folder icon may be stopped, and the user may perform the hand-up operation at this time.
S823, the display screen transmits a hand-up event to the RecycloerView display control.
In some embodiments, after receiving a user input of a hand-up operation for a folder to be moved, the display screen may transmit a corresponding hand-up event to the recurview display control in response to the hand-up operation.
In some embodiments, a hands-up event may trigger a RecycloerView display control to invoke the onChildDraw system method, determining whether to merge folders based on the location of the dragged folder relative to the target location folder. For example, the RecycloView display control may invoke the onChildDraw system method to obtain the height of the currently dragged folder and the offset relative to the previous or next folder adjacent thereto. It should be appreciated that the offset may be used to indicate a location after the folder is dragged, and may be used to obtain an overlap of the folder with a previous folder or a next folder after the folder is dragged, where if the overlap is greater than a first ratio, the currently dragged folder and the corresponding folder may be merged, and if the overlap is less than the first ratio, the currently dragged folder and the folder of the target location may be swapped.
S824, the RecycleView display control receives the hand-up event and determines coordinates (X ', Y') corresponding to the hand-up event.
The coordinates (X ', Y') may refer to coordinates corresponding to when the user performs the hand-lifting operation, and the coordinate position may correspond to a target position, that is, a destination position to which the folder needs to be moved.
S825, the RecycloView display control transmits coordinates (X ', Y') corresponding to the hand-up event to the ItemTouchHelper module.
S826, the ItemTouchHelper module determines the target view based on the coordinates (X ', Y').
The target view refers to a view corresponding to a position where the folder is dragged when the user lifts his or her hand, that is, a view corresponding to the folder to be moved when the dragging process is finished.
S827, the ItemTouchHelper module delivers a target viewholder to the ItemTouchHelper.
In some embodiments, the ItemTouchHelper module, in response to a lift event, may call the clearView callback method in the ItemTouchHelper. Callback to determine into which parent folder the folder to be dragged is moved, i.e., to determine the target location of the dragged folder. By way of example, the manner in which the location of the dragged folder is determined may include: and determining which parent folder to move the dragged folder into according to the moving position of the currently dragged folder and the level of the last folder (denoted as folder A) and the next folder (denoted as folder B) adjacent to the dragged folder in the folder list. Specifically, the following cases can be classified:
1. If the next folder B adjacent to the dragged folder is a child of the last folder A, the dragged folder is moved into folder A, i.e., folder A is set as the parent of the dragged folder.
2. If the level of the last folder a adjacent to the dragged folder is greater than the level of the next folder B, then:
(1) If the level of the dragged folder is larger than that of the previous folder A, placing the dragged folder under the same level of the directory as the previous folder A, namely, the moved folder and the folder A belong to the same level;
(2) If the level of the dragged folder is the same as or smaller than the level of the next folder B, the dragged folder is placed under the same directory as the next folder B, i.e. the moved folder and the folder B belong to the same level.
3. If the previous folder A and the next folder B are in the same hierarchy, the dragged folder is placed under the same hierarchy of the previous folder, namely the moved folder belongs to the same hierarchy with the folders A and B.
4. If the dragged folder moves to the target position and then a blank area is below the dragged folder (i.e. no other folders exist), the dragged folder is placed under the root directory, i.e. the dragged folder belongs to the first level.
In some embodiments, when a user lifts his/her hand, itemTouchHelper may also invoke the onChildDraw callback method in ItemTouchHelper. By way of example, the manner of determining whether to merge folders may include: when the user lifts his hand after dragging, the offset of the height of the dragged folder relative to the previous or next folder adjacent to the dragged folder is judged according to the offset (dy value) of the dragged folder in the Y-axis direction of the callback, the overlapping part of the dragged folder and the previous or next folder can be obtained according to the offset, and when the overlapping part of the dragged folder and the previous or next folder is larger than a first proportion (such as the overlapping is larger than 75%), the folder merging operation can be determined. Optionally, whether the target folder to be merged is the previous folder or the next folder may also be obtained according to the position where the current folder is located and the sliding direction of the drag gesture. After the parent folder is determined, the parent folder of the dragged folder can be pointed to be the target folder, so that the dragged folder can be placed under the target folder conveniently.
The Y-axis direction may refer to a direction parallel to the left or right side edge of the mobile phone.
S828, the ItemTouchHelper. Callback module obtains the position of the target view holder in the folder list.
S829, the ItemTouchHelper. Callback module sends the location of the target viewholder to the DataManager.
S830, the DataManager calculates a parent folder to which the corresponding folder belongs according to the position of the target view holder, and updates the array value.
In some embodiments, after the DataManager receives the location of the target viewing holder, the location of the folder list corresponding to the dragged folder may be queried according to the location of the viewing holder, then the folder ID of the target location may be updated by using the parent folder ID value of the currently dragged folder, and the user_order of the folder list may be reset according to the dragged target location, and the folder database may be updated.
The DataManager can retrieve the folder list data content from the folder database through recursive call, and transfer the folder list data content to the adapter, and the adapter generates the content of the folder list to be displayed.
S831, datamanager delivers the updated array value to the adapter.
The updated array value in this step may refer to an array value corresponding to the folder to be moved after being dragged to the target position, where the updated array value may be used to characterize a new parent-child folder relationship, a position of each folder, and the like after the folder is dragged.
In this step, the DataManager may also pass the updated folder list data content to the adapter.
In some embodiments, after the adapter obtains the updated array value, an updated folder list structure, such as a folder parent-child relationship, a folder location, a folder title, etc., may be obtained from the updated array value. The Adapter can also select data contents corresponding to the folders to be displayed from the received data contents of the folder list, and fill the data contents into positions corresponding to the folder list.
In some embodiments, the DataManager may also pass the data content corresponding to the subfolder of the dragged folder to the adapter. The Adapter may generate subfolder content corresponding to the dragged folder based on the data content corresponding to the subfolders to display subfolders included in the dragged folder at the target location.
S832, the data adaptation module (adapter) notifies the RecycloerView display control update list display.
In some embodiments, after the control update list is displayed by the recycloview, the user may be shown the folder list that reaches the target location after the folder to be moved is dragged.
According to the folder management method provided by the embodiment of the application, the method is aimed atThe system terminal equipment displays the input drag operation of the folder to be moved, drags the selected folder to the target position, and can realize the moving effect of the folder, in addition, when the folders need to be combined, the selected folder is dragged to the upper part of the target folder needing to be combined, and the selected folder is caused to be combinedThe overlapping relation between the folder and the target folder meets the preset condition, so that the automatic combination of the two folders can be realized, and the method can be realized based on +.>The system can manage folders conveniently and efficiently, and can effectively improve the use experience of users.
Exemplary, as shown in fig. 10, a schematic flowchart of another folder management method according to an embodiment of the present application is provided. The method may be performed by the terminal device as a main body, and may specifically include the steps of:
S1001, a long press operation is received.
The long-press operation is an operation input for the icon of the folder to be moved in the folder list, and the long-pressed folder can be described as the folder to be moved or the selected folder.
S1002, it is determined whether the selected folder supports movement.
When the selected folder supports movement, step S1003 is performed.
When the selected folder does not support movement, a prompt message may be displayed indicating that the currently selected folder does not support movement.
S1003, judging whether the selected folder has subfolders.
When the selected folder has subfolders, that is, the judgment result is yes, step S1004 is executed; when the selected folder has no subfolder, i.e., the determination result is no, step S1005 is performed.
S1004, removing the subfolder.
Removing subfolders in this step refers to deleting subfolders of the selected folder in the folder list structure information. Thereafter, an updated folder list may be displayed according to the updated folder list structure information, the updated folder list excluding the deleted subfolders.
S1005, drag the selected folder.
The manner of dragging the folder may be as shown in fig. 3B and 3C, or as shown in fig. 4B and 4C, or as shown in fig. 5C and 5D.
S1006, the positions of the folders are exchanged by two pairs, and the positions corresponding to the dragging operation are recorded.
In some embodiments, during the drag, the selected folder and the middle folder may be swapped two by two according to the drag position.
S1007, a lift operation is detected.
When the hand-lifting operation is detected, the file folder dragging is ended.
S1008, determining a combined folder or a moving folder according to the drag height and the relative offset.
In some embodiments, when a lift operation is detected, a drag height of the selected folder may be obtained, and a target position of the currently selected folder may be obtained according to the drag height. Determining a merging folder or a moving folder according to the offset of the target position relative to the adjacent folders, wherein if the overlapping part of the selected folder and the adjacent folders is determined to be greater than or equal to a first ratio (such as 75%) according to the offset, the selected folder and the folders are indicated to be merged; if the overlapping part of the selected folder and the adjacent folder is determined to be smaller than a proportion according to the offset, the selected folder is moved to a position adjacent to the adjacent folder, and the selected folder and the adjacent folder are in the same level and are not combined. In addition, it is also possible to determine that the selected folder is merged with the previous folder, or that the selected folder is merged with the next folder, or that the selected folder is moved only without merging, according to the direction of the drag. For example, when the direction of the drag is upward and the overlapping portion of the selected folder and the previous folder adjacent thereto is greater than or equal to the first ratio after the drag, it may be determined that the selected folder is merged with the previous folder.
S1009, a target folder is calculated.
In some embodiments, when the dragged folder and the adjacent folders need to be merged, the position of the target folder merged with the selected folder is calculated, and information such as the target folder ID can be further acquired based on the position of the target folder.
S1010, judging whether the same-name folder exists under the target folder.
In some embodiments, whether the subfolder, which is the same name as the selected folder, is included may be looked up from the folder list structure information or database based on the target folder ID.
Wherein when the target folder includes a folder having the same name as the selected folder, the following step S1014 may be performed. When the target folder does not include a folder of the same name as the selected folder, the following step S1011 may be performed.
S1011, updating the parent folder of the selected folder as the target folder.
In some embodiments, when the target folder does not include a folder with the same name as the selected folder, that is, the selected folder may be successfully combined with the target folder, a parent folder corresponding to the selected folder in the folder list structure information may be modified into the target folder. And simultaneously, the position corresponding to the selected folder in the folder list structure information can be modified.
S1012, updating the user_order and the database.
In some embodiments, after the selected folder is successfully moved to the target location or combined with the target folder, the user_order corresponding to the selected folder in the folder list structure information may be updated, and the information of the selected folder in the database may be updated, so that the folder information is consistent with the updated folder list. In one possible implementation, the rank order group of the folders may correspond to a user_order of the folders, and may specifically be an order of the folders in the hierarchy in which they are located. For example, assuming that there are 3 folders in the first hierarchy, since the 3 folders are ordered in the folder list, which row is in the first position of the first hierarchy, which row is in the second position of the first hierarchy, and which row is in the third position of the first hierarchy are characterized by user_order.
It should be understood that the arrangement herein is merely the arrangement of folders in the hierarchy in which they are located and does not represent the arrangement throughout the folder list.
S1013, the folder list display is refreshed.
S1014, the movement fails, and the refreshing folder list is restored to the original interface style.
According to the folder management method provided by the embodiment of the application, the method is aimed atIn addition, when the folders are required to be combined, the automatic combination of the two folders can be realized by dragging the selected folders to the position above the target folders required to be combined and enabling the overlapping relation between the selected folders and the target folders to meet preset conditions, and the method can be realized based on->The system can manage folders conveniently and efficiently, and can effectively improve the use experience of users.
Exemplary, as shown in fig. 11, a schematic flowchart of a method for managing folders according to another embodiment of the application is provided. The method may be performed by the terminal device as a main body, and may specifically include the steps of:
s1101, in response to a long press operation input by the user for the first folder icon in the first folder list, displaying a first interface including the first folder icon in the selected state.
In some embodiments, the displaying the first interface in response to the long press operation input by the user for the first folder icon in the first folder list specifically includes: responding to a long-press operation input by a user for a first folder icon in a first folder list, and determining a first coordinate corresponding to the long-press operation; determining a first folder according to the first coordinates, wherein the position of the first folder corresponds to the first coordinates; and setting the first folder icon to be in a selected state, and displaying the first interface.
In some embodiments, when the first folder includes subfolders, displaying a first interface in response to a long press operation input by a user for a first folder icon in the first folder list, and further including: responding to long-press operation input by a user for a first folder icon in a first folder list, deleting information corresponding to subfolders of the first folder in the preset folder list structure information, and acquiring second folder list structure information; and displaying a first interface according to the second folder structure information, wherein the first interface comprises the first folder icon in the selected state, and the subfolder included in the first folder is not displayed.
S1102, receiving a drag operation input by a user for the first folder icon, and displaying a second interface in response to the drag operation, wherein the second interface comprises position change in the process of dragging the first folder icon.
In some embodiments, the receiving a drag operation input by the user for the first folder icon, and determining, in response to the drag operation, a position of the first folder icon in a moving process may specifically include: receiving a drag operation input by a user aiming at the first folder icon; determining at least one second coordinate corresponding to the drag operation; and determining at least one position of the first folder in the moving process according to the at least one second coordinate.
In some embodiments, the method further comprises: and displaying the position change of the first folder icon in the dragging process according to at least one position of the first folder in the moving process.
And S1103, when the dragging is finished, responding to a hand lifting operation input by a user, and determining a target position of the first folder according to the dragging height and the offset of the first folder relative to the target folder after the first folder is dragged, wherein the target position is inside the target folder or adjacent to the target folder.
In some embodiments, the target folder includes a second target folder and/or a third folder, the method further comprising: when the dragging is finished, responding to a hand lifting operation input by a user, and determining a second folder and/or a third folder adjacent to the first folder icon according to the dragging height, wherein the second folder is an adjacent folder positioned above the first folder icon, and the third folder is an adjacent folder positioned below the first folder icon; determining whether to merge folders according to the offset of the first folder relative to the target folder after the first folder is dragged; when the superposition part of the first folder and the second folder is determined to be larger than or equal to a first proportion according to the offset, merging the first folder and the second folder; when the superposition part of the first folder and the second folder is determined to be smaller than a first proportion according to the offset, not merging the first folder and the second folder; merging the first folder and the third folder when the overlapping part of the first folder and the third folder is determined to be greater than or equal to a first proportion according to the offset; when the superposition part of the first folder and the third folder is determined to be smaller than a first proportion according to the offset, not merging the first folder and the third folder; and when the overlapping parts of the first folder, the second folder and the third folder are smaller than a first proportion according to the offset, moving the icon of the first folder to the position between the icon of the second folder and the icon of the third folder.
In some embodiments, the determining whether to merge folders according to the offset of the first folder relative to the target folder after being dragged specifically includes: and determining whether to merge the folders according to the offset and the dragging direction of the first folder relative to the target folder after the first folder is dragged.
In some embodiments, the determining whether to merge folders according to the offset and the dragging direction of the first folder relative to the target folder after being dragged specifically includes: when the superposition part of the first folder and the second folder is determined to be larger than or equal to a first proportion according to the offset, and the direction of the drag operation is upward, merging the first folder and the second folder; when the superposition part of the first folder and the second folder is determined to be larger than or equal to a first proportion according to the offset, and the direction of the drag operation is downward, the first folder icon is moved to the lower part of the second folder icon; when the superposition part of the first folder and the third folder is determined to be larger than or equal to a first proportion according to the offset, and the direction of the drag operation is downward, merging the first folder and the third folder; and when the superposition part of the first folder and the third folder is larger than or equal to a first proportion according to the offset, and the direction of the drag operation is upward, moving the first folder icon to the upper part of the second folder icon.
S1104, updating preset folder list structure information according to the target position of the first folder, and acquiring the first folder list structure information, wherein the first folder list structure information is used for indicating IDs (identity) of all folders in the first folder list, the hierarchy, the ID of the father folder and the folder arrangement sequence after the dragging is completed.
In some embodiments, the folder list structure information is an array value, where the array value includes IDs of folders, levels of the folders, IDs of parent folders, and an arrangement order of the folders, where the folders are respectively corresponding to the folders included in the folder list, and the updating the preset folder list structure information may include: modifying a position corresponding to the first folder in the array value according to the target position of the first folder after being dragged, so that the position of the first folder in the array value is consistent with the position of the first folder in the folder list after being dragged; modifying the arrangement sequence of the folders corresponding to the first folders in the array value, so that the arrangement sequence of the folders corresponding to the first folders is consistent with the arrangement sequence of the folders in the folder list after the first folders are dragged; modifying the hierarchy corresponding to the first folder in the array value, so that the hierarchy corresponding to the first folder is consistent with the hierarchy in the folder list after the first folder is dragged; and modifying the ID of the parent folder corresponding to the first folder in the array value, so that the ID of the parent folder corresponding to the first folder is consistent with the ID of the parent folder in the folder list after the first folder is dragged.
It should be noted that, the rank order group of the folders may correspond to a user_order of the folders, and specifically may refer to an arrangement order of the folders in a hierarchy where the folders are located. For example, assuming that there are 3 folders in the first hierarchy, since the 3 folders are ordered in the folder list, which row is in the first position of the first hierarchy, which row is in the second position of the first hierarchy, and which row is in the third position of the first hierarchy are characterized by user_order.
It should be understood that the arrangement herein is merely the arrangement of folders in the hierarchy in which they are located and does not represent the arrangement throughout the folder list.
In some embodiments, the manner in which the folder structure information is obtained may include: and generating the folder structure information according to the information of each folder in the first folder list recorded in the database, wherein the information of each folder comprises the IDs of the folders, the hierarchy, the father-son relationship of the folders and the arrangement sequence. The generating the folder structure information according to the information of each folder in the first folder list recorded in the database may specifically include: acquiring folders in a first hierarchy in the first folder list according to the hierarchy in which the folders are located; traversing and inquiring subfolders included in each first-level folder to obtain a corresponding second-level folder; recursively inquiring subfolders included in the second-level folder to obtain a corresponding third-level folder; repeating the operation of recursively inquiring the subfolders until the inquired folder of a certain level no longer comprises the subfolders; and generating folder list structure information according to the hierarchy where each folder is located, the parent-child relationships and the arrangement sequence of the folders.
In some embodiments, the updating the preset folder list structure information according to the target position of the first folder specifically includes: when the first folder is combined with the second folder, modifying the first folder into subfolders of the second folder in the folder list structure information, and determining the arrangement sequence of the first folder according to the position of the first folder in the second folder; when the first folder is combined with the third folder, modifying the first folder into a subfolder of the third folder in the folder list structure information, and determining the arrangement sequence of the first folder according to the position of the first folder in the third folder; when the first folder icon moves between the second folder icon and the third folder icon, the position of the first folder is modified to be between the subfolder of the second folder and the third folder in the folder list structure information.
S1105, displaying a third interface according to the updated folder list structure information, wherein the third interface comprises a second folder list, and the second folder list is a folder list corresponding to the first folder icon after being dragged to the target position.
In some embodiments, the folder information in the database is adjusted according to the updated folder list structure information, so that the hierarchy and the folder arrangement sequence of the folders corresponding to the folders in the database are consistent with those in the updated folder structure information.
According to the folder management method provided by the embodiment of the application, the method is aimed atIn addition, when the folders are required to be combined, the automatic combination of the two folders can be realized by dragging the selected folders to the position above the target folders required to be combined and enabling the overlapping relation between the selected folders and the target folders to meet preset conditions, and the method can be realized based on->The system can manage folders conveniently and efficiently, and can effectively improve the use experience of users.
Based on the same technical concept, the embodiment of the application also provides terminal equipment, which comprises one or more processors; one or more memories; the one or more memories store one or more computer programs comprising instructions that, when executed by the one or more processors, cause the computer or processor to perform one or more steps of any of the methods described above.
Based on the same technical idea, the embodiments of the present application further provide a computer-readable storage medium having stored therein computer-executable program instructions, which when executed on a computer, cause the computer or processor to perform one or more steps of any of the methods described above.
Based on the same technical idea, an embodiment of the present application also provides a computer program product containing instructions, the computer program product comprising computer program code which, when run on a computer, causes the computer or processor to perform one or more steps of any one of the methods described above.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted across a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.
The foregoing is merely a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited to this, and any changes or substitutions within the technical scope disclosed in the embodiment of the present application should be covered in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. A method for folder management, applied to a terminal device, comprising:
responding to a long-press operation input by a user for a first folder icon in a first folder list, and displaying a first interface, wherein the first interface comprises the first folder icon in a selected state;
Receiving a drag operation input by a user for the first folder icon, and responding to the drag operation to display the second interface, wherein the second interface comprises position change in the process of dragging the first folder icon;
when the dragging is finished, responding to a hand-lifting operation input by a user, and determining a target position of the first folder according to the dragging height and the offset of the first folder relative to a target folder after the first folder is dragged, wherein the target position is inside the target folder or is adjacent to the target folder;
updating preset folder list structure information according to the target position of the first folder, and acquiring first folder list structure information, wherein the first folder list structure information is used for indicating the identification ID, the hierarchy of each folder, the ID of a father folder and the folder arrangement sequence of each folder in the first folder list after the dragging is finished;
and displaying a third interface according to the structure information of the first folder list, wherein the third interface comprises a second folder list, and the second folder list is a folder list corresponding to the first folder icon after being dragged to the target position.
2. The method according to claim 1, wherein the method further comprises:
and generating the folder structure information according to the information of each folder in the first folder list recorded in the database, wherein the information of each folder comprises the IDs of the folders, the hierarchy, the ID of the father folder and the folder arrangement sequence.
3. The method according to claim 2, wherein the generating the folder structure information according to the information of each folder in the first folder list recorded in the database specifically includes:
acquiring folders in a first hierarchy in the first folder list according to the hierarchy in which each folder in the first folder list is located;
traversing and inquiring subfolders included in each first-level folder to obtain a corresponding second-level folder;
recursively inquiring subfolders included in the second-level folder to obtain a corresponding third-level folder;
repeating the operation of recursively inquiring the subfolders until the inquired folder of a certain level no longer comprises the subfolders;
and generating the folder list structure information according to the folder IDs, the hierarchy level, the ID of the father folder and the folder arrangement sequence which are respectively corresponding to the folders.
4. A method according to any one of claims 1-3, wherein the displaying the first interface in response to a long press operation entered by a user for the first folder icon in the first folder list specifically comprises:
responding to a long-press operation input by a user for a first folder icon in a first folder list, and determining a first coordinate corresponding to the long-press operation;
determining a first folder according to the first coordinates, wherein the position of the first folder corresponds to the first coordinates;
and setting the first folder icon to be in a selected state, and displaying the first interface.
5. The method of any of claims 1-4, wherein when the first folder includes subfolders, displaying a first interface in response to a long press operation entered by a user for a first folder icon in a first folder list, further comprising:
responding to long-press operation input by a user for a first folder icon in a first folder list, deleting information corresponding to subfolders of the first folder in the preset folder list structure information, and acquiring second folder list structure information;
And displaying a first interface according to the second folder structure information, wherein the first interface comprises the first folder icon in the selected state, and the subfolder included in the first folder is not displayed.
6. The method according to any one of claims 1-5, wherein the receiving a drag operation input by a user for the first folder icon and determining a position of the first folder icon during movement in response to the drag operation specifically comprises:
receiving a drag operation input by a user aiming at the first folder icon;
determining at least one second coordinate corresponding to the drag operation;
and determining at least one position of the first folder in the moving process according to the at least one second coordinate.
7. The method of claim 6, wherein the method further comprises:
and displaying the position change of the first folder icon in the dragging process according to at least one position of the first folder in the moving process.
8. The method of any of claims 1-7, wherein the target folder comprises a second target folder and/or a third folder, the method further comprising:
When the dragging is finished, responding to a hand lifting operation input by a user, and determining a second folder and/or a third folder adjacent to the first folder icon according to the dragging height, wherein the second folder is an adjacent folder positioned above the first folder icon, and the third folder is an adjacent folder positioned below the first folder icon;
determining whether to merge folders according to the offset of the first folder relative to the target folder after the first folder is dragged; wherein, the liquid crystal display device comprises a liquid crystal display device,
merging the first folder and the second folder when the overlapping part of the first folder and the second folder is determined to be greater than or equal to a first proportion according to the offset;
when the superposition part of the first folder and the second folder is determined to be smaller than a first proportion according to the offset, not merging the first folder and the second folder;
merging the first folder and the third folder when the overlapping part of the first folder and the third folder is determined to be greater than or equal to a first proportion according to the offset;
when the superposition part of the first folder and the third folder is determined to be smaller than a first proportion according to the offset, not merging the first folder and the third folder;
And when the overlapping parts of the first folder, the second folder and the third folder are smaller than a first proportion according to the offset, moving the icon of the first folder to the position between the icon of the second folder and the icon of the third folder.
9. The method according to claim 8, wherein determining whether to merge folders according to the offset of the first folder relative to the target folder after being dragged comprises:
and determining whether to merge the folders according to the offset and the dragging direction of the first folder relative to the target folder after the first folder is dragged.
10. The method according to claim 9, wherein determining whether to merge folders according to the offset of the first folder with respect to the target folder after being dragged and the dragging direction specifically comprises:
when the superposition part of the first folder and the second folder is determined to be larger than or equal to a first proportion according to the offset, and the direction of the drag operation is upward, merging the first folder and the second folder;
when the superposition part of the first folder and the second folder is determined to be larger than or equal to a first proportion according to the offset, and the direction of the drag operation is downward, the first folder icon is moved to the lower part of the second folder icon;
When the superposition part of the first folder and the third folder is determined to be larger than or equal to a first proportion according to the offset, and the direction of the drag operation is downward, merging the first folder and the third folder;
and when the superposition part of the first folder and the third folder is larger than or equal to a first proportion according to the offset, and the direction of the drag operation is upward, moving the first folder icon to the upper part of the second folder icon.
11. The method according to any one of claims 8-10, wherein updating the preset folder list structure information according to the target location of the first folder specifically includes:
when the first folder is combined with the second folder, modifying the first folder into subfolders of the second folder in the folder list structure information, and determining the arrangement sequence of the first folder according to the position of the first folder in the second folder;
when the first folder is combined with the third folder, modifying the first folder into a subfolder of the third folder in the folder list structure information, and determining the arrangement sequence of the first folder according to the position of the first folder in the third folder;
When the first folder icon moves between the second folder icon and the third folder icon, the position of the first folder is modified to be between the subfolder of the second folder and the third folder in the folder list structure information.
12. The method according to any one of claims 1-11, further comprising:
and adjusting the folder information in the database according to the updated folder list structure information, so that the hierarchy and the folder arrangement sequence of folders corresponding to the folders in the database are consistent with those in the updated folder structure information.
13. The method according to any one of claims 1 to 12, wherein the folder list structure information is an array value, the array value includes IDs of folders, a hierarchy, an ID of a parent folder, and an arrangement order of folders, which are respectively corresponding to the folders included in the folder list;
the updating the preset folder list structure information according to the target position of the first folder specifically includes:
modifying a position corresponding to the first folder in the array value according to the target position of the first folder after being dragged, so that the position of the first folder in the array value is consistent with the position of the first folder in the folder list after being dragged; the method comprises the steps of,
Modifying the arrangement sequence of the folders corresponding to the first folder in the array value, so that the arrangement sequence of the folders corresponding to the first folder is consistent with the arrangement sequence of the folders in the folder list after the first folder is dragged; the method comprises the steps of,
modifying the hierarchy corresponding to the first folder in the array value, so that the hierarchy corresponding to the first folder is consistent with the hierarchy in the folder list after the first folder is dragged; the method comprises the steps of,
and modifying the ID of the parent folder corresponding to the first folder in the array value, so that the ID of the parent folder corresponding to the first folder is consistent with the ID of the parent folder in the folder list after the first folder is dragged.
14. A terminal device, comprising:
one or more processors;
one or more memories;
the one or more memories store one or more computer programs comprising instructions that, when executed by the one or more processors, cause the terminal device to perform the method of any of claims 1-13.
15. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when run on a computer, causes the computer to perform the method according to any one of claims 1 to 13.
CN202211145006.9A 2022-09-20 2022-09-20 Folder management method and terminal equipment Pending CN116719454A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211145006.9A CN116719454A (en) 2022-09-20 2022-09-20 Folder management method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211145006.9A CN116719454A (en) 2022-09-20 2022-09-20 Folder management method and terminal equipment

Publications (1)

Publication Number Publication Date
CN116719454A true CN116719454A (en) 2023-09-08

Family

ID=87864811

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211145006.9A Pending CN116719454A (en) 2022-09-20 2022-09-20 Folder management method and terminal equipment

Country Status (1)

Country Link
CN (1) CN116719454A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929706A (en) * 2012-10-31 2013-02-13 广州市久邦数码科技有限公司 Method for combining files
CN105183311A (en) * 2015-08-27 2015-12-23 北京金山安全软件有限公司 Folder merging method and device
CN108197302A (en) * 2018-01-29 2018-06-22 维沃移动通信有限公司 A kind of file folder creation method and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929706A (en) * 2012-10-31 2013-02-13 广州市久邦数码科技有限公司 Method for combining files
CN105183311A (en) * 2015-08-27 2015-12-23 北京金山安全软件有限公司 Folder merging method and device
CN108197302A (en) * 2018-01-29 2018-06-22 维沃移动通信有限公司 A kind of file folder creation method and mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WINDOWS7 旗舰版: "《Windows7 旗舰版 操作系统》" *

Similar Documents

Publication Publication Date Title
EP3907597A1 (en) Method for displaying ui assembly and electronic device
RU2612362C1 (en) Method of recording, method of playback, device, terminal and system
CN108496150A (en) A kind of method and terminal of screenshot capture and reading
CN111240547A (en) Interactive method for cross-device task processing, electronic device and storage medium
WO2019061040A1 (en) File management method and device
US20220358089A1 (en) Learning-Based Keyword Search Method and Electronic Device
WO2020233556A1 (en) Call content processing method and electronic device
CN113791850B (en) Information display method and electronic equipment
JP7201827B2 (en) Image classification method and electronic device
EP4261680A1 (en) Widget display method and electronic device
WO2022135485A1 (en) Electronic device, theme configuration method therefor, and medium
CN111176766A (en) Communication terminal and component display method
WO2022022674A1 (en) Application icon layout method and related apparatus
WO2022127130A1 (en) Method for adding operation sequence, electronic device, and system
WO2020062014A1 (en) Method for inputting information into input box and electronic device
CN112163033B (en) Mobile terminal and travel list display method thereof
CN114610419A (en) Method and device for adding widget and computer readable storage medium
CN116719454A (en) Folder management method and terminal equipment
CN114371895B (en) Terminal equipment, mail marking method and storage medium
WO2022166435A1 (en) Picture sharing method and electronic device
CN113497835B (en) Multi-screen interaction method, electronic equipment and computer readable storage medium
CN113448658A (en) Screen capture processing method, graphical user interface and terminal
WO2022052962A1 (en) Application module startup method and electronic device
WO2023160455A1 (en) Object deletion method and electronic device
EP4336357A1 (en) Message processing method and related apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination