File management method and related equipment
By implementing the drag operation in the file management interface, the method of adding the file to the directory solves the problem of cumbersome operation of the existing technology file to the directory operation, and improves operational efficiency and convenience.
Patent Information
- Application Number
- CN202310920427.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2025-01-28
AI Technical Summary
In the prior art, when creating a directory, users need tedious operations to add files to the directory, which consumes a lot of effort and time.
By displaying the sidebar side of the directory and the content column in the same interface, users can add the file into the directory through the drag and drag operation. The specific implementation method includes receiving the user's drag operation, determining the point coordinate location information in the drag and dragging process, so as to determine which list is located, and update the display content of the sidebar sidebar of the directory when the user's finger leaves the touch screen, update the file path of the file path Under the path of the corresponding list.
Simplified the operation process added to the directory, improved the efficiency of the file added to the directory, and the operation of users is more convenient.
Smart Images

Figure CN119377174A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a file management method and related equipment. Background Art
[0002] Directories can help users find the desired files or content more quickly. However, when creating a directory, users need to perform cumbersome operations, such as selecting the target file, clicking the option button, and then selecting the directory to which the target file needs to be moved to add the target file to the directory. This method usually takes a lot of effort and time. Summary of the invention
[0003] The present application provides a file management method and related equipment, which can more efficiently add files to the corresponding list in the directory.
[0004] In a first aspect, some embodiments of the present application provide a file management method. The file management method may include: displaying a directory sidebar and a content column in the same interface, wherein the directory sidebar displays multiple lists in the directory, and the content column displays one or more files, wherein the one or more files include a first file; receiving a first drag operation of a user on a touch screen on a first view corresponding to a first file; determining the coordinate position information of a first point on the first view during the first drag operation; determining that the first point is located in the first list from multiple lists displayed in the directory sidebar based on the coordinate position information of the first point; when the first point is located in the first list, if it is detected that the user's finger leaves the touch screen, updating the display content of the directory sidebar, and updating the path of the first file to the path of the first list; wherein, in the display content of the updated directory sidebar, the first file is displayed under the first list.
[0005] Through the above method, the user only needs to drag the first file into the first list to add the first file to the directory. The operation is more convenient and the efficiency of adding files to the directory is improved.
[0006] In one possible implementation, determining that the first point is located in the first list from multiple lists displayed in the directory sidebar based on the coordinate position information of the first point includes: judging whether the first point is located in the directory sidebar based on the coordinate position information of the first point and a first coordinate range corresponding to the directory sidebar; if the first point is located in the directory sidebar, determining the first list in which the first point is located based on the coordinate position information of the first point and each second coordinate range corresponding to each list in the directory sidebar.
[0007] Through the above method, it is possible to accurately determine whether the first point is located in the sidebar of the directory, and when the first point is in the sidebar of the directory, determine the first list in which the first point is located, thereby avoiding multiple repeated determination processes and improving the efficiency of determining the first list in which the first point is located.
[0008] In a possible implementation, a prompt image is displayed within the second coordinate range corresponding to the first list, and the prompt image is used to prompt that the first file is pre-added into the first list.
[0009] Through the above method, the user is prompted by the prompt image to pre-add the first file into the first list, so that the determined first list is more accurate.
[0010] In one possible implementation, determining the coordinate position information of a first point on a first view during a first drag operation includes: determining whether the first view supports the first drag operation; and if the first view supports the first drag operation, determining the coordinate position information of the first point on the first view during the first drag operation.
[0011] In a possible implementation, determining whether the first view supports the first drag operation includes: determining whether the first view supports the first drag operation based on an editing state of the first file; wherein the editing state of the first file is used to indicate whether the first file is being edited.
[0012] Through the above method, the file being edited is locked, and the file being edited is determined to be unable to be dragged, thereby ensuring that the file being edited is not affected.
[0013] In one possible implementation, determining whether the first view supports the first drag operation includes: determining whether the first view supports the first drag operation based on a drag identifier corresponding to the first file; wherein the drag identifier is set based on a user setting when saving the first file, and the drag identifier is used to indicate whether the first file supports the drag operation.
[0014] Through the above method, whether a file can be dragged is determined based on the user's settings, ensuring that the file that the user wants to lock will not be dragged.
[0015] In a possible implementation, the first point is a point on the transverse central axis in the first view.
[0016] Through the above method, the first list can be determined more accurately.
[0017] In one possible implementation, the first midpoint is the midpoint of the first side of the first view, the first side is parallel to the left and right sides of the directory sidebar, and the first side is the side closest to the left and right sides of the directory sidebar among the multiple sides of the first view.
[0018] Through the above method, it can be more accurately determined whether the first view is located in the directory sidebar.
[0019] In a second aspect, the present application provides an electronic device. The electronic device includes: one or more processors, and one or more memories; the one or more memories are coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to perform the method described in the first aspect or any one of the implementations of the first aspect.
[0020] In a third aspect, the present application provides a computer storage medium, which includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method described in the first aspect or any one of the implementations of the first aspect.
[0021] In a fourth aspect, an embodiment of the present application provides a chip. The chip can be applied to an electronic device, and the chip includes one or more processors, and the processor is used to call computer instructions to enable the electronic device to execute the method described in the first aspect or any implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1A A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0023] Figure 1B A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0024] Figure 2 A flowchart of a file management method provided in an embodiment of the present application;
[0025] Figure 3 A schematic diagram of an interface provided in an embodiment of the present application;
[0026] Figure 4 A schematic diagram of a directory sidebar provided in an embodiment of the present application;
[0027] Figure 5 A schematic diagram of another interface provided in an embodiment of the present application;
[0028] Figure 6 A schematic diagram of a data structure provided in an embodiment of the present application;
[0029] Figure 7 A schematic diagram of another interface provided in an embodiment of the present application;
[0030] Figure 8A schematic diagram of another data structure provided in an embodiment of the present application;
[0031] Fig. 9 A flowchart of another file management method provided in an embodiment of the present application;
[0032] Fig. 10A A schematic diagram of a user setting provided in an embodiment of the present application;
[0033] Fig. 10B A schematic diagram of another user setting provided in an embodiment of the present application;
[0034] Fig.11 A flowchart of a file management method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The terms "first" and "second" and the like in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0036] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0037] In the present application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three and more than three, and "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0038] The hardware structure and software structure of the electronic device involved in the embodiment of the present application are introduced below:
[0039] Figure 1A The hardware structure diagram of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 1A As shown, the electronic device may include a processor, a mobile communication module, a wireless communication module, an external memory interface, an internal memory, a display screen, a sensor, an audio module, a speaker, a receiver, a microphone and an earphone interface.
[0040] The structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In some embodiments of the present application, the electronic device may include more components than shown in the figure. In some embodiments of the present application, the electronic device may include fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. The interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration and does not constitute a limitation on the structure of the electronic device.
[0041] The processor may include one or more processing units, for example, the processor may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors.
[0042] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate 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. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker, a receiver, etc.), or displays an image or video through a display screen. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor and be set in the same device as the mobile communication module or other functional modules.
[0043] The wireless communication function of the electronic device can be realized through antenna 1, antenna 2, a mobile communication module, a wireless communication module, a modulation and demodulation processor, and a baseband processor.
[0044] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0045] The mobile communication module can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to electronic devices. The mobile communication module may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module can receive electromagnetic waves from antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module may be arranged in the processor. In some embodiments, at least some of the functional modules of the mobile communication module may be arranged in the same device as at least some of the modules of the processor.
[0046] The wireless communication module can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module can be one or more devices integrating at least one communication processing module. The wireless communication module receives electromagnetic waves via antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor. The wireless communication module can also receive the signal to be sent from the processor, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through antenna 2.
[0047] In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module, and the antenna 2 is coupled to the wireless communication module, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS).
[0048] The external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor through the external memory interface to implement data storage functions. For example, music, video and other files can be saved in the external memory card.
[0049] The internal memory can be used to store computer executable program codes, which include instructions. The processor executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory. The internal memory may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image or video playback function, etc.). The data storage area can store data created during the use of the electronic device (such as audio data, a phone book, etc.). In addition, the internal memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0050] Electronic devices implement display functions through GPU, display screen, and application processor. GPU is a microprocessor for image processing, connecting the display screen and application processor. GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor may include one or more GPUs, which execute program instructions to generate or change display information.
[0051] The display screen is used to display images, videos, etc. The display screen includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens, where N is a positive integer greater than 1.
[0052] The sensor may include, but is not limited to, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, an ambient light sensor, a fingerprint sensor, or a temperature sensor.
[0053] Electronic devices can implement audio functions such as music playback and recording through audio modules, speakers, receivers, microphones, headphone jacks, and application processors.
[0054] Figure 1BA schematic diagram of the software structure of an electronic device provided in an embodiment of the present application.
[0055] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0056] The application layer can include a series of application packages. Figure 1B As shown, the application layer may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
[0057] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 1B As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0058] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0059] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0060] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0061] The phone manager is used to provide communication functions for electronic devices, such as the management of call status (including answering, hanging up, etc.).
[0062] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0063] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, the user terminal vibrates, the indicator light flashes, etc.
[0064] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0065] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0066] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0067] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0068] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0069] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0070] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0071] A 2D graphics engine is a drawing engine for 2D drawings.
[0072] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0073] The following is a further introduction to the file management method provided in the embodiment of the present application:
[0074] See also Figure 2 , Figure 2 A flowchart of a file management method provided in an embodiment of the present application, wherein:
[0075] 201. The electronic device displays a directory sidebar and a content column in the same interface, wherein the directory sidebar displays multiple lists in the directory, and the content column displays one or more files, wherein the one or more files include a first file.
[0076] Among them, the content column can be a content column corresponding to any list in the directory displayed in the directory sidebar, and the content column displays all files under the any list. The content column can also be the content column displayed by default after opening the application, and the default content column can display all files in the application, or display files that have been recently opened in the application, or files that have been recently edited in the application. The files in the content column can be folders, or portable document format files (Portable Document Format, PDF), or slide presentation files (PowerPoint Presentation, PPT), pictures, etc. The file can also be other types, and the present application does not limit the file type of the files in the content column. The interface can be an interface corresponding to the file system, or it can be an interface corresponding to the note application, and the present application does not limit this.
[0077] For example, Figure 3 As shown, Figure 3 A schematic diagram of an interface provided in an embodiment of the present application, Figure 3 The area marked with 301 is the directory sidebar. Figure 3 The area marked with 302 is the content column. The directory sidebar 301 includes List A to List K. The lists included in the directory sidebar 301 can be in a parallel relationship (such as List C and List D) or in an inclusive relationship (such as List D includes List E and List F). This application does not limit the specific relationship between the lists included in the directory sidebar. Content column 302 is the content column corresponding to List B in the directory sidebar 301. The content column 302 displays five files corresponding to List B (such as technical specifications, reporting plans, etc.).
[0078] Figure 3 In the interface shown, the directory side bar is located on the left side of the interface, and the directory side bar can also be located at other positions of the interface, for example, the directory side bar can also be located on the right side of the interface, etc. This application does not limit this.
[0079] 202. The electronic device receives a first drag operation performed by a user on a touch screen on a first view corresponding to a first file.
[0080] The first drag operation may include only a drag operation, or may include a long press operation and a drag operation, that is, after the user long presses the first view corresponding to the first file on the touch screen, the drag operation on the first view is initiated. It should be noted that the drag operation may also be initiated by other operations, such as single click, double click, etc., and this application does not limit this.
[0081] 203. The electronic device determines coordinate position information of a first point on the first view during the first drag operation.
[0082] The first point is located on the first view, and during the first drag operation, the coordinate position of the first point changes, and the electronic device determines the coordinate position of the first point in real time during the drag operation. That is, during the first drag operation, there is coordinate position information of multiple first points.
[0083] For example, Figure 3 The lower left corner of the interface shown is used as the origin, the horizontal side to the right of the origin is used as the x-axis, and the vertical side above the origin is used as the y-axis. Figure 3 The reporting scheme is the first file, and the point marked with 303 on the first view corresponding to the reporting scheme is the first point 303. When the user starts to perform the first drag operation on the first view, the coordinates of the first point (the initial coordinates of the first point 303) are (22, 38). During the first drag operation, the coordinates of the first point on the first view become (18, 38), (17, 36), etc. The three coordinates (22, 38), (18, 38) and (17, 36) mentioned above are part of the coordinate position information of the first point on the first view during the first drag operation.
[0084] In order to allow the user to determine in real time the first view that is undergoing the first drag operation, the first view that is undergoing the first drag operation may be highlighted. Figure 3 The first view corresponding to the reporting plan is highlighted.
[0085] In a possible embodiment, the electronic device determines the coordinate position information of the first point on the first view during the first drag operation, specifically: the electronic device determines the coordinate position information of the first point on the first view during the first drag operation through a drag framework. The drag framework may be a drag / drop framework provided by the Android system. The drag / drop framework may provide the coordinate position information of the first point during the first drag operation in real time.
[0086] In a possible embodiment, the first point is a point on the transverse central axis in the first view. Figure 3 As shown, Figure 3The line marked with 304 is the horizontal central axis 304 of the first view. The y value corresponding to the horizontal central axis 304 is 38, and the y value corresponding to the first point is also 38. For example, the coordinates of the first point can be (21, 38), (22, 38), (23, 38), etc.
[0087] In a possible embodiment, the first midpoint is the midpoint of the first side of the first view, the first side is parallel to the left and right sides of the directory sidebar, and the first side is the side closest to the left and right sides of the directory sidebar among the multiple sides of the first view.
[0088] For example, if the directory sidebar is on the left side of the interface, the first side is the leftmost side of the first view. Alternatively, if the directory sidebar is on the right side of the interface, the first side is the rightmost side of the first view.
[0089] 204. The electronic device determines, based on the coordinate position information of the first point, from a plurality of lists displayed in a sidebar of the directory that the first point is located in a first list.
[0090] The first list is any one of the multiple lists displayed in the sidebar of the directory.
[0091] In a possible embodiment, the electronic device determines that the first point is located in the first list from multiple lists displayed in the directory sidebar based on the coordinate position information of the first point. Specifically, the electronic device determines whether the first point is located in the directory sidebar based on the coordinate position information of the first point and the first coordinate range corresponding to the directory sidebar; if the first point is located in the directory sidebar, the electronic device determines the first list in which the first point is located based on the coordinate position information of the first point and each second coordinate range corresponding to each list in the directory sidebar.
[0092] The first coordinate range is the coordinate range of the directory sidebar, such as Figure 3 In the interface shown, the first coordinate range of the directory sidebar 301 is (0-20, 0-60), that is, the horizontal coordinate range of the directory sidebar is 0-20, and the vertical coordinate range of the directory sidebar is 0-60.
[0093] In such Figure 3In the interface shown, the vertical coordinate range of the directory sidebar is the vertical coordinate range of the entire interface (that is, the height of the directory sidebar is the same as the height of the entire interface), so it is only necessary to determine whether the horizontal coordinate in the coordinate position information of the first point falls within the horizontal coordinate range (0-20) of the directory sidebar. For example, if the coordinate position information of the first point is (22, 38), then the horizontal coordinate value (22) of the first point does not fall within the horizontal coordinate range (0-20) of the directory sidebar, and the first point is not located in the directory sidebar; if the coordinate position information of the first point is (17, 38), then the horizontal coordinate value (17) of the first point falls within the horizontal coordinate range (0-20) of the directory sidebar, and the first point is located in the directory sidebar.
[0094] The second coordinate range is the coordinate range corresponding to each list in the directory sidebar, such as Figure 3 In the interface shown, the directory sidebar includes List A to List K, and List A to List K correspond to a coordinate range respectively. For example, the second coordinate range corresponding to List A is (0-20, 43-46), the second coordinate range corresponding to List B is (0-20, 40-43), and the second coordinate range corresponding to List C is (0-20, 37-40), and the same is true for the other lists.
[0095] In such Figure 3 In the interface shown, the horizontal coordinate ranges in the second coordinate ranges corresponding to the various lists are the same, so it is only necessary to determine the first list in which the first point is located based on the vertical coordinate in the coordinate position information of the first point.
[0096] For example, the second coordinate range corresponding to list A is (0-20, 43-46), the second coordinate range corresponding to list B is (0-20, 40-43), and the second coordinate range corresponding to list C is (0-20, 37-40). If the coordinate position information of the first point is (17, 44), the ordinate of the coordinate position information of the first point is 44, and the ordinate of the first point falls within the ordinate range (43-46) of list A, list A is determined to be the first list; if the coordinate position information of the first point is (17, 41), the ordinate of the coordinate position information of the first point is 41, and the ordinate of the first point falls within the ordinate range (40-43) of list B, list B is determined to be the first list. If the coordinate position information of the first point is (17, 38), the ordinate of the coordinate position information of the first point is 38, and the ordinate of the first point falls within the ordinate range (37-40) of list C, list C is determined to be the first list.
[0097] The second coordinate ranges corresponding to the lists in the directory sidebar are not fixed. Figure 3 As shown, Figure 3The list D in the directory sidebar 301 shown includes list E and list F. At this time, list D in the interface is in an expanded state, and list G is adjacent to list F and list H. If list D is collapsed, list E and list F are no longer displayed in the interface, and list G is adjacent to list D and list H. The second coordinate range corresponding to list G changes. Similarly, Figure 3 The list C in the directory sidebar 301 is shown in a collapsed state, where list C is adjacent to list B and list D. If list C is expanded, list C is no longer adjacent to list D, and the second coordinate range corresponding to list D changes.
[0098] In a possible embodiment, before the electronic device determines the first list where the first point is located based on the coordinate position information of the first point and the second coordinate ranges corresponding to the lists in the directory sidebar, the electronic device receives a user's click operation on the expand / collapse button on the touch screen; and determines the second coordinate ranges corresponding to the lists in the directory sidebar.
[0099] For example, Figure 4 As shown, Figure 4 The directory sidebar 401 marked with 401 shows four lists: List A, List B, List C and List D. Figure 4 The directory sidebar 402 marked with 402 displays six lists: List A, List B, List C, List D, List E, and List F. Among them, List E and List F belong to List A. After the user clicks the expand / collapse button 403 corresponding to List A, List A is expanded, and the directory sidebar 401 becomes the directory sidebar 402.
[0100] In the directory sidebar 401, the second coordinate range corresponding to list A is (0-20, 43-46), the second coordinate range corresponding to list B is (0-20, 40-43), the second coordinate range corresponding to list C is (0-20, 37-40), and the second coordinate range corresponding to list D is (0-20, 34-37). After the user clicks the expand / collapse button 403, the second coordinate ranges corresponding to the lists in the directory sidebar 402 are determined as follows: the second coordinate range corresponding to list A is (0-20, 43-46), the second coordinate range corresponding to list E is (0-20, 40-43), the second coordinate range corresponding to list F is (0-20, 37-40), the second coordinate range corresponding to list B is (0-20, 34-37), the second coordinate range corresponding to list C is (0-20, 31-34), and the second coordinate range corresponding to list D is (0-20, 28-31).
[0101] The above example is about expanding a collapsed list, and the same is true for collapsing an expanded list, which is not described in detail in this application.
[0102] In a possible embodiment, the electronic device displays a prompt image within the second coordinate range corresponding to the first list, where the prompt image is used to prompt that the first file is pre-added into the first list.
[0103] The prompt image can be as follows: Figure 5 As shown in the image marked with 504. Optionally, the electronic device may also highlight the second coordinate range corresponding to the first list to prompt that the first file is pre-added into the first list.
[0104] 205. When the electronic device detects that the user's finger has left the touch screen when the first point is located in the first list, the electronic device updates the display content of the directory sidebar and updates the path of the first file to the path of the first list; wherein, in the display content of the updated directory sidebar, the first file is displayed under the first list.
[0105] For example, Figure 5 As shown, Figure 5 After the display content of the directory side bar 501 in the directory is updated, the updated directory side bar 502 is obtained. It can be seen that the first file 503 is dragged into the first list ( Figure 5 After the first list D is displayed in the directory sidebar (as shown in the directory sidebar 502), the first file will be displayed in the directory sidebar (as shown in the directory sidebar 502). The data structure corresponding to the directory sidebar 501 is as follows Figure 6 As shown in the data structure on the left side of the figure, the data structure corresponding to the updated directory sidebar 502 is as follows Figure 6 The data structure on the right is shown in the data structure on the left. The path of list D in the data structure on the left is: directory->list D. After the path of the first file is updated to the path of the first list, the path of the first file is: directory->list D->first file.
[0106] In a possible embodiment, the electronic device determines the name, icon, and identifier corresponding to the first file and the identifier corresponding to the first list. Based on the name and identifier corresponding to the first file, the display content of the directory sidebar is updated, and in the display content of the updated directory sidebar, the first file is displayed under the first list, and the name and icon corresponding to the first file are displayed under the first list; based on the identifier corresponding to the first file and the identifier corresponding to the first list, the path of the first file is updated to the path of the first list.
[0107] Optionally, when the electronic device detects that the user's finger stays in the second coordinate range corresponding to the first list for more than a preset time, the display content of the directory sidebar is updated, and the path of the first file is updated to the path of the first list. For example, when it is detected that the user's finger stays in the second coordinate range corresponding to the second list for 3 seconds, which exceeds the preset time of 2 seconds, the display content of the directory sidebar is updated, and the path of the first file is updated to the path of the first list.
[0108] In a possible embodiment, after the first file is dragged into the first list in the directory sidebar, the electronic device receives a second drag operation by the user on the touch screen on the first view corresponding to the first file, and the electronic device determines the coordinate position information of the first point on the first view during the second drag operation; based on the coordinate position information of the first point, the electronic device determines the second list where the first point is located from the multiple lists displayed in the directory sidebar; when the first point is located in the second list, if it is detected that the user's finger leaves the touch screen, the electronic device updates the display content of the directory sidebar and changes the path of the first file from the path of the first list to the path of the second list; wherein, in the display content of the updated directory sidebar, the first file is displayed under the second list; wherein the second list is any one of the multiple lists displayed in the directory sidebar except the first list.
[0109] That is, after dragging the first file into the first list in the directory sidebar, the user drags the first file again to drag the first file into the second list in the directory sidebar. In addition to dragging the first file from the content column to the directory sidebar, the first file can also be dragged from the first list in the directory sidebar to the second list in the directory sidebar.
[0110] Wherein, based on the coordinate position information of the first point, from the multiple lists displayed in the directory sidebar, the second list where the first point is located can be determined, as described in the above step 204, and this application will not repeat it here. The second drag operation is the same as the first drag operation, as described in the above description of the first drag operation, and this application will not repeat it here.
[0111] For example, Figure 7 As shown, the first file (reporting plan) in the directory sidebar 701 is dragged to move the first file from list D to list F, thereby obtaining a directory sidebar 702. The data structure corresponding to the directory sidebar 701 is as follows Figure 8 As shown in the data structure on the left side of the figure, the data structure corresponding to the moved directory side bar 702 is as follows Figure 8The data structure on the right side of the figure is shown in the figure. The original path of the first file is: directory->list D->first file. After the path of the first file is changed from the path of the first list to the path of the second list, the path of the first file is: directory->list D->list F->first file.
[0112] Through the above method, the user only needs to drag the first file into the first list to add the first file to the directory. The operation is more convenient and the efficiency of adding files to the directory is improved.
[0113] See also Fig. 9 , Fig. 9 A flowchart of another file management method provided in an embodiment of the present application, wherein:
[0114] 901. The electronic device displays a directory sidebar and a content column in the same interface, wherein the directory sidebar displays multiple lists in the directory, and the content column displays one or more files, wherein the one or more files include a first file.
[0115] This step can refer to the description in the above step 201, and this application will not elaborate on it here.
[0116] 902. The electronic device receives a first drag operation performed by a user on a touch screen on a first view corresponding to a first file.
[0117] This step can be referred to the description in the above step 202, and this application will not elaborate on it here.
[0118] 903: The electronic device determines whether the first view supports a first drag operation.
[0119] Whether the first view supports the first drag operation may be set by the system or by the user. The following describes the two situations of system setting and user setting respectively.
[0120] Case 1: Whether the first view set by the system supports the first drag operation.
[0121] In a possible embodiment, the system sets the file in the editing state to not support the first drag operation, and sets the file not in the editing state to support the first drag operation, so as to determine whether the first view set by the system supports the first drag operation.
[0122] The electronic device determines whether the first view supports the first drag operation, specifically: the electronic device determines whether the first view supports the first drag operation based on the editing state of the first file; wherein the editing state of the first file is used to indicate whether the first file is being edited.
[0123] That is, if the first file is being edited, the electronic device determines that the first file does not support the first drag operation; conversely, if the first file is not being edited, the electronic device determines that the first file supports the first drag operation. The file being edited is locked and the file being edited is determined to be unable to be dragged, thereby ensuring that the file being edited is not affected.
[0124] In a possible embodiment, the system sets the opened file to not support the first drag operation and sets the unopened file to support the first drag operation, so as to determine whether the first view set by the system supports the first drag operation.
[0125] The electronic device determines whether the first view supports the first drag operation, specifically: the electronic device determines whether the first view supports the first drag operation based on the opening state of the first file; wherein the opening state of the first file is used to indicate whether the first file is opened.
[0126] That is, if the first file is opened, the electronic device determines that the first file does not support the first drag operation; conversely, if the first file is not opened, the electronic device determines that the first file supports the first drag operation.
[0127] In a possible embodiment, the system sets some file types to support the first drag operation and sets another part of the file types to not support the first drag operation, so as to realize whether the first view set by the system supports the first drag operation. The electronic device determines whether the first view supports the first drag operation, specifically: the electronic device determines whether the first view supports the first drag operation based on the file type of the first file.
[0128] For example, the system sets the files of the file types: PDF, folder, PPT to support dragging. If the file type of the first file is PPT, the electronic device determines that the first file supports the first dragging operation; if the file type of the first file is a picture, the electronic device determines that the first file does not support the first dragging operation.
[0129] In a possible embodiment, the system sets files in some directories to support the first drag operation, and sets files in another directory to not support the first drag operation, so as to determine whether the first view set by the system supports the first drag operation. The electronic device determines whether the first view supports the first drag operation, specifically: the electronic device determines whether the first view supports the first drag operation based on the directory where the first file is located.
[0130] For example, the system sets the files in directory A to not support the first drag operation, and sets the files except those in directory B, directory C, and directory D to support the first drag operation. If the first file is in directory A, the first file does not support the first drag operation; if the first file is in directory B, the first file supports the first drag operation.
[0131] There may be other ways to determine whether the first view set by the system supports the first drag operation. The above-mentioned ways are only examples and this application does not impose any limitation on this.
[0132] Case 2: Whether the first view set by the user supports the first drag operation.
[0133] In a possible embodiment, when saving the first file, the user sets whether the first view supports the first drag operation. Fig. 10A As shown, Fig. 10A The interface shown is a save setting interface that pops up when the user saves the first file, and the save setting interface includes a drag option 1001. The user can set the first file to support dragging by checking the drag option 1001; the user can also set the first file to not support dragging by unchecking the drag option 1001.
[0134] Optionally, in addition to setting by checking the box above, the user can also set whether the first file supports dragging by toggling a switch corresponding to the drag option. This application does not impose any restrictions on this.
[0135] When the first view set by the user supports the first drag operation, the electronic device determines whether the first view supports the first drag operation, specifically: the electronic device determines whether the first view supports the first drag operation based on the drag identifier corresponding to the first file; wherein the drag identifier is based on the setting by the user when saving the first file, and the drag identifier is used to indicate whether the first file supports the drag operation.
[0136] For example, the drag flag includes 0 and 1. When the drag flag is 1, the electronic device determines that the first view supports the first drag operation; when the drag flag is 0, the electronic device determines that the first view does not support the first drag operation.
[0137] In a possible embodiment, the user sets whether the first view supports the first drag operation in the properties corresponding to the first file. Fig. 10B As shown, Fig. 10BThe interface shown is a property interface corresponding to the first file, which includes a drag option 1002. The user can set the first file to support dragging by checking the drag option 1002; the user can also set the first file to not support dragging by unchecking the drag option 1002.
[0138] When the first view set by the user supports the first drag operation, the electronic device determines whether the first view supports the first drag operation, specifically: the electronic device determines whether the first view supports the first drag operation based on the drag identifier corresponding to the first file; wherein the drag identifier is based on the setting by the user in the property interface.
[0139] 904. If the first view supports the first drag operation, the electronic device determines coordinate position information of a first point on the first view during the first drag operation.
[0140] This step can be referred to the description in the above step 203, and this application will not elaborate on it here.
[0141] 905. The electronic device determines, based on the coordinate position information of the first point, from a plurality of lists displayed in a sidebar of the directory that the first point is located in a first list.
[0142] This step can be referred to the description in the above step 204, and this application will not elaborate on it here.
[0143] 906. When the electronic device detects that the user's finger has left the touch screen when the first point is located in the first list, the electronic device updates the display content of the directory sidebar and updates the path of the first file to the path of the first list; wherein, in the display content of the updated directory sidebar, the first file is displayed under the first list.
[0144] This step can be referred to the description in the above step 205, and this application will not elaborate on it here.
[0145] See also Fig.11 , Fig.11 A flowchart of another file management method provided in an embodiment of the present application, wherein:
[0146] Applications, directory sidebar layout classes, drag frame directory sidebar adapters, and content column layout classes are all in electronic devices;
[0147] After the user performs the first drag operation on the first view corresponding to the first file on the touch screen, the application sends the first view corresponding to the first file to the content column layout class, and the content column layout class determines whether the first view corresponding to the first file supports dragging. If the first view corresponding to the first file supports dragging, a drag frame is pulled up, and the drag frame can be referred to in the previous description. This application will not be elaborated here.
[0148] The directory sidebar layout class determines that the first point is located in the first list from the multiple lists displayed in the directory sidebar based on the coordinate position information of the first point. Specifically, please refer to the description in the above step 204, which will not be repeated in this application.
[0149] The sidebar sends the name, icon, and logo corresponding to the first file and the logo corresponding to the first list to the directory sidebar adapter, and the directory sidebar adapter updates the path of the first file and updates the display content of the directory sidebar. For details, please refer to the description in the above step 205, which will not be repeated in this application.
[0150] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A file management method, characterized in that: The method comprises: Displaying a directory sidebar and a content column in the same interface, wherein the directory sidebar displays multiple lists in the directory, and the content column displays one or more files, wherein the one or more files include the first file; receiving a first drag operation of a user on a touch screen on a first view corresponding to the first file; Determining coordinate position information of a first point on the first view during the first drag operation; Determining that the first point is located in a first list from among the multiple lists displayed in the sidebar of the directory based on the coordinate position information of the first point; When the first point is located in the first list, if it is detected that the user's finger leaves the touch screen, the display content of the directory sidebar is updated, and the path of the first file is updated to the path of the first list; Among them, in the updated display content of the directory sidebar, the first file is displayed under the first list.
2. The method according to claim 1, characterized in that: The step of determining that the first point is located in a first list from among the multiple lists displayed in the directory sidebar based on the coordinate position information of the first point includes: Based on the coordinate position information of the first point and the first coordinate range corresponding to the directory sidebar, determining whether the first point is located in the directory sidebar; If the first point is located in the directory sidebar, the first list in which the first point is located is determined based on the coordinate position information of the first point and each second coordinate range corresponding to each list in the directory sidebar.
3. The method according to claim 2, characterized in that The method further comprises: A prompt image is displayed within a second coordinate range corresponding to the first list, where the prompt image is used to prompt that the first file is pre-added into the first list.
4. The method according to any one of claims 1 to 3, characterized in that: The determining, during the first drag operation, coordinate position information of a first point on the first view includes: Determining whether the first view supports the first drag operation; If the first view supports the first drag operation, coordinate position information of a first point on the first view during the first drag operation is determined.
5. The method according to claim 4, characterized in that The determining whether the first view supports the first drag operation includes: Based on the editing state of the first file, determining whether the first view supports the first drag operation; The editing status of the first file is used to indicate whether the first file is being edited.
6. The method according to claim 4, characterized in that The determining whether the first view supports the first drag operation includes: Determining, based on the drag identifier corresponding to the first file, whether the first view supports the first drag operation; The drag flag is set by the user when saving the first file, and is used to indicate whether the first file supports a drag operation.
7. The method according to any one of claims 1 to 6, characterized in that: The first point is a point on the transverse central axis in the first view.
8. The method according to claim 7, characterized in that The first midpoint is the midpoint of the first side of the first view, the first side is parallel to the left and right sides of the directory sidebar, and the first side is the side closest to the left and right sides of the directory sidebar among the multiple sides of the first view.
9. An electronic device, comprising one or more memories and one or more processors, characterized in that: The memory is used to store a computer program; the processor is used to call the computer program so that the electronic device executes the method according to any one of claims 1 to 8.
10. A computer storage medium, characterized in that: include: Computer instructions; when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 8.