Handwritten note display method and electronic equipment

By loading the foreground layer containing all the contents of the note page in an electronic device, the white screen and segmented display problems when the handwritten note page is loaded, achieving a smoother display effect.

CN120491878AActive Publication Date: 2025-08-15HONOR DEVICE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411377988.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-08-15
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

When there are many page contents of handwritten notes, the prior art electronic devices are prone to white screens or segmented display problems when loading the note page, which affects the user experience.

Method used

Before loading the note page, display a foreground layer that contains pictures or PDF content of all the contents of the note page, and undoes the foreground layer display after the handwriting and background layers are loaded.

Benefits of technology

Reduce the white screen time, avoid segmented display of note pages, and improve the display fluency and user experience of handwritten notes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120491878A_ABST
    Figure CN120491878A_ABST
Patent Text Reader

Abstract

The invention provides a handwritten note display method and electronic equipment, and relates to the field of terminals. The invention provides a handwritten note display method which is applied to an electronic device, the electronic device responds to the operation of reloading a handwritten note by a user, and before loading of a handwritten layer and a background layer of a note page to be displayed is completed, a foreground layer corresponding to the note page and a picture or PDF content corresponding to the note page loaded by the foreground layer are displayed. The loading speed is higher than that of a handwriting layer or a background layer in the note page, and the foreground layer is displayed on the handwriting layer and completely shields the handwriting layer and the background layer; and after loading of the handwriting layer and the background layer of the note page is completed, display of the foreground layer is cancelled. By adopting the method provided by the embodiment of the invention, when the handwritten note is opened by the electronic equipment, even if the current to-be-displayed note page has more contents, the note page can be quickly displayed, so that the duration of a white screen is shortened or the problem of segmented display of the current note page is avoided, the smoothness of displaying the handwritten note is improved, and the user experience is improved. And the visual experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminals, and in particular to a method and electronic device for displaying handwritten notes. Background Art

[0002] In today's digital world, mobile devices (such as mobile phones) have become indispensable tools, profoundly impacting people's lives and work. Mobile devices often come with note-taking applications, allowing users to record multimedia data (such as text, voice, video, and images). Note-taking applications typically include handwritten notes and text notes. Handwritten notes are created by users using their fingers or a stylus to draw information within the handwriting area, while text notes are recorded using a soft keyboard or voice input.

[0003] However, when the i-th page (i is an integer greater than 0) of the handwritten notes has a lot of note content (for example, the page of notes is filled with text, pictures and other data), the note application responds to the user's operation of opening the i-th page of handwritten notes. In the process of loading the notes on this page, the note application may first display a white screen and display the white screen for a period of time (such as more than 2 seconds) before it can normally display the content of the page note, or the page of notes may be displayed in segments (such as displaying the first paragraph of text first, and then displaying the third line of text after an interval of 1 second), which affects the user experience. Summary of the Invention

[0004] In order to solve the above technical problems, the present application provides a method for displaying handwritten notes, so that when an electronic device opens a handwritten note, even if the content of the note page to be displayed is large, the note page can be displayed quickly, reducing the duration of the white screen or avoiding the problem of segmented display of the current note page, thereby improving the smoothness of displaying handwritten notes and enhancing the user's visual experience.

[0005] In a first aspect, an embodiment of the present application provides a method for displaying handwritten notes, which is applied to an electronic device, comprising: in response to a first operation input by a user, obtaining a note page that needs to be displayed at the first moment in a selected handwritten note as a first page, each note page including a foreground layer, a handwriting layer and a background layer, the foreground layer is displayed above the handwriting layer, and the handwriting layer is displayed above the background layer; wherein the handwriting layer is used to display the first data recorded by the user on the note page, and the background layer is used to display the background image of the note page; obtaining target data for the first page, the target data being a local image containing all the contents of the first page or a PDF content recording all the contents of the first page; filling the foreground layer of the first page with the target data; displaying the foreground layer of the first page at the first moment; and canceling the display of the foreground layer of the first page when it is detected that the handwriting layer of the first page has completed loading the first data and the background layer of the first page has completed loading the background image.

[0006] For example, the electronic device may be a touch-enabled computer, mobile phone, vehicle-mounted device, or tablet computer.

[0007] For example, the handwritten notes can be handwritten notes in a note application or a memo application. The handwritten notes refer to information recorded by the user in a handwriting area using a finger or touch.

[0008] For example, each handwritten note includes at least one note page, each of which includes a foreground layer, a handwriting layer, and a background layer. The foreground layer, handwriting layer, and background layer are all views in the Android system. The handwriting layer is used to record and display user-entered data, and the background layer is used to display a user-selected background image.

[0009] Exemplarily, the note pages displayed at the first moment may include multiple ones, and the electronic device may use the N note pages displayed at the first moment as N first pages, where N is an integer greater than 1, that is, the electronic device may obtain multiple first pages.

[0010] For example, the first operation may be an operation of opening a handwritten note, or an operation of switching between horizontal and vertical screens, an operation of split-screen display, and the like.

[0011] Exemplarily, when the target data is PDF content, the electronic device may convert the PDF content into a picture (hereinafter referred to as a PDF picture) and use the PDF picture to fill the foreground layer.

[0012] In this way, when the user inputs the first operation, the note page that needs to be displayed in the handwritten note selected by the user is obtained, and the target data of the note page is obtained. Since the target data is a picture or PDF content, the time consumed by the foreground layer to load the target data is less than the sum of the time it takes for the handwriting layer to load the first data and the time it takes for the background layer to load the background picture, so that the foreground layer is displayed before the handwriting layer and the background layer; and the foreground layer is located above the handwriting layer, which can block the handwriting layer and background layer that have not been loaded. In this example, the local picture or PDF content loaded by the target data contains all the contents of the note page, so that the effect of the foreground layer loading is the same as the effect of the handwriting layer and the background layer of the note page being loaded and displayed, avoiding the problem of a white screen appearing for a long time or the segmented display of the note page, and improving the smoothness of the handwritten note display. In addition, when the handwriting layer and the background layer are both loaded, the foreground layer is canceled to avoid the problem of the displayed content not being changed or delayed in time after the user enters information.

[0013] According to the first aspect, when a first object lifting event is detected in a handwriting area of an electronic device and no touch event of the first object is detected in the handwriting area within a first preset time period, it is determined that a change in the content of the handwriting layer of the current note page is detected, wherein the first object includes a finger or a stylus; the display content of the current note page is obtained and saved as a local picture corresponding to the current note page, wherein the display content of the current note page includes the first data of the handwriting layer in the current note page and the background picture of the background layer.

[0014] Illustratively, the first object lifting event is an event in which a finger is lifted from the handwriting area or a stylus is lifted from the handwriting area.

[0015] Exemplarily, the first preset duration may be 1 second, 0.5 seconds, 2 seconds, etc.

[0016] Exemplarily, the content of a note page includes the recorded first data and a background image.

[0017] In this way, when the user records information in the handwriting area with a finger or a stylus, the content of the note on that page will change (that is, the first data recorded will change). If the content of the note on that page is obtained and saved as a local picture every time the first data changes, it will increase CPU consumption and increase the power consumption of the electronic device. In this example, the note on that page is saved only when the first object is lifted and no touch event occurs within the first preset time period. By delaying the saving of the local picture of the note on that page, the problem of data inconsistency caused by frequent saving of local pictures can be avoided, and the problem of affecting system performance due to frequent writing of pictures to disk can also be avoided. In this example, each note page only saves one newly generated local picture.

[0018] According to the first aspect, before obtaining the note page that needs to be displayed at the first moment in the selected handwritten note as the first page in response to the first operation input by the user, the method also includes: when it is detected that any page parameter in the current note page has changed, obtaining the display content of the current note page and saving it as a local picture corresponding to the current note page, the display content of the current note page includes the first data of the handwriting layer in the current note page and the background picture of the background layer; wherein the page parameters include the size information of the page, the color of the page and the direction of page display.

[0019] Exemplarily, the size information of the page includes the specification information of the paper of the note page, the color of the page includes the background image, and the direction of page display includes the direction of paper display of the note page (such as horizontal display or vertical display).

[0020] In this way, when the page parameters change, the local image of the note page is saved in time to avoid the content presented in the foreground layer being different from the current note page.

[0021] According to the first aspect, before obtaining the note page that needs to be displayed at the first moment in the selected handwritten note as the first page in response to the first operation input by the user, the method also includes: when it is detected that the user has input a second operation to save the current note page, obtaining the display content of the current note page and saving it as a local picture corresponding to the current note page, the display content of the current note page includes the first data of the handwriting layer in the current note page and the background picture of the background layer.

[0022] In this way, in some scenarios, the user saves the note page within the first preset time period after lifting his finger or stylus. If the note page is not saved at this time, the foreground layer may not be able to use local pictures due to the failure to save the note page in time, affecting the display speed of the foreground layer.

[0023] According to the first aspect, the method also includes: in response to a first operation input by the user, reading a PDF file corresponding to the handwritten note from a database, the PDF file being used to record the content of each note page in the handwritten note; parsing the PDF file; storing the parsed PDF file into a first array; initializing the first array; obtaining target data of the first page, including: detecting whether the initialization of the first array is completed, obtaining a first detection result; detecting whether there is a corresponding local image on the first page, obtaining a second detection result; and determining the target data of the first page based on the first detection result and the second detection result.

[0024] In this way, the electronic device stores a PDF file for each note page in the handwritten note, parses the PDF file, and stores the first array, so that if the foreground layer is subsequently filled with PDF content, the speed is fast. In this example, the data to fill the foreground layer is determined based on whether the first array initialization is completed and whether the note page has a local image. This makes the foreground layer display compatible with handwritten notes before the foreground layer function was added, improving the applicability of the foreground layer display.

[0025] According to the first aspect, the target data of the first page is determined based on the first detection result and the second detection result, including: when it is detected that there is a corresponding local image for the first page, the local image corresponding to the first page is used as the target data; when it is detected that the first array has been initialized and it is detected that there is no corresponding local image for the first page, the PDF content corresponding to the first page is obtained from the first array, and the obtained PDF content is used as the target data.

[0026] In this way, before the handwriting layer and background layer of the first page are loaded, if the current note page has a corresponding local picture, the local picture is used to fill the foreground layer; if the current note page does not have a local picture and the first array is initialized, the PDF content of the current note page is used to fill it. These two ways of filling the foreground layer make the solution of shielding the handwriting layer and background layer through the foreground layer compatible with handwritten notes before the foreground layer function is added, ensuring the shielding effect of the foreground layer.

[0027] According to the first aspect, the method further includes: when it is detected that the first array is not initialized and that no local image corresponds to the first page, canceling display of the foreground layer of the first page or determining that the target data is empty. In this way, if the first array is not loaded and no local image corresponds to it, the foreground layer is not displayed.

[0028] According to the first aspect, before filling the foreground layer of the first page with the target data, the method further includes: setting the size of the foreground layer of the first page to the maximum size supported by the first page. In this way, the size of the local image is consistent with the maximum size supported by the first page, the clarity of the local image can be guaranteed, and a clear distinction between the displayed foreground layer and the first page is avoided, thereby ensuring the occlusion effect of the foreground layer.

[0029] According to a first aspect, an electronic device includes a multi-view sliding switching page adapter, a foreground layer listener and a background layer adapter; the method also includes: in response to a first operation input by a user, the multi-view sliding switching page adapter binds the content of each note page in the handwritten note with the corresponding note page, so that the background layer adapter can load the background image of the handwritten note and the handwriting layer can load the first data corresponding to each note page; in the process of the multi-view sliding switching page adapter binding the content of each note page in the handwritten note with the corresponding note page, the foreground layer listener is called to set the foreground layer of the first page to a visible state; the background layer adapter notifies the foreground layer listener through a first callback function that the background layer adapter has completed loading the background image of the first page; the handwriting layer notifies the foreground layer listener through a second callback function that it has completed loading the first data of the first page; when the foreground layer listener detects that the handwriting layer of the first page has completed loading the first data and the background layer of the first page has completed loading the background image, the display of the foreground layer of the first page is revoked, including: the foreground layer listener sets the foreground layer of the first page to an invisible state.

[0030] In this way, the application to which the handwritten note belongs (such as the note application, memo) binds the content of each note page in the handwritten note to the corresponding note page through the multi-view sliding switch page, so that the handwriting layer can load the corresponding first data and the background layer can load the background image. During the multi-view sliding switch page adapter to perform the binding operation, the foreground layer is set to a visible state so that the foreground layer can be displayed immediately after loading the target data, avoiding the problem of the foreground layer being displayed in a timely manner. The background layer and the handwriting layer can promptly notify the foreground layer listener by calling the callback function, so that the foreground layer can be undisplayed in a timely manner.

[0031] According to the first aspect, the first operation includes any one of the following operations: opening a handwritten note, switching between horizontal and vertical screens, switching from a single-screen display to a multi-screen display, switching from a multi-screen display to a single-screen display, and reducing or enlarging the handwritten note when the electronic device is in a split-screen state.

[0032] In a second aspect, the present application provides an electronic device comprising: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device executes the method for displaying handwritten notes corresponding to the first aspect and any one of the implementations of the first aspect.

[0033] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.

[0034] In a third aspect, the present application provides a computer-readable medium for storing a computer program. When the computer program is run on an electronic device, the electronic device executes the method for displaying handwritten notes corresponding to the above-mentioned first aspect and any one of the implementation methods of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. 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 any creative work.

[0036] Figure 1a is a schematic diagram illustrating an exemplary scenario of creating a handwritten note;

[0037] Figure 1b is a schematic diagram illustrating an exemplary scenario of opening a handwritten note;

[0038] Figure 2 is a hardware structure diagram of an electronic device shown as an example;

[0039] Figure 3 is a software structure diagram of an electronic device shown as an example;

[0040] Figure 4a is a flowchart exemplarily illustrating an electronic device loading a foreground layer;

[0041] Figure 4b is a schematic diagram showing an exemplary foreground layer, a handwriting layer, and a background layer in a note page;

[0042] Figure 5 is a timing diagram exemplarily showing the display and cancellation of the foreground layer;

[0043] Figure 6 is a class diagram showing an exemplary foreground layer display;

[0044] Figure 7 is a complete flow chart showing an example of an electronic device loading a foreground layer;

[0045] Figure 8 is a schematic diagram illustrating an exemplary scenario of opening a handwritten note;

[0046] Figure 9 FIG. 4 is an illustrative diagram showing the effect of the foreground layer display. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0048] The term "and / or" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0049] In the description and claims of the embodiments of this application, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of objects. For example, the terms "first target object" and "second target object" are used to distinguish different objects, rather than to describe a specific order of objects.

[0050] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0051] In the description of the embodiments of this application, unless otherwise specified, "multiple" means two or more. For example, "multiple processing units" means two or more processing units; "multiple systems" means two or more systems.

[0052] Before explaining the embodiments of the present application in detail, the application scenarios of the embodiments of the present application are first described with reference to the accompanying drawings. In this example, a mobile phone is used as an example of an electronic device, and the application for creating handwritten notes can be a note application, a memo application, or an electronic document application. In this example, a note application is used as an example of an application for creating handwritten notes.

[0053] The following combination Figure 1a This section explains the process of creating handwritten notes on a mobile phone.

[0054] See also Figure 1a In (1), for example, the display interface of the mobile phone shows the mobile phone desktop 101, which includes multiple application icons, such as a note application icon, a recorder application icon, etc. In response to the user clicking the note application icon, the mobile phone runs the note application and jumps from the desktop 101 to the main interface 102 of the note application. The main interface 102 of the note application includes a note search box 103, and the name of each note (such as Figure 1a Note 1, Note 2), the note creation control 104, and the number of notes stored by the note application (such as Figure 1a In response to the user clicking on the note creation control 104, the note application displays a pop-up window 105 on the main interface, which displays an icon for a text note and an icon for a handwritten note. The difference between text notes and handwritten notes lies in the different input methods. The input method for text notes is the soft keyboard input method, while the input method for handwritten notes is the handwriting input method. The soft keyboard input method refers to the method in which the user inputs the note content by operating the soft keyboard, and the handwriting method refers to the method in which the user inputs the note content by sliding his finger in the handwriting area.

[0055] like Figure 1aAs shown in (2), the user clicks the handwritten note icon on the pop-up window 105, and the note application jumps to the handwritten note creation interface 107 in response to the user's selection operation. The handwritten note creation interface 107 displays the note cover option 107-1 and the note paper option 107-2. Figure 1a As shown in (3), in response to the user selecting the note cover option 107-1, the note application displays pictures of different styles in the main interface 107 for the user to choose. In this example, the picture styles include basic, business and art styles, and there are multiple pictures in different styles. For example, in this example, pictures 107-11 and 107-12 in the art style are displayed in the main interface 107. Optionally, the user can slide the pictures left and right to display other pictures. The user selected the picture 107-11 in the art style as the cover of the current handwritten note. The paper option 107-2 includes a paper orientation option 107-22 and a paper specification option 107-21. The user can adjust the paper specifications of the handwritten note through the specification option 107-21. In this example, the paper option 107-2 provides multiple paper specifications, such as A4, A5, B5, B6 and other specifications. The user can adjust the paper orientation within the note using the paper orientation option 107-22. This option provides a choice between landscape and portrait orientation. In this example, portrait orientation is used, and the paper size is A4. After selecting the cover option 107-1 and paper options 107-2, the user can click the completion control 107-3 within the handwritten note creation interface 107. In response to the user clicking the completion control 107-3, the note application completes the handwritten note creation and transitions from the current handwritten note creation interface to the handwritten note editing interface 108.

[0056] like Figure 1a As shown in (4) in the figure. The editing interface 108 includes a handwriting area 108-1 and a handwriting toolbar. The handwriting area 108-1 is an editable area of a page in the note. The bottom of the handwriting area 108-1 displays the current page number 108-11. Figure 1a As shown in (5), the page number indicates that the current page is the first page of the note. The user can write text or draw in the handwriting area 108-1, and the handwriting area 108-1 displays the user's completed input content in real time, such as Figure 1aAs shown in (4), the user is writing the second stroke of the character "正". The handwriting toolbar includes multiple tool controls, such as a brush stroke selection control (the leftmost control in (4) of 1a), an erasure control, a text box insertion control, a picture insertion control, a paper addition control 108-2, etc. The user can modify the width of the brush stroke through the brush stroke control. The user can delete any content in the handwriting area through the erasure control. When the user clicks on the paper addition control 108-2, a new piece of paper can be added. The navigation bar of this editing interface 108 includes an undo control, a redo control, and a text editing completion control 108-3. The handwriting area 108-1 displays any content entered by the user in this area. It should be noted that the user can insert a picture in this handwriting area through the picture insertion control in the handwriting toolbar 108-2. The user can drag the picture within this handwriting area to change the placement position of the picture; the user can also change the size of the picture. After the user finishes editing the note, the user can click on the text editing completion control 108-3 in the handwriting note 108, as Figure 1a As shown in (5), in response to the user's operation of clicking on the text editing completion control 108-3, the note application saves this note and exits the text editing state. After the note is saved, the user can close this handwriting note.

[0057] The following will describe the process of opening a note on a mobile phone in conjunction with Figure 1b this.

[0058] Refer to Figure 1b (1). Exemplarily, in response to the user's operation of opening the note application icon on the mobile phone, the display interface of the mobile phone shows the main interface 201 of the note application. The number of notes stored in the note application currently is shown on the main interface 201 of the note application (such as "3 notes" shown in (1) of Figure 1b (1)), a note search box 202, and the name of each note. Generally, the note application saves the page information of each note when it was last closed, so that the note application can display the note page at the time of last closing when opening this note this time. In this example, the note named "Note 3" is a handwriting note. Assume that the information capacity of the note recorded on the first page is 1M, and the first page was shown when it was last closed. The content data of this first page note is large, and the time for loading the note is too long, resulting in the display interface having a white screen for too long, as Figure 1b shown in (2) and (3). After 2 seconds of white screen, the display interface 205 of this note shows the first page note page 206.

[0059] In some embodiments, in response to the display of the note "Note 3", when the note application jumps from the main interface to the first page of notes, due to the fast loading speed of part of the content in the first page of notes, it is displayed first on the first page of notes, resulting in the problem of segmented display of the first page of notes, such as Figure 1b As shown in (4), the first two lines of the content 206-1 of the first note page are displayed first, and after 1 second, the entire content of the first note 206 is fully displayed, as shown in FIG. Figure 1b As shown in (5).

[0060] In this example, when the data content stored in the Nth page of the handwritten note is too large, such as the Nth page is filled with text or the page is filled with pictures (such as 3 pictures with a resolution of 1080*1080), when the note application opens the Nth page of the handwritten note, a white screen will be displayed for a period of time (such as 1.5 seconds, 2 seconds, etc.) and then the content of the Nth page of notes will be fully displayed, or the content of the Nth page of notes will be displayed in segments, which seriously affects user use.

[0061] An embodiment of the present application provides a method for displaying handwritten notes, which is executed by an electronic device. In response to a user's operation of opening a handwritten note, a first application obtains the note page of the handwritten note when it was last closed as the note page to be displayed this time. The first application loads the note page to be displayed this time, and displays the foreground layer of the note page before the note page is loaded. The foreground layer loads the local image or PDF content of the note page, wherein the local image or PDF content includes all the contents in the note page; when the first application finishes loading the note page to be displayed this time, the foreground layer is unavailable.

[0062] In this example, each note page includes a foreground layer, a handwriting layer, and a background layer. The foreground layer is displayed above the handwriting layer, and the handwriting layer is displayed above the background layer. Before the handwriting layer and the background layer are fully displayed, the foreground layer is used to block the incompletely displayed handwriting layer and the background layer. Since the content displayed by the foreground layer is the same as the content presented by the note page, and the time consumed by the foreground layer to load the image or PDF is less than the sum of the time for the handwriting layer to load the content and the time for the background layer to load the background image, the time the white screen appears is reduced and the problem of segmented display of the note page is avoided. The user perceives that the note page is loaded quickly and the delay is short, thereby providing the user with smoother visual feedback and improving the user experience.

[0063] The electronic devices to which the embodiments of the present application are applicable may be, for example, mobile phones, laptop computers, or tablet computers.

[0064] It should be understood that Figure 2The illustrated electronic device 100 is merely one example of an electronic device, and the electronic device 100 may have more or fewer components than shown in the drawings, may combine two or more components, or may have a different configuration of components. Figure 2 The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits. In this example, the electronic device 100 is taken as an example of a mobile phone.

[0065] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a Subscriber Identification Module (SIM) card interface 195. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.

[0066] It is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules that perform the corresponding functions. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.

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

[0068] The layered architecture of electronic device 100 divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other via software interfaces. In some embodiments, the Android system is divided into three layers: the application layer, the application framework layer, and the kernel layer, from top to bottom.

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

[0070] like Figure 3 As shown, the application package may include applications such as notes, camera, calendar, music, short message, gallery, call, map, etc.

[0071] Notes apps can be used to record multimedia data, such as text, video, images, or audio recordings. Notes apps can include both text and handwritten notes. When using text notes, users enter text using the system's soft keyboard. They can also insert images, videos, audio recordings, and other data while recording text. Text notes can also convert audio recordings into text. When using handwritten notes, users enter text by touching the screen within the handwriting area, and images can also be inserted into the handwritten note page.

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

[0073] like Figure 3 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.

[0074] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

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

[0076] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0077] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

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

[0079] The notification manager enables applications to display notification information in the status bar, which can be used to convey informational messages and disappear automatically after a short stay without user interaction.

[0080] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0081] It is understandable that Figure 3 The layers in the illustrated software structure and the components contained in each layer do 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 layers than shown, and each layer may include more or fewer components, which is not limited in the present application.

[0082] In the embodiment of the present application, each note stored in the note application may include at least one note page, for example, Figure 1b In the example shown in (1), there are 3 notes stored in the note application. Assume that Note 1 includes 3 pages of notes, Note 2 includes 5 pages of notes, and Note 3 includes 1 page of notes (e.g. Figure 1b The page 206 shown in (3) is a note page). Each note page displayed on the display screen includes multiple views. In this example, each note page is composed of a foreground layer, a handwriting layer, and a background layer from top to bottom. Figure 4b As shown, the foreground layer is displayed on the handwriting layer, and the handwriting layer is displayed on the background layer. That is, when the foreground layer is visible and the display content has been loaded, the foreground layer can cover the handwriting layer and the background layer.

[0083] In this example, the foreground layer, handwriting layer, and background layer of each page load their own corresponding content. The speed of loading content in any layer is not affected by the loading of content in the other two layers. The foreground layer, handwriting layer, and background layer can perform their own loading tasks at the same time. Figure 4a The process of loading content on the foreground layer is described in detail. The process of loading the foreground layer on the mobile phone includes:

[0084] Step 401: The note application loads the note and displays the foreground layer.

[0085] For example, in response to the user opening any handwritten note, the note application obtains the page that was displayed when the note was last closed as the initial display page when the note is opened this time, or the note application obtains the first page of the note as the initial display page when the note is opened this time. In this example, the note application obtains the page that was displayed when the note was last closed as the initial display page when the note is opened this time.

[0086] The initial display page may include at least one page of notes, for example, Figure 1b In the handwritten note in (1) (i.e., "Note 3"), it is assumed that the handwritten note has a total of 3 note pages. When the note application closed "Note 3" last time, the pages displayed were the lower half of page 1 and the upper half of page 2, as shown in the following example: Figure 9 As shown, the initial display pages obtained by the note application at this time include the first note page and the second note page.

[0087] In this example, each note page consists of a foreground layer, a handwriting layer, and a background layer. After determining the initial display page, the note application can obtain the content of each note page (i.e., the first page) in the initial display page. The handwriting layer of the first page begins loading the corresponding data, and the background layer loads the corresponding background image. While the handwriting layer is loading, the note application can set the foreground layer of the first page to be visible.

[0088] Step 402: The note application determines whether the current note page has a corresponding local image. If the note application detects that the current note page does not have a corresponding local image, step 403 is executed; if the note application detects that the current note page has a corresponding local image, step 404 is executed.

[0089] For example, after adding the foreground layer display function, the note application saves a corresponding local image for each newly created or modified note page, and the local image contains all the contents of the handwriting layer and background layer in the note page.

[0090] In one example, upon detecting a change in the handwriting layer content of a current note page and after a first preset duration has elapsed, the note application retrieves the contents of the handwriting layer and background layer of the current note page to generate a local image of the current note page. The first preset duration can be greater than or equal to 1 second and less than 5 seconds, for example, the first preset duration is 1 second.

[0091] Events in which the content of the handwriting layer changes may include any of the following: the user adds text or pictures, deletes text or pictures, and modifies text or pictures in the handwriting area of the current note page. Optionally, the note application can determine whether the content of the handwriting layer in the current note page has changed by detecting when the user's finger / stylus is lifted. When the note application determines that the user's finger / stylus is lifted, it can start a timer; when it is detected that the timer reaches a first preset time length, the note application determines that the content of the handwriting layer in the current note page has changed and the change has lasted for the first preset time length, and the note application obtains the content of the handwriting layer and background layer of the current note page and saves it as a local image.

[0092] For example, the user writes the character "可" on the handwriting page with a finger. As shown in Figure 1a the note page 108-1 in (5) therein. When the note application detects that the user lifts the finger, the note application determines that the content of the current page note has changed and starts a timer. When the timer reaches 1 second, the note application determines that the content of the current page note has changed and the duration of the change reaches the first preset duration. The note application obtains the picture corresponding to the current note page 108-1 and saves the picture as the local picture corresponding to the note on this page. It can be understood that the note application can use the page (View) screenshot function in Android to generate the picture of this page note.

[0093] Through the mechanism of delayed saving, the electronic device can avoid frequently triggering the saving operation in a short time. Frequent saving not only consumes system resources, but may also cause performance problems such as the user interface freezing and the handwriting not following the finger. And delayed saving can merge multiple saving requests into one, so as to ensure that the user will not feel obvious delay or freezing when performing handwriting operations, thus providing a smoother user experience.

[0094] In one example, when the note application detects that the paper parameters (i.e., page parameters) of the current note page change, it obtains the content of the handwriting layer and the background layer in the current note page to generate the local picture of the current note page. The events of the paper parameter change include any one of the following listed events: the paper specification changes (such as the paper specification changes from A4 to A5), the orientation of the paper changes (such as changes from portrait to landscape, or the orientation of the paper changes from landscape to portrait), and the color of the paper (i.e., the background picture) changes.

[0095] In one example, when the user inputs an operation to save the current note page, it obtains the content of the handwriting layer and the background layer in the current note page to generate the local picture of the current note page. For example, referring to Figure 1a the (5) therein, when the user clicks the text editing completion control 1X08-3, the note application determines that the user has input an operation to save the note on the current page, generates a picture containing the content of the handwriting layer and the background layer in the note page, and uses the generated picture as the local picture of the note page.

[0096] In this example, the electronic device provides three scenarios for generating local pictures. When any one of the above 3 scenarios is detected (i.e., it is detected that the content of the handwriting layer of the current note page has changed and has passed the first preset duration; it is detected that the page parameters of the current note page have changed; it is detected that the user has input an operation to save the current note page), the local picture of the current note page is generated and saved.

[0097] In this example, the electronic device stores the PDF file of each note, that is, the electronic device stores the PDF file of each note before the foreground layer display function is added, and also stores the PDF file of each newly created / modified note after the foreground layer display function is added.

[0098] To improve the display effect of the foreground layer, after setting the foreground layer to visible, the note application can determine whether the current note page (i.e., the initially displayed page) has a corresponding local image. If the note application detects that the current note page does not have a corresponding local image, it fills the foreground layer of the current note page with the PDF content corresponding to the current note page, executing step 403. If the note application detects that the current note page has a corresponding local image, it fills the foreground layer of the note page with the local image, executing step 404.

[0099] Step 403: The note application fills the foreground layer with the PDF content corresponding to the current note page.

[0100] For example, when the note application detects that there is no corresponding local image for the current note page, it obtains the PDF content corresponding to the note page. The note application parses the PDF content corresponding to the note page and converts the parsed PDF content into an image (hereinafter referred to as the first display image). The note application uses the first display image to fill the foreground layer of the current note page.

[0101] Step 404: The note application fills the foreground layer with the local image.

[0102] For example, when the note application detects that the current note page has a corresponding local image, the local image corresponding to the current note page is directly used to fill the foreground layer of the current note page.

[0103] Step 405: The note-taking application determines whether both the background layer and the handwriting layer are fully displayed. If the note-taking application detects that both the background layer and the handwriting layer are fully displayed, step 406 is executed, which cancels the foreground layer. If the note-taking application detects that either the background layer or the handwriting layer is not fully displayed, the note-taking application may wait for a preset period of time before re-executing step 405.

[0104] For example, since the foreground layer is set to a visible state, after the foreground layer of the current note page is filled with local images or PDF content, the display screen can display the content of the foreground layer. After the note application detects that the background layer and the handwriting layer are fully displayed, it can set the foreground layer of the current page to an invisible state, thereby canceling the display of the foreground layer. Optionally, after the background layer is fully displayed, the foreground layer can be notified by callback that the current background layer has been fully displayed. After the handwriting layer is fully displayed, the foreground layer can also be notified by callback that the current handwriting layer has been fully displayed.

[0105] Optionally, upon receiving notification of the background layer or handwriting layer, the note-taking application may detect whether both the background layer and the foreground layer of the current page are fully displayed.

[0106] Step 406: The note application cancels the foreground layer.

[0107] Exemplarily, the note application sets the foreground layer to an invisible state.

[0108] In one example, Figure 4a The foreground layer shown is displayed when Figure 6 The class shown. Figure 6 The classes involved in the foreground layer display include: foreground layer listener (ForeGroundListener), multi-view sliding switching page adapter (PageViewAdapter), sliding page adapter listening interface (PageViewAdapterListener), background layer (BackgroundView), handwriting layer (NoteWritingView) and multi-view sliding switching page (PageView).

[0109] PageViewAdapter is the adapter class of ViewPager, which is used to control the creation, binding and recycling of views. Figure 6 The dotted arrow pointing to ForeGroundListener in the figure indicates that PageViewAdapter calls ForeGroundListener, which sets the foreground layer to be visible. The PageViewAdapter can also refresh the foreground layer through PageViewAdapterListener.

[0110] After the NoteWritingView has finished loading the handwriting layer content, it can notify the ForeGroundListener that the NoteWritingView has finished loading the handwriting layer content (such as Figure 6 After BackgroundView finishes loading the background layer content, it notifies ForeGroundListener that the BackgroundView has finished loading the background layer content (such as Figure 6 solid line pointing to ForeGroundListener).

[0111] PageView is a component that can generate scrolling pages on the screen. Figure 6 As shown, bind PageView to PageViewAdapter and load PageView into NoteWritingView so that the handwriting layer and foreground layer can slide.

[0112] The following combination Figure 5 The logical timing diagram of the foreground layer is used to illustrate the display and disappearance of the foreground layer.

[0113] Step 501: The multi-view sliding switching page adapter receives an operation of opening a handwritten note by the user.

[0114] Exemplarily, the user inputs an operation to open a handwritten note, and the PageViewAdapter in the note application receives a first operation input by the user, where the first operation is an operation to open the handwritten note.

[0115] Step 502: The multi-view sliding switching page adapter is bound to the handwriting layer to display each page of notes.

[0116] Exemplarily, the PageViewAdapter executes a page binding method (ie, onBindViewHolder method) in response to a first operation input by the user, and binds the content corresponding to the handwriting layer to the handwriting layer so that the handwriting layer can load the content corresponding to each page in the note.

[0117] Optionally, during the process of PageViewAdapter executing the onBindViewHolder method, the onBindViewHolder method calls ForeGroundListener to set the foreground layer to a visible state, that is, during the process of PageViewAdapter executing the onBindViewHolder method, ForeGroundListener executes step 503 to set the foreground layer to a visible state.

[0118] Step 503: The foreground layer listener sets the foreground layer to be visible.

[0119] For example, after the foreground layer is loaded and filled with content, the display screen displays the foreground layer, thereby shielding the handwriting layer and the background layer. In other words, the time when the foreground layer starts to be displayed has nothing to do with the loading speed of the background layer or the loading speed of the handwriting layer.

[0120] Step 504: The background layer adapter loads the content of the background layer.

[0121] Exemplarily, StylusNoteAdapter loads the content of the background layer.

[0122] Step 505: The handwriting layer adapter loads the content of the handwriting layer.

[0123] Exemplarily, after PageViewAdapter binds the note content of each page in the note to the corresponding handwriting layer, the handwriting layer of the current page loads the corresponding handwriting content.

[0124] It should be noted that there is no order in which step 504 and step 505 are executed, and it can be understood that StylusNoteAdapter and NoteWritingView are executed synchronously. In addition, there is no order in which step 504 and step 505 are executed in relation to step 503.

[0125] Step 506: After the background layer adapter completes loading the background layer content, the first callback method is executed.

[0126] Exemplarily, the first callback method may be an executeCallBack method. The background layer adapter executes the first callback method after completing loading of the background layer content, so that the foreground layer listener can be notified in a timely manner that the background layer has completed loading.

[0127] Step 507: After the handwriting layer completes loading the content of the handwriting layer, execute the second callback method.

[0128] Exemplarily, the second callback method may be the onPathInfoLoaded method. After the handwriting layer completes loading of its content, the second callback method is executed so that the foreground layer listener can promptly learn that the handwriting layer has completed loading.

[0129] Step 508: After detecting that the content of the background layer and the content of the handwriting layer have been loaded, the foreground layer listener sets the foreground layer to an invisible state.

[0130] For example, after detecting that the background layer and the handwriting layer have finished loading, the foreground layer listener sets the foreground layer to an invisible state to avoid blocking the normal display of the handwriting layer and the background layer.

[0131] from Figure 5 As shown in the logical timing diagram of the display and disappearance of the foreground layer, it can be seen that in the process of binding the handwriting layer with the corresponding content, the foreground layer is set to be visible, which can avoid the problem of the handwriting layer being displayed first; and the display duration of the foreground layer depends on the loading duration of the background layer content and the loading duration of the handwriting layer content.

[0132] Figure 7 This is an example of a complete flow chart for loading the foreground layer. Figure 7 Specifically explain the process of loading the foreground layer:

[0133] Step 701: The note application receives an operation from the user to open a handwritten note.

[0134] For example, in response to a user opening a handwritten note, the note-taking application determines the tag of the currently opened handwritten note. Based on the obtained tag, the note-taking application can use the PDFFragment class to read the full PDF file of the note from the database. The full PDF file stores all the content of the note. The PDFFragment class parses the content of each page in the PDF file and saves the parsed content to the AllPdfListOrder array (i.e., the first array).

[0135] Step 702: The note application loads and initializes the AllPdfListOrder array.

[0136] Exemplarily, the PDFFragment class is also used to create a corresponding foreground adapter (ForeGroundNoteAdapter) object for the note. After the PDFFragment class completes initialization of the AllPdfListOrder array, it sets the AllPdfListOrder array to the ForeGroundNoteAdapter object.

[0137] Step 703: The note application determines whether the initialization of the AllPdfListOrder array is complete. If the note application detects that the initialization of the AllPdfListOrder array is complete, step 704 is executed; if the note application detects that the initialization of the AllPdfListOrder array is not complete, step 708 is executed.

[0138] For example, after the ForeGroundNoteAdapter object is created, the ForeGroundNoteAdapter object can detect whether the AllPdfListOrder array has been initialized. When it is detected that the AllPdfListOrder array has been initialized, the onBindViewHolder method can be called to determine whether the current note page has a corresponding local image, that is, execute step 704. If it is detected that the AllPdfListOrder array has not been initialized, the onBindViewHolder method needs to be called, that is, execute step 707.

[0139] That is to say, regardless of whether the AllPdfListOrder array is initialized, the ForeGroundNoteAdapter object will call the onBindViewHolder method to determine whether there is a corresponding local image on the current note page.

[0140] Step 704: The note application determines whether the current note page has a corresponding local image. When the note application detects that the current note page has a corresponding local image, step 705 is executed; when the note application detects that the current note page does not have a corresponding local image, step 706 is executed.

[0141] Exemplarily, the ForeGroundNoteAdapter object calls the onBindViewHolder method. If it detects that the current note page has a corresponding local image, it executes step 705 to bind the local image corresponding to the current page to the foreground layer. If it detects that the current note page does not have a corresponding local image, it obtains the PDF content corresponding to the current page from the AllPdfListOrder array and converts the PDF content into a corresponding image (hereinafter referred to as a PDF image).

[0142] Step 705: The note application fills the foreground layer with the local image corresponding to the current note page.

[0143] Exemplarily, the foreground layer loads the local image according to the bound local image.

[0144] Step 706: The note application fills the foreground layer with the PDF corresponding to the current note page.

[0145] Exemplarily, ForeGroundNoteAdapter binds the PDF image to the foreground layer, and the foreground layer loads the PDF image according to the bound PDF image.

[0146] Step 707: The note application determines whether the current note page has a corresponding local image. When the note application detects that the current note page has a corresponding local image, step 705 is executed; when the note application detects that the current note page does not have a corresponding local image, step 708 is executed.

[0147] Exemplarily, the ForeGroundNoteAdapter object calls the onBindViewHolder method to detect whether the current page has a corresponding local image. If so, step 705 is executed directly. When it is detected that it does not exist, the PDF content corresponding to the current page cannot be used to fill the foreground layer because the AllPdfListOrder array has not been initialized yet.

[0148] Step 708: The note application determines that the foreground layer is invalid.

[0149] For example, even if the ForeGroundListener sets the foreground layer to be visible, because the ForeGroundNoteAdapter object detects that the AllPdfListOrder array has not been initialized and there is no corresponding local image on the current note page, the foreground layer has no content to be filled and cannot take effect.

[0150] In one example, when the handwriting layer notifies the ForeGroundListener that it has finished loading its content, or when the background layer notifies the ForeGroundListener that it has finished loading its content, the ForeGroundListener calls a second setup method to determine whether both the handwriting layer and the background layer have finished loading. If the ForeGroundListener detects that both the handwriting layer and the background layer have finished loading, it removes the foreground layer from display. If the ForeGroundListener detects that both the handwriting layer and the background layer have finished loading, it retains the foreground layer.

[0151] For example, ForeGroundListener calls the setInVisibility method (i.e., the second setting method), and ForeGroundListener obtains first information indicating whether the content of the background layer has been loaded. For example, backgroundIsFinished = false, indicating that the content of the background layer has not been loaded. When backgroundIsFinished = true, it indicates that the content of the background layer has been loaded. ForeGroundListener can obtain second information indicating whether the content of the handwriting layer has been loaded. When NoteWritingIsFinished = false, it indicates that the content of the handwriting layer has not been loaded. When NoteWritingIsFinished = true, it indicates that the content of the handwriting layer has been loaded. When ForeGroundListener detects backgroundIsFinished = true and NoteWritingIsFinished = true, it executes the operation of setting the foreground layer to an invisible state (i.e., revoking the foreground layer).

[0152] The following combination Figure 8 This section explains how to open a note on a mobile phone.

[0153] See also Figure 8 In (1), for example, in response to the user opening the note application icon in the mobile phone, the display interface of the mobile phone displays the note application main interface 801. The note application main interface 801 displays the number of notes currently stored in the note application (such as Figure 8), the "3 notes" shown in (1) in the text, the note search box 802 and the name of each note.

[0154] In response to the user clicking on "Note 3", the note application obtains the note page (such as page 1) when the note (i.e., the handwritten note named "Note 3") was last closed, and uses the note page as the initial display page when the note is opened this time.

[0155] The PageViewAdapter in the note-taking app executes the page binding method (i.e., the onBindViewHolder method), binding the content corresponding to the handwriting layer to the handwriting layer so that the handwriting layer can load the content corresponding to each page of the note. During the execution of the onBindViewHolder method, the PageViewAdapter calls the ForeGroundListener to set the foreground layer to be visible. The StylusNoteAdapter obtains the background content of the note and loads the content of the background layer. Based on the bound content, the NoteWritingView loads the content of the first page of the note.

[0156] In response to the user clicking on "Note 3," the note application uses the PDFFragment class to read the full PDF file for the note from the database. This full PDF file stores all the content of the note. The PDFFragment class parses the content of each page in the PDF file and saves the parsed content into the AllPdfListOrder array. The PDFFragment class creates a ForeGroundNoteAdapter object for this note (i.e., "Note 3") and sets the AllPdfListOrder array to the ForeGroundNoteAdapter object. After the ForeGroundNoteAdapter object detects that the AllPdfListOrder array has been initialized, it calls the onBindViewHolder method to determine whether there is a corresponding local image for page 1. When the ForeGroundNoteAdapter object detects that the current page has a corresponding local image, it binds the local image corresponding to page 1 to the foreground layer, and the foreground layer loads the bound local image. Since the foreground layer has been set to a visible state by the ForeGroundListener, when the foreground layer finishes loading the local image, the local image is presented on the display screen. Since the foreground layer is loaded with local images, the loading speed is fast, so the time from the note application main interface 801 to the content 806 in the foreground layer is short. Figure 8As shown in (3), the content of the foreground layer is displayed after 100 milliseconds. This allows the user to seamlessly experience the jump from the main interface to the initial interface of the note.

[0157] In another example, the ForeGroundNoteAdapter object detects that the AllPdfListOrder array has not been initialized, and calls the onBindViewHolder method to determine whether there is a corresponding local image for page 1. When the ForeGroundNoteAdapter object detects that there is no corresponding local image for the current page, it reads the PDF content corresponding to page 1 from the AllPdfListOrder array and converts the PDF content of page 1 into an image (hereinafter referred to as a PDF image). The foreground layer loads the PDF image. Since the foreground layer has been set to a visible state by the ForeGroundListener, when the foreground layer has loaded the PDF image, the PDF image is presented on the display. Since the foreground layer loads a PDF image, it takes time for the AllPdfListOrder array to parse the PDF file and convert it into a PDF image (the time consumed is less than the time it takes for the handwriting layer to load the content or the time it takes for the background layer to load the background content). For example Figure 8 As shown in (1), (2) and (4), when the first page of notes has more content, the display screen will first show a white screen. After 0.6 seconds, when the PDF image of the foreground layer is loaded, the image of the foreground layer will be displayed.

[0158] In another example, when a handwritten note is last closed, the pages displayed on the display screen include at least two pages of the note (e.g., Figure 9 ), the note application follows the above Figure 8 As shown, the foreground layer of the first page of notes and the foreground layer of the second page of notes are loaded respectively, and the first page of notes and the second page of notes are displayed on the display interface at the same time. Since the display interface has a size, the display interface is finally presented as follows Figure 9 The effect shown.

[0159] It should be noted that the foreground layer display scenario in the embodiments of the present application is not only applicable to the scenario of opening a handwritten note, but also applies to the scenario of switching the display screen from landscape to portrait mode, or from portrait to landscape mode, or zooming in or out of the current note page in the column view. In other words, when the electronic device detects the landscape to portrait switching operation, the operation of zooming in or out of the current note page in the column view, or the operation of opening a note page, it will trigger the execution of the handwritten note display method in the embodiments of the present application.

[0160] An embodiment of the present application further provides a chip system, which includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected via lines. For example, the interface circuit can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit can be used to send signals to other devices (such as a processor). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instructions are executed by the processor, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.

[0161] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-described method steps to implement the handwritten note display method of the above embodiment. Storage media include various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0162] This embodiment also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the above-mentioned related steps to implement the method for displaying handwritten notes in the above-mentioned embodiment.

[0163] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding handwritten note display method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0164] Any content of each embodiment of this application, as well as any content of the same embodiment, can be freely combined. Any combination of the above content is within the scope of this application.

[0165] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A method for displaying handwritten notes, characterized in that: Used in electronic equipment, including: In response to a first operation input by a user, a note page to be displayed at a first moment in the selected handwritten note is obtained as a first page, each note page including a foreground layer, a handwriting layer, and a background layer, the foreground layer being displayed above the handwriting layer, and the handwriting layer being displayed above the background layer; wherein the handwriting layer is used to display first data recorded by the user on the note page, and the background layer is used to display a background image of the note page; Obtain target data of the first page, where the target data is a local image containing all contents of the first page or a PDF content recording all contents of the first page; Filling the foreground layer of the first page with the target data; Displaying the foreground layer of the first page at a first moment; When it is detected that the handwriting layer of the first page has finished loading the first data and the background layer of the first page has finished loading the background image, the foreground layer of the first page is canceled from being displayed.

2. The method according to claim 1, characterized in that Before obtaining, in response to a first operation input by the user, a note page in the selected handwritten note that needs to be displayed at a first moment as the first page, the method further includes: When a lift event of a first object is detected within a handwriting area of the electronic device and no touch event of the first object within the handwriting area is detected within a first preset time period, determining that a change in the content of the handwriting layer of the current note page is detected, wherein the first object includes a finger or a stylus; The display content of the current note page is obtained and saved as a local image corresponding to the current note page, wherein the display content of the current note page includes the first data of the handwriting layer in the current note page and the background image of the background layer.

3. The method according to claim 1, characterized in that Before obtaining, in response to a first operation input by the user, a note page in the selected handwritten note that needs to be displayed at a first moment as the first page, the method further includes: When a change in any page parameter of the current note page is detected, the display content of the current note page is obtained and saved as a local image corresponding to the current note page, where the display content of the current note page includes the first data of the handwriting layer of the current note page and the background image of the background layer; The page parameters include page size information, page color, and page display direction.

4. The method according to claim 1, wherein Before obtaining, in response to a first operation input by the user, a note page in the selected handwritten note that needs to be displayed at a first moment as the first page, the method further includes: When it is detected that the user has entered the second operation of saving the current note page, the display content of the current note page is obtained and saved as a local picture corresponding to the current note page. The display content of the current note page includes the first data of the handwriting layer in the current note page and the background picture of the background layer.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In response to a first operation input by a user, reading a PDF file corresponding to the handwritten note from a database, the PDF file being used to record the content of each note page in the handwritten note; Parsing the PDF file; Storing the parsed PDF file into a first array; Initializing the first array; The acquiring target data of the first page includes: Detecting whether the first array is initialized and obtaining a first detection result; Detecting whether the first page has a corresponding local image, and obtaining a second detection result; Target data of the first page is determined according to the first detection result and the second detection result.

6. The method according to claim 5, characterized in that The determining the target data of the first page according to the first detection result and the second detection result includes: When detecting that the first page has a corresponding local picture, using the local picture corresponding to the first page as the target data; When it is detected that the first array has been initialized and that no local image corresponding to the first page exists, the PDF content corresponding to the first page is obtained from the first array, and the obtained PDF content is used as the target data.

7. The method according to claim 6, characterized in that The method further comprises: When it is detected that the initialization of the first array is not completed and it is detected that there is no corresponding local picture for the first page, the foreground layer of the first page is canceled or the target data is determined to be empty.

8. The method according to any one of claims 1 to 4, characterized in that Before filling the foreground layer of the first page with the target data, the method further includes: The size of the foreground layer of the first page is set to a maximum size supported by the first page.

9. The method according to any one of claims 1 to 4, characterized in that The electronic device includes a multi-view sliding switch page adapter, a foreground layer listener and a background layer adapter; The method further comprises: In response to a first operation input by the user, the multi-view sliding switching page adapter binds the content of each note page in the handwritten note to the corresponding note page, so that the background layer adapter loads the background image of the handwritten note and the handwriting layer loads the first data corresponding to each note page; In the process of the multi-view sliding switching page adapter binding the content of each note page in the handwritten note with the corresponding note page, calling the foreground layer listener to set the foreground layer of the first page to a visible state; The background layer adapter notifies the foreground layer listener through a first callback function that the background layer adapter has completed loading the background image of the first page; The handwriting layer notifies the foreground layer listener through a second callback function that loading of the first data of the first page has been completed; When the foreground layer listener detects that the handwriting layer of the first page has finished loading the first data and the background layer of the first page has finished loading the background image, canceling display of the foreground layer of the first page includes: The foreground layer listener sets the foreground layer of the first page to an invisible state.

10. The method according to any one of claims 1 to 4, characterized in that The first operation includes any one of the following operations: opening the handwritten note, switching between horizontal and vertical screens, switching from single-screen display to multi-screen display, switching from multi-screen display to single-screen display, and reducing or enlarging the handwritten note when the electronic device is in split-screen state.

11. An electronic device, characterized in that: include: a memory and a processor, the memory being coupled to the processor; The memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the method for displaying handwritten notes according to any one of claims 1 to 10.

12. A computer-readable storage medium comprising a computer program, characterized in that When the computer program is executed on an electronic device, the electronic device is caused to execute the method for displaying handwritten notes according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • New label page opening method and device

    CN104199597A

  • Demonstration text editing method and apparatus

    CN105373524A

  • Display content remarking method, display client and projection screen client

    CN108241480A

  • E-book note processing method, handwriting reading equipment and storage medium

    CN109712218A

  • Camera function control method, electronic equipment and storage medium

    CN117750186A