Page display method and electronic device
By obtaining the page size and screen display range, determining the page type and screen ratio, and automatically adjusting the page display, the inconvenience for users when browsing extremely long pages is solved, consistency and browsability are achieved across different devices, and the user experience is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2026-03-20
AI Technical Summary
Users need to manually adjust the page size when browsing text files containing excessively long pages, resulting in a poor user experience.
By obtaining the page size and screen display range, the page type and screen display ratio are determined, and the page display is automatically adjusted to adapt to the screen display range of different devices, thus achieving consistency and browsability of page content on different devices.
No need for users to manually adjust the page size; the page content automatically adapts to the screen size on different devices, improving user experience and the usability and versatility of the application.
Smart Images

Figure CN120337858B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of terminal technology, and in particular to a page display method and an electronic device. Background Technology
[0002] Text files (e.g., notes, documents, etc.) may include at least one page. When a text file includes both special pages (e.g., an extra-long page) and normal pages, the display effect of the text file can be as follows: Figure 1 As shown.
[0003] Combination Figure 1 As can be seen, special pages are displayed on the canvas in a scaled-down format, while normal pages are displayed at their normal size. When users browse special pages of this text file, they need to manually adjust the display size of the special pages to ensure that the content of the special pages is displayed correctly. This display method causes inconvenience to users and reduces their user experience. Summary of the Invention
[0004] The embodiments of this disclosure provide a page display method and electronic device that can display extremely long pages normally, thereby facilitating users to browse the content of extremely long pages.
[0005] To achieve the above objectives, the embodiments of this disclosure adopt the following technical solutions:
[0006] In a first aspect, embodiments of this disclosure provide a page display method, comprising: first, obtaining a page to be displayed, the page size corresponding to each page in the page to be displayed, and the screen display range of an electronic device; the page to be displayed includes an extra-long page; then, determining the page type corresponding to each page based on the page size corresponding to each page; next, determining the screen display ratio based on the page size corresponding to each page, the page type corresponding to each page, and the screen display range; and finally, displaying the page to be displayed based on the page size corresponding to each page, the page type corresponding to each page, and the screen display ratio.
[0007] Based on the above page display method, this disclosure determines the screen ratio according to the page size, page type, and screen display range of each page, so as to better utilize the screen ratio for compatibility with the screen display ranges of different electronic devices. Then, the page to be displayed is displayed according to the page size, page type, and screen ratio of each page. In this way, the page content not only has good browsability on different electronic devices, but also achieves consistent display across different electronic devices. Therefore, users do not need to manually adjust the page to be displayed (i.e., excessively long pages within the page to be displayed), as the page to be displayed can automatically adapt to the screen display range of the electronic device.
[0008] With reference to the first aspect, in a possible implementation, the method further includes: receiving an editing operation of the user; in response to the editing operation, obtaining a screen display range of the view corresponding to the editing operation; projecting the view corresponding to the editing operation according to the screen display range of the electronic device and the screen display range of the view, to obtain a projected view; performing screen display adaptation on the projected view based on the screen display ratio, to obtain an adapted view, and displaying the adapted view.
[0009] According to the scheme, by projecting the screen display range of the electronic device and the screen display range of the view, it can be ensured that the view can provide appropriate display effect on different electronic devices. Moreover, according to the scheme, no matter on which electronic device the user performs the editing operation, consistent view display effect can be obtained, and the usability and universality of the application are improved.
[0010] With reference to the first aspect, in a possible implementation, the method further includes: receiving a processing operation performed by the user in the adapted view; the view corresponding to the editing operation includes a view corresponding to a text box, and the adapted view includes an adapted view corresponding to the text box; in response to the processing operation, determining a screen display size corresponding to a cursor in the text box and a screen display position coordinate of the cursor; processing the adapted view corresponding to the text box based on the screen display size corresponding to the cursor and the screen display position coordinate of the cursor, to obtain a processed view; performing inverse calculation on the processed view, to obtain a display view, and displaying the display view.
[0011] According to the scheme, the problem of incorrect screen display size of the cursor in the text box (or the comment box) and / or incorrect screen display position of the cursor can be avoided after the user performs the processing operation in the adapted view. According to the scheme, by determining the screen display size corresponding to the cursor and the screen display position coordinate of the cursor, accurate control and positioning of the cursor position and the cursor size can be realized, so that the user can accurately edit and process the text. In addition, the user can feel real-time feedback and view changes when editing and processing the text box, and the user experience is improved.
[0012] With reference to the first aspect, in a possible implementation, the method further includes: determining the page type corresponding to each page based on the page size corresponding to each page, including: if the page size corresponding to the page is less than or equal to a screening size, determining that the page type corresponding to the page is a first page type; if the page size corresponding to the page is greater than the screening size, the page type corresponding to the page is a second page type; wherein the screening size is related to the screen display range. According to the scheme, by determining the page type corresponding to each page, different display methods can be used for different page types, so that the display effect of each page is better.
[0013] With reference to the first aspect, in a possible implementation manner, the display proportion is determined based on the page size corresponding to each page, the page type corresponding to each page, and the display range, including: determining a display page in the at least one first page according to the page size corresponding to the at least one first page in the to-be-displayed page; the page type of the first page is a first page type, and the display page is a page with the largest page size in the at least one first page; and determining the display proportion according to the page size corresponding to the display page and the display range.
[0014] According to the scheme, the page with the largest page size in the first page is taken as the display page, which can not only ensure that all pages in the first page can be normally displayed within the display range, but also ensure that other pages in the first page have good readability and visibility, thereby helping the user to better browse and understand the page content. Moreover, the display proportion is determined according to the page size corresponding to the display page and the display range, which can make the page layout more flexible, thereby adapting to various display environments.
[0015] With reference to the first aspect, in a possible implementation manner, the to-be-displayed page is displayed based on the page size corresponding to each page, the page type corresponding to each page, and the display proportion, including: determining a display size corresponding to the first page based on the page size corresponding to the first page and the display proportion; and displaying the first page according to the display size corresponding to the first page.
[0016] According to the scheme, the display size corresponding to the first page is determined based on the page size corresponding to the first page and the display proportion, which can realize adaptive layout of the page; and the first page is displayed according to the display size corresponding to the first page, which can make the first page maintain consistent page display effect on different devices. In this way, the user can obtain similar visual experience on any electronic device (for example, a computer, a mobile phone, or a tablet computer) when browsing the first page, thereby improving the user's use convenience.
[0017] With reference to the first aspect, in a possible implementation manner, the to-be-displayed page is displayed based on the page size corresponding to each page, the page type corresponding to each page, and the display proportion, including: performing multi-screen division on a second page in the to-be-displayed page based on the page size corresponding to the second page and the display proportion, to obtain a display size corresponding to the second page and a multi-screen division result corresponding to the second page; the page type corresponding to the second page is a second page type; and displaying the second page in a split screen manner according to the display size corresponding to the second page and the multi-screen division result corresponding to the second page.
[0018] Based on this solution, the second page can be displayed across multiple screens using a multi-screen partitioning approach. This not only ensures the second page displays correctly but also improves the user's reading experience. Furthermore, split-screen display of the second page increases user interactivity, making it easier for users to filter and organize information.
[0019] In conjunction with the first aspect, another possible implementation involves determining the screen ratio based on the page size and display area corresponding to the displayed page. This includes determining the screen ratio based on the width and height of the page size corresponding to the displayed page, as well as the width and height of the display area. An example of determining the screen ratio is provided.
[0020] In conjunction with the first aspect, another possible implementation satisfies the following expression for the screen-to-display ratio: R = wi * hj > wj * hi ? wj / wi : hj / hi; where R is the screen-to-display ratio; wj / wi is the screen-to-display ratio. i The width of the page corresponding to the displayed page size; h i The height of the page corresponding to the screen display size; w j h is the width of the display area. j This represents the height of the display area. Another concrete example of determining the screen aspect ratio is provided.
[0021] In conjunction with the first aspect, another possible implementation is that the extra-long page is a global collection page and / or a web page collection page.
[0022] Secondly, embodiments of this disclosure provide a page display device that can be applied to an electronic device to implement the method described in the first aspect. The functions of the page display device can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functions, such as an acquisition module, a determination module, and a display module.
[0023] The acquisition module is configured to acquire the page to be displayed, the page size of each page within the page to be displayed, and the screen display range of the electronic device; the page to be displayed includes extra-long pages. The determination module is configured to determine the page type of each page based on its page size, and to determine the screen ratio based on the page size, page type, and screen display range. The display module is configured to display the page to be displayed based on the page size, page type, and screen ratio of each page.
[0024] With reference to the second aspect, in a possible implementation manner, the page display apparatus further includes a receiving module and a projecting module. The receiving module is configured to receive the editing operation of the user. The obtaining module is further configured to obtain a screen display range of the view corresponding to the editing operation in response to the editing operation. The projecting module is configured to project the view corresponding to the editing operation according to the screen display range of the electronic device and the screen display range of the view, to obtain a projected view. The display module is further configured to perform screen display adaptation on the projected view based on the screen display ratio, to obtain an adapted view, and display the adapted view.
[0025] With reference to the second aspect, in a possible implementation manner, the receiving module is further configured to receive a processing operation performed by the user in the adapted view; the view corresponding to the editing operation includes a view corresponding to a text box, and the adapted view includes a view corresponding to an adapted text box. The determining module is further configured to determine a screen display size corresponding to a cursor in the text box and a screen display position coordinate of the cursor in response to the processing operation, and perform processing on the view corresponding to the adapted text box based on the screen display size corresponding to the cursor and the screen display position coordinate of the cursor, to obtain a processed view. The display module is further configured to perform inverse calculation processing on the processed view, to obtain a display view, and display the display view.
[0026] With reference to the second aspect, in a possible implementation manner, the determining module is further configured to determine that a page type of the page is the first page type if a page size corresponding to the page is less than or equal to a screening size, and determine that the page type of the page is the second page type if the page size corresponding to the page is greater than the screening size; wherein the screening size is related to the screen display range.
[0027] With reference to the second aspect, in a possible implementation manner, the determining module is further configured to determine a screen display page in the at least one first page according to a page size corresponding to the at least one first page in the page to be displayed; the page type of the first page is the first page type, and the screen display page is a page with the largest page size in the at least one first page; and determine the screen display ratio according to the page size corresponding to the screen display page and the screen display range.
[0028] With reference to the second aspect, in a possible implementation manner, the determining module is further configured to determine a screen display size corresponding to the first page based on the page size corresponding to the first page and the screen display ratio. The display module is further configured to display the first page according to the screen display size corresponding to the first page.
[0029] In a possible implementation manner of the second aspect, the determining module is further configured to perform multi-screen division on the second page based on the page size corresponding to the second page in the to-be-displayed page and the screen display ratio, to obtain a screen display size corresponding to the second page and a multi-screen division result corresponding to the second page; and the page type corresponding to the second page is the second page type. The display module is further configured to display the second page in a split screen manner according to the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page.
[0030] In a possible implementation manner of the second aspect, the determining module is further configured to determine the screen display ratio according to the width and the height of the page size corresponding to the screen display page, and the width and the height of the screen display range.
[0031] In a possible implementation manner of the second aspect, the screen display ratio satisfies the following expression: R = w i *h j >w j *h i ?w j / w i :h j / h i ; wherein R is the screen display ratio, w i is the width of the page size corresponding to the screen display page, h i is the height of the page size corresponding to the screen display page, w j is the width of the screen display range, and h j is the height of the screen display range.
[0032] In a possible implementation manner of the second aspect, the super-long page is a global collection page and / or a web page collection page.
[0033] In a third aspect, the present disclosure provides an electronic device, comprising a memory, a display screen and one or more processors; the memory, the display screen and the processors are coupled. Wherein the memory is configured to store computer program codes, the computer program codes comprise computer instructions; when the electronic device is running, the processor is configured to execute one or more computer instructions stored in the memory, so that the electronic device executes the page display method of any one of the above first aspect.
[0034] In a fourth aspect, the present disclosure provides a computer storage medium, comprising computer instructions, when the computer instructions are running on an electronic device, so that the electronic device executes the page display method of any one of the first aspect.
[0035] In a fifth aspect, the present disclosure provides a computer program product, when the computer program product is running on an electronic device, so that the electronic device executes the page display method of any one of the first aspect.
[0036] In a sixth aspect, an apparatus (which can be a chip system) is provided, and the apparatus includes a processor configured to support a first terminal device to implement the functions involved in the first aspect. In a possible design, the apparatus further includes a memory configured to store program instructions and data necessary for the first terminal device. When the apparatus is a chip system, the apparatus can be composed of a chip or include a chip and other discrete devices.
[0037] It should be understood that the advantages of the second aspect to the sixth aspect can be referred to the description of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 A display effect diagram of a text file provided by the related art;
[0039] Figure 2 A hardware structure diagram of an electronic device provided by the embodiment of the present disclosure;
[0040] Figure 3 A software structure diagram of an electronic device provided by the embodiment of the present disclosure;
[0041] Figure 4 One of the flow diagrams of a page display method provided by the embodiment of the present disclosure;
[0042] Figure 5 A display diagram provided by the embodiment of the present disclosure;
[0043] Figure 6 A display effect diagram of a page provided by the embodiment of the present disclosure;
[0044] Figure 7 Another display effect diagram of a page provided by the embodiment of the present disclosure;
[0045] Figure 8 Still another display effect diagram of a page provided by the embodiment of the present disclosure;
[0046] Figure 9 A display effect diagram of a text file provided by the embodiment of the present disclosure;
[0047] Figure 10 A metric unit conversion diagram provided by the embodiment of the present disclosure;
[0048] Figure 11 A display effect diagram of a cursor provided by the embodiment of the present disclosure;
[0049] Figure 12 The second flow diagram of a page display method provided by the embodiment of the present disclosure;
[0050] Figure 13 A structural schematic diagram of a chip system provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0051] The technical solutions in the embodiments of the present disclosure will be described below with reference to the drawings in the embodiments of the present disclosure. In the description of the present disclosure, unless otherwise specified, “ / ” represents an “or” relationship between the objects before and after the “ / ”, for example, A / B can represent A or B; “and / or” in the present disclosure is only a description of the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. In addition, in the description of the present disclosure, unless otherwise specified, “multiple” means two or more than two. “At least one of the following” or the like means any combination of the items, including any combination of single item or multiple items. For example, at least one of a, b, or c can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple. In addition, in order to clearly describe the technical solutions of the embodiments of the present disclosure, in the embodiments of the present disclosure, the same items or similar items with basically the same functions and effects are distinguished by using “first”, “second”, and the like. Those skilled in the art can understand that “first”, “second”, and the like do not limit the quantity and execution order, and “first”, “second”, and the like do not necessarily mean different. At the same time, in the embodiments of the present disclosure, “exemplary” or “for example” means to serve as an example, illustration, or description. Any embodiment or design scheme described as “exemplary” or “for example” in the embodiments of the present disclosure should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, “exemplary” or “for example” is used to present the relevant concept in a specific manner, for understanding.
[0052] In addition, the network architecture and business scenarios described in the embodiments of the present disclosure are used to more clearly illustrate the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art can know that, as the network architecture evolves and new business scenarios appear, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.
[0053] In order to describe each of the following embodiments clearly and concisely, first, a brief introduction of related concepts or technologies is given:
[0054] 1. Canvas refers to an area for drawing graphics and images. The canvas can provide a blank area, and the user can draw pictures, draw images, or draw other graphics on the blank area.
[0055] 2、Canvas content refers to the specific graphics, images or other elements drawn or added on the canvas. The canvas content can be constantly enriched by drawing on the canvas.
[0056] 3、Device Independent Pixels (dp) is a unit of length used to describe the pixel density on the screen. Dp is commonly used in computer graphics and application development. Dp is device independent, and dp can be adjusted according to the screen size and resolution of different electronic devices, so as to ensure that the display effect of the application on different electronic devices remains consistent.
[0057] 4、Pixel (px) is used to represent the size and position of image or graphic elements on the screen. Pixel is the smallest unit of digital image, each pixel has specific color and brightness information. It should be noted that px is a unit based on physical pixels of the screen, which is related to screen density. Because different electronic devices may have different screen densities, the same number of px may display different sizes on different electronic devices.
[0058] 5、Pixels Per Inch (PPI) is used to describe the screen or image resolution. PPI represents the number of pixels per inch. The higher the PPI, the higher the clarity of the screen or image.
[0059] Text files are files that store information in character form. Text files contain content such as text, numbers, symbols, pictures, etc. Common text files include PDF, DOC, DOCX, TXT, etc. Text files can include one or more pages.
[0060] Figure 1 An example is shown to show the display effect of a text file. The text file includes two pages, the first page of the two pages is an ultra-long page, and the second page is a normal page. Figure 1 The ultra-long page and the normal page are displayed simultaneously. Combined with Figure 1 It can be seen that the display width of the ultra-long page is less than the width of the display size corresponding to the electronic device. The normal page is normally displayed according to the display size corresponding to the electronic device. Because the display width of the ultra-long page is less than the width of the display size corresponding to the electronic device, when the user views the display content of the ultra-long page, generally needs to be enlarged to make the ultra-long page clearly displayed. This display method greatly affects the user's reading efficiency and use experience.
[0061] To this end, the present disclosure provides a page display method applied to an electronic device. In this way, the super-long page can be normally displayed on the electronic device, and the user can more conveniently browse the page content of the super-long page.
[0062] For example, the electronic device can be a mobile terminal such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), and the like, or a professional camera and the like, and the specific type of the electronic device is not limited in the embodiments of the present disclosure.
[0063] For example, the electronic device can be a mobile terminal such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), and the like, or a professional camera and the like, and the specific type of the electronic device is not limited in the embodiments of the present disclosure. Figure 2 A structural schematic diagram of the electronic device 200 is shown. The electronic device can include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charge management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headset interface 270D, a sensor module 280, a key 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, and the like.
[0064] The sensor module 280 can include a pressure sensor, a gyroscope sensor, a barometric 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, and a bone conduction sensor, and the like.
[0065] It can be understood that the structure shown in the embodiment does not constitute a specific limitation on the electronic device 200. In other embodiments, the electronic device 200 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0066] The processor 210 can include one or more processing units, for example: the processor 210 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors.
[0067] The controller can be the nerve center and command center of the electronic device 200. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.
[0068] The memory can also be provided in the processor 210, for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory can save instructions or data that have just been used or are frequently used by the processor 210. If the processor 210 needs to use the instructions or data again, it can directly call them from the memory. This avoids repeated access and reduces the waiting time of the processor 210, thus improving the efficiency of the system.
[0069] In some embodiments, the processor 210 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0070] It can be understood that the interface connection relationship between the modules shown in the embodiments is only illustrative and does not constitute a limitation on the structure of the electronic device 200. In other embodiments, the electronic device 200 can also use different interface connection modes or combinations of multiple interface connection modes in the above embodiments.
[0071] The charging management module 240 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. The charging management module 240 can charge the battery 242 and also supply power to the electronic device through the power management module 241.
[0072] The power management module 241 is configured to connect the battery 242 and the charging management module 240 to the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240 to supply power to the processor 210, the internal memory 221, the external memory, the display screen 294, the camera 293, and the wireless communication module 260. In some embodiments, the power management module 241 and the charging management module 240 can be arranged in the same device.
[0073] The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor, and the baseband processor. In some embodiments, the antenna 1 and the mobile communication module 250 of the electronic device 200 are coupled, and the antenna 2 and the wireless communication module 260 are coupled, so that the electronic device 200 can communicate with a network and other devices through a wireless communication technology.
[0074] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.
[0075] The mobile communication module 250 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 200. The mobile communication module 250 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves from the antenna 1 and perform filtering, amplification, etc. on the received electromagnetic waves and transmit the processed electromagnetic waves to the modem processor for demodulation.
[0076] The mobile communication module 250 can also amplify the signal modulated by the modem processor and convert the signal into electromagnetic waves via the antenna 1. In some embodiments, at least part of the functions of the mobile communication module 250 can be implemented in the processor 210. In some embodiments, at least part of the functions of the mobile communication module 250 can be implemented in the same device as at least part of the functions of the processor 210.
[0077] The wireless communication module 260 can provide wireless communication solutions including WLAN (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 200.
[0078] The wireless communication module 260 can be one or more devices that integrate at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 210. The wireless communication module 260 can also receive a signal to be transmitted from the processor 210, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves via the antenna 2.
[0079] The electronic device 200 can implement a display function through a GPU, a display screen 294, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 can include one or more GPUs that execute program instructions to generate or change display information.
[0080] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a display panel.
[0081] The electronic device 200 can implement a photographing function through an ISP, a camera 293, a video codec, a GPU, a display screen 294, and an application processor, etc. The ISP is used to process data fed back by the camera 293. The camera 293 is used to capture still images or videos. In some embodiments, the electronic device 200 can include one or N cameras 293, N being a positive integer greater than 1.
[0082] The external memory interface 220 can be configured to connect with an external memory card, such as a Micro SD card, to expand the memory capacity of the electronic device 200. The external memory card can communicate with the processor 210 via the external memory interface 220 to perform data storage functions. For example, the external memory card can store files, such as music, videos, and the like.
[0083] The internal memory 221 can be configured to store computer-executable program codes, which include instructions. The processor 210 can perform various functions of the electronic device 200 and data processing by executing the instructions stored in the internal memory 221. For example, in an embodiment of the present disclosure, the processor 210 can perform various functions of the electronic device 200 by executing the instructions stored in the internal memory 221. The internal memory 221 can include a program storage area and a data storage area.
[0084] The program storage area can store an operating system, at least one application program (such as a sound play function, an image play function, and the like) required by a function, and the like. The data storage area can store data (such as audio data, a phone book, and the like) created during the use of the electronic device 200, and the like. In addition, the internal memory 221 can include a high-speed random access memory, and can further include a non-volatile memory, such as at least one of a magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
[0085] The electronic device 200 can perform an audio function via an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, an application processor, and the like. For example, the electronic device 200 can play music, record audio, and the like.
[0086] The keys 290 can include a power key, a volume key, and the like. The keys 290 can be mechanical keys. Alternatively, the keys 290 can be touch keys. The motor 291 can generate a vibration prompt. The motor 291 can be used for incoming call vibration prompt, and can also be used for touch vibration feedback. The indicator 292 can be an indicator light, and can be used to indicate a charging state, a power change, and can also be used to indicate a message, a missed call, a notification, and the like. The SIM card interface 295 can be configured to connect with a SIM card. The SIM card can be connected to or disconnected from the electronic device 200 by being inserted into or pulled out of the SIM card interface 295. The electronic device 200 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 295 can support a Nano SIM card, a Micro SIM card, a SIM card, and the like.
[0087] In addition, on the above components, an operating system such as a HongMeng operating system, an iOS operating system, an Android operating system, a Windows operating system, and the like runs. An application program can be installed and run on the operating system. In some embodiments, the operating system running in the electronic device can be multiple.
[0088] It should be understood that Figure 2 The hardware modules included in the electronic device shown are only exemplary descriptions and do not limit the specific structure of the electronic device. In fact, the electronic device provided by the embodiments of the present disclosure can also include other hardware modules that have an interaction relationship with the hardware modules shown in the figure, which are not specifically limited here. For example, the electronic device can also include a flash, a micro projection device, and the like. For another example, if the electronic device is a PC, the electronic device can also include a keyboard, a mouse, and the like.
[0089] The software system of the electronic device described above can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present disclosure exemplarily illustrate the software structure of the electronic device by taking a layered architecture as an example. The software structure of the electronic device is exemplarily illustrated by taking a system as an example.
[0090] Figure 3 The software structure diagram of the electronic device of the embodiments of the present disclosure is shown in FIG. 2. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the system is divided into four layers, and from top to bottom, they are an application layer, an application framework layer, an Android runtime and system library, and a kernel layer.
[0091] The application layer can include a series of application packages. Exemplarily, the application packages can include camera, gallery, calendar, telephone, map, navigation, WLAN, Bluetooth, music, video, note, and the like.
[0092] The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. The application framework layer includes some pre-defined functions.
[0093] The application framework layer can include an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, and the like, and the embodiments of the present disclosure do not make any limitation thereto.
[0094] Activity Manager: used to manage the life cycle of each application. Applications usually run in the form of Activity in the operating system. For each Activity, there is an ActivityRecord corresponding to the application record in the Activity Manager, which records the state of the Activity of the application. The Activity Manager can use this ActivityRecord as an identifier to schedule the Activity process of the application.
[0095] Window Manager Service: used to manage the graphical user interface (GUI) resources used on the screen, which can be used to obtain the screen size, create and destroy windows, display and hide windows, layout windows, manage focus, and manage input methods and wallpapers.
[0096] The content provider is used to store and obtain data, and make the data accessible to application programs. The data can include videos, images, audio, dialed and received calls, browsing history and bookmarks, phonebook, etc. The resource manager provides various resources for application programs, such as localized strings, icons, pictures, layout files, video files, etc.
[0097] The application framework layer can also include a text box module, an editing module, a picture module, a handwriting engine module, and a screen display control module.
[0098] When the element corresponding to the editing operation is a text box (or a comment box), the editing module is used to generate a view corresponding to the adapted text box (or comment box). When the element corresponding to the editing operation is a picture, the picture module is used to generate a view corresponding to the adapted picture. When the element corresponding to the editing operation is a handwritten note, the handwriting engine module is used to generate a view corresponding to the adapted handwritten note. The text box module is also used to generate a screen display size corresponding to the cursor, and receive screen display position coordinates of the cursor, and display the cursor according to the screen display size corresponding to the cursor and the received screen display position coordinates of the cursor. The editing module is also used to determine the screen display position coordinates of the cursor, and send the screen display position coordinates of the cursor to the text box module. The screen display control module is used to obtain a screen display range and a screen display scale of the electronic device, project a view corresponding to the editing operation based on the screen display range of the electronic device and the screen display range of the view corresponding to the editing operation, to obtain a projected view; perform screen display adaptation on the projected view based on the screen display scale, to obtain an adapted view, and send the adapted view to a canvas; and receive a processed view, perform inverse calculation processing on the processed view, to obtain an inverse calculated view, and obtain a display view based on the inverse calculated view, and send the display view to a display screen.
[0099] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core library includes two parts: one part is a function function that the java language needs to call, and the other part is the core library of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java file of the application layer and the application framework layer into a binary file. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection and the like.
[0100] The system library can include a plurality of function modules. For example: a surface manager, media libraries, a three-dimensional graphics processing library (for example: OpenGL ES), a two-dimensional image engine (for example: SGL) and the like.
[0101] The surface manager is used for managing the display subsystem, and provides a plurality of applications with the fusion of 2D and 3D layers. The media library supports a plurality of commonly used audio, video format playback and recording, and static image files and the like. The media library can support a plurality of audio and video coding formats, for example: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG and the like. OpenGL ES is used to realize three-dimensional graphics drawing, image rendering, synthesis and layer processing and the like. SGL is a drawing engine for 2D drawing.
[0102] The kernel layer is a layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, a sensor driver and the like, and the embodiments of the present disclosure do not make any limitation thereto.
[0103] The methods in the following embodiments can be implemented in the electronic device with the hardware structure or the software structure described above.
[0104] A page display method provided by the embodiments of the present disclosure is described in detail below with reference to the accompanying drawings. The method can be applied to the electronic device described above. As shown in the figure, the method specifically includes: Figure 4
[0105] Step 401, the electronic device acquires a to-be-displayed page and a page size corresponding to each page in the to-be-displayed page.
[0106] The electronic device can include a note application program, when a user needs to operate a note through the note application program on the electronic device, the user can open the note application program on the electronic device, that is, the electronic device can receive an opening operation of the note application program by the user, such as receiving a click operation of an icon corresponding to the note application program by the user. Wherein, operating the note can include creating a note, or editing a note.
[0107] After the electronic device receives the opening operation of the note application program by the user, in response, the electronic device can display an interface corresponding to the note application program. The interface corresponding to the note application program can include an identification corresponding to at least one created note, such as an icon corresponding to a created note, a name corresponding to a created note, and a creation time corresponding to a created note, etc. When the user needs to operate some notes, the user can trigger a delete control, an editing operation or an adjustment control in the note application program to delete, edit or adjust the created notes in the note application program.
[0108] In some examples, the interface corresponding to the note application program can also include a new note control, which can be used to trigger the display of an interface corresponding to a newly created note to create a new note. When the user needs to create a new note, the user can trigger the new note control in the interface corresponding to the note application program. That is, the electronic device can receive a triggering operation of the new note control by the user, such as a click operation, etc.
[0109] After the electronic device receives the click operation of the new note control by the user, in response, the electronic device can display a new note. The page size corresponding to the new note can be a preset size. If the user adjusts the page size corresponding to the new note, the page size corresponding to the new note is the adjusted page size. If the user adjusts the number of pages corresponding to the new note, the number of pages corresponding to the new note is the adjusted number of pages.
[0110] In some examples, the interface corresponding to the note application program can also include an import control, which can be used to trigger the display of an interface corresponding to a newly imported note. When the user needs to import a note, the user can trigger the import control in the interface corresponding to the note application program. That is, the electronic device can receive a triggering operation of the import control by the user, such as a click operation, etc.
[0111] After the electronic device receives the click operation of the import control by the user, in response, the electronic device can display an imported note. The page size corresponding to the imported note is related to the file size of the imported file. If the user performs an operation on the imported note, for example, the user adds a page or deletes a page in the imported note, the number of pages corresponding to the imported note is the adjusted number of pages.
[0112] For example, in response to the electronic device receiving a user's triggering operation on the "handwritten note" in the creating note control 02, as shown in (b) of FIG. 1C, the electronic device can display a new handwritten note corresponding interface 03 in the note application corresponding interface 01. The new handwritten note corresponding interface 03 includes a specification control 04. The specification control 04 is used to trigger the electronic device to display a selected specification corresponding page size, so that the user can create a handwritten note on different page specifications. In response to the electronic device receiving a user's triggering operation on the "A4" in the specification control 04, as shown in (c) of FIG. 1C, the electronic device displays an unnamed note corresponding interface 05. The unnamed note corresponding interface 05 includes a setting control 06. The setting control 06 is used to trigger the electronic device to display a page setting corresponding interface, a page turning setting corresponding page, an open / close one-stroke shaping function and an open / close only allow using a pen function. In response to the electronic device receiving a user's triggering operation on the "page setting" in the setting control 06, as shown in (d) of FIG. 1C, the electronic device displays a page setting corresponding interface 07. The page setting corresponding interface 07 also includes the specification control 04. The user can select a suitable page size through the specification control 04 based on his own needs. Figure 5 Figure 5 Figure 5 Figure 5
[0113] In some examples, the text type file can be a note file. The to-be-displayed page includes at least one page. For example, the to-be-displayed page includes a page in a note. The page size corresponding to each page in the to-be-displayed page includes a page size corresponding to each page in the note.
[0114] In some scenarios, the user can import a text type file into the note application by using an import control of the note application, so as to obtain a note file. In response, the electronic device displays a note file corresponding interface in the note application.
[0115] Taking a note file as an example, the note file is note A. The note A includes multiple pages. The multiple pages are page 1, page 2 and page 3 respectively. For example, the multiple pages can be global collection pages and / or web page collection pages. The page size corresponding to the page 1 is a first size, the page size corresponding to the page 2 is a second size, and the page size corresponding to the page 3 is a third size. The first size, the second size and the third size are all different. For example, the first size is 21cm*13cm. The second size is 21cm*56cm. The third size is 21cm*90cm.
[0116] Since the third size is different from the preset size, and the height of the third size is much greater than the height of the preset size, the third size can also be called a special size. According to the third size corresponding to the page 3, the page 3 can also be called a special page or an extra-long page.
[0117] In some examples, when the user browses the pages in the note, the user can choose whether to add a to-be-added page according to the user's own needs. If the user chooses to add, the to-be-displayed pages include the pages in the note and the to-be-added page. The page size corresponding to each page in the to-be-displayed pages includes the page size corresponding to each page in the note and the page size corresponding to the to-be-added page. The page size corresponding to the to-be-added page is a preset size. The preset size is the size selected by the user when creating the note.
[0118] For example, before the note application imports the note A, if the size selected by the user is A4, the preset size is A4 size, that is, the preset size is 21cm*29.7cm. Therefore, the to-be-displayed pages obtained by the electronic device include the page 1, the page 2 and the page 3. The page size corresponding to each page in the to-be-displayed pages includes the first size, the second size and the third size. If the user adds a page 4 (i.e., a to-be-added page) when browsing the note A, the to-be-displayed pages obtained by the electronic device include the page 1, the page 2, the page 3 and the page 4. The page size corresponding to each page in the to-be-displayed pages includes the first size, the second size, the third size and the preset size.
[0119] Of course, the user can also adjust the page size corresponding to the to-be-added page according to the user's own needs, for example, adjusting the page size from A4 to A5. Then, the preset size corresponding to the to-be-added page is A5.
[0120] That is, when the user browses the note file, the user can adjust the pages in the note file according to the user's needs, for example, adding pages, deleting pages, and the like. If the user chooses to add pages, the to-be-displayed pages further include to-be-added pages. The page size corresponding to the to-be-added pages is the preset size. Therefore, the to-be-displayed pages and the page size corresponding to each page in the to-be-displayed pages obtained by the electronic device are the results after the electronic device collects the to-be-displayed pages and the page size corresponding to each page in the to-be-displayed pages in the note file after the user adjusts the note file.
[0121] It can be understood that the electronic device can further include other office applications. When the user operates the pages through the other office applications, the electronic device can also correctly display the pages of the other office applications based on the user operation.
[0122] Step 402, the electronic device obtains the screen display range of the electronic device.
[0123] The screen display range refers to the effective display area of the screen, that is, the actual available display area after removing the frame and other non-display parts. The measurement unit of the screen display range can be px or inch (in).
[0124] The screen display range is the screen display range of the electronic device for displaying the to-be-displayed pages. For example, the electronic device can be a mobile phone, a tablet computer, a handheld computer, a personal computer, and the like, which has a note application. It can be understood that the screen display ranges of different models of electronic devices are different.
[0125] In some examples, when the electronic device is started, the operating system initializes the display driver and related hardware, so that the display driver communicates with the screen. The operating system can obtain the screen information of the electronic device through the display driver, and then store the screen information in the register or the specific hardware interface. Based on the obtained screen information, the operating system can calculate the screen display range of the electronic device. The screen information of the electronic device can include screen resolution, size, pixel density, and the like. The process of obtaining the screen display range of the electronic device can be that the electronic device obtains the screen display range of the electronic device through the API provided by the operating system. For example, the screen display range of the electronic device is 21 cm*29.7 cm.
[0126] In some examples, the user can also adjust the screen display range of the electronic device according to the user's own needs. For example, adjusting the display scale of the display screen; adjusting the display size of the display screen; adjusting the position and range of the display screen; and the like. The operating system can monitor the user's adjustment operation of the screen display range in real time. When receiving the user's adjustment operation of the screen display range, the operating system can derive the adjusted screen display range in response to the adjustment operation, so that the electronic device obtains the adjusted screen display range through the API.
[0127] In step 403, the electronic device determines the page type corresponding to each page in the to-be-displayed page based on the page size corresponding to each page in the to-be-displayed page.
[0128] The page type includes a first page type and a second page type.
[0129] After the electronic device obtains the to-be-displayed page, the page size corresponding to each page in the to-be-displayed page, and the screen display range of the electronic device, the page type corresponding to each page in the to-be-displayed page can be derived based on the page size corresponding to each page in the to-be-displayed page and a preset rule.
[0130] In some examples, the process of determining the page type corresponding to each page in the to-be-displayed page based on the page size corresponding to each page in the to-be-displayed page can be: determining the page type corresponding to each page based on the page size corresponding to each page and a preset rule.
[0131] The preset rule is to determine whether the page size corresponding to each page is greater than a screening size. If the page size corresponding to each page is less than or equal to the screening size, the page type corresponding to the page is the first page type. If the page size corresponding to each page is greater than the screening size, the page type corresponding to the page is the second page type. The screening size is related to the screen display range.
[0132] For example, the width of the screening size is less than or equal to the screen display width in the screen display range, and the width of the screening size is 1.5 times the screen display height in the screen display range. Alternatively, the width of the screening size is less than or equal to the screen display width in the screen display range, and the width of the screening size is 2 times the screen display height in the screen display range.
[0133] For example, in combination with step 401, the note A includes page 1, page 2, and page 3, the screen display range is 21cm*29.7cm, the width of the screening size is 21cm, and the height of the screening size is 59.4cm. Comparing the first size corresponding to page 1, the second size corresponding to page 2, and the third size corresponding to page 3 with the screening size respectively, it can be known that the page type corresponding to page 1 is the first page type, the page type corresponding to page 2 is the first page type, and the page type corresponding to page 3 is the second page type.
[0134] In some examples, based on the page size corresponding to each page, the first page can be determined; the page type corresponding to the first page is the first page type. Based on the page size corresponding to each page, the second page can also be determined; the page type corresponding to the second page is the second page type.
[0135] In some examples, after the electronic device obtains the to-be-displayed page, the page size corresponding to each page in the to-be-displayed page, and the screen display range of the electronic device, a target page with the largest page size in the to-be-displayed page can be screened. Then, it is determined whether the page size corresponding to the target page is greater than the screening size. If the page size corresponding to the target page is greater than the screening size, the page type corresponding to the target page is the second page type. If the page size corresponding to the target page is less than or equal to the screening size, the page type corresponding to the target page is the first page type, and the page types corresponding to other pages in the to-be-displayed page except the target page are all the first page type.
[0136] When the page type corresponding to the target page is the second page type, it is further determined whether the page size corresponding to a page with the second largest page size in the to-be-displayed page except the target page is greater than the screening size, and so on, until the page types corresponding to all pages in the to-be-displayed page are determined.
[0137] In some examples, after the electronic device obtains the to-be-displayed page, the page size corresponding to each page in the to-be-displayed page, and the screen display range of the electronic device, a target page with the largest page size in the to-be-displayed page can be screened. Then, it is determined whether the page size corresponding to the target page is greater than the screening size.
[0138] In the case where the page size corresponding to the target page is greater than the screening size, the target page is eliminated, and a screened page is obtained, so the screened page does not include the target page.
[0139] In the case where the screened page does not include the target page, it is further determined whether the page size corresponding to other pages in the to-be-displayed page except the target page is greater than the screening size. If there is still a page with a page size greater than the screening size in the to-be-displayed page, the screened page only includes pages with a page size not greater than the screening size. If there is no page with a page size greater than the screening size in the to-be-displayed page except the target page, the screened page includes all other pages in the to-be-displayed page except the target page.
[0140] In the case where the page size corresponding to the target page is less than or equal to the screening size, the target page is not eliminated, and the screened page includes the target page.
[0141] In the case that the screened page includes the target page, it indicates that the page size of the other pages in the to-be-displayed page except the target page is less than or equal to the screening size, and thus the screened page includes all the pages in the to-be-displayed page.
[0142] By determining the page type corresponding to each page, different display methods are used for different page types, so that the display effect of each page is better.
[0143] In step 404, the electronic device determines the screen display ratio based on the page size corresponding to each page, the page type corresponding to each page, and the screen display range.
[0144] After the electronic device obtains the page size corresponding to each page, the page type corresponding to each page, and the screen display range, the screen display ratio can be obtained according to the page size corresponding to each page, the page type corresponding to each page, and the screen display range. Then, the to-be-displayed page can be displayed by using the screen display ratio.
[0145] In some examples, the process of determining the screen display ratio according to the page size corresponding to each page, the page type corresponding to each page, and the screen display range can be: determining at least one first page based on the page size corresponding to each page, the page type corresponding to each page being the first page type. In the at least one first page, a screen display page is determined. Finally, the screen display ratio is obtained according to the page size corresponding to the screen display page and the screen display range.
[0146] In some examples, the process of determining the screen display page according to the page size corresponding to the first page can be: determining the page with the largest page size in the at least one first page as the screen display page according to the page size corresponding to the at least one first page.
[0147] For example, in combination with step 401 and step 403, it can be known that the page type corresponding to page 1 is the first page type, the page type corresponding to page 2 is the first page type, and the page type corresponding to page 3 is the second page type. The page size corresponding to page 1 is the first size, and the page size corresponding to page 2 is the second size. The first size is 21cm*13cm. The second size is 21cm*56cm. Therefore, the first page includes page 1 and page 2. According to the first size corresponding to page 1 and the second size corresponding to page 2, the determined screen display page is page 2.
[0148] The process of obtaining the screen display ratio according to the page size corresponding to the screen display page and the screen display range can be: obtaining the screen display ratio according to the width and height of the page size corresponding to the screen display page and the width and height of the screen display range.
[0149] In some examples, the screen display ratio satisfies the following expression:
[0150] R = w i *h j > w j *h i ? w j / w i : h j / h i
[0151] wherein R is a screen display ratio; w i is a width of a page size corresponding to the screen display page; h i is a height of the page size corresponding to the screen display page; w j is a width of the screen display range; h j is a height of the screen display range.
[0152] Based on the above formula, if the width of the page size corresponding to the screen display page multiplied by the height of the screen display range is greater than the width of the screen display range multiplied by the height of the page size corresponding to the screen display page, the screen display ratio is a ratio of the width of the screen display range to the width of the page size corresponding to the screen display page. If the width of the page size corresponding to the screen display page multiplied by the height of the screen display range is less than or equal to the width of the screen display range multiplied by the height of the page size corresponding to the screen display page, the screen display ratio is a ratio of the height of the screen display range to the height of the page size corresponding to the screen display page.
[0153] For example, the page size corresponding to the screen display page is 21 cm*56 cm, and the screen display range is 21 cm*29.7 cm. The width of the page size corresponding to the screen display page multiplied by the height of the screen display range is 21x29.7=623.7. The width of the screen display range multiplied by the height of the page size corresponding to the screen display page is 21x56=1176. Since the width of the page size corresponding to the screen display page multiplied by the height of the screen display range (i.e. 623.7) is less than the width of the screen display range multiplied by the height of the page size corresponding to the screen display page (i.e. 1176), the screen display ratio is a ratio of the height of the screen display range to the height of the page size corresponding to the screen display page, i.e. 29.7 / 56=0.5.
[0154] From the above processing process, the page with the largest page size in the at least one first page is taken as the screen display page, which not only ensures that all the pages in the first page can be normally displayed in the screen display range, but also guarantees that other pages in the first page have good readability and visibility, thereby helping the user to better browse and understand the page content. Moreover, the screen display ratio is determined according to the page size corresponding to the screen display page and the screen display range, which can make the page layout more flexible, thereby adapting to various display environments.
[0155] In step 405, the electronic device displays the to-be-displayed page based on the page size corresponding to each page, the page type corresponding to each page, and the screen display ratio.
[0156] When the electronic device obtains the page size corresponding to each page, the page type corresponding to each page, and the screen display ratio, the electronic device can display the to-be-displayed page based on the page size corresponding to each page, the screen display ratio, and the page type corresponding to each page.
[0157] In some examples, the process in which the electronic device displays the to-be-displayed page based on the screen display ratio and the page type corresponding to each page can be that the electronic device determines the display size of each page in the to-be-displayed page based on the screen display ratio and the page type corresponding to each page, and displays the to-be-displayed page based on the display size of each page in the to-be-displayed page.
[0158] In some examples, the process in which the electronic device determines the display size of each page in the to-be-displayed page based on the screen display ratio and the page type corresponding to each page can be that the electronic device determines the screen display size corresponding to the first page based on the screen display ratio and the page size corresponding to the first page, and displays the first page according to the screen display size corresponding to the first page.
[0159] Determining the screen display size corresponding to the first page based on the page size corresponding to the first page and the screen display ratio can achieve adaptive layout of the page, and displaying the first page according to the screen display size corresponding to the first page can make the first page have consistent page display effect on different devices. In this way, the user can obtain similar visual experience when browsing the first page on any electronic device (for example, a computer, a mobile phone, or a tablet), and the use convenience of the user is improved.
[0160] In some examples, the process in which the electronic device determines the display size of each page in the to-be-displayed page based on the screen display ratio and the page type corresponding to each page can be that the electronic device determines the second page based on the page size corresponding to each page, the page type corresponding to the second page is the second page type, performs multi-screen division on the second page based on the screen display ratio and the page size corresponding to the second page to obtain the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page, and displays the second page in a split screen manner according to the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page.
[0161] The process of performing multi-screen division on the second page based on the screen display ratio and the page size corresponding to the second page to obtain the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page can be: obtaining the screen display size corresponding to the second page based on the screen display ratio and the page size corresponding to the second page; and performing multi-screen division on the second page according to the screen display size corresponding to the second page to obtain the multi-screen division result corresponding to the second page.
[0162] The process of performing multi-screen division on the second page according to the screen display size corresponding to the second page to obtain the multi-screen division result corresponding to the second page can be: performing multi-screen division on the second page according to the height in the screen display size corresponding to the second page to obtain the multi-screen division result corresponding to the second page. The multi-screen division result is used to indicate the number of screen display ranges in which the content of the second page is displayed, for example, the multi-screen division result is used to indicate that the content of the second page is displayed in 1.5 screen display ranges.
[0163] The process of performing multi-screen division on the second page according to the height in the screen display size corresponding to the second page to obtain the multi-screen division result corresponding to the second page can be: determining the ratio of the height in the page size corresponding to the second page to the height of the screen display range according to the height of the screen display range; and performing multi-screen division on the second page according to the ratio of the height in the page size corresponding to the second page to the height of the screen display range to obtain the number of screen display ranges in which the content of the second page is displayed.
[0164] The second page can be divided into multiple screen display ranges for display by means of multi-screen division. In this way, not only can the second page be normally displayed, but also the reading experience of the user can be improved. At the same time, displaying the second page in multiple screens can increase the interactivity between the user and the second page, so that the user can more conveniently filter and organize information.
[0165] In some examples, the process of determining the display size of each page in the to-be-displayed page based on the screen display ratio and the page type corresponding to each page can be: determining whether the page type corresponding to the page is the first page type or the second page type based on the screen display ratio when the to-be-displayed page includes only one page. If the page type corresponding to the page is the first page type, it means that the page size corresponding to the page is less than or equal to the filtering size, then determining the screen display size corresponding to the page based on the screen display ratio and the page size corresponding to the page, and displaying the page according to the screen display size corresponding to the page.
[0166] For example, Figure 6 An exemplary display effect diagram of a page is shown, taking note B as an example, which includes page 5. The display direction of page 5 is horizontal display. The page type corresponding to page 5 is the first page type, Figure 6The (a) in the figure shows an exemplary display effect of a page 5. Taking note C as an example, the note C includes a page 6. The display direction of the page 6 is vertical display. The page type corresponding to the page 6 is the first page type, Figure 6 The (b) in the figure shows an exemplary display effect of a page 6.
[0167] If the page type corresponding to the page is the second page type, and the page size corresponding to the second page type is greater than the screening size, the screen display size corresponding to the page is obtained based on the screen display ratio and the page size corresponding to the page. The page is divided into multiple screens according to the screen display size corresponding to the page, and the multiple screen division result corresponding to the page is obtained. Finally, the page is displayed based on the screen display size corresponding to the page and the multiple screen division result corresponding to the page.
[0168] When the page is divided into multiple screens, the starting position of the first screen displays the content of the first line in the page. Figure 7 The figure shows another exemplary display effect of a page. Taking note D as an example, the note D includes a page 7, the page type corresponding to the page 7 is the second page type, and the multiple screen division result corresponding to the page 7 is 3.5. That is, the page 7 can be completely displayed in a range of 3.5 screens. Then, the user can slide the page up or down through an interactive tool (for example, a mouse, a keyboard, etc.) so that the user can completely view the content of the page in the range of 3.5 screens.
[0169] When the page to be displayed includes multiple pages, the page types corresponding to the multiple pages can all be the first page type, or all be the second page type, or include both the first page type and the second page type.
[0170] When the page types corresponding to the multiple pages are all the first page type, the screen display size corresponding to each page can be obtained based on the page size corresponding to each page and the screen display ratio. Finally, the multiple pages are displayed in sequence according to the display order of the multiple pages and the screen display size corresponding to each page.
[0171] For example, the page to be displayed includes a page 8 and a page 9. The page types corresponding to the page 8 and the page 9 are both the first page type. The page size corresponding to the page 8 is w1*h1, the page size corresponding to the page 9 is w2*h2, and the screen display ratio is r1. Based on the page size (w1*h1) corresponding to the page 8 and the screen display ratio (r1), the screen display size corresponding to the page 8 can be determined, so the width of the screen display size corresponding to the page 8 is w1*r1, and the height is h1*r1. Based on the page size (w2*h1) corresponding to the page 9 and the screen display ratio (r1), the screen display size corresponding to the page 9 can be determined, so the width of the screen display size corresponding to the page 9 is w2*r1, and the height is h2*r1.
[0172] When the page types corresponding to the plurality of pages are all the second page type, the display size corresponding to each page can also be obtained based on the page size corresponding to each page in the plurality of pages and the display ratio. Then, the number of display ranges corresponding to each page is determined according to the height of the display size corresponding to each page and the display range. Finally, the plurality of pages are displayed in sequence according to the display order of the plurality of pages, the display size corresponding to each page, and the number of display ranges corresponding to each page.
[0173] For example, the pages to be displayed include page 10 and page 11. The page types corresponding to page 10 and page 11 are both the second page type. The page size corresponding to page 10 is w3*h3, and the page size corresponding to page 11 is w4*h4. The display ratio is r2. Then, the display size corresponding to page 10 can be determined based on the page size (i.e., w3*h3) corresponding to page 10 and the display ratio (i.e., r2), so the width of the display size corresponding to page 10 is w3*r2, and the height is h3*r2. If the display range is w5*h5, the number of display ranges corresponding to page 10 is h3*r2 / h5. Finally, page 10 can be completely displayed in the plurality of display ranges according to the height in the display size corresponding to page 10 and the number of display ranges corresponding to page 10.
[0174] The display size corresponding to page 11 can be determined based on the page size (i.e., w4*h4) corresponding to page 11 and the display ratio (i.e., r2), so the width of the display size corresponding to page 11 is w4*r2, and the height is h4*r2. If the display range is w5*h5, the number of display ranges corresponding to page 11 is h4*r2 / h5. Finally, page 11 can be completely displayed in the plurality of display ranges according to the height in the display size corresponding to page 11 and the number of display ranges corresponding to page 11.
[0175] When the page types corresponding to the plurality of pages include both the first page type and the second page type, the display size corresponding to each page can also be obtained based on the page size corresponding to each page in the plurality of pages and the display ratio. Finally, the plurality of pages are displayed in sequence according to the display order of the plurality of pages and the display size corresponding to each page.
[0176] As can be seen from steps 401-403, the page type corresponding to page 1 in the note A is the first page type, the page type corresponding to page 2 is the first page type, and the page type corresponding to page 3 is the second page type. The first size corresponding to page 1 is 21cm*13cm. The second size corresponding to page 2 is 21cm*56cm. The third size corresponding to page 3 is 21cm*90cm. It can be determined that the target page is page 2.
[0177] When the screen display range is 21cm*29.7cm and the screen display ratio is 0.5, the screen display size corresponding to page 1 can be obtained based on the first size corresponding to page 1 and the screen display ratio. The width of the screen display size corresponding to page 1 is 21*0.5=10.5; and the height is 13*0.5=6.5. The screen display size corresponding to page 2 can be obtained based on the second size corresponding to page 2 and the screen display ratio. The width of the screen display size corresponding to page 2 is 21*0.5=10.5; and the height is 56*0.5=28. The screen display size corresponding to page 3 can be obtained based on the third size corresponding to page 3 and the screen display ratio. The width of the screen display size corresponding to page 3 is 21*0.5=10.5; and the height is 90*0.5=45. Since the height in the screen display range is 29.7cm, the height of the screen display size corresponding to page 3 can be divided into multiple screen display ranges, and the number of the multiple screen display ranges is 45 / 29.7=1.5 screens. Finally, page 1, page 2 and page 3 are completely displayed according to the display order of page 1, page 2 and page 3, the screen display size corresponding to page 1, the screen display size corresponding to page 2, the screen display size corresponding to page 3 and the number of the screen display ranges corresponding to page 3.
[0178] Figure 8 Another example of the display effect of a page can be shown. Taking note E as an example, note E includes page 12 and page 13, the page type corresponding to page 12 is the second page type, and the page type corresponding to page 13 is the first page type.
[0179] For Figure 1 the note file shown in the figure, the display effect of the text file in Figure 1 can be as shown in Figure 9 . That is, the special page of the text file can be displayed on the canvas according to the normal size. When the user browses the special page of the text file, it is no longer necessary to manually adjust the display size of the special page, thereby making it more convenient for the user to browse the text file and improving the user's satisfaction.
[0180] It can be understood that when the electronic device displays the to-be-displayed page according to the screen display size, if no editing operation of the to-be-displayed page is received from the user, the display method provided by the present disclosure does not include the content of subsequent steps 406-413. When the electronic device receives the editing operation of the user, the display method provided by the present disclosure includes the content of subsequent steps 406-413.
[0181] When the to-be-displayed page is displayed, the user can use handwriting drawing, inserting pictures, inserting text boxes and other editing means to perform secondary editing on the to-be-displayed page. After the secondary editing of the to-be-displayed page, problems such as superposition misplacement and display size abnormality can occur. Therefore, the following steps can be used to solve the problems such as superposition misplacement and display size abnormality caused by secondary editing.
[0182] Step 406, the electronic device receives the editing operation of the user.
[0183] The editing operation at least includes any one of inserting a text box (or a comment box), inserting a picture, and inserting a handwriting note.
[0184] After the electronic device correctly displays the to-be-displayed page according to the screen display size, if the user needs to perform an editing operation on a certain page in the to-be-displayed page, the user can trigger the editing control in the note to edit the page by using the editing control. The editing control can include a text box control, a picture control, a handwriting note control, and the like.
[0185] In some examples, if the page on which the user performs the editing operation is a blank page (for example, the blank page can be a page in the to-be-displayed page, and can also be a to-be-added page inserted in response to a user operation), the user performs the editing operation on the blank page. If the page on which the user performs the editing operation is a non-blank page, the user performs the editing operation on the non-blank page.
[0186] Since the editing operation performed by the user is performed on the display screen of the electronic device, the electronic device can track, monitor and subsequently process the editing behavior of the user by obtaining the pixel coordinates, size and changes involved in the editing operation of the user. The pixel coordinates, size and changes obtained by the electronic device can be recorded in units of px.
[0187] Step 407, in response to the editing operation of the user, the electronic device obtains the screen display range of the view corresponding to the editing operation.
[0188] The object operated by the editing operation can be referred to as an element, and the element is displayed on the canvas in the form of each view.
[0189] In some examples, in response to the editing operation of the user, the electronic device obtains the screen display range of the view (i.e., view) corresponding to the editing operation. The process can be: in response to the editing operation of the user, the electronic device obtains the pixel information of the element corresponding to the editing operation. According to the pixel information of the element corresponding to the editing operation, the screen display range of the view corresponding to the editing operation is determined.
[0190] When the electronic device detects the editing operation of the user, the electronic device can obtain pixel information of an element corresponding to the editing operation in response to the editing operation of the user. For example, the element corresponding to the editing operation can be any one of a text box (or a comment box), a picture, or a handwritten note. The pixel information of the element corresponding to the editing operation can include width information, height information, size, color, and the like of the element.
[0191] For example, when the element corresponding to the editing operation is a text box (or a comment box), the pixel information of the element corresponding to the editing operation can include a pixel position of a starting point of the text box (or the comment box), a pixel position of an ending point of the text box (or the comment box), a size of the text box (or the comment box), a color of the text box (or the comment box), and the like. The view corresponding to the editing operation is a view corresponding to the text box (or the comment box).
[0192] When the element corresponding to the editing operation is a picture, the pixel information of the element corresponding to the editing operation can include a pixel position of a starting point of the picture, a pixel position of an ending point of the picture, a size of the picture, a position of the picture, and the like. The view corresponding to the editing operation is a view corresponding to the picture.
[0193] When the element corresponding to the editing operation is a handwritten note, the pixel information of the element corresponding to the editing operation can include a pixel position of a starting point of the handwritten note, a pixel position of an ending point of the handwritten note, and a size of the handwritten note, and the like. The view corresponding to the editing operation is a view corresponding to the handwritten note. Of course, the element information corresponding to the editing operation can also include other information, which is not limited in the present disclosure.
[0194] Since the display range of the view corresponding to different editing operations is different, the display range of the view corresponding to the editing operation can be obtained according to the pixel information of the element corresponding to the editing operation. The unit of the pixel information of the element corresponding to the editing operation is px.
[0195] In some examples, the process in which the electronic device obtains the pixel information of the element corresponding to the editing operation can be that the electronic device obtains the pixel information of the element corresponding to the editing operation through a getWidth() function and a getHeight() function. The getWidth() function is used to obtain width data of the element corresponding to the editing operation. The getHeight() function is used to obtain height data of the element corresponding to the editing operation.
[0196] The process in which the display range of the view corresponding to the editing operation is obtained according to the pixel information of the element corresponding to the editing operation can be that the display range of the view corresponding to the editing operation is obtained according to the width information and the height information in the pixel information of the element corresponding to the editing operation.
[0197] Figure 10An exemplary diagram illustrating a unit conversion is shown. For example... Figure 10 As shown, the display method disclosed herein involves conversions between different units of measurement. Examples include conversions from px to dp, dp to cm, cm to dp, etc. Specifically, the unit of measurement for data involved in editing operations (e.g., pixel information of the element corresponding to the editing operation) is px. The unit of measurement for data involved in the page to be displayed (e.g., the page size corresponding to each page in the page to be displayed) is cm. The unit of measurement for data involved in the view (e.g., the screen display area of the view) is dp.
[0198] During step 407, since the pixel coordinates, size, and changes involved in the pixel information of the element corresponding to the editing operation are recorded in pixels (px), while the screen display range of the view corresponding to the editing operation is recorded in decimal places (dp), it is necessary to convert the measurement unit from px to dp. The process of converting the measurement unit from px to dp is as follows: First, obtain the screen's PPI; then, divide the measurement data corresponding to px by the PPI to obtain the conversion factor. Finally, multiply the measurement data corresponding to px by the conversion factor to obtain the data represented in dp. The screen's PPI can be obtained through the hardware and software properties of the electronic device.
[0199] Step 408: The electronic device projects the view corresponding to the editing operation based on the screen display range of the electronic device and the screen display range of the view corresponding to the editing operation, and obtains the projected view.
[0200] After the electronic device determines the screen display range of the view corresponding to the editing operation, the view corresponding to the editing operation can be projected onto the canvas based on the screen display range of the electronic device and the screen display range of the view corresponding to the editing operation, thereby obtaining the projected view.
[0201] For example, when the element corresponding to the editing operation is a text box (or comment box), the projected view is the view corresponding to the projected text box (or comment box). When the element corresponding to the editing operation is an image, the projected view is the view corresponding to the projected image. When the element corresponding to the editing operation is a handwritten note, the projected view is the view corresponding to the projected handwritten note.
[0202] In some examples, based on the screen display range of the electronic device and the screen display range of the view corresponding to the editing operation, the process of projecting the view corresponding to the editing operation onto the canvas to obtain the projected view can be: first, according to the screen display range of the electronic device and the screen display range of the view corresponding to the editing operation, the projection scale is calculated. Then, according to the projection scale and the position of the view on the display screen, the position of the view on the canvas is calculated. Finally, using a graphics drawing library (such as Android's Canvas or iOS's UIKit), the view is drawn according to the projection scale and the position of the view on the canvas, thereby obtaining the projected view. Wherein, the projection scale is used to determine how to scale the view on the canvas.
[0203] As shown in Figure 10 , the screen display range of the view corresponding to the editing operation is recorded in units of dp, and the projected view is in units of cm, so in this process, the unit of measurement dp also needs to be converted to cm. The process of converting the unit of measurement dp to cm is: first, according to the conversion relationship between dp and inch (in), convert dp to in; then convert in to cm. Wherein, 1dp = 1 / 160in, 1in = 2.54cm.
[0204] By using the screen display range of the electronic device and the screen display range of the view for projection, it can be ensured that the view can provide appropriate display effect on different electronic devices; and through this scheme, no matter what kind of electronic device the user performs editing operation on, consistent view display effect can be obtained, improving the usability and universality of the application.
[0205] Step 409, the electronic device performs screen display adaptation on the projected view based on the screen display scale to obtain an adapted view.
[0206] When the electronic device obtains the projected view, the electronic device can obtain the screen display scale, and perform screen display adaptation on the projected view according to the screen display scale to obtain an adapted view, and display the adapted view.
[0207] In some examples, the process of the electronic device performing screen display adaptation on the projected view according to the screen display scale to obtain an adapted view can be: the electronic device multiplies the size corresponding to the projected view by the screen display scale to obtain the size corresponding to the adapted view, and then the adapted view can be displayed according to the size corresponding to the adapted view.
[0208] In some examples, when the element corresponding to the editing operation is a text box (or a comment box), the adapted view is a view corresponding to the adapted text box (or the adapted comment box). When the element corresponding to the editing operation is a picture, the adapted view is a view corresponding to the adapted picture. When the element corresponding to the editing operation is a handwritten note, the adapted view is a view corresponding to the adapted handwritten note.
[0209] The electronic device can include an editing module, a picture module, and a handwriting engine module. When the element corresponding to the editing operation is a text box (or a comment box), the editing module is configured to generate a view corresponding to the adapted comment box. When the element corresponding to the editing operation is a picture, the picture module is configured to generate a view corresponding to the adapted picture. When the element corresponding to the editing operation is a handwritten note, the handwriting engine module is configured to generate a view corresponding to the adapted handwritten note.
[0210] For example, when the element corresponding to the editing operation is a text box (or a comment box), the electronic device can obtain the screen display ratio and send the screen display ratio to the editing module. The editing module can obtain a view corresponding to the adapted text box (or the adapted comment box) based on the projected view corresponding to the comment box and the screen display ratio. For example, the editing module can multiply the size of the projected view corresponding to the text box (or the comment box) by the screen display ratio to obtain the size of the view corresponding to the adapted text box (or the adapted comment box).
[0211] When the element corresponding to the editing operation is a picture, the electronic device can obtain the screen display ratio and send the screen display ratio to the picture module. The picture module can obtain a view corresponding to the adapted picture based on the projected view corresponding to the picture and the screen display ratio. For example, the picture module can multiply the size of the projected view corresponding to the picture by the screen display ratio to obtain the size of the view corresponding to the adapted picture.
[0212] When the element corresponding to the editing operation is a handwritten note, the electronic device can obtain the screen display ratio and send the screen display ratio to the handwriting engine module. The handwriting engine module can obtain a view corresponding to the adapted note based on the projected view corresponding to the handwritten note and the screen display ratio. For example, the handwriting engine module can multiply the size of the projected view corresponding to the handwritten note by the screen display ratio to obtain the size of the view corresponding to the adapted handwritten note.
[0213] After the adapted view is formed based on the user's editing operation, the adapted view can be displayed. Then, the user can choose whether to perform a processing operation on the adapted view according to needs. If the user does not perform the processing operation on the adapted view, the flow ends. If the user performs the processing operation on the adapted view, the user can be displayed a processed view based on the user's processing operation. Therefore, the display method provided by the present disclosure further includes the contents of steps 410-413.
[0214] Step 410, the electronic device receives the processing operation performed by the user on the adapted view.
[0215] When the electronic device obtains the adapted view, the adapted view can be displayed. Then, the user can perform a corresponding processing operation in the adapted view according to needs.
[0216] For example, when the element corresponding to the editing operation is a text box (or a comment box), the processing operation performed by the user in the adapted view (or the comment box) corresponding to the text box (or the comment box) can be that the user edits the text in the text box (or the comment box). When the element corresponding to the editing operation is a picture, the processing operation performed by the user in the adapted view corresponding to the picture can be that the user performs a zoom-in operation or a zoom-out operation on the picture. When the element corresponding to the editing operation is a handwritten note, the processing operation performed by the user in the adapted view corresponding to the handwritten note can be that the user performs an erasing or modifying operation on the handwritten note in the canvas by using a control. The data corresponding to the processing operation is recorded in cm as a measurement unit.
[0217] Step 411, in response to the processing operation, the electronic device processes the adapted view to obtain a processed view.
[0218] When the processing operation performed by the user on the adapted view is received, the electronic device can process the adapted view in response to the processing operation to obtain a processed view.
[0219] For example, when the user performs the processing operation in the adapted view, some problems may occur. For example, the cursor in the text box (or the comment box) has an incorrect display size, the cursor in the text box (or the comment box) has an incorrect display position, a part of the picture is displayed outside the display range, and the like. At this time, the adapted view needs to be processed to obtain a processed view. The processed view is recorded in cm as a measurement unit.
[0220] For example, the cursor in the text box (or the comment box) has an incorrect display size can be that the display size of the cursor is too large or the display size of the cursor is too small. Figure 11 An example of a display effect of a cursor is shown. Specifically, Figure 11Fig. 1(a) shows an exemplary diagram illustrating an effect of a cursor display size being too small. As shown in Fig. 1(a), in response to a user's processing operation (e.g., a text input operation), an electronic device displays an interface 1100. The interface 1100 includes a text box 1101, an input text 1102, and a cursor 1103. Based on the input text 1102, the electronic device determines a display size of the cursor 1103 corresponding to the input text 1102. The display size of the cursor 1103 is smaller than the display size of the input text 1102. Figure 11 Fig. 1(a) shows an exemplary diagram illustrating an effect of a cursor display size being too small. As shown in Fig. 1(a), in response to a user's processing operation (e.g., a text input operation), an electronic device displays an interface 1100. The interface 1100 includes a text box 1101, an input text 1102, and a cursor 1103. Based on the input text 1102, the electronic device determines a display size of the cursor 1103 corresponding to the input text 1102. The display size of the cursor 1103 is smaller than the display size of the input text 1102. Figure 11 Fig. 1(a) shows an exemplary diagram illustrating an effect of a cursor display size being too small. As shown in Fig. 1(a), in response to a user's processing operation (e.g., a text input operation), an electronic device displays an interface 1100. The interface 1100 includes a text box 1101, an input text 1102, and a cursor 1103. Based on the input text 1102, the electronic device determines a display size of the cursor 1103 corresponding to the input text 1102. The display size of the cursor 1103 is smaller than the display size of the input text 1102.
[0221] Fig. 1(a) shows an exemplary diagram illustrating an effect of a cursor display size being too small. As shown in Fig. 1(a), in response to a user's processing operation (e.g., a text input operation), an electronic device displays an interface 1100. The interface 1100 includes a text box 1101, an input text 1102, and a cursor 1103. Based on the input text 1102, the electronic device determines a display size of the cursor 1103 corresponding to the input text 1102. The display size of the cursor 1103 is smaller than the display size of the input text 1102. Figure 11 Fig. 1(a) shows an exemplary diagram illustrating an effect of a cursor display size being too small. As shown in Fig. 1(a), in response to a user's processing operation (e.g., a text input operation), an electronic device displays an interface 1100. The interface 1100 includes a text box 1101, an input text 1102, and a cursor 1103. Based on the input text 1102, the electronic device determines a display size of the cursor 1103 corresponding to the input text 1102. The display size of the cursor 1103 is smaller than the display size of the input text 1102. Figure 11 Fig. 1(a) shows an exemplary diagram illustrating an effect of a cursor display size being too small. As shown in Fig. 1(a), in response to a user's processing operation (e.g., a text input operation), an electronic device displays an interface 1100. The interface 1100 includes a text box 1101, an input text 1102, and a cursor 1103. Based on the input text 1102, the electronic device determines a display size of the cursor 1103 corresponding to the input text 1102. The display size of the cursor 1103 is smaller than the display size of the input text 1102. Figure 11 Fig. 1(a) shows an exemplary diagram illustrating an effect of a cursor display size being too small. As shown in Fig. 1(a), in response to a user's processing operation (e.g., a text input operation), an electronic device displays an interface 1100. The interface 1100 includes a text box 1101, an input text 1102, and a cursor 1103. Based on the input text 1102, the electronic device determines a display size of the cursor 1103 corresponding to the input text 1102. The display size of the cursor 1103 is smaller than the display size of the input text 1102. Figure 11 Fig. 1(a) shows an exemplary diagram illustrating an effect of a cursor display size being too small. As shown in Fig. 1(a), in response to a user's processing operation (e.g., a text input operation), an electronic device displays an interface 1100. The interface 1100 includes a text box 1101, an input text 1102, and a cursor 1103. Based on the input text 1102, the electronic device determines a display size of the cursor 1103 corresponding to the input text 1102. The display size of the cursor 1103 is smaller than the display size of the input text 1102. Figure 11 Fig. 1(a) shows an exemplary diagram illustrating an effect of a cursor display size being too small. As shown in Fig. 1(a), in response to a user's processing operation (e.g., a text input operation), an electronic device displays an interface 1100. The interface 1100 includes a text box 1101, an input text 1102, and a cursor 1103. Based on the input text 1102, the electronic device determines a display size of the cursor 1103 corresponding to the input text 1102. The display size of the cursor 1103 is smaller than the display size of the input text 1102. Figure 12 Fig. 1(a) shows an exemplary diagram illustrating an effect of a cursor display size being too small. As shown in Fig. 1(a), in response to a user's processing operation (e.g., a text input operation), an electronic device displays an interface 1100. The interface 1100 includes a text box 1101, an input text 1102, and a cursor 1103. Based on the input text 1102, the electronic device determines a display size of the cursor 1103 corresponding to the input text 1102. The display size of the cursor 1103 is smaller than the display size of the input text 1102.
[0222] Fig. 1(a) shows an exemplary diagram illustrating an effect of a cursor display size being too small. As shown in Fig. 1(a), in response to a user's processing operation (e.g., a text input operation), an electronic device displays an interface 1100. The interface 1100 includes a text box 1101, an input text 1102, and a cursor 1103. Based on the input text 1102, the electronic device determines a display size of the cursor 1103 corresponding to the input text 1102. The display size of the cursor 1103 is smaller than the display size of the input text 1102.
[0223] In some examples, the process that the electronic device determines the cursor size corresponding to the cursor in the text box in response to the processing operation can be: first, in response to the processing operation, determining the size of the inputted text; then, determining the cursor size corresponding to the cursor matching the inputted text according to the size of the inputted text; then, obtaining the screen display size corresponding to the cursor according to the screen display ratio and the cursor size corresponding to the cursor matching the inputted text; and finally, displaying the cursor according to the screen display size corresponding to the cursor. The size of the inputted text can be a preset size or a size customized by the user, and the present disclosure does not limit this.
[0224] For example, the process that the screen display size corresponding to the cursor is obtained according to the screen display ratio and the cursor size corresponding to the cursor matching the inputted text can be: multiplying the screen display ratio and the cursor size corresponding to the cursor matching the inputted text to obtain the screen display size corresponding to the cursor.
[0225] In some examples, the electronic device includes a text box module for generating the screen display size corresponding to the cursor. The process that the electronic device determines the screen display size corresponding to the cursor in the text box in response to the processing operation can be: the electronic device determines the size of the inputted text and obtains the screen display ratio in response to the processing operation; then, determines the cursor size corresponding to the cursor matching the inputted text according to the size of the inputted text; and sends the cursor size corresponding to the cursor matching the inputted text and the screen display ratio to the text box module. The text box module receives the cursor size corresponding to the cursor matching the inputted text and the screen display ratio, and then obtains the screen display size corresponding to the cursor according to the screen display ratio and the cursor size corresponding to the cursor matching the inputted text, and displays the cursor according to the screen display size corresponding to the cursor.
[0226] In some examples, the process that the electronic device determines the screen display position coordinates of the cursor in response to the processing operation can be: first, determining the size of the inputted text, the number of cursor movements and the cursor movement direction in response to the processing operation; then, determining the unit movement size of the cursor according to the size of the inputted text. Then, determining the movement distance of the cursor according to the unit movement size of the cursor and the number of cursor movements. Then, determining the cursor position coordinates according to the cursor movement direction and the movement distance of the cursor; and finally, obtaining the screen display position coordinates of the cursor according to the screen display ratio and the cursor position coordinates.
[0227] In some examples, the editing module in the electronic device is further configured to determine the screen display position coordinate of the cursor. The electronic device can determine the screen display position coordinate of the cursor in response to the processing operation. The process of determining the screen display position coordinate of the cursor can be as follows: the electronic device determines the size of the input text, the number of cursor movements and the cursor movement direction in response to the processing operation, and obtains the screen display scale; then the electronic device sends the size of the input text, the number of cursor movements and the cursor movement direction and the screen display scale to the editing module. The editing module receives the size of the input text, the number of cursor movements and the cursor movement direction and the screen display scale, and determines the unit movement size of the cursor according to the size of the input text. Then the editing module determines the movement distance of the cursor according to the unit movement size of the cursor and the number of cursor movements. Next, the editing module determines the cursor position coordinate according to the cursor movement direction and the movement distance of the cursor. Finally, the editing module obtains the screen display position coordinate of the cursor according to the screen display scale and the cursor position coordinate, and sends the screen display position coordinate of the cursor to the text box module. The text box module receives the screen display position coordinate of the cursor, and displays the cursor according to the screen display position coordinate of the cursor.
[0228] After obtaining the screen display size corresponding to the cursor and the screen display position coordinate of the cursor, the electronic device can process the view corresponding to the adapted text box based on the adapted view, the screen display size corresponding to the cursor and the screen display position coordinate of the cursor, to obtain a processed view.
[0229] In some examples, when the adapted view is a view corresponding to an adapted picture, if the user performs a processing operation in the adapted view to make a part of the picture displayed outside the screen display range, the electronic device can perform a cropping process on the view corresponding to the adapted picture according to the user's processing operation, to obtain a processed view, so that the processed view matches the user's processing operation.
[0230] Through the above processing process, the problems of incorrect screen display size of the cursor and / or incorrect screen display position of the cursor in the text box (or the comment box) after the user performs a processing operation in the adapted view can be avoided. By determining the screen display size corresponding to the cursor and the screen display position coordinate of the cursor, accurate control and positioning of the cursor position and the cursor size can be achieved, so that the user can accurately edit and process the text. In addition, this method can also enable the user to feel real-time feedback and view changes when editing and processing the text box, thereby improving the user experience.
[0231] Step 412, the electronic device performs inverse calculation processing on the processed view to obtain an inverse calculated view.
[0232] Since the processed view is recorded in cm as the measurement unit, after obtaining the processed view, inverse calculation processing needs to be performed on the processed view to obtain an inverse calculated view, so that the inverse calculated view is recorded in dp as the measurement unit.
[0233] In some examples, the process of inverse calculation on the processed view can be: converting the metric unit of the processed view, so as to obtain the inverse calculated view. Wherein, the metric unit of the processed view is cm, and converting the metric unit of the processed view means converting the metric unit of the processed view from cm to dp. Then, the inverse calculated view is measured by dp.
[0234] Step 413, based on the inverse calculated view, obtaining a display view, and displaying the display view.
[0235] Since the metric unit of the inverse calculated view is dp, when the inverse calculated view is displayed, the metric unit of the inverse calculated view needs to be converted from dp to px for display, therefore, the metric unit of the display view is px.
[0236] In some examples, as shown in Figure 13 The display screen of the electronic device can receive the editing operation of the user. When the screen of the electronic device receives the editing operation of the user, the screen can determine the screen display range of the view corresponding to the editing operation according to the editing operation of the user, and send the screen display range of the view corresponding to the editing operation to the screen display control module.
[0237] The screen display control module can obtain the screen display range and the screen display ratio of the electronic device, and project the view corresponding to the editing operation according to the screen display range of the electronic device and the screen display range of the view corresponding to the editing operation, to obtain the projected view. Then, based on the screen display ratio, the projected view is screen displayed and adapted to obtain the adapted view, and the adapted view is sent to the canvas. The canvas receives and displays the adapted view, and if the user performs a processing operation on the adapted view, the canvas can receive the processing operation of the user on the adapted view, and respond to the processing operation to process the adapted view to obtain the processed view, and send the processed view to the screen display control module. After receiving the processed view, the screen display control module can perform inverse calculation on the processed view to obtain the inverse calculated view, and based on the inverse calculated view, obtain the display view, and send the display view to the display screen. The display screen receives and displays the display view.
[0238] Based on the method provided in the embodiments of the present disclosure, the present disclosure determines the screen display ratio according to the page size, the page type and the screen display range corresponding to each page, so as to better adapt to the screen display range of different electronic devices by using the screen display ratio. Then, the page to be displayed is displayed according to the page size, the page type and the screen display ratio corresponding to each page. In this way, the page content of the page to be displayed not only has better browsability on different electronic devices, but also can be displayed consistently on different electronic devices. Therefore, the user does not need to manually adjust the page to be displayed (i.e., the super-long page in the page to be displayed), and the page to be displayed can automatically adapt to the screen display range of the electronic device.
[0239] It should be understood that each step in the above method embodiments provided by the present disclosure can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The method steps disclosed in combination with the embodiments of the present disclosure can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0240] In one example, the units in the above apparatus can be one or more integrated circuits configured to implement the above methods, for example: one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of at least two of these integrated circuit forms.
[0241] For another example, when the units in the apparatus can be implemented in the form of a processing element scheduler, the processing element can be a general-purpose processor, such as a CPU or other processor that can call a program. For another example, these units can be integrated together in the form of a system on a chip (SOC).
[0242] In one implementation, the units of the above apparatus that implement the respective steps in the above method can be implemented in the form of a processing element scheduler. For example, the apparatus can include a processing element and a storage element, and the processing element calls the program stored in the storage element to execute the method of the above method embodiments. The storage element can be a storage element on the same chip as the processing element, i.e., an on-chip storage element.
[0243] In another implementation, the program for executing the above method can be in a storage element that is on a different chip from the processing element, i.e., an off-chip storage element. At this time, the processing element calls or loads the program from the off-chip storage element to the on-chip storage element to call and execute the method of the above method embodiments.
[0244] For example, the embodiments of the present disclosure further provide an apparatus, such as an electronic device, which can include a processor and a memory storing instructions executable by the processor. The processor is configured to execute the instructions to cause the electronic device to implement the data processing method according to the foregoing embodiments. The memory can be located within the electronic device or outside the electronic device. The processor can include one or more processors.
[0245] In yet another implementation, the units implementing the steps of the above method can be one or more processing elements configured to be on the electronic device as described above. The processing elements can be integrated circuits, such as one or more ASICs, or one or more DSPs, or one or more FPGAs, or combinations of these types of integrated circuits. The integrated circuits can be integrated together, forming a chip.
[0246] For example, the embodiments of the present disclosure further provide a chip, such as Figure 2 As shown in the figure, the chip system includes at least one processor 1301 and at least one interface circuit 1302. The processor 1301 and the interface circuit 1302 can be interconnected by a line. For example, the interface circuit 1302 can be used to receive signals from other devices. For another example, the interface circuit 1302 can be used to send signals to other devices (such as the processor 1301).
[0247] For example, the interface circuit 1302 can read instructions stored in the memory of the device and send the instructions to the processor 1301. When the instructions are executed by the processor 1301, the electronic device (such as the electronic device 200 shown in the figure) can perform the steps in the above embodiments. Of course, the chip system can also include other discrete devices, which are not limited in the embodiments of the present disclosure. As shown in the figure, the chip system includes at least one processor 1301 and at least one interface circuit 1302. The processor 1301 and the interface circuit 1302 can be interconnected by a line. For example, the interface circuit 1302 can be used to receive signals from other devices. For another example, the interface circuit 1302 can be used to send signals to other devices (such as the processor 1301).
[0248] The embodiments of the present disclosure further provide a computer readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by an electronic device, the electronic device can implement the data processing method as described above.
[0249] The embodiments of the present disclosure further provide a computer program product including computer instructions executable by an electronic device, which, when executed by the electronic device, causes the electronic device to implement the data processing method as described above. Through the description of the foregoing embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the foregoing functional modules is taken as an example for description. In actual applications, the foregoing functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0250] In several embodiments provided by the present disclosure, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the division of the apparatus embodiments is merely illustrative, and the division of the modules or units can be changed according to actual needs. For example, a plurality of units or components can be combined or integrated into another apparatus, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, apparatuses or units, and can be in electrical, mechanical or other forms.
[0251] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, i.e., may be located in one place, or may be distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0252] In addition, each functional unit in the various embodiments of the present disclosure can be integrated into one processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0253] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present disclosure essentially or substantially or all or part of the technical solutions that make contributions to the prior art can be embodied in the form of a software product, such as a program. The software product is stored in a program product, such as a computer readable storage medium, and includes a plurality of instructions for causing an end device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various media that can store program codes.
[0254] For example, the embodiments of the present disclosure can also provide a computer readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by an electronic device, the electronic device implements the data processing method as in the foregoing method embodiments.
[0255] The above is merely specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto, and any changes or replacements within the technical scope disclosed by the present disclosure should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. A page display method, characterized in that, Applied to electronic devices, the method includes: The system obtains the page to be displayed, the page size corresponding to each page in the page to be displayed, and the screen display area of the electronic device; the page to be displayed includes an extra-long page; wherein, the screen display area refers to the actual usable display area on the screen of the electronic device after removing the border and other non-display parts; the display width of the extra-long page is smaller than the width of the corresponding display size of the electronic device; Based on the comparison results between the page size and the filter size corresponding to each page, the page type corresponding to each page is determined; wherein, the page type includes a first page type and a second page type; If the page size corresponding to the page is less than or equal to the filter size, then the page type corresponding to the page is determined to be the first page type; if the page size corresponding to the page is greater than the filter size, then the page type corresponding to the page is the second page type; wherein, the filter size is related to the screen display range; The screen display page is determined based on the page size and page type of each page in the page to be displayed. The screen display ratio is determined based on the page size corresponding to the screen display page and the screen display range; Based on the page size corresponding to the first page and the screen display ratio, determine the screen display size corresponding to the first page; display the first page according to the screen display size corresponding to the first page; the page type of the first page is the first page type; Based on the page size corresponding to the screen display page, a second page is determined, and the page type corresponding to the second page is the second page type; based on the screen display ratio and the page size corresponding to the second page, the second page is divided into multiple screens to obtain the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page; according to the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page, the second page is displayed in split screens.
2. The method according to claim 1, characterized in that, The method further includes: Receive user editing operations; In response to the editing operation, obtain the screen display range of the view corresponding to the editing operation; Based on the screen display range of the electronic device and the screen display range of the view, the view corresponding to the editing operation is projected to obtain the projected view; Based on the screen ratio, the projected view is adapted to the screen ratio to obtain an adapted view, and the adapted view is displayed.
3. The method according to claim 2, characterized in that, The method further includes: Receive processing operations performed by the user in the adapted view; the view corresponding to the editing operation includes the view corresponding to the text box, and the adapted view includes the view corresponding to the adapted text box; In response to the processing operation, the screen display size and screen display position coordinates of the cursor in the text box are determined; Based on the screen display size and screen display position coordinates of the cursor, the view corresponding to the adapted text box is processed to obtain the processed view; The processed view is then inversely calculated to obtain the display view, which is then displayed.
4. The method according to claim 1, characterized in that, The step of determining the screen display ratio based on the page size corresponding to the screen display page and the screen display range includes: The screen display ratio is determined based on the width and height of the page size corresponding to the screen display page, and the width and height of the screen display area.
5. The method according to claim 4, characterized in that, The screen display ratio satisfies the following expression: ; Where R is the screen ratio; wi is the width of the page corresponding to the screen display page; hi is the height of the page corresponding to the screen display page; wj is the width of the screen display area; and hj is the height of the screen display area.
6. The method according to claim 1, characterized in that, The extra-long page refers to a global bookmark page and / or a webpage bookmark page.
7. An electronic device, characterized in that, include: Processor, memory, bus, and communication interface; The memory is used to store computer execution instructions. The processor is connected to the memory via the bus. When the terminal is running, the processor executes the computer execution instructions stored in the memory to cause the terminal to perform the page display method as described in any one of claims 1-6.
8. A computer-readable storage medium storing instructions, characterized in that, When the instruction is executed on the terminal, the terminal performs the page display method as described in any one of claims 1-6.
Citation Information
Patent Citations
Page preview method, related device and equipment
CN113779465A
Rem-based page adaptive layout method and device
CN113934339A