CN107256142B - Page display method and terminal - Google Patents

Page display method and terminal Download PDF

Info

Publication number
CN107256142B
CN107256142B CN201710265761.3A CN201710265761A CN107256142B CN 107256142 B CN107256142 B CN 107256142B CN 201710265761 A CN201710265761 A CN 201710265761A CN 107256142 B CN107256142 B CN 107256142B
Authority
CN
China
Prior art keywords
page
target
terminal
target page
size
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710265761.3A
Other languages
Chinese (zh)
Other versions
CN107256142A (en
Inventor
梁宇轩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710265761.3A priority Critical patent/CN107256142B/en
Publication of CN107256142A publication Critical patent/CN107256142A/en
Application granted granted Critical
Publication of CN107256142B publication Critical patent/CN107256142B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a page display method and a terminal, which can improve the display effect which can be achieved by displaying pages on multiple terminals. The method provided by the embodiment of the invention comprises the following steps: the method comprises the steps that a terminal obtains the page size of a target page in an original state; when the terminal detects that the target page is in a target state, the terminal determines a page adaptation mode matched with the characteristic type of the target page; the terminal adjusts the page size according to the page adaptation mode; and the terminal displays the target page by using the adjusted page size.

Description

Page display method and terminal
Technical Field
The invention relates to the technical field of internet, in particular to a page display method and a terminal.
Background
When a user accesses the same page on different terminals, the page may not be suitable for some terminals, the display effect presented by the page may not be consistent with the expected display effect, the display effect is not good, the use and viewing of the user are affected, and therefore the display problem of the page on multiple terminals needs to be solved.
One existing solution is: and determining a main stream terminal in the multiple terminals, designing the page by referring to the size and the resolution of the main stream terminal, and displaying the page in the middle when the page needs to be displayed in other terminals.
However, when the size of a certain terminal is larger than the size of the main stream terminal and the resolution is larger than the resolution of the main stream terminal, if the page needs to be displayed in the terminal, the display effect of the page in the terminal is not optimal because the page and the terminal are not completely matched. Therefore, the display effect which can be achieved by displaying the page on the multiple terminals in the existing scheme is insufficient.
Disclosure of Invention
The embodiment of the invention provides a page display method and a terminal, which can improve the display effect which can be achieved by displaying pages in multiple terminals.
In view of this, a first aspect of the embodiments of the present invention provides a method for displaying a page, which may include:
the method comprises the steps that a terminal obtains the page size of a target page in an original state;
when the terminal detects that the target page is in a target state, the terminal determines a page adaptation mode matched with the characteristic type of the target page;
the terminal adjusts the page size according to the page adaptation mode;
and the terminal displays the target page by using the adjusted page size.
A second aspect of an embodiment of the present invention provides a terminal, which may include:
the acquisition module is used for acquiring the page size of the target page in the original state;
the determining module is used for determining a page adaptation mode matched with the characteristic type of the target page when the target page is detected to be in a target state;
the adjusting module is used for adjusting the page size according to the page adaptation mode;
and the display module is used for displaying the target page by using the adjusted page size.
According to the technical scheme, the embodiment of the invention has the following advantages: the method comprises the steps that a terminal obtains the page size of a target page in an original state; when the terminal detects that the target page is in a target state, the terminal starts to analyze the page adaptation mode, and the terminal determines the page adaptation mode matched with the characteristic type of the target page through the page adaptation mode analysis; the terminal performs width scaling or height scaling and other adjustments on the page size according to the page adaptation mode; and finally, the terminal displays the adjusted target page by using the adjusted page size. Therefore, the width and the height of the original page are integrally adjusted and adapted through the page adaptation mode, so that the display effect of the original page in various states is improved, and the display effect of the page displayed at multiple terminals can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic diagram illustrating a page display method according to an embodiment of the present invention;
FIG. 2-a is a schematic diagram of a page being enlarged in auto-mode as a browser window is enlarged according to an embodiment of the present invention;
fig. 2-b is a schematic diagram illustrating a preview effect of a photo in a contact mode in different mobile phone albums according to an embodiment of the present invention;
fig. 2-c is a schematic diagram of a cover mode downstream interface according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a page display method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another terminal according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another terminal according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a page display method and a terminal, which can improve the display effect which can be achieved by displaying pages in multiple terminals.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that the page display method provided by the technical scheme of the invention can be adapted to various terminals, so that the original page can restore the original visual display effect under each terminal. To facilitate understanding of the technical solution of the present invention, the following description is made of the principle of the technical solution of the present invention, please refer to fig. 1, and fig. 1 is a schematic diagram of the principle of a page display method provided by the technical solution of the present invention.
The following description is made of the important parts of the schematic diagram:
page original size: the terminal may obtain the width and height of the original design or the mobile page in an original standard state (hereinafter, simply referred to as original state for convenience of description) by analyzing or defining.
The monitoring equipment: and monitoring an onresize event, and calling an engine to acquire the width and height required in the current state when a user initializes a page or rotates the mobile phone.
In addition, the listening device may listen to the page from four angles, which may be: orientation ═ 0 °, 45 °, 90 °, and 180 °. The listening device may also listen from other angles, which is not limited herein.
Automatic (auto) mode: and maintaining the aspect ratio of the page, and adjusting the width of the page to enable the width of the page to be completely contained in the current browser window.
Including (continain) mode: the aspect ratio of the page is kept, the width or the height (larger) of the page is adjusted, the page is completely contained in a browser window, the page is horizontally and vertically centered, blanks can appear on the left, the right, the upper and the lower sides of the page, and the page background uses a pure color or a reproducible background, so that the method is suitable for sliding-screen pages and single-screen pages.
Overlay (cover) mode: the aspect ratio of the page is kept, the width or height (smaller) of the page is adjusted, the page completely covers the current browser window, the page is horizontally and vertically centered, the content beyond the left and right sides or up and down sides of the browser window can be hidden, the method is suitable for sliding-screen pages and single-screen pages, and the edge of the page has no important content.
To further understand the auto mode, the contact mode and the cover mode, please refer to fig. 2, fig. 2-a provides a schematic view of a page enlarged with the enlargement of a browser window in the auto mode, fig. 2-b provides a schematic view of a preview effect of a photo in different phone albums in the contact mode, and fig. 2-c provides a schematic view of a hand-trip interface in the cover mode.
Obviously, the invention makes the original page restore the original visual display effect under each terminal by reasonably utilizing the three-page adaptation mode to carry out integral adjustment and adaptation on the width or height of the original page.
Referring to fig. 3, a method for displaying a page in an embodiment of the present invention is described below with reference to a specific embodiment, where an embodiment of the method for displaying a page in an embodiment of the present invention includes:
101. the method comprises the steps that a terminal obtains the page size of a target page in an original state;
in this embodiment, the target page is a page that needs to be displayed on the terminal, and before the terminal displays the target page, in order to improve the display effect of the target page in the browser window of the terminal, the terminal needs to perform corresponding processing on the target page, where the corresponding processing flow includes: the terminal obtains the page size of the target page in the original state.
It should be noted that the terminal may obtain the page width and the page height of the target page in the original state through an analysis or a definition manner, the target page may be, but is not limited to, an original design draft and a mobile page, and the terminal includes, but is not limited to, a mobile phone and a tablet.
102. When the terminal detects that the target page is in a target state, the terminal determines a page adaptation mode matched with the characteristic type of the target page;
generally, the page size of the target page in the original state is not suitable in the target state, so the terminal needs to adjust the page size of the target page to achieve the purpose that the adjusted page size of the target page is matched with the target state.
In some embodiments of the present invention, before determining the page adaptation mode matched with the feature type of the target page, the terminal includes:
and if the terminal detects the initialization operation of the target page or the switching operation of the horizontal screen and the vertical screen of the terminal, the terminal determines that the target page is in the target state.
The switching operation of the horizontal screen and the vertical screen of the terminal may be a rotation operation of the terminal by the user.
It should be noted that, when the target page is in the target state, that is, the target page needs to be displayed on the terminal, the target state includes, but is not limited to, an initialization state of the target page, and a switching operation between the landscape screen and the portrait screen. The switching operation of the horizontal screen and the vertical screen may be switching from the horizontal screen to the vertical screen, or switching from the vertical screen to the horizontal screen, which is not limited herein.
Therefore, whether the target page is in the target state or not is determined by providing a method for detecting initialization operation of the target page or switching operation of a transverse screen and a vertical screen of the terminal, so that the target state is explained to further explain the meaning of the target state, and the technical scheme of the invention is perfected.
In addition, the terminal determines the page adaptation mode matched with the feature type of the target page, which can be implemented in various ways, and the following descriptions are respectively given:
firstly, the method comprises the following steps: determining a page adaptation mode according to the feature type of the page edge;
specifically, in some embodiments of the present invention, the determining, by the terminal, a page adaptation mode matched with the feature type of the target page includes:
the terminal acquires the characteristic type of the page edge of the target page; the terminal determines a page adaptation mode matched with the feature type of the page edge.
In this embodiment, the page edge of the target page may have important content, or may not have important content, for example, the page edge has no content and is blank. The page adaptation modes matched with the target page with the important content at the page edge and the target page without the important content at the page edge are different. For example, when there is important content at the page edge of the target page, the page adaptation mode may be the auto mode shown in fig. 1; when the page edge of the target page has no important content, the page adaptation mode may be a contact mode or a cover mode.
II, secondly: determining an adaptation mode according to whether the target page is a sliding screen page or a single-screen page;
specifically, in some embodiments of the present invention, the determining, by the terminal, a page adaptation mode matched with the feature type of the target page includes:
the terminal acquires the characteristic type of a target page; and if the terminal determines that the target page is a sliding screen page or a single-screen page according to the characteristic type of the target page, determining a page adaptation mode matched with the sliding screen page and the single-screen page.
In this embodiment, the target page may be a sliding screen page, a single-screen page, or a double-screen page, and when the target page is a sliding screen page or a single-screen page, the terminal may determine a page adaptation mode, such as a contact mode and a cover mode, that is matched with the sliding screen page and the single-screen page; when the target page is a dual-screen page, the terminal may determine a page adaptation mode, such as an auto mode, that matches the dual-screen page.
103. The terminal adjusts the page size according to the page adaptation mode;
104. and the terminal displays the target page by using the adjusted page size.
In the embodiment, the terminal acquires the page size of a target page in an original state; when the terminal detects that the target page is in a target state, the terminal starts to analyze the page adaptation mode, and the terminal determines the page adaptation mode matched with the characteristic type of the target page through the page adaptation mode analysis; the terminal performs width scaling or height scaling and other adjustments on the page size according to the page adaptation mode; and finally, the terminal displays the adjusted target page by using the adjusted page size. Therefore, the width and the height of the original page are integrally adjusted and adapted through the page adaptation mode, so that the display effect of the original page in various states is improved, and the display effect of the page displayed at multiple terminals can be improved.
In some embodiments of the present invention, after the terminal determines that the target page is in the target state, the method further includes:
and the terminal determines the window size of the target page adapted in the target state.
The window size may be the same as the browser window size, but it is necessary to ensure that the target page has a good display effect. If the target page cannot be guaranteed to have a good display effect, the terminal needs to determine a proper window size, the determined window size is different from the browser window size, and the target page can also show the good display effect.
Further, in some embodiments of the present invention, the adjusting, by the terminal, the page size according to the page adaptation mode includes:
and the terminal adjusts the page size of the target page into the window size according to the page adaptation mode.
Further, in some embodiments of the present invention, the adjusting, by the terminal, the page size of the target page to the window size according to the page adaptation mode includes:
under the condition that the ratio of the width to the height of the target page is not changed, the terminal adjusts the width or the height of the target page so as to adjust the page size of the target page to be the window size.
Further, in some embodiments of the present invention, the adjusting, by the terminal, the width or the height of the target page to adjust the page size of the target page to the window size includes:
the terminal adjusts the width of the target page to adjust the page size of the target page to be a window size, and the width of the window is contained in the current browser window, namely an auto mode; or the terminal adjusts the smaller of the width and the height of the target page to adjust the page size of the target page to be the window size, the window completely covers the current browser window, the window of the target page is horizontally and vertically centered, and the part of the window of the target page, which exceeds the current browser window, is hidden, namely, a cover mode; or the terminal adjusts the larger one of the width and the height of the target page to adjust the page size of the target page to be the window size, the window of the target page is completely contained in the current browser window, and the window of the target page is horizontally and vertically centered, namely, a contact mode.
It should be noted that the terminal may select the auto mode under the condition that the target page is allowed to have a scroll bar and a bottom blank. If the background of the target page is pure color, the target page is subjected to hollow gradual change processing, and the display effect achieved by the terminal selecting the auto mode is better. The cover mode is suitable for a target page with a rectangular size, important content does not exist on the left and right page edges of the target page, the upper and lower edges of the target page can be completely fused in a browser window, and although the left and right edges of the target page exceed the edges of the browser window, the important content does not exist on the left and right page edges, so that the display effect achieved by the terminal in selecting the cover mode is good. The contact mode adjusts the larger of the width and the height of the target page, and the larger of the width and the height fills the browser window, obviously, the smaller of the width and the height does not exceed the browser window, so that the contact mode is suitable for the target page needing to display complete information in the browser window, and a good display effect is achieved.
In addition, after the terminal displays the target page by using the adjusted page size, if the terminal detects the switching operation of the horizontal screen and the vertical screen, the width and the height of the target page can be changed in the switching process, so that the target page has no good display effect. Therefore, the size of the target page needs to be adjusted again, that is, the width and height of the target page need to be recalculated, for example, the browser width of the terminal is 320px, and after the switching operation, the browser width becomes 480 px. If the page width of the target page in the original state is 300, then there is a scaling, which may be browser width/page width, or browser height/page width. Obviously, if the scaling before the switching operation is 320/300, the scaling after the switching operation is 480/300, that is, the scaling is changed. The terminal may adjust the page size of the target page according to the scaling 480/300 and the corresponding page adaptation mode under the condition that the zoom center is determined (typically, the center of the browser window), so that the target page after the switching operation still has a good display effect.
For convenience of understanding, the page display method of the present invention is described in detail in a specific application scenario, specifically:
user a browses the web page using a cell phone, where the cell phone browser size is 320px × 480 px. When a user A wants to open a webpage B, the mobile phone analyzes the webpage B, after the width of the webpage B at the beginning of design is determined to be 300px and the height is 400px, if the webpage B is determined to be a sliding screen page or a single screen page and the page edge of the webpage B has no important content, a cover mode is adopted, namely under the condition that the ratio of the width to the height of the webpage B is kept unchanged, the width of the webpage B is adjusted from 300px to 320px by the mobile phone, and the adjusted webpage B is displayed by the mobile phone; if the webpage B is determined to be a sliding screen page or a single screen page, and the page edge of the webpage B has important content, adopting a continain mode, namely, under the condition of keeping the ratio of the width to the height of the webpage B unchanged, adjusting the height of the webpage B from 400px to 480px by the mobile phone, and displaying the adjusted webpage B by the mobile phone; if the scroll bar of the webpage B is determined to exist and the bottom of the webpage B is blank, the auto mode is adopted, namely the width of the webpage B is adjusted from 300px to 320px by the mobile phone under the condition that the ratio of the width to the height of the webpage B is kept unchanged, and the adjusted webpage B is displayed by the mobile phone.
Referring to fig. 4, the terminal in the embodiment of the present invention is described in detail below, where the terminal in the embodiment of the present invention includes:
an obtaining module 201, configured to obtain a page size of a target page in an original state;
the determining module 202 is configured to determine a page adaptation mode matched with the feature type of the target page when the target page is detected to be in the target state;
an adjusting module 203, configured to adjust the size of the page acquired by the acquiring module 201 according to the page adaptation mode determined by the determining module 202;
and a display module 204, configured to display the target page by using the page size adjusted by the adjustment module 203.
In this embodiment, the obtaining module 201 obtains the page size of the target page in the original state; when the target page is detected to be in the target state, the determining module 202 starts to perform page adaptation mode analysis, and determines a page adaptation mode matched with the feature type of the target page through the page adaptation mode analysis; the adjusting module 203 performs width scaling or height scaling and other adjustments on the page size according to the page adaptation mode; finally, the display module 204 displays the adjusted target page by using the adjusted page size. Therefore, the width and the height of the original page are integrally adjusted and adapted through the page adaptation mode, so that the display effect of the original page in various states is improved, and the display effect of the page displayed at multiple terminals can be improved.
Optionally, in an optional embodiment of the present invention, the determining module 202 is specifically configured to determine that the target page is in the target state if an initialization operation of the target page is detected, or a switching operation between a horizontal screen and a vertical screen of the terminal is detected.
It should be noted that, when the target page is in the target state, that is, the target page needs to be displayed on the terminal, the target state includes, but is not limited to, an initialization state of the target page, and a switching operation between the landscape screen and the portrait screen. The switching operation of the horizontal screen and the vertical screen may be switching from the horizontal screen to the vertical screen, or switching from the vertical screen to the horizontal screen, which is not limited herein.
Therefore, whether the target page is in the target state or not is determined by providing a method for detecting initialization operation of the target page or switching operation of a transverse screen and a vertical screen of the terminal, so that the target state is explained to further explain the meaning of the target state, and the technical scheme of the invention is perfected.
Optionally, in an optional embodiment of the present invention, the determining module 202 is further configured to determine, after determining that the target page is in the target state, a window size adapted to the target page in the target state.
The window size may be the same as the browser window size, but it is necessary to ensure that the target page has a good display effect. If the target page cannot be guaranteed to have a good display effect, the terminal needs to determine a proper window size, the determined window size is different from the browser window size, and the target page can also show the good display effect.
Optionally, in an optional embodiment of the present invention, the adjusting module 203 is specifically configured to adjust the page size of the target page to the window size according to a page adaptation mode.
Optionally, in an optional embodiment of the present invention, the adjusting module 203 is specifically configured to adjust the width or the height of the target page under the condition that a ratio of the width to the height of the target page is not changed, so as to adjust the page size of the target page to the window size.
Optionally, in an optional embodiment of the present invention, the adjusting module 203 is specifically configured to adjust a width of the target page, so as to adjust a page size of the target page to a window size, where the width of the window is included in a current browser window; or adjusting the smaller of the width and the height of the target page to adjust the page size of the target page to be the window size, wherein the window completely covers the current browser window, the window of the target page is horizontally and vertically centered, and the part of the window of the target page, which exceeds the current browser window, is hidden; or adjusting the larger one of the width and the height of the target page to adjust the page size of the target page to be the window size, wherein the window of the target page is completely contained in the current browser window, and the window of the target page is horizontally and vertically centered.
It should be noted that the terminal may select the auto mode under the condition that the target page is allowed to have a scroll bar and a bottom blank. If the background of the target page is pure color, the target page is subjected to hollow gradual change processing, and the display effect achieved by the terminal selecting the auto mode is better. The cover mode is suitable for a target page with a rectangular size, important content does not exist on the left and right page edges of the target page, the upper and lower edges of the target page can be completely fused in a browser window, and although the left and right edges of the target page exceed the edges of the browser window, the important content does not exist on the left and right page edges, so that the display effect achieved by the terminal in selecting the cover mode is good. The contact mode adjusts the larger of the width and the height of the target page, and the larger of the width and the height fills the browser window, obviously, the smaller of the width and the height does not exceed the browser window, so that the contact mode is suitable for the target page needing to display complete information in the browser window, and a good display effect is achieved.
Optionally, in an optional embodiment of the present invention, the determining module 202 is specifically configured to obtain a feature type of a page edge of the target page; and determining a page adaptation mode matched with the feature type of the page edge.
In this embodiment, the page edge of the target page may have important content, or may not have important content, for example, the page edge has no content and is blank. The page adaptation modes matched with the target page with the important content at the page edge and the target page without the important content at the page edge are different. For example, when there is important content at the page edge of the target page, the page adaptation mode may be the auto mode shown in fig. 1; when the page edge of the target page has no important content, the page adaptation mode may be a contact mode or a cover mode.
Optionally, in an optional embodiment of the present invention, the determining module 202 is specifically configured to obtain a feature type of the target page; and if the target page is determined to be a sliding screen page or a single-screen page according to the characteristic type of the target page, determining a page adaptation mode matched with the sliding screen page and the single-screen page.
In this embodiment, the target page may be a sliding screen page, a single-screen page, or a double-screen page, and when the target page is a sliding screen page or a single-screen page, the terminal may determine a page adaptation mode, such as a contact mode and a cover mode, that is matched with the sliding screen page and the single-screen page; when the target page is a dual-screen page, the terminal may determine a page adaptation mode, such as an auto mode, that matches the dual-screen page.
The terminal in the embodiment of the present invention is described above from the perspective of the modular functional entity, and the terminal in the embodiment of the present invention is described below from the perspective of hardware processing, referring to fig. 5, where the terminal in the embodiment of the present invention includes: a receiver 301, a processor 302, and a memory 303.
Embodiments of the invention may involve terminals having more or fewer components than those shown in fig. 5, which may be combined into two or more components, or which may involve different configurations of components or devices, which may be implemented in hardware, software or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The receiver 301 is configured to perform the following operations:
and acquiring the page size of the target page in the original state.
The processor 302 is configured to perform the following operations:
when the target page is detected to be in the target state, determining a page adaptation mode matched with the characteristic type of the target page;
adjusting the page size according to the page adaptation mode;
and displaying the target page by using the adjusted page size.
The memory 303 is used for storing instructions required by the processor 302 to perform corresponding operations.
In this embodiment, the receiver 301 obtains the page size of the target page in the original state; when the processor 302 detects that the target page is in the target state, the processor 302 starts to perform page adaptation mode analysis, and the processor 302 determines a page adaptation mode matched with the feature type of the target page through the page adaptation mode analysis; the processor 302 performs width scaling or height scaling and other adjustments on the page size according to the page adaptation mode; finally, the processor 302 displays the adjusted target page using the adjusted page size. Therefore, the width and the height of the original page are integrally adjusted and adapted through the page adaptation mode, so that the display effect of the original page in various states is improved, and the display effect of the page displayed at multiple terminals can be improved.
Optionally, the processor 302 is further configured to perform the following operations:
and if the initialization operation of the target page or the switching operation of the horizontal screen and the vertical screen of the terminal is detected, determining that the target page is in the target state.
Therefore, whether the target page is in the target state or not is determined by providing a method for detecting initialization operation of the target page or switching operation of a transverse screen and a vertical screen of the terminal, so that the target state is explained to further explain the meaning of the target state, and the technical scheme of the invention is perfected.
Optionally, the processor 302 is further configured to perform the following operations:
after the target page is determined to be in the target state, the window size of the target page in the target state is determined.
The window size may be the same as the browser window size, but it is necessary to ensure that the target page has a good display effect. If the target page cannot be guaranteed to have a good display effect, the terminal needs to determine a proper window size, the determined window size is different from the browser window size, and the target page can also show the good display effect.
Optionally, the processor 302 is further configured to perform the following operations:
and adjusting the page size of the target page to the window size according to the page adaptation mode.
Optionally, the processor 302 is further configured to perform the following operations:
and under the condition that the ratio of the width to the height of the target page is not changed, adjusting the width or the height of the target page to adjust the page size of the target page to be the window size.
Optionally, the processor 302 is further configured to perform the following operations:
adjusting the width of the target page to adjust the page size of the target page to be a window size, wherein the width of the window is contained in the current browser window; or adjusting the smaller of the width and the height of the target page to adjust the page size of the target page to be the window size, wherein the window completely covers the current browser window, the window of the target page is horizontally and vertically centered, and the part of the window of the target page, which exceeds the current browser window, is hidden; or adjusting the larger one of the width and the height of the target page to adjust the page size of the target page to be the window size, wherein the window of the target page is completely contained in the current browser window, and the window of the target page is horizontally and vertically centered.
Optionally, the processor 302 is further configured to perform the following operations:
acquiring a feature type of a page edge of a target page; and determining a page adaptation mode matched with the feature type of the page edge.
Optionally, the processor 302 is further configured to perform the following operations:
acquiring a feature type of a target page; and if the target page is determined to be a sliding screen page or a single-screen page according to the characteristic type of the target page, determining a page adaptation mode matched with the sliding screen page and the single-screen page.
For convenience of description, only the relevant parts of the embodiments of the present invention are shown, and details of the specific technology are not disclosed. The terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, etc., taking the terminal as the mobile phone as an example:
fig. 6 is a block diagram illustrating a partial structure of a mobile phone related to a terminal provided in an embodiment of the present invention. Referring to fig. 6, the handset includes: radio Frequency (RF) circuit 410, memory 420, input unit 430, display unit 440, sensor 450, audio circuit 460, wireless fidelity (WiFi) module 470, processor 480, and power supply 490. Those skilled in the art will appreciate that the handset configuration shown in fig. 6 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 6:
the RF circuit 410 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the received downlink information to the processor 480; in addition, the data for designing uplink is transmitted to the base station. In general, the RF circuit 410 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 410 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The memory 420 may be used to store software programs and modules, and the processor 480 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 420. The memory 420 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 430 may include a touch panel 431 and other input devices 432. The touch panel 431, also called a touch screen, may collect touch operations of a user on or near the touch panel 431 (e.g., operations of the user on or near the touch panel 431 using any suitable object or accessory such as a finger or a stylus) and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 431 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 480, and receives and executes commands sent from the processor 480. In addition, the touch panel 431 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 430 may include other input devices 432 in addition to the touch panel 431. In particular, other input devices 432 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 440 may be used to display information input by the user or information provided to the user and various menus of the cellular phone. The Display unit 440 may include a Display panel 441, and optionally, the Display panel 441 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 431 may cover the display panel 441, and when the touch panel 431 detects a touch operation on or near the touch panel 431, the touch panel is transmitted to the processor 480 to determine the type of the touch event, and then the processor 480 provides a corresponding visual output on the display panel 441 according to the type of the touch event. Although in fig. 6, the touch panel 431 and the display panel 441 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 431 and the display panel 441 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 450, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 441 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 441 and/or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuit 460, speaker 461, microphone 462 may provide an audio interface between the user and the cell phone. The audio circuit 460 may transmit the electrical signal converted from the received audio data to the speaker 461, and convert the electrical signal into a sound signal for output by the speaker 461; on the other hand, the microphone 462 converts the collected sound signal into an electrical signal, which is received by the audio circuit 460 and converted into audio data, which is then processed by the audio data output processor 480 and then transmitted to, for example, another cellular phone via the RF circuit 410, or output to the memory 420 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 470, and provides wireless broadband Internet access for the user. Although fig. 6 shows the WiFi module 470, it is understood that it does not belong to the essential constitution of the handset, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 480 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 420 and calling data stored in the memory 420, thereby integrally monitoring the mobile phone. Optionally, processor 480 may include one or more processing units; preferably, the processor 480 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 480.
The handset also includes a power supply 490 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 480 via a power management system, so that the power management system may perform functions such as managing charging, discharging, and power consumption.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
In this embodiment of the present invention, the processor 480 included in the terminal further has the following functions: acquiring the page size of a target page in an original state; when the target page is detected to be in the target state, determining a page adaptation mode matched with the characteristic type of the target page; adjusting the page size according to the page adaptation mode; and displaying the target page by using the adjusted page size.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (13)

1. A method of page display, comprising:
the method comprises the steps that a terminal obtains the page size of a target page in an original standard state, and the target page is used for being displayed in a browser window of the terminal;
when the terminal detects that the target page is in a target state, the terminal determines a page adaptation mode matched with the characteristic type of the target page;
the terminal adjusts the page size according to the page adaptation mode;
the terminal displays the target page by using the adjusted page size;
the terminal determines a page adaptation mode matched with the feature type of the target page, and the page adaptation mode comprises the following steps:
the terminal acquires the characteristic type of the page edge of the target page;
the terminal determines a page adaptation mode matched with the feature type of the page edge; when the page edge feature type representation of the target page has important content, the page adaptation mode adopts an automatic mode, the automatic mode is that the width of the target page is adjusted by a terminal so as to adjust the page size of the target page to be the window size, and the width of the window is contained in the current browser window; when the page edge feature type representation of the target page has no important content, the page adaptation mode adopts an inclusion mode or a coverage mode, wherein the coverage mode is that the smaller of the width and the height of the target page is adjusted by the terminal so as to adjust the page size of the target page to be the window size, the window completely covers the current browser window, the window of the target page is horizontally and vertically centered, and the part of the window of the target page, which exceeds the current browser window, is hidden; the inclusion mode is that the larger of the width and the height of the target page is adjusted for the terminal so as to adjust the page size of the target page to be the window size, and the window of the target page is completely included in the current browser window, and the window of the target page is horizontally and vertically centered.
2. The method of claim 1, wherein the terminal determining the page adaptation mode matching the feature type of the target page comprises:
and if the terminal detects the initialization operation of the target page or the switching operation of the horizontal screen and the vertical screen of the terminal, the terminal determines that the target page is in a target state.
3. The method of claim 2, wherein the terminal determining that the target page is in the target state comprises:
and the terminal determines the window size of the target page adapted in the target state.
4. The method of claim 3, wherein the terminal adjusting the page size according to the page adaptation mode comprises:
and the terminal adjusts the page size of the target page to the window size according to the page adaptation mode.
5. The method of claim 4, wherein the terminal adjusting the page size of the target page to the window size according to the page adaptation mode comprises:
and under the condition that the ratio of the width to the height of the target page is not changed, the terminal adjusts the width or the height of the target page so as to adjust the page size of the target page to the window size.
6. The method according to any one of claims 1 to 5, wherein the terminal determining the page adaptation mode matching the feature type of the target page comprises:
the terminal acquires the characteristic type of the target page;
and if the terminal determines that the target page is a sliding screen page or a single-screen page according to the characteristic type of the target page, determining a page adaptation mode matched with the sliding screen page and the single-screen page.
7. A terminal, comprising:
the terminal comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring the page size of a target page in an original standard state, and the target page is used for being displayed in a browser window of the terminal;
the determining module is used for determining a page adaptation mode matched with the characteristic type of the target page when the target page is detected to be in a target state;
the adjusting module is used for adjusting the page size according to the page adaptation mode;
the display module is used for displaying the target page by using the adjusted page size;
the determining module is specifically configured to obtain a feature type of a page edge of the target page; determining a page adaptation mode matched with the feature type of the page edge; when the page edge feature type representation of the target page has important content, the page adaptation mode adopts an automatic mode, the automatic mode is that the width of the target page is adjusted by a terminal so as to adjust the page size of the target page to be the window size, and the width of the window is contained in the current browser window; when the page edge feature type representation of the target page has no important content, the page adaptation mode adopts an inclusion mode or a coverage mode, wherein the coverage mode is that the smaller of the width and the height of the target page is adjusted by the terminal so as to adjust the page size of the target page to be the window size, the window completely covers the current browser window, the window of the target page is horizontally and vertically centered, and the part of the window of the target page, which exceeds the current browser window, is hidden; the inclusion mode is that the larger of the width and the height of the target page is adjusted for the terminal so as to adjust the page size of the target page to be the window size, and the window of the target page is completely included in the current browser window, and the window of the target page is horizontally and vertically centered.
8. The terminal according to claim 7, wherein the determining module is specifically configured to determine that the target page is in the target state if an initialization operation of the target page or a switching operation of a landscape screen and a portrait screen of the terminal is detected.
9. The terminal of claim 8, wherein the determining module is further configured to determine the window size adapted to the target page in the target state after determining that the target page is in the target state.
10. The terminal according to claim 9, wherein the adjusting module is specifically configured to adjust the page size of the target page to the window size according to the page adaptation mode.
11. The terminal according to claim 10, wherein the adjusting module is specifically configured to adjust the width or the height of the target page under a condition that a ratio of the width to the height of the target page is not changed, so as to adjust the page size of the target page to the window size.
12. The terminal according to any one of claims 7 to 11, wherein the determining module is specifically configured to obtain a feature type of the target page; and if the target page is determined to be a sliding screen page or a single-screen page according to the characteristic type of the target page, determining a page adaptation mode matched with the sliding screen page and the single-screen page.
13. A computer-readable storage medium comprising instructions for performing the method of any of claims 1-6.
CN201710265761.3A 2017-04-21 2017-04-21 Page display method and terminal Active CN107256142B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710265761.3A CN107256142B (en) 2017-04-21 2017-04-21 Page display method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710265761.3A CN107256142B (en) 2017-04-21 2017-04-21 Page display method and terminal

Publications (2)

Publication Number Publication Date
CN107256142A CN107256142A (en) 2017-10-17
CN107256142B true CN107256142B (en) 2020-12-29

Family

ID=60027854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710265761.3A Active CN107256142B (en) 2017-04-21 2017-04-21 Page display method and terminal

Country Status (1)

Country Link
CN (1) CN107256142B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108810602B (en) * 2018-03-30 2020-09-04 武汉斗鱼网络科技有限公司 Method and device for displaying information of live broadcast room and computer equipment
CN110244996A (en) * 2019-05-14 2019-09-17 苏宁智能终端有限公司 A kind of method, apparatus and terminal of transverse screen display terminal adaptation vertical screen application program
CN112784526A (en) * 2020-06-05 2021-05-11 珠海金山办公软件有限公司 Document page adjusting method and device
CN117111813B (en) * 2023-10-19 2024-02-20 深圳市慧为智能科技股份有限公司 Display adaptation method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012787A (en) * 2010-11-19 2011-04-13 互动在线(北京)科技有限公司 Method for realizing self-adaption of nonfixed region with height/width of browser for cascading style sheet
CN103324476A (en) * 2013-06-04 2013-09-25 白连宇 Page dynamic reference layout and display method
CN103677720A (en) * 2013-12-25 2014-03-26 乐视网信息技术(北京)股份有限公司 Picture display method and device based on website
CN103986962A (en) * 2014-06-03 2014-08-13 合一网络技术(北京)有限公司 Method and system for displaying suspended playing window
CN104331230A (en) * 2014-11-24 2015-02-04 联想(北京)有限公司 Information processing method and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102109959A (en) * 2011-03-07 2011-06-29 惠州Tcl移动通信有限公司 Method for realizing rotation of JAVA application programming interface (API) with rotation of screen
CN104598131B (en) * 2015-01-15 2018-07-24 小米科技有限责任公司 Adjust the method and device of page display way
JP6580903B2 (en) * 2015-08-28 2019-09-25 京セラ株式会社 Portable electronic devices
CN105975576B (en) * 2016-05-04 2019-12-31 北京京东尚科信息技术有限公司 Terminal content adaptive display method and device and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012787A (en) * 2010-11-19 2011-04-13 互动在线(北京)科技有限公司 Method for realizing self-adaption of nonfixed region with height/width of browser for cascading style sheet
CN103324476A (en) * 2013-06-04 2013-09-25 白连宇 Page dynamic reference layout and display method
CN103677720A (en) * 2013-12-25 2014-03-26 乐视网信息技术(北京)股份有限公司 Picture display method and device based on website
CN103986962A (en) * 2014-06-03 2014-08-13 合一网络技术(北京)有限公司 Method and system for displaying suspended playing window
CN104331230A (en) * 2014-11-24 2015-02-04 联想(北京)有限公司 Information processing method and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于InDesign的自适应跨媒体排版技术";顾静筠等;《今日印刷》;20130510;58-61 *

Also Published As

Publication number Publication date
CN107256142A (en) 2017-10-17

Similar Documents

Publication Publication Date Title
US9697622B2 (en) Interface adjustment method, apparatus, and terminal
CN108536365B (en) Image sharing method and terminal
CN107943367B (en) Interface display method of double-screen terminal, double-screen terminal and computer storage medium
CN104679466A (en) Image display method and device and electronic device
CN107256142B (en) Page display method and terminal
CN108205398B (en) Method and device for adapting webpage animation to screen
CN107273035B (en) Application program recommendation method and mobile terminal
CN109151367B (en) Video call method and terminal equipment
CN104571979B (en) A kind of method and apparatus for realizing split view
CN106406530B (en) Screen display method and mobile terminal thereof
CN109697008B (en) Content sharing method, terminal and computer readable storage medium
CN109327672B (en) Video call method and terminal
CN109739407B (en) Information processing method and terminal equipment
CN108460769B (en) image processing method and terminal equipment
CN103180809A (en) Screen-interface display method and terminal
US11842029B2 (en) Image display method and mobile terminal
CN108196781B (en) Interface display method and mobile terminal
EP3179354A1 (en) Method and terminal for processing media file
CN107729104B (en) Display method, mobile terminal and computer storage medium
CN110099434B (en) Power adjustment method, terminal equipment and computer readable storage medium
CN109669656B (en) Information display method and terminal equipment
CN104238931B (en) Information input method and device and electronic equipment
US10706282B2 (en) Method and mobile terminal for processing image and storage medium
CN109040580B (en) Mobile terminal and photographing control method and device thereof
CN108628534B (en) Character display method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant