Display area adjusting method and related device
阅读说明:本技术 显示区域调节方法及相关装置 (Display area adjusting method and related device ) 是由 王磊 于 2019-09-19 设计创作,主要内容包括:本发明的实施例提供了一种显示区域调节方法及相关装置,涉及终端显示技术领域。通过在终端设备的显示区域因折叠区域被损坏而显示异常时,判断用户在显示区域的滑动操作是否符合调节条件,当滑动操作符合调节条件时,调节显示区域的位置,以使显示区域显示正常。在本发明实施例中,通过调节显示区域的位置,使显示区域显示正常,这样原本靠近折叠区域的那部分显示异常的区域也能够正常显示内容,从而避免折叠区域被损坏黑屏对终端设备的界面显示的影响,提高用户使用体验。(The embodiment of the invention provides a display area adjusting method and a related device, and relates to the technical field of terminal display. When the display area of the terminal equipment is abnormal due to the fact that the folding area is damaged, whether the sliding operation of a user in the display area meets the adjusting condition or not is judged, and when the sliding operation meets the adjusting condition, the position of the display area is adjusted, so that the display area is normal. In the embodiment of the invention, the display area is normally displayed by adjusting the position of the display area, so that the part of the area which is originally close to the folding area and is abnormally displayed can also normally display the content, thereby avoiding the influence of the damaged black screen of the folding area on the interface display of the terminal equipment and improving the use experience of a user.)
1. A display area adjusting method is applied to a terminal device with a foldable screen, wherein the screen of the terminal device comprises a display area and a folding area, and the method comprises the following steps:
when the display area is abnormal due to the damage of the folding area, judging whether the sliding operation of a user in the display area meets the adjustment condition;
and when the sliding operation meets the adjusting condition, adjusting the position of the display area according to the sliding operation so as to enable the display area to display normally.
2. The method according to claim 1, wherein the sliding operation includes a sliding distance and a sliding direction, and the step of determining whether the sliding operation of the user on the display area meets the adjustment condition includes:
when the sliding direction is a first preset direction and the sliding distance exceeds a first preset threshold value, judging that the sliding operation meets a first adjusting condition;
when the sliding direction is a second preset direction and the sliding distance exceeds a second preset threshold value, judging that the sliding operation meets a second adjusting condition; wherein the first preset direction is opposite to the second preset direction.
3. The method according to claim 2, wherein the step of adjusting the position of the display area according to the sliding operation when the sliding operation meets the adjustment condition comprises:
and when the sliding operation meets the first adjusting condition, controlling the display area to be reduced in an equal proportion towards the first preset direction and the direction far away from the folding area according to the sliding distance.
4. The method according to claim 2, wherein the step of adjusting the position of the display area according to the sliding operation when the sliding operation meets the adjustment condition comprises:
and when the sliding operation meets the second adjusting condition, controlling the display area to be reduced in the second preset direction and the direction far away from the folding area in an equal proportion according to the sliding distance.
5. A display area adjusting device is applied to a terminal device with a foldable screen, wherein the screen of the terminal device comprises a display area and a folding area, and the device comprises:
the judging module is used for judging whether the sliding operation of a user in the display area meets the adjusting condition or not when the display area is abnormal due to the damage of the folding area;
and the adjusting module is used for adjusting the position of the display area according to the sliding operation when the sliding operation meets the adjusting condition so as to enable the display area to display normally.
6. The device according to claim 5, wherein the sliding operation includes a sliding distance and a sliding direction, and the determining module is configured to determine that the sliding operation meets a first adjustment condition when the sliding direction is a first preset direction and the sliding distance exceeds a first preset threshold; when the sliding direction is a second preset direction and the sliding distance exceeds a second preset threshold value, judging that the sliding operation meets a second adjusting condition; wherein the first preset direction is opposite to the second preset direction.
7. The device according to claim 6, wherein the adjusting module is configured to control the display area to be scaled down in the first preset direction and in a direction away from the folding area according to the sliding distance when the sliding operation meets the first adjusting condition.
8. The device according to claim 6, wherein the adjusting module is configured to control the display area to be scaled down in the second preset direction and in a direction away from the folding area according to the sliding distance when the sliding operation meets the second adjusting condition.
9. A terminal device comprising a processor and a memory, the memory storing a computer program executable by the processor, the processor being operable to execute the computer program to implement the method of any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1-4.
Technical Field
The invention relates to the technical field of terminal display, in particular to a display area adjusting method and a related device.
Background
With the continuous popularization of terminal equipment, the differentiation of consumers is more and more obvious, the multi-level requirements are more and more intense, and the terminal equipment has a plurality of diversified designs. Among them, the folding screen terminal (i.e. the terminal device with a foldable display screen) is popular in the market due to the advantages of large screen size, light weight after folding and portability.
In daily use, a screen of the folding screen terminal is repeatedly folded for a long time, so that a folding area is easily damaged to cause a black screen, and an area around the folding area (namely, a part close to the folding area in a display area) cannot be normally displayed, thereby affecting the interface display of the whole terminal.
Disclosure of Invention
The invention aims to provide a display area adjusting method and a related device, for example, to solve the problem that interface display of terminal equipment is affected due to the fact that a display area cannot be normally displayed after a folding area is damaged and a black screen is damaged in the prior art.
Embodiments of the invention may be implemented as follows:
in a first aspect, an embodiment of the present invention provides a display area adjustment method, which is applied to a terminal device with a foldable screen, where a screen of the terminal device includes a display area and a foldable area, and the method includes:
when the display area is abnormal due to the damage of the folding area, judging whether the sliding operation of a user in the display area meets the adjustment condition;
and when the sliding operation meets the adjusting condition, adjusting the position of the display area according to the sliding operation so as to enable the display area to display normally.
In an alternative embodiment, the sliding operation includes a sliding distance and a sliding direction, and the step of determining whether the sliding operation of the user on the display area meets the adjustment condition includes:
when the sliding direction is a first preset direction and the sliding distance exceeds a first preset threshold value, judging that the sliding operation meets a first adjusting condition;
when the sliding direction is a second preset direction and the sliding distance exceeds a second preset threshold value, judging that the sliding operation meets a second adjusting condition; wherein the first preset direction is opposite to the second preset direction.
In an optional embodiment, when the sliding operation meets the adjustment condition, the step of adjusting the position of the display area according to the sliding operation includes:
and when the sliding operation meets the first adjusting condition, controlling the display area to be reduced in an equal proportion towards the first preset direction and the direction far away from the folding area according to the sliding distance.
In an optional embodiment, when the sliding operation meets the adjustment condition, the step of adjusting the position of the display area according to the sliding operation includes:
and when the sliding operation meets the second adjusting condition, controlling the display area to be reduced in the second preset direction and the direction far away from the folding area in an equal proportion according to the sliding distance.
In a second aspect, an embodiment of the present invention provides a display area adjusting apparatus, which is applied to a terminal device with a foldable screen, where a screen of the terminal device includes a display area and a foldable area, and the apparatus includes:
the judging module is used for judging whether the sliding operation of a user in the display area meets the adjusting condition or not when the display area is abnormal due to the damage of the folding area;
and the adjusting module is used for adjusting the position of the display area according to the sliding operation when the sliding operation meets the adjusting condition so as to enable the display area to display normally.
In an optional embodiment, the sliding operation includes a sliding distance and a sliding direction, and the determining module is configured to determine that the sliding operation meets a first adjustment condition when the sliding direction is a first preset direction and the sliding distance exceeds a first preset threshold; when the sliding direction is a second preset direction and the sliding distance exceeds a second preset threshold value, judging that the sliding operation meets a second adjusting condition; wherein the first preset direction is opposite to the second preset direction.
In an optional embodiment, the adjusting module is configured to, when the sliding operation meets the first adjusting condition, control the display area to be scaled down in the first preset direction and in a direction away from the folding area according to the sliding distance.
In an optional embodiment, the adjusting module is configured to, when the sliding operation meets the second adjusting condition, control the display area to be scaled down in the second preset direction and in a direction away from the folding area according to the sliding distance.
In a third aspect, an embodiment of the present invention provides a terminal device, including a processor and a memory, where the memory stores a computer program that can be executed by the processor, and the processor can execute the computer program to implement the method described in any one of the foregoing embodiments.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method of any one of the foregoing embodiments.
The beneficial effects of the embodiment of the invention include, for example:
according to the display area adjusting method and the related device provided by the embodiment of the invention, when the display area of the terminal equipment is abnormal due to the damage of the folding area, whether the sliding operation of a user in the display area meets the adjusting condition or not is judged, and when the sliding operation meets the adjusting condition, the position of the display area is adjusted, so that the display area is normal. That is to say, the embodiment of the present invention adjusts the position of the display area to make the display area display normally, so that the portion of the abnormal display area originally close to the folding area can also display the content normally, thereby avoiding the influence of the damaged black screen of the folding area on the interface display of the terminal device, and improving the user experience.
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 embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic block diagram of a terminal device according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a terminal device according to an embodiment of the present invention with a screen in an expanded state;
fig. 3 is a schematic diagram of a terminal device provided by an embodiment of the present invention with a screen in a folded state;
FIG. 4 is a flowchart illustrating a display area adjustment method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a display area showing an anomaly due to a damaged folded area and a black screen;
FIG. 6 is a schematic diagram of the display area after adjusting the position;
FIG. 7 is another schematic view of the display area after adjustment of the position;
FIG. 8 is another schematic view of the display area after the position adjustment;
FIG. 9 is another schematic view of the display area after the position adjustment;
fig. 10 is a functional block diagram of a display area adjustment apparatus according to an embodiment of the present invention.
Icon: 100-a terminal device; 110-a memory; 120-a processor; 130-a communication module; 101-a display area; 102-a fold region; 300-display area adjustment means; 310-a judgment module; 320-adjusting module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. indicate an orientation or a positional relationship based on that shown in the drawings or that the product of the present invention is used as it is, this is only for convenience of description and simplification of the description, and it does not indicate or imply that the device or the element referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus should not be construed as limiting the present invention.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
Referring to fig. 1, a block diagram of a
The
The
The
It should be understood that the structure shown in fig. 1 is only a schematic structural diagram of the
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by the
Referring to fig. 2, a schematic diagram of a screen of the
In practical applications, for the
Fig. 4 is a schematic flow chart of a display area adjustment method according to an embodiment of the present invention. It should be noted that, the display area adjustment method provided in the embodiment of the present invention is not limited by fig. 4 and the following specific sequence, and it should be understood that, in other embodiments, the sequence of some steps in the display area adjustment method provided in the embodiment of the present invention may be interchanged according to actual needs, or some steps in the display area adjustment method may also be omitted or deleted. The display area adjusting method can be applied to the
Step S201, when the display area is abnormal due to the damage of the folding area, whether the sliding operation of the user in the display area meets the adjustment condition is judged.
As shown in fig. 5, when the
And S202, when the sliding operation accords with the adjusting condition, adjusting the position of the display area according to the sliding operation so as to enable the display area to be displayed normally.
In this embodiment, when the
Alternatively, the sliding operation may include a sliding distance and a sliding direction, which may be determined according to the coordinates of the start contact point and the end contact point of the user on the
The first preset direction can be upward sliding, and the second preset direction can be downward sliding; or the first preset direction is downward sliding, and the second preset direction is upward sliding.
The first preset threshold and the second preset threshold may be the same or different. For example, in this embodiment, the first preset threshold and the second preset threshold may be set to be 150 pixels.
In this embodiment, in order that the display effect of the
In an example, assuming that the first preset direction is upward sliding, the second preset direction is downward sliding, the first preset threshold and the second preset threshold are both 150 pixels, and the resolution of the
As can be seen, in this embodiment, after the
In practical applications, when the
It should be noted that, in practical applications, the screen of the
Specifically, assuming that the two
In order to perform the corresponding steps in the above embodiments and various possible modes, an implementation mode of the display area adjusting device is given below. Referring to fig. 10, fig. 10 is a functional block diagram of a display
Alternatively, the aforementioned determining
The determining
Optionally, the sliding operation includes a sliding distance and a sliding direction, and the determining
It is understood that the determining
The adjusting
Optionally, the adjusting
It is understood that the
In summary, embodiments of the present invention provide a display area adjustment method and a related apparatus, when a display area of a terminal device is abnormal due to a damaged folding area, determine whether a sliding operation of a user on the display area meets an adjustment condition, and adjust a position of the display area when the sliding operation meets the adjustment condition, so that the display area is displayed normally. That is to say, the embodiment of the present invention adjusts the position of the display area to make the display area display normally, so that the portion of the abnormal display area originally close to the folding area can also display the content normally, thereby avoiding the influence of the damaged black screen of the folding area on the interface display of the terminal device, and improving the user experience.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules 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 description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
- 上一篇:一种医用注射器针头装配设备
- 下一篇:一种信息处理方法及电子设备