Display method and device

By dynamically adjusting the content height of the text box according to the screen resolution and displaying the expanded controls, the problem that the fixed height of the text box cannot adapt to the non-mainstream screen size is solved, and the user's reading experience on devices with different screen resolutions is improved.

CN113918107BActive Publication Date: 2025-08-19BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111156288.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-29
Publication Date
2025-08-19
Estimated Expiration
2041-09-29

AI Technical Summary

Technical Problem

In the existing content folding strategy, the fixed height of the text box cannot be adapted to non-mainstream screen sizes, resulting in a reduced user reading experience.

Method used

Dynamically adjust the content height of the text box according to the screen resolution, and when the collapse display condition is met, the content that does not exceed the content height is displayed and the excess part is collapsed to display the expand control.

Benefits of technology

It realizes adaptive adjustment of the content of the text box, improving the user experience of terminal devices with different screen resolutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113918107B_ABST
    Figure CN113918107B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a display method, comprising: obtaining a screen resolution; determining a content height of a text box based on the screen resolution; determining the actual height of the text box when the corresponding content is expanded; and when a folding display condition is determined to be satisfied based on the actual height and the content height, displaying content that does not exceed the content height, folding content that exceeds the content height, and displaying an expansion control. Thus, the height or number of rows of content displayed in the text box is no longer fixed, and an adaptive content height can be determined for terminal devices with different screen resolutions, thereby improving the user experience when browsing on terminal devices with different screen resolutions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a display method and a display device. Background Art

[0002] In terminal devices, when a large amount of content needs to be displayed, the content is usually folded. Existing content folding strategies usually use fixed parameters, such as a fixed text box height. However, existing content folding strategies have the following problems:

[0003] The fixed height of the text box is usually designed for mainstream screen sizes and cannot be adapted to non-mainstream screen sizes, which reduces the user reading experience. Summary of the Invention

[0004] In view of the above problems, the embodiments of the present application are proposed to provide a display method and a corresponding display device that overcome the above problems or at least partially solve the above problems.

[0005] In order to solve the above problems, the present application discloses a display method, including:

[0006] Get the screen resolution;

[0007] Determine the content height of the text box according to the screen resolution;

[0008] Determining the actual height of the text box when it is expanded to display corresponding content;

[0009] When it is determined that the folding display condition is met according to the actual height and the content height, the content that does not exceed the content height is displayed, the content that exceeds the content height is folded, and an expansion control is displayed.

[0010] Optionally, determining the content height of the text box according to the screen resolution includes:

[0011] Get the reference ratio for content height;

[0012] Determining a reference height according to the height of the screen resolution and the reference ratio;

[0013] The content height of the text box is determined according to the reference height.

[0014] Optionally, determining the content height of the text box according to the reference height includes:

[0015] Get the displayed row height of the text box;

[0016] Determining the number of content rows according to the reference height and the display row height;

[0017] The content height of the text box is determined according to the display row height and the number of content rows.

[0018] Optionally, obtaining a reference ratio for content height includes:

[0019] Determine the text box element that needs to be displayed in the text box;

[0020] A reference scale is determined according to the text box elements that need to be displayed in the text box.

[0021] Optionally, when the actual height is greater than the sum of the content height and the reserved height, it is determined that the folding display condition is met.

[0022] Optionally, it also includes:

[0023] When the actual height is less than or equal to the sum of the content height and the reserved height, all contents are expanded and displayed.

[0024] Optionally, the display expansion control includes:

[0025] Display an expansion control below the content height, or display an expansion control in the last row of the content height.

[0026] The present application also discloses a display device, including:

[0027] Resolution acquisition module, used to obtain screen resolution;

[0028] A content height determination module, configured to determine the content height of the text box according to the screen resolution;

[0029] An actual height determination module, used to determine the actual height of the text box when it is expanded to display corresponding content;

[0030] The display module is configured to display content that does not exceed the content height, fold content that exceeds the content height, and display an expansion control when it is determined that a folding display condition is met based on the actual height and the content height.

[0031] Optionally, the content height determination module includes:

[0032] The reference ratio acquisition submodule is used to obtain the reference ratio for the content height;

[0033] A reference height determination submodule, configured to determine a reference height according to the height of the screen resolution and the reference ratio;

[0034] The content height determination submodule is used to determine the content height of the text box according to the reference height.

[0035] Optionally, the content height determination submodule includes:

[0036] Display row height acquisition unit, used to obtain the display row height of the text box;

[0037] a content row number determination unit, configured to determine the number of content rows based on the reference height and the display row height;

[0038] The content height determining unit is used to determine the content height of the text box according to the display row height and the number of content rows.

[0039] Optionally, the reference ratio acquisition submodule includes:

[0040] A text box element determination unit, used to determine the text box element that needs to be displayed in the text box;

[0041] The reference ratio determining unit is configured to determine a reference ratio according to the text box elements that need to be displayed in the text box.

[0042] Optionally, when the actual height is greater than the sum of the content height and the reserved height, it is determined that the folding display condition is met.

[0043] Optionally, the display module is further configured to expand and display all contents when the actual height is less than or equal to the sum of the content height and the reserved height.

[0044] Optionally, the display module includes:

[0045] The space display submodule is used to display an expansion control below the content height, or to display an expansion control in the last line of the content height.

[0046] The embodiments of the present application include the following advantages:

[0047] In an embodiment of the present application, the height of the text box's content can be adaptively determined based on the screen resolution; the actual height of the text box when it is expanded to display the corresponding content can be determined; when the folding display conditions are determined to be met based on the actual height and the content height, the content that does not exceed the content height is displayed, the content that exceeds the content height is folded, and the expansion control is displayed. Compared to the prior art, the height or number of rows of content displayed in the text box is no longer fixed. The adaptive content height can be determined for terminal devices with different screen resolutions, which can improve the user experience when browsing on terminal devices with different screen resolutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a flowchart of a display method according to an embodiment of the present application;

[0049] Figure 2 is a flowchart of another display method according to an embodiment of the present application;

[0050] Figure 3 This is a schematic diagram of a text box display content in an embodiment of the present application;

[0051] Figure 4 This is a schematic diagram of another text box display content in an embodiment of the present application;

[0052] Figure 5 This is a schematic diagram of another text box display content in an embodiment of the present application;

[0053] Figure 6 This is a schematic diagram of another text box display content in an embodiment of the present application;

[0054] Figure 7 This is a structural block diagram of a display device according to an embodiment of the present application;

[0055] Figure 8 This is a structural block diagram of an optional embodiment of a display device of the present application;

[0056] Figure 9 is a structural block diagram of an electronic device for display according to an exemplary embodiment;

[0057] Figure 10 It is a structural diagram of an electronic device for display according to another exemplary embodiment of the present application. DETAILED DESCRIPTION

[0058] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0059] Reference Figure 1 , shows a flowchart of a display method according to an embodiment of the present application, which may specifically include the following steps:

[0060] Step 101: Get screen resolution.

[0061] Screen resolution refers to the number of pixels in the vertical and horizontal directions, and the unit is px.

[0062] Step 102: Determine the content height of the text box according to the screen resolution.

[0063] When a user browses a page on a terminal device, they often want a larger area for the text box on the screen to display content, so that they can see as much content as possible without triggering a content change operation. For example, a content change operation may include: clicking an expand button when the content is collapsed; dragging a slider to display the content corresponding to the dragged position on the screen.

[0064] The content height may refer to the height used to control how much content is displayed in the text box when displaying content in the text box. The content height of the text box may be adaptively determined for different screen resolutions.

[0065] For example, the content height is not greater than the height of the screen resolution. If the content height is greater than the height of the screen resolution, the content in the text box cannot be displayed on the same screen.

[0066] In the embodiment of the present application, the content height is not fixed but can be adjusted dynamically, so the height of the entire text box is also not fixed.

[0067] Step 103: Determine the actual height of the text box when it is expanded to display the corresponding content.

[0068] Expanded display is relative to collapsed display. Expanded display means that all contents are displayed without collapsing the text box. Collapsed display means that only part of the contents in the text box are displayed, and the rest of the contents are collapsed and not displayed.

[0069] When the text box is expanded, all the content to be displayed is displayed in the text box, and the height of the text box is the actual height.

[0070] Step 104 : When it is determined that the folding display condition is met based on the actual height and the content height, the content that does not exceed the content height is displayed, the content that exceeds the content height is folded, and an expansion control is displayed.

[0071] The folding display condition is used to determine whether the folding display is required. The folding display condition can be determined based on the actual height and the content height. When the folding display condition is determined to be met, the content that does not exceed the content height can be displayed in the text box, and the content that exceeds the content height can be folded and not displayed. At the same time, an expansion control can be displayed in the text box. For example, the expansion control can be a touch button. When the user clicks the touch button, the folded content can be expanded and displayed.

[0072] In an embodiment of the present application, the height of the text box's content can be adaptively determined based on the screen resolution; the actual height of the text box when it is expanded to display the corresponding content can be determined; when the folding display conditions are determined to be met based on the actual height and the content height, the content that does not exceed the content height is displayed, the content that exceeds the content height is folded, and the expansion control is displayed. Compared to the prior art, the height or number of rows of content displayed in the text box is no longer fixed. The adaptive content height can be determined for terminal devices with different screen resolutions, which can improve the user experience when browsing on terminal devices with different screen resolutions.

[0073] Reference Figure 2 , shows a flowchart of another display method according to an embodiment of the present application, which may specifically include the following steps:

[0074] Step 201: Get screen resolution.

[0075] Step 202: Obtain a reference ratio for content height.

[0076] The reference ratio is used to set the content height. The content height can be determined based on the reference ratio and the height of the screen resolution.

[0077] In an example, step 202 may include: determining text box elements that need to be displayed in the text box; and determining a reference ratio based on the text box elements that need to be displayed in the text box.

[0078] A text box element refers to an element that can be displayed in a text box. For example, the text box element may include but is not limited to: content, title, expansion control, etc. For example, the content may include but is not limited to: at least one of text, picture, and video. Figure 3 The following is a schematic diagram of a text box displaying content according to an embodiment of the present application. A page may include multiple text boxes. In one text box, the displayed content may include a title and an image. In another text box, the displayed content may include text and an expansion control, with some text displayed collapsed and the expansion control located below the text.

[0079] If a text box needs to display content and text box elements other than the expansion control, you need to reserve some area for displaying the content and text box elements other than the expansion control. You can set a smaller reference scale. If a text box only needs to display content and expansion controls, or only needs to display content, you can set a larger reference scale.

[0080] In another example, when a page has multiple text boxes, a reference ratio of the height of the content in each text box may be set according to the number of text boxes in the page.

[0081] When a page has multiple text boxes, the user may want to quickly slide to other text boxes on the page. Therefore, the content height of the text box should not be set too large, so that the user does not need to slide a long distance to slide to other text boxes.

[0082] In another example, the reference ratio corresponding to the text box may be a default ratio, for example, a ratio that provides a better user experience based on empirical data analysis may be used as the reference ratio; or it may be set by the user.

[0083] Step 203: Determine a reference height according to the height of the screen resolution and the reference ratio.

[0084] For example, the product of the height of the screen resolution and the reference ratio may be used as the reference height.

[0085] Step 204: Determine the content height of the text box according to the reference height.

[0086] Exemplarily, a height value that is greater than or equal to the reference height may be determined as the content height of the text box.

[0087] In the embodiment of the present application, step 204 may include the following sub-steps S11-S13:

[0088] Sub-step S11, obtaining the display line height of the text box.

[0089] The display line height refers to the height of a line of content displayed in a text box. In practice, a terminal device can use a multiple of the base pixel height as the default line height. For example, if the base pixel height is 16px, the default line height can be 2 times the base pixel height (32px).

[0090] When displayed, text boxes can be scaled based on the default row height. If not scaled, the displayed row height of the text box is the default row height. If the text box is scaled, the displayed row height is calculated by multiplying the scale factor by the default row height. For example, if the user zooms in 150%, the displayed row height is 150% of the default row height.

[0091] Sub-step S12: determining the number of content rows according to the reference height and the display row height.

[0092] The number of content lines can refer to the number of lines set to display content in a text box. For example, the reference height can be divided by the display line height to obtain the first number of lines. If the reference height does not divide the display line height, the first number of lines has a remainder, and a second number of lines greater than the first number of lines can be obtained by rounding up. The second number of lines is used as the number of content lines. If the reference height can divide the display line height, the first number of lines can be used as the number of content lines.

[0093] For example, assuming the screen resolution height is Y, the display row height is M, and the reference ratio is 70%, the second number of rows N = [Y * 0.7 / M] + 1, where […] represents rounding down. For example, if the user opens the page on a terminal device with a resolution of 750 * 1334, the second number of rows in the text box is n = [1334 * 0.7 / 64] + 1 = 15.

[0094] Sub-step S13, determining the content height of the text box according to the display row height and the number of content rows.

[0095] Exemplarily, the product of the display row height and the number of content rows may be determined as the content height of the text box.

[0096] Step 205: Determine the actual height of the text box when it is expanded to display the corresponding content.

[0097] The content to be displayed in the text box may include a variety of text box elements. When expanded, all the content to be displayed is displayed in the text box. At this time, the height of the text box is the actual height.

[0098] For example, when text and a picture are displayed in a text box, the actual height includes the height of the text and the height of the picture. When text and a video are displayed in a text box, the actual height includes the height of the text and the height of the video.

[0099] Step 206 : When it is determined that the folding display condition is met based on the actual height and the content height, the content that does not exceed the content height is displayed, the content that exceeds the content height is folded, and an expansion control is displayed.

[0100] In one example, when the actual height is greater than the sum of the content height and the reserved height, it is determined that the folding display condition is met, and the content that does not exceed the content height can be displayed, the content that exceeds the content height can be folded, and an expansion control can be displayed. Exemplarily, the expansion control can be displayed below the content that exceeds the content height, or in the last row of the content height.

[0101] When the content displayed in the text box includes a picture or video, if a portion of the picture or video exceeds the area of the content height, the exceeding portion can be masked to achieve a folded display effect.

[0102] When the actual height is less than or equal to the sum of the content height and the reserved height, it is determined that the folding display condition is not met. The reserved height can be a height reserved for displaying text box elements other than the content.

[0103] For example, if the expansion control is set to be displayed in the next row of the area with the content height, the reserved height can be the height reserved for displaying the expansion control, for example, the reserved height can be 1 row. If the expansion control is set to be displayed in the last row of the area with the content height and does not exceed the area with the content height, the reserved height can be 0 rows.

[0104] Reference Figure 4 The figure shows another schematic diagram of a text box displaying content according to an embodiment of the present application. It is assumed that the number of content lines in the text box is determined to be 11 lines, and the reserved height is 1 line. Figure 5 , the actual height of the text box when it is expanded to display the corresponding content is greater than 12 lines, so the text after line 11 can be collapsed and the expansion control can be displayed on line 12.

[0105] Reference Figure 5 The figure shows another example of a text box displaying content in an embodiment of the present application. Assume that the number of lines of content in the text box is determined to be 11, and the reserved height is 1 line. When a picture is displayed in the text box, the actual height of the text box when expanded to display the text and picture is greater than 12 lines. Therefore, the text after line 11 can be collapsed, and the expansion control can be displayed on line 12.

[0106] In an embodiment of the present application, a reference height can be determined based on the height of the screen resolution and a reference ratio; the content height of the text box can be determined based on the reference height; the actual height of the text box when it is expanded to display the corresponding content can be determined; when it is determined based on the actual height and the content height that the folding display condition is met, the content that does not exceed the content height is displayed, the content that exceeds the content height is folded, and the expansion control is displayed. Compared to the existing technology, the height or number of rows of content displayed in the text box is no longer fixed. For terminal devices with different screen resolutions, the adaptive content height can be determined, which can improve the user experience when browsing on terminal devices with different screen resolutions.

[0107] One existing content collapse strategy uses a fixed maximum display line number for text boxes. However, this approach offers a poor interactive reading experience in certain scenarios. For example, if a text box is set to display a maximum of 15 lines, content beyond that is truncated. The user clicks the expand button to display the remaining lines. If the total text height is 16 lines, the content beyond 15 lines is truncated and an expand button is displayed. Clicking expand only expands the text box down one line. This poor interactive reading experience impacts both display and user reading efficiency.

[0108] In an embodiment of the present application, the method may further include: when the actual height is less than or equal to the sum of the content height and the reserved height, expanding and displaying all the contents.

[0109] Reference Figure 6 The figure shows another schematic diagram of a text box displaying content according to an embodiment of the present application. It is assumed that the number of content lines in the text box is determined to be 11 lines, and the reserved height is 1 line. Figure 6 In the , the actual height of the text box when expanded to display the corresponding content is 12 lines, which is exactly the sum of the number of content lines and the reserved height. Therefore, the entire content can be displayed without folding. This can avoid the situation where only a small amount of content (such as a single line of content) is collapsed, improving the user reading experience.

[0110] It should be noted that for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the order of the actions described, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0111] Reference Figure 7 , shows a structural block diagram of a display device according to an embodiment of the present application, which may specifically include the following modules:

[0112] A resolution acquisition module 701 is used to acquire screen resolution;

[0113] A content height determination module 702 is configured to determine the content height of the text box according to the screen resolution;

[0114] An actual height determination module 703 is used to determine the actual height of the text box when it is expanded to display corresponding content;

[0115] The display module 704 is configured to display content that does not exceed the content height, fold content that exceeds the content height, and display an expansion control when it is determined that a folding display condition is met based on the actual height and the content height.

[0116] Reference Figure 8 , shows a structural block diagram of an optional embodiment of a display device of the present application. In an optional embodiment of the present application, the content height determination module 702 may include:

[0117] The reference ratio acquisition submodule 7021 is used to obtain a reference ratio for content height;

[0118] A reference height determination submodule 7022 is configured to determine a reference height based on the height of the screen resolution and the reference ratio;

[0119] The content height determination submodule 7023 is configured to determine the content height of the text box according to the reference height.

[0120] In an optional embodiment of the present application, the content height determination submodule 7023 may include:

[0121] Display row height acquisition unit 70231, used to acquire the display row height of the text box;

[0122] a content row number determination unit 70232, configured to determine the number of content rows based on the reference height and the display row height;

[0123] The content height determining unit 70233 is configured to determine the content height of the text box according to the display row height and the number of content rows.

[0124] In an optional embodiment of the present application, the reference ratio acquisition submodule 7021 may include:

[0125] The text box element determination unit 70211 is used to determine the text box element that needs to be displayed in the text box;

[0126] The reference ratio determining unit 70212 is configured to determine a reference ratio according to the text box elements that need to be displayed in the text box.

[0127] In an optional embodiment of the present application, when the actual height is greater than the sum of the content height and the reserved height, it is determined that the folding display condition is met.

[0128] In an optional embodiment of the present application, the display module 704 is further configured to expand and display all contents when the actual height is less than or equal to the sum of the content height and the reserved height.

[0129] In an optional embodiment of the present application, the display module 704 may include:

[0130] The space display submodule 7041 is used to display an expansion control below the content height, or to display an expansion control in the last line of the content height.

[0131] In an embodiment of the present application, the height of the text box's content can be adaptively determined based on the screen resolution; the actual height of the text box when it is expanded to display the corresponding content can be determined; when the folding display conditions are determined to be met based on the actual height and the content height, the content that does not exceed the content height is displayed, the content that exceeds the content height is folded, and the expansion control is displayed. Compared to the prior art, the height or number of rows of content displayed in the text box is no longer fixed. The adaptive content height can be determined for terminal devices with different screen resolutions, which can improve the user experience when browsing on terminal devices with different screen resolutions.

[0132] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0133] Figure 9 1 is a block diagram illustrating a structure of an electronic device 900 for display according to an exemplary embodiment. For example, the electronic device 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a smart wearable device, etc.

[0134] Reference Figure 9 , the electronic device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .

[0135] The processing component 902 generally controls the overall operation of the electronic device 900, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 902 may include one or more modules to facilitate interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.

[0136] The memory 904 is configured to store various types of data to support operations on the electronic device 900. Examples of such data include instructions for any application or method operating on the electronic device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0137] The power component 906 provides power to the various components of the electronic device 900. The power component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 900.

[0138] The multimedia component 908 includes a screen that provides an output interface between the electronic device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the electronic device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.

[0139] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the electronic device 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.

[0140] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.

[0141] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the electronic device 900. For example, the sensor assembly 914 can detect the open / closed state of the electronic device 900, the relative positioning of components, such as the display and keypad of the electronic device 900. The sensor assembly 914 can also detect changes in the position of the electronic device 500 or a component of the electronic device 900, the presence or absence of user contact with the electronic device 900, the orientation or acceleration / deceleration of the electronic device 900, and the temperature change of the electronic device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0142] The communication component 916 is configured to facilitate wired or wireless communication between the electronic device 900 and other devices. The electronic device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 914 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 914 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0143] In an exemplary embodiment, the electronic device 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described methods.

[0144] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the instructions can be executed by the processor 920 of the electronic device 900 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0145] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform a display method, the method comprising:

[0146] Get the screen resolution;

[0147] Determine the content height of the text box according to the screen resolution;

[0148] Determining the actual height of the text box when it is expanded to display corresponding content;

[0149] When it is determined that the folding display condition is met according to the actual height and the content height, the content that does not exceed the content height is displayed, the content that exceeds the content height is folded, and an expansion control is displayed.

[0150] Optionally, determining the content height of the text box according to the screen resolution includes:

[0151] Get the reference ratio for content height;

[0152] Determining a reference height according to the height of the screen resolution and the reference ratio;

[0153] The content height of the text box is determined according to the reference height.

[0154] Optionally, determining the content height of the text box according to the reference height includes:

[0155] Get the displayed row height of the text box;

[0156] Determining the number of content rows according to the reference height and the display row height;

[0157] The content height of the text box is determined according to the display row height and the number of content rows.

[0158] Optionally, obtaining a reference ratio for content height includes:

[0159] Determine the text box element that needs to be displayed in the text box;

[0160] A reference scale is determined according to the text box elements that need to be displayed in the text box.

[0161] Optionally, when the actual height is greater than the sum of the content height and the reserved height, it is determined that the folding display condition is met.

[0162] Optionally, it also includes:

[0163] When the actual height is less than or equal to the sum of the content height and the reserved height, all contents are expanded and displayed.

[0164] Optionally, the display expansion control includes:

[0165] Display an expansion control below the content height, or display an expansion control in the last row of the content height.

[0166] Figure 10: This is a structural diagram of an electronic device 1000 for display according to another exemplary embodiment of the present application. The electronic device 1000 can be a server, which may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1022 (for example, one or more processors) and memory 1032, one or more storage media 1030 (for example, one or more mass storage devices) storing application programs 1042 or data 1044. Among them, the memory 1032 and the storage medium 1030 can be temporary storage or persistent storage. The program stored in the storage medium 1030 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1022 can be configured to communicate with the storage medium 1030 to execute a series of instruction operations in the storage medium 1030 on the server.

[0167] The server may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input and output interfaces 1058, one or more keyboards 1056, and / or one or more operating systems 1041, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0168] In an exemplary embodiment, the server is configured to execute one or more programs including instructions for performing the following operations by one or more central processors 1022:

[0169] Get the screen resolution;

[0170] Determine the content height of the text box according to the screen resolution;

[0171] Determining the actual height of the text box when it is expanded to display corresponding content;

[0172] When it is determined that the folding display condition is met according to the actual height and the content height, the content that does not exceed the content height is displayed, the content that exceeds the content height is folded, and an expansion control is displayed.

[0173] Optionally, determining the content height of the text box according to the screen resolution includes:

[0174] Get the reference ratio for content height;

[0175] Determining a reference height according to the height of the screen resolution and the reference ratio;

[0176] The content height of the text box is determined according to the reference height.

[0177] Optionally, determining the content height of the text box according to the reference height includes:

[0178] Get the displayed row height of the text box;

[0179] Determining the number of content rows according to the reference height and the display row height;

[0180] The content height of the text box is determined according to the display row height and the number of content rows.

[0181] Optionally, obtaining a reference ratio for content height includes:

[0182] Determine the text box element that needs to be displayed in the text box;

[0183] A reference scale is determined according to the text box elements that need to be displayed in the text box.

[0184] Optionally, when the actual height is greater than the sum of the content height and the reserved height, it is determined that the folding display condition is met.

[0185] Optionally, it also includes:

[0186] When the actual height is less than or equal to the sum of the content height and the reserved height, all contents are expanded and displayed.

[0187] Optionally, the display expansion control includes:

[0188] Display an expansion control below the content height, or display an expansion control in the last row of the content height.

[0189] The embodiments of the present application also provide one or more machine-readable media having instructions stored thereon, which, when executed by one or more processors, enable the processors to execute the methods described in the embodiments of the present application.

[0190] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0191] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more machine-readable media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0192] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0193] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0194] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0195] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0196] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0197] The above is a detailed introduction to a display method and a display device provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A display method, characterized in that: include: Get the screen resolution; Determine the content height of the text box according to the screen resolution; The screen includes at least one text box, and the content height of each text box is determined according to the screen resolution, a reference ratio, a display row height of the text box, and the number of content rows; the reference ratio is determined according to a text box element, and the text box element is displayed in the text box; the text box element includes at least one of content, a title, and an expansion control, and the content includes at least one of text, a picture, and a video; the display row height is determined according to a default row height and a zoom ratio, and the default row height is determined according to a base pixel height; the number of content rows is determined according to the height of the screen resolution, the reference ratio, and the display row height; Determining the actual height of the text box when it is expanded to display corresponding content; When it is determined that the folding display condition is met based on the actual height and the content height, the content that does not exceed the content height is displayed, the content that exceeds the content height is folded, and an expansion control is displayed; when the actual height is greater than the sum of the content height and the reserved height, it is determined that the folding display condition is met; The reserved height is the height reserved for displaying text box elements other than the content; The display expansion control includes: The expansion control is displayed below the content height, or the expansion control is displayed in the last line of the content height; when the expansion control is set to be displayed below the content height, the reserved height is the height reserved for displaying the expansion control.

2. The method according to claim 1, characterized in that Determining the content height of the text box according to the screen resolution includes: Get the reference ratio for content height; Determining a reference height according to the height of the screen resolution and the reference ratio; The content height of the text box is determined according to the reference height.

3. The method according to claim 2, characterized in that Determining the content height of the text box according to the reference height includes: Get the displayed row height of the text box; Determining the number of content rows according to the reference height and the display row height; The content height of the text box is determined according to the display row height and the number of content rows.

4. The method according to claim 2, characterized in that The obtaining of a reference ratio for content height includes: Determine the text box element that needs to be displayed in the text box; A reference scale is determined according to the text box elements that need to be displayed in the text box.

5. The method according to claim 1, wherein Also includes: When the actual height is less than or equal to the sum of the content height and the reserved height, all contents are expanded and displayed.

6. A display device, characterized in that: include: Resolution acquisition module, used to obtain screen resolution; A content height determination module, configured to determine the content height of the text box according to the screen resolution; The screen includes at least one text box, and the content height of each text box is determined according to the screen resolution, a reference ratio, a display row height of the text box, and the number of content rows; the reference ratio is determined according to a text box element, and the text box element is displayed in the text box; the text box element includes at least one of content, a title, and an expansion control, and the content includes at least one of text, a picture, and a video; the display row height is determined according to a default row height and a zoom ratio, and the default row height is determined according to a base pixel height; the number of content rows is determined according to the height of the screen resolution, the reference ratio, and the display row height; An actual height determination module, used to determine the actual height of the text box when it is expanded to display corresponding content; A display module configured to, when determining based on the actual height and the content height that a folding display condition is met, display content that does not exceed the content height, fold the content that exceeds the content height, and display an expansion control; and when the actual height is greater than the sum of the content height and the reserved height, determine that the folding display condition is met; The reserved height is the height reserved for displaying text box elements other than the content; The display module includes: The spatial display submodule is used to display an expansion control below the content height, or to display the expansion control in the last line of the content height; when the expansion control is set to be displayed below the content height, the reserved height is the height reserved for displaying the expansion control.

7. The device according to claim 6, characterized in that The content height determination module includes: The reference ratio acquisition submodule is used to obtain the reference ratio for the content height; A reference height determination submodule, configured to determine a reference height according to the height of the screen resolution and the reference ratio; The content height determination submodule is used to determine the content height of the text box according to the reference height.

8. The device according to claim 7, characterized in that The content height determination submodule includes: Display row height acquisition unit, used to obtain the display row height of the text box; a content row number determination unit, configured to determine the number of content rows based on the reference height and the display row height; The content height determining unit is used to determine the content height of the text box according to the display row height and the number of content rows.

9. The device according to claim 7, characterized in that The reference ratio acquisition submodule includes: A text box element determination unit, used to determine the text box element that needs to be displayed in the text box; The reference ratio determining unit is configured to determine a reference ratio according to the text box elements that need to be displayed in the text box.

10. The device according to claim 6, characterized in that The display module is further configured to expand and display all contents when the actual height is less than or equal to the sum of the content height and the reserved height.

11. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the display method according to any one of claims 1 to 5 are implemented.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the display method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Display method and display apparatus used for page without pull-down function

    CN107885411A