Note content moving method, electronic device, storage medium and program product

By generating and synchronously refreshing the content of the first view in the note application, the jitter problem during the circle selection target dragging process is solved, and the user operation experience is improved.

CN119645282AActive Publication Date: 2025-03-18HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510169112.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-03-18
Estimated Expiration
2045-02-17

AI Technical Summary

Technical Problem

In the note-taking application, jitter problems are prone to occur when selecting targets in circles and dragging, which affects the user's operating experience.

Method used

By generating a first view containing the contents of the first element and the second element, and refreshing its contents simultaneously during the drag, avoiding jitter caused by refresh time difference of different layer elements.

Benefits of technology

It effectively improves the jitter problem during the dragging process of circle selection targets, and improves the smoothness and experience of user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645282A_ABST
    Figure CN119645282A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a note content moving method, electronic equipment, a storage medium and a program product, relates to the technical field of software, and can improve the jitter problem in the dragging process of a circled target. The note content moving method comprises the steps that at the first moment, a first interface of a first application is displayed, the first interface comprises a first element and a second element, and the first element and the second element correspond to different layers; at a second moment, based on the circle selection operation, a second interface is displayed, the second interface comprises the contour line of the first circle selection area, and the first element and the second element are located in the first circle selection area; at a third moment, a first view is generated based on a first dragging operation corresponding to the first circle selection area, in the dragging process of the first dragging operation, the position of the first view is moved, and the first view comprises the content of the first element and the content of the second element; and at a fourth moment, destroying the first view based on the hand raising operation when the first dragging operation is finished.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software technology, and in particular to a note content moving method, electronic device, storage medium and program product. Background Art

[0002] With the development of smart electronic devices, users can more conveniently record and manage notes through note-taking applications. In note-taking applications, users can use the lasso function to conveniently circle a target, so as to perform operations such as dragging, cutting, and copying on the circled target. However, currently, jitter problems may occur during the dragging process of the circled target. Summary of the invention

[0003] In view of this, embodiments of the present application provide a note content moving method, electronic device, storage medium and program product, which can improve the jitter problem during the dragging process of the circled target.

[0004] In a first aspect, an embodiment of the present application provides a method for moving note content, comprising: at a first moment, displaying a first interface of a first application, the first interface including a lasso button, a first element and a second element, the first element and the second element corresponding to different layers; at a second moment, based on a circle selection operation, displaying a second interface, the second interface including an outline of a first circled area, the outline of the first circled area being a closed line, and the first element and the second element being located within the first circled area; at a third moment, based on a first drag operation corresponding to the first circled area, generating a first view, and during the dragging process of the first drag operation, moving the position of the first view, the first view including the contents of the first element and the second element; at a fourth moment, based on a hand-raising operation at the end of the first drag operation, destroying the first view.

[0005] When the selected area includes the first element and the second element of different layers, the dragging operation generates a first view including the contents of the first element and the second element, and moves the first view during the dragging process. The contents of the first element and the second element are refreshed synchronously, so the user does not feel the jitter of the content on the first view, thereby improving the jitter problem during the dragging process of the selected target.

[0006] In some possible implementations, the note content moving method further includes: at a fifth moment, displaying the third interface of the first application, the third interface including a lasso button, a first element, and a second element; at a sixth moment, based on a circle selection operation, displaying a fourth interface, the fourth interface including an outline of a second circled area, the outline of the second circled area being a closed line, the first element being located within the second circled area, and the second element being located outside the second circled area; at a seventh moment, based on a second drag operation corresponding to the second circled area, moving the position of the first element, and not generating the first view during the dragging process of the second drag operation. In the process of dragging an element of a single layer without a jitter problem, the position of the element is directly moved to improve efficiency.

[0007] In some possible implementations, at the third moment, in response to the first drag operation, a first view is generated based on the contents of the two layers corresponding to the first circled area.

[0008] In some possible implementations, the note content moving method further includes: at a third moment, in response to the first drag operation, hiding the first element and the second element; at a fourth moment, based on a hand-lifting operation at the end of the first drag operation, before destroying the first view, moving the first element and the second element to positions corresponding to the first view and unhiding the first element and the second element. The first element and the second element are hidden during the dragging process to reduce the impact on the movement effect of the first view.

[0009] In some possible implementations, the note content moving method also includes: when a touch event MotionEvent is obtained, determining whether a first condition is met, and based on the determination result that the first condition is met, generating a first view and moving the position of the first view; the determination result that the first condition is met includes that the type of the touch event is a move event, and the element selected by the lasso is not a single layer.

[0010] In some possible implementations, the judgment result that satisfies the first condition further includes: being in a lasso state, being in a lasso selected state, and having no first view.

[0011] In some possible implementations, the note content moving method also includes: when a touch event MotionEvent is obtained, determining whether a second condition is met, and based on the determination result that the second condition is met, executing movement of the position of the first view; the determination result that the second condition is met includes being in a lasso state, and in a lasso selected state, and the type of the touch event is a move Move event, and the element selected by the lasso is not a single layer, and there is a first view.

[0012] In some possible implementations, the note content moving method also includes: when a touch event MotionEvent is obtained, determining whether a third condition is satisfied, and based on the determination result that the third condition is satisfied, moving the element of the single layer selected by the lasso, and in the process of moving the element of the single layer selected by the lasso, not generating the first view; the determination result that the third condition is satisfied includes: the type of the touch event is a move event, and the element selected by the lasso is an element of a single layer.

[0013] In some possible implementations, the judgment result that satisfies the third condition further includes: being in a lasso state and being in a lasso selected state.

[0014] In some possible implementations, the note content moving method also includes: when a touch event MotionEvent is obtained, determining whether a fourth condition is met, and based on the determination result that the fourth condition is met, moving the first element and the second element to positions corresponding to the first view, and destroying the first view; the determination result that the fourth condition is met includes: the type of the touch event is an Up event, and the first view exists.

[0015] In some possible implementations, the judgment result that satisfies the fourth condition further includes: being in a lasso state and in a lasso selected state.

[0016] In some possible implementations, the note content moving method also includes: when a touch event MotionEvent is obtained, determining whether the fifth condition is met, and based on the determination result that the fifth condition is met, generating the contour line of the circled area according to the coordinates of the touch event; the determination result that the fifth condition is met includes: being in a lasso state and not being in a lasso selected state.

[0017] In some possible implementations, the note content moving method also includes: when a touch event MotionEvent is obtained, determining whether the sixth condition is met, and entering a lasso selection state based on the determination result that the sixth condition is met; the determination result that the sixth condition is met includes: being in a lasso state and in a non-lasso selection state, and the type of the touch event is an Up event, and having the outline of a closed circled area.

[0018] In some possible implementations, the note content moving method further includes: when a touch event MotionEvent is obtained, determining whether it is in a non-lasso state, and based on the determination result of being in a non-lasso state, executing non-lasso touch logic, wherein the non-lasso touch logic includes writing logic.

[0019] In some possible implementations, the note content moving method further includes: non-lasso touch logic includes: if the touch event is clicking a lasso button, entering a lasso state.

[0020] In a second aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory, the memory is used to store at least one instruction, when the instruction is loaded and executed by the processor, the electronic device executes the above method.

[0021] On the third aspect, an embodiment of the present application provides a computer-readable storage medium, including a program or an instruction. When the program or the instruction runs on a computer, the above method is executed.

[0022] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes the above method. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0024] Figure 1 This is a structural block diagram of an electronic device in an embodiment of the present application; Figure 2 A software architecture diagram of an electronic device in an embodiment of the present application; Figure 3 This is a schematic diagram of the content hierarchy of a note application page in an embodiment of the present application; Figure 4 This is a schematic diagram of an interface of an electronic device at the first moment t1 in an embodiment of the present application; Figure 5 A flowchart of a method for moving note content in an embodiment of the present application; Figure 6 A timing diagram of a method for moving note content in an embodiment of the present application; Figure 7 This is a schematic diagram of an interface of an electronic device at the second moment t2 in an embodiment of the present application; Figure 8 A flowchart of another method for moving note content in an embodiment of the present application; Fig. 9 This is a schematic diagram of an interface of an electronic device at a third time t3 in an embodiment of the present application; Fig.10 This is a schematic diagram of an interface of an electronic device at time t31 in an embodiment of the present application; Fig.11 This is a schematic diagram of an interface of an electronic device at time t32 in an embodiment of the present application; Fig.12 This is a schematic diagram of an interface of an electronic device at time t33 in an embodiment of the present application; Fig.13 This is a schematic diagram of an interface of an electronic device at a fourth time t4 in an embodiment of the present application; Fig.14 This is a schematic diagram of an interface of an electronic device at a fifth time t5 in an embodiment of the present application; Fig.15 This is a schematic diagram of an interface of an electronic device at a sixth moment t6 in an embodiment of the present application; Fig.16 This is a schematic diagram of an interface of an electronic device at the seventh time t7 in an embodiment of the present application; Fig.17 This is a schematic diagram of the logic flow of an electronic device when a touch event is acquired in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0026] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0027] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0028] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0029] Before describing the embodiments of the present application, the related technologies and their technical problems are described first. In the related technology, in the note application, the page display content includes multiple layers, including a handwriting layer and an insertion layer. The handwriting layer is used to present handwriting elements, including handwritten characters and handwritten graphics. The insertion layer is used to present the user's inserted elements, including text box elements, picture elements and inserted formulas. The elements of different layers are displayed in a superimposed manner. If the lasso function is used to circle the target elements of two layers, and then drag to move the target elements, during the movement of the target elements, there are differences in the refresh order of the elements in different layers. If the refresh time difference of the elements in different layers exceeds the screen refresh time, the user may perceive that the elements in different layers have jitter problems during the movement.

[0030] The embodiment of the present application can improve this jitter problem, and the embodiment of the present application is described below.

[0031] Figure 1 A schematic structural diagram of an electronic device 100 in an embodiment of the present application is shown.

[0032] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a sensor module 180, a button 190, a display screen 194, etc. The sensor module 180 may include a touch sensor 180K, etc.

[0033] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0034] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0035] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0036] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0037] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0038] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0039] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0040] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0041] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0042] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0043] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 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. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.

[0044] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. Taking the electronic device 100 as a tablet computer as an example, the electronic device 100 can not only obtain touch operations performed by the user through fingers, but also obtain touch operations performed by the user through a stylus. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0045] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0046] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0047] Figure 2 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

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

[0049] The application layer can include a series of application packages.

[0050] like Figure 2 As shown, the application package may include camera, gallery, calendar, notes, Bluetooth, music, video, and other applications.

[0051] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0052] like Figure 2As shown, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, and the like.

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

[0054] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, browsing history and bookmarks, etc.

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

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

[0057] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

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

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

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

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

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

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

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

[0065] A 2D graphics engine is a drawing engine for 2D drawings.

[0066] The kernel layer is the layer between hardware and software. The kernel layer can include display drivers, audio drivers, and sensor drivers.

[0067] The following is an illustrative description of the workflow of the software and hardware of the electronic device 100 in conjunction with a note-taking application scenario.

[0068] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into raw input events (including touch coordinates, timestamp of the touch operation, and other information). The raw input events are stored in the kernel layer. The application framework layer obtains the raw input events from the kernel layer and identifies the functional logic corresponding to the input events.

[0069] The note application in the embodiment of the present application may be an application for implementing a handwritten note function, such as Figure 3 and Figure 4 As shown, the interface of the note application includes a toolbar area and a page content area. The page content area of ​​the note application may include a handwriting layer, an insertion layer and a background layer. The handwriting layer is used to present handwriting elements, including handwritten characters and handwritten graphics. The insertion layer is used to present the user's inserted elements, including text box elements, picture elements and inserted formulas. It should be noted that the user's handwritten formulas can be automatically recognized and converted into inserted formulas in the note application. The background layer is used to present page background content, such as background grid lines, background pictures, portable document format (PDF) background content, etc. Elements of different layers are displayed in superposition. For example, the handwriting layer is located in the upper layer of the three layers, the insertion layer is located in the middle, and the background layer is located in the lower layer.

[0070] The present application embodiment provides a method for moving note content. The execution subject of the method may be the above-mentioned electronic device, specifically the above-mentioned note application. The method can realize the movement of content in the note application. Note content moving method: like Figure 4 and Figure 5 As shown, step 101 is executed, and at a first moment t1, a first interface of a first application is displayed, the first interface includes a lasso button, a first element and a second element, and the first element and the second element correspond to different layers.

[0071] For example, the first element is an element in the handwriting layer, including the handwritten words "Zhu Ziqing's prose", and the second element is an element in the insertion layer, including the inserted text box "Zhu Ziqing's prose", the inserted picture and the inserted formula "x+y=z".

[0072] The first application may be a note application, the note application has a lasso function, and the toolbar area of ​​the note application includes a lasso button. Figure 6 As shown, when the user clicks the lasso button, the corresponding touch event MotionEvent will be reported. In response to the touch event MotionEvent corresponding to clicking the lasso button, the note application sets the variable of the lasso state to true, that is, enters the lasso state. When the variable of the lasso state is true, it means that it is in the lasso state. When in the lasso state, the user can perform a circle selection operation in the page content area to circle the content. When the lasso is canceled, the variable of the lasso selected state is set to fasle, and the mark bit of the single layer selection is set to fasle. In the lasso selected state, clicking an area unrelated to the lasso, such as clicking a location outside the circled area, can cancel the lasso.

[0073] like Figure 5 and Figure 7 As shown, the above-mentioned note content moving method also includes: Execute step 102, and at a second time t2, based on the circle selection operation, display a second interface, the second interface including a contour line of the first circled area, the contour line of the first circled area is a closed line, and the first element and the second element are located in the first circled area.

[0074] During the process of circling the page content area, the sensor will continue to report touch events MotionEvent, including press-down events and multiple consecutive move Move events. The note application generates the outline of the circled path in response to the coordinates corresponding to the touch event MotionEvent during the circled process. The outline can be generated in the lasso layer, and the lasso layer can be located above the handwriting layer. The user's hand-raising Up event at the end of the circle selection will also report the corresponding touch event MotionEvent. In response to the hand-raising Up event at the end of the circle selection, the note application determines if the outline of the circled path is closed, that is, it has a closed outline of the circled area, and then sets the variable of the lasso selection state to true, that is, enters the lasso selection state. At this time, it will be determined whether the lasso selection is an element of a single layer, that is, whether there is only one layer of elements in the circled area corresponding to the circle selection operation. If so, the single layer selection flag (isSingleLayerSelecte) is set to true, if not, the flag is set to fasle. Figure 7 In the scene shown, the lasso selects not the elements of a single layer, but the first element and the second element located in different layers. It should be noted that the content in the background layer will not be selected.

[0075] like Figure 5 as well as Figures 8 to 12 As shown, the above-mentioned note content moving method also includes: Execute step 103, at a third time t3, generate a first view m1 based on a first drag operation corresponding to the first circled area, and move the position of the first view m1 during the dragging process of the first drag operation. The first view includes contents of the first element and the second element.

[0076] Specifically, when the lasso is in the selected state, the user can perform a drag operation on the circled area, and the sensor will continue to report touch events MotionEvent, including Down events and multiple consecutive Move events. At the beginning of the drag operation, such as when the first Move event after the Down event is obtained, it is determined whether the lasso selected is an element of a single layer, such as Figure 7In the illustrated second moment t2, the lasso selects not the elements of a single layer, but the first element of the handwriting layer and the second element of the insertion layer. Therefore, when the first drag operation is performed at the third moment t3, the first view m1 will be generated. For example, the first view m1 can be located in the upper layer of the handwriting layer and the insertion layer. The first view m1 is at the same position as the first circled area. The shape and size of the first view m1 can be the circumscribed rectangle of the first circled area. The first view m1 includes the contents of the first element and the second element. The first view m1 can be understood as a mask layer view view. The first view m1 carries the contents of the first element and the second element. In this way, for the user, during the first drag operation, what is actually seen is not the contents of the first element and the second element in the original handwriting layer and the insertion layer, but the contents of the first element and the second element on the newly generated first view m1. During the dragging process, the position of the first view m1 will be moved based on the dragging. For example, if the first drag operation is a drag operation to the right, the first view m1 will be moved from the left to the right. Fig. 9 The third moment t3 to Fig.10 At time t31, the first view m1 moves rightward to the first target position, from Fig.10 From t31 to Fig.11 At time t32, the first view m1 continues to move rightward to the second target position. Fig.11 T32 time to Fig.12At time t33, the first view m1 continues to move rightward to the third target position. During the first drag operation, the position of the first view m1 can be moved according to the touch coordinate position reported by the sensor. For example, the coordinate position of the upper left corner of the first view m1 is used as the reference position of the first view m1. At the third time t3, the coordinates of the first view m1 are (x11, y11), and the user's touch coordinate position is (x21, y21). At time t31, based on the user's drag operation, the touch coordinate position becomes (x22, y22) = (x21 + △x1, y21 + △y1). According to the relative change of the touch coordinate position, the first view m1 can be determined. The coordinates of the first target position at time t31 are (x12, y12) = (x11 + △x1, y11 + △y1); at time t32, the touch coordinate position becomes (x23, y23) = (x22 + △x2, y22 + △y2), and according to the relative change of the touch coordinate position, the coordinates of the second target position of the first view m1 at time t32 can be determined to be (x13, y13) = (x12 + △x2, y12 + △y2); and so on, at time t33, the touch coordinate position becomes (x24, y24) = (x23 + △x3, y23 + △y3), and according to the relative change of the touch coordinate position, the coordinates of the third target position of the first view m1 at time t33 can be determined to be (x14, y14) = (x13 + △x3, y13 + △y3). During the first drag operation, since the user sees the contents of the first element and the second element on the first view m1 on the same layer, the content of the first element and the content of the second element are refreshed synchronously, so the user does not feel the jitter of the content on the first view m1.

[0077] It should be noted that the above only takes the three moving positions in the process of the first drag operation as an example. In fact, the drag process can be implemented based on the frequency of the touch signal collected by the sensor, and the corresponding process is executed each time a reported touch event MotionEvent is received.

[0078] like Figure 5 , Fig.12 and Fig.13 As shown, the above-mentioned note content moving method also includes: Execute step 104 : at a fourth time t4 , based on the hand-lifting operation when the first dragging operation ends, destroy the first view m1 .

[0079] At the fourth moment t4, the user stops dragging, and the touch coordinate position is the same as at moment t33. At this time, the touch event MotionEvent reported by the sensor is an Up event, that is, the first drag operation is ended. Therefore, the first view m1 can be destroyed to avoid the influence of the first view m1 on the normal layer. After the first view m1 is destroyed, the first and second elements of the original handwriting layer and the inserted layer at the drag target position are displayed based on the touch coordinate position at this time.

[0080] In the note content moving method in the embodiment of the present application, when the selected area includes the first element and the second element of different layers, the dragging operation generates a first view including the content of the first element and the second element, and moves the first view during the dragging process. The content of the first element and the content of the second element are refreshed synchronously, so the user will not feel the jitter of the content on the first view, thereby improving the jitter problem during the dragging process of the selected target.

[0081] In some embodiments, Figure 8 As shown, at the third moment t3, in response to the first drag operation, a first view m1 is generated based on the contents of the two layers corresponding to the first circled area.

[0082] Specifically, in response to the first Move event during the first drag operation, the layer where the first element is located draws the content of the first element, and the layer where the second element is located draws the content of the second element, and according to the hierarchical relationship of the layers, the content of the first element and the content of the second element are drawn onto a bitmap bitmap, and then a first view m1 carrying the bitmap is added to the topmost layer corresponding to the first circled area, so that the first layer m1 has the content of the first element and the second element, and the content presented on the first layer m1 is completely consistent with the content originally presented by the first element and the second element in different layers, that is, at the third moment t3, in response to the first drag operation, the first view m1 is generated based on the contents of the two layers corresponding to the first circled area.

[0083] In some embodiments, Figure 8 As shown, the above-mentioned note content movement also includes: at the third moment t3, in response to the first drag operation, hiding the first element and the second element; at the fourth moment t4, based on the hand-lifting operation at the end of the first drag operation, before destroying the first view m1, moving the first element and the second element to the position corresponding to the first view m1 and unhiding the first element and the second element.

[0084] Specifically, after the first view m1 is generated, the first element in the handwriting layer is set to a transparent state, and the brush color information of the element is recorded to hide the first element, and the second element in the insertion layer is set to an invisible state to hide the second element. During the first drag operation, the first element in the handwriting layer and the second element in the insertion layer do not move, but because the first element and the second element are in a hidden state, they are not visible to the user, and the user sees the movement of the content of the first element and the second element on the first view m1. At time t33, after the first view m1 moves to the third target position (x14, y14), the user's touch position (x24, y24) and the first view m1 no longer move. At the fourth time t4, when the first drag operation ends, in response to the user's hand-raising operation, that is, in response to the hand-raising Up event reported by the sensor, the second element in the insertion layer is moved to the target position corresponding to the touch position (x24, y24), and the second element is displayed, and the first element in the handwriting layer is moved to the target position corresponding to the touch position (x24, y24), and the brush color is restored to the color before the transparent state is set, and then the first view m1 is destroyed. In this way, at the fourth time t4, the first element and the second element in different layers after the move can be displayed, and other note content operations can be continued. Since the first view m1 has been destroyed, other note content operations will not be affected by the first view m1. The first view m1 only presents the dynamic effect of the drag target content during the first drag operation to improve the jitter problem of the content in different layers during the dragging process.

[0085] In some embodiments, the above-mentioned note content moving method further includes: like Fig.14 As shown, at the fifth moment t5, the third interface of the first application is displayed, the third interface includes a lasso button, a first element and a second element, and the lasso button has been clicked, that is, it is in a lasso state; like Fig.15 As shown, at the sixth moment t6, based on the circle selection operation, the fourth interface is displayed, the fourth interface includes the outline of the second circled area, the outline of the second circled area is a closed line, the first element is located in the second circled area, and the second element is located outside the second circled area, that is, only the handwritten handwriting "Zhu Ziqing's prose" is circled, and the text box, picture and formula therein are not circled; like Fig.16 As shown, at the seventh moment t7, based on the second drag operation corresponding to the second circled area, the position of the first element is moved, and the first view is not generated during the dragging process of the second drag operation.

[0086] Specifically, see Figure 6 and Figure 8As shown, when the drag operation starts, for example, when the first Move event after the Down event is obtained, it is determined whether the element selected by the lasso is a single layer, for example, Fig.15 At the sixth moment t6 shown, the lasso selects only the first element of the handwriting layer, and the second element of the insertion layer is not selected by the lasso. Therefore, when the second drag operation is performed at the seventh moment t7, it is not necessary to generate the first view, but directly move the first element selected by the lasso. Assume that during the dragging process, when the received touch coordinate position is the fourth position, the first element is moved to the corresponding fourth target position, and then, when the received touch coordinate position is the fifth position, the first element is moved to the corresponding fifth target position, and then, when the received touch coordinate position is the sixth position, the first element is moved to the corresponding sixth target position. When the dragging ends, the movement of the first element is completed. It should be noted that in the process of t5, t6, and t7, only the first element is selected in the second circled selection area as an example for explanation. The embodiment of the present application does not limit which layer of elements is selected in the second circled selection area. It can also be that the second circled selection area selects the second element, and the first element is located outside the second circled selection area.

[0087] In some embodiments, Figure 6 , Figure 8 and Fig.17 As shown, the above-mentioned movement of the note content also includes: when the touch event MotionEvent is obtained, judging whether the first condition is met, and based on the judgment result of meeting the first condition, executing the above-mentioned generation of the first view m1 and moving the position of the first view m1; the judgment result of meeting the first condition includes that the type of the touch event is a moving Move event, and the element selected by the lasso is not a single layer.

[0088] Specifically, in the underlying logic, when the note application obtains the touch event MotionEvent, it indicates that the user is performing a touch operation, which can be a touch operation implemented by a finger or a touch operation based on a stylus. Therefore, each time a touch event MotionEvent is obtained, the corresponding function will be executed according to the logic. For example, if the type of the touch event is a move event, and the elements selected by the lasso include at least two layers, it means that the user is dragging elements in at least two layers. At this time, the first view m1 can be generated and the position of the first view m1 can be moved, so as to reduce the jitter problem that may occur in elements in different layers. The specific process of generating the first view m1 and moving the position of the first view m1 can refer to the relevant content of the third moment t3 mentioned above, which will not be repeated here. For example, in the process of moving the first view m1, the first element and the second element can be hidden.

[0089] In some embodiments, the judgment result that satisfies the first condition further includes: being in the lasso state, being in the lasso selected state, and the first view m1 not existing.

[0090] Specifically, determining whether the first condition is met may include: When the touch event MotionEvent is obtained, step 201 is executed to determine whether it is in the lasso state. If so, it means that the user has clicked the lasso button and the touch operation is executing the related functions of the lasso. Therefore, step 202 is executed next to determine whether it is in the lasso selected state. If so, it means that the user has selected the target through the lasso, and the touch operation is executing the related functions for the selected target. Next, the type of touch event is determined. If the type of touch event is a press Down event, it may be triggered by the user's initial press when dragging the lasso to select the target. At this time, since the target has not really started to be dragged, the function can be not executed. If the type of touch event is a move Move event, it means that the user has started to drag the target. Next, step 203 is executed to determine whether the lasso selected is an element of a single layer. If not, it means that the user is dragging elements in at least two layers. Next, step 204 is executed to determine whether there is a first view. If so, the first condition is met, indicating that the drag operation has just started. Next, the first view is generated and the position of the first view is moved to improve the jitter problem that may be generated by elements in different layers during the dragging process.

[0091] In some embodiments, the above-mentioned movement of the note content also includes: when a touch event MotionEvent is obtained, determining whether the second condition is met, and based on the determination result of meeting the second condition, executing the movement of the position of the first view; the determination result of meeting the second condition includes being in a lasso state, and in a lasso selected state, and the type of the touch event is a move Move event, and the element selected by the lasso is not a single layer, and there is a first view.

[0092] Specifically, determining whether the second condition is satisfied includes the above steps 201, 202, 203 and 204. The difference between satisfying the second condition and satisfying the first condition is that in step 204, if it is determined that the first view exists, it indicates that the dragging operation is continued after the first view is generated. Since the first view has been generated, it is not necessary to generate the first view, and the position of the first view can be moved.

[0093] In some embodiments, the above-mentioned movement of the note content also includes: when the touch event MotionEvent is obtained, determining whether the third condition is met, and based on the judgment result that the third condition is met, moving the elements of the single layer selected by the lasso, and in the process of moving the elements of the single layer selected by the lasso, not generating the first view; the judgment result that meets the third condition includes: the type of the touch event is a move event, and the elements selected by the lasso are of a single layer.

[0094] Specifically, when the lasso selects an element of a single layer, the Move event means that the element of a single layer is being dragged. In this scenario, there is no jitter problem during the dragging process. Therefore, the element of the single layer selected by the lasso can be directly moved without generating the first view.

[0095] In some embodiments, the judgment result that satisfies the third condition further includes: being in a lasso state and being in a lasso selected state.

[0096] Specifically, judging whether the third condition is met includes the above steps 201, 202 and 203. In step 203, if it is judged that the lasso selects an element of a single layer, it means that there is no jitter problem during the dragging process, and the element of the single layer selected by the lasso can be directly moved.

[0097] In some embodiments, the above-mentioned movement of the note content also includes: when a touch event MotionEvent is obtained, determining whether the fourth condition is met, and based on the judgment result of meeting the fourth condition, moving the first element and the second element to the position corresponding to the first view, and destroying the first view; the judgment result of meeting the fourth condition includes: the type of the touch event is an Up event, and the first view exists.

[0098] Specifically, after moving the first view, when the user completes the first drag operation and raises his hand, an Up event will be reported. At this time, if it is determined that the first view exists, it means that during the dragging process, the position of the first view is moved, but the first element and the second element are not moved. Therefore, the first element and the second element are first moved to the position corresponding to the first view, and the hiding of the first element and the second element is canceled, and then the first view is destroyed to achieve the dragging effect of the first element and the second element.

[0099] In some embodiments, the judgment result that satisfies the fourth condition further includes: being in a lasso state and being in a lasso selected state.

[0100] Specifically, judging whether the fourth condition is met may include the above steps 201 and 202. Based on the judgment in step 202 that the state is selected by the lasso, the type of the touch event is judged to be an Up event, indicating that the user has ended the drag operation. At this time, step 205 is executed to judge whether there is a first view. If so, it means that the drag operation is based on elements in at least two layers. Therefore, after the drag operation is completed, the first element and the second element are moved to the position corresponding to the first view, and the first view is destroyed. In step 205, if it is judged that there is no first view, it means that the drag operation is over and no additional processing is required.

[0101] In some embodiments, the above-mentioned movement of the note content also includes: when the touch event MotionEvent is obtained, judging whether the fifth condition is met, and based on the judgment result of meeting the fifth condition, generating the outline of the circled area according to the coordinates of the touch event; the judgment result of meeting the fifth condition includes: being in the lasso state and not in the lasso selected state.

[0102] Specifically, determining whether the fifth condition is met may include steps 201 and 202. If it is determined in step 202 that the lasso selection state is not in place, it means that the user has not completed the selection. At this time, the reported touch event MotionEvent is the user's selection process. Therefore, the outline of the selected area is generated according to the coordinates of the touch event to prompt the user of the selection range.

[0103] In some embodiments, the above-mentioned movement of the note content also includes: when the touch event MotionEvent is obtained, judging whether the sixth condition is met, and entering the lasso selection state based on the judgment result of meeting the sixth condition; the judgment result of meeting the sixth condition includes: being in the lasso state and in the non-lasso selection state, and the type of the touch event is an Up event, and having the outline of a closed circled area.

[0104] Specifically, when the Up event when the user finishes circle selection is obtained, if the user has circled a closed area, it means that the circle selection is completed, that is, the lasso selection state is entered, and the user can then perform corresponding operations based on the target selected by the lasso, including dragging.

[0105] In some embodiments, the above-mentioned note content movement also includes: when the touch event MotionEvent is obtained, determining whether it is in a non-lasso state, and based on the determination result of being in a non-lasso state, executing non-lasso touch logic, and the non-lasso touch logic includes writing logic.

[0106] Specifically, in the above step 201, if it is determined that the state is not lasso state, it means that the current touch operation of the user does not involve the lasso function, so the corresponding non-lasso touch logic can be executed, for example, the user may be writing content.

[0107] In some embodiments, the non-lasso touch logic includes: if the touch event is a click of a lasso button, entering a lasso state.

[0108] Specifically, when in the non-lasso state, if the user wishes to execute the lasso function, the user may click the lasso button to enter the lasso state.

[0109] The embodiment of the present application further provides an electronic device, including: a processor and a memory, the memory is used to store at least one instruction, when the instruction is loaded and executed by the processor, the electronic device executes the method in any of the above embodiments. The electronic device may be the above electronic device 100.

[0110] The electronic devices involved in this application may be smart TVs, mobile phones, tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, drone devices, smart cars, smart speakers, robots, smart glasses, and any other products.

[0111] An embodiment of the present application also provides a computer-readable storage medium, including a program or an instruction. When the program or the instruction runs on a computer, the method of any of the above embodiments is executed.

[0112] An embodiment of the present application also provides a computer program product, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes the method of any of the above embodiments.

[0113] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can 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 the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk), etc.

[0114] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0115] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for moving note content, characterized in that: include: At a first moment, a first interface of a first application is displayed, the first interface including a lasso button, a first element, and a second element, the first element and the second element corresponding to different layers; At a second moment, based on the circle selection operation, a second interface is displayed, the second interface includes a contour line of the first circle selection area, the contour line of the first circle selection area is a closed line, and the first element and the second element are located in the first circle selection area; At a third moment, based on a first drag operation corresponding to the first selected area, a first view is generated, and during the dragging process of the first drag operation, a position of the first view is moved, where the first view includes contents of the first element and the second element; At a fourth moment, based on a hand-lifting operation when the first dragging operation ends, the first view is destroyed.

2. The method according to claim 1, characterized in that Also includes: At a fifth moment, a third interface of the first application is displayed, where the third interface includes the lasso button, the first element, and the second element; At a sixth moment, based on the circle selection operation, a fourth interface is displayed, the fourth interface including an outline of the second circle selection area, the outline of the second circle selection area is a closed line, the first element is located within the second circle selection area, and the second element is located outside the second circle selection area; At a seventh moment, based on a second drag operation corresponding to the second selected area, the position of the first element is moved, and during the dragging process of the second drag operation, the first view is not generated.

3. The method according to claim 1, characterized in that At the third moment, in response to the first drag operation, the first view is generated based on contents of two corresponding layers in the first selected area.

4. The method according to claim 3, characterized in that Also includes: At the third moment, in response to the first drag operation, hiding the first element and the second element; At the fourth moment, based on the hand-lifting operation when the first dragging operation ends, before the first view is destroyed, the first element and the second element are moved to positions corresponding to the first view and the first element and the second element are unhidden.

5. The method according to claim 1, characterized in that Also includes: When the touch event MotionEvent is acquired, determining whether a first condition is satisfied, and based on a determination result that the first condition is satisfied, executing the steps of generating the first view and moving the position of the first view; The judgment result that satisfies the first condition includes that the type of the touch event is a Move event, and the element selected by the lasso is not a single layer.

6. The method according to claim 5, characterized in that The judgment result that satisfies the first condition also includes: being in the lasso state, being in the lasso selected state, and the first view does not exist.

7. The method according to claim 5, characterized in that Also includes: When the touch event MotionEvent is acquired, determining whether a second condition is satisfied, and executing the moving of the position of the first view based on a determination result that the second condition is satisfied; The judgment result that meets the second condition includes being in the lasso state and in the lasso selected state, the type of the touch event is a move event, the lasso selected element is not a single layer element, and the first view exists.

8. The method according to claim 5, characterized in that Also includes: When the touch event MotionEvent is acquired, determining whether a third condition is satisfied, and based on a determination result that the third condition is satisfied, moving the element of the single layer selected by the lasso, and in the process of moving the element of the single layer selected by the lasso, not generating the first view; The judgment result that satisfies the third condition includes: the type of the touch event is a Move event, and the element selected by the lasso is an element of a single layer.

9. The method according to claim 8, characterized in that The judgment result that meets the third condition also includes: being in the lasso state and being in the lasso selected state.

10. The method according to claim 5, characterized in that Also includes: When the touch event MotionEvent is obtained, determining whether a fourth condition is satisfied, and based on a determination result that the fourth condition is satisfied, moving the first element and the second element to positions corresponding to the first view, and destroying the first view; The judgment result that satisfies the fourth condition includes: the type of the touch event is an Up event, and the first view exists.

11. The method according to claim 10, characterized in that The judgment result that meets the fourth condition also includes: being in the lasso state and in the lasso selected state.

12. The method according to claim 5, characterized in that Also includes: When a touch event MotionEvent is acquired, determining whether a fifth condition is satisfied, and based on a determination result that the fifth condition is satisfied, generating a contour line of the circled area according to the coordinates of the touch event; The judgment result satisfying the fifth condition includes: being in the lasso state and not being in the lasso selected state.

13. The method according to claim 12, characterized in that Also includes: When the touch event MotionEvent is obtained, determining whether the sixth condition is satisfied, and entering the lasso selection state based on the determination result that the sixth condition is satisfied; The judgment results satisfying the sixth condition include: being in the lasso state and in the non-lasso selection state, and the type of the touch event is an Up event, and having an outline of a closed circled area.

14. The method according to claim 5, characterized in that Also includes: When a touch event MotionEvent is obtained, it is determined whether the touch screen is in a non-lasso state. Based on the determination result that the touch screen is in a non-lasso state, a non-lasso touch logic is executed, where the non-lasso touch logic includes a writing logic.

15. The method according to claim 14, characterized in that The non-lasso touch logic includes: if the touch event is clicking the lasso button, entering the lasso state.

16. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the electronic device executes the method as claimed in any one of claims 1 to 15.

17. A computer-readable storage medium, characterized in that: The method comprises a program or an instruction, and when the program or the instruction is run on a computer, the method according to any one of claims 1 to 15 is executed.

18. A computer program product, characterized in that The computer program product comprises executable instructions, and when the executable instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Element control method, device and equipment and storage medium

    CN108710460A

  • Information display method, electronic equipment and readable storage medium

    CN118502625A

  • Device, method, and graphical user interface for navigating media content

    US20240045572A1