A kind of method, apparatus and terminal of transverse screen display terminal adaptation vertical screen application programTechnical field
The present invention relates to field of computer technology more particularly to a kind of sides of transverse screen display terminal adaptation vertical screen application programMethod, device and terminal.
Background technique
With the universal and development of technology of Internet of things, especially smart home, the intelligence applied to various specific areas is eventuallyEnd product continues to bring out, such as smart television, intelligent witch mirror, intelligent refrigerator, intelligent smoke machine, vehicle-mounted central control system, and such productionProduct are to meet user experience requirement to be morphologically often designed as being shown displayed across screen, are embedded in intelligent terminal due to being shown displayed across screenProduct on, therefore be shown displayed across screen and be unable to complete mobile and rotation.
Meanwhile many outstanding application programs for aiming at Cell Phone Design or only provide vertical screen version, such as trill, quick worker, Soviet UnionThe application software such as Ning Yi purchase are without transverse screen version;Screen is shown displayed across to the use demand of vertical screen application program, part intelligence in order to meetThe display content stretching of vertical screen application program is paved with entirely by energy manufacturer terminal by the display direction of pressure setting application programScreen, effect as shown in Figure 1, be shown displayed across screen among divide one piece of region, by way of reducing screen resolution, such asResolution ratio drops to 607x 1080 from 1920x 1080, and then the zooming of display content of vertical screen application program is strong to the regionSystem completes display on being shown displayed across screen, but runs vertical screen on having the intelligent terminal for being shown displayed across screen using the above schemeThere are the following problems for application program:
1, vertical screen application program itself UI interface deformation, font size, which changes, loses aesthetic feeling, and leads to certain functionsIt can not normal use.
2, the network multimedia resource in vertical screen application program (such as video, picture) display deformation or incomplete, the shadow of displayRing the usage experience of user.
Summary of the invention
The purpose of the present invention is to provide a kind of method, apparatus of transverse screen display terminal adaptation vertical screen application program and endsEnd can make user obtain preferable usage experience by the display content adaptation of vertical screen application program in being shown displayed across in screen.
To achieve the goals above, an aspect of of the present present invention provides a kind of transverse screen display terminal adaptation vertical screen application programMethod, comprising:
In the fixation display direction of system level setting transverse screen window;
Optimum display size of the vertical screen application program in vertical screen window is obtained, vertical screen is obtained after display logic adjusts and answersWith matching display size of the program in transverse screen window;
The screen for adjusting transverse screen window shows density, makes display scale of the vertical screen application program in transverse screen window and is erectingThe display scale shielded in window is consistent;
Density is shown based on screen adjusted, launches vertical screen application according to the matching display size in transverse screen windowThe display content of program.
Preferably, optimum display size of the vertical screen application program in vertical screen window is obtained, after display logic adjustsMethod to matching display size of the vertical screen application program in transverse screen window includes:
The optimum display size W*H of vertical screen application program and vertical screen Window match is obtained, wherein W indicates vertical screen windowWidth, H indicate the height of vertical screen window;
Matching display size of the vertical screen application program in transverse screen window is adjusted to L*H, wherein L=H* (H/W).
Preferably, the screen of transverse screen window shows that density adjusts formula are as follows:
The screen of transverse screen window shows that the screen that density is vertical screen window shows W/L times of density.
Preferably, making vertical screen application program in the display scale in transverse screen window and the display scale one in vertical screen windowThe method of cause includes:
Best image resolution ratio based on vertical screen application program in vertical screen window, make vertical screen application program according to it is described mostGood display resolution is shown in transverse screen window;
The screen of transverse screen window is shown that density is set as W/L times of the screen display density of vertical screen window, realizes vertical screenApplication program is consistent with the display scale in vertical screen window in the display scale in transverse screen window.
Illustratively, include: in the method for the fixation display direction of system level setting transverse screen window
The rotation angle that transverse screen window is modified in system windows manager is zero degree.
Compared with prior art, the method for transverse screen display terminal adaptation vertical screen application program provided by the invention has followingThe utility model has the advantages that
It is horizontal by being set in system level in the method for transverse screen display terminal adaptation vertical screen application program provided by the inventionShield the fixation display direction of window, the display direction that vertical screen application program is kept fixed in transverse screen window beginsTransverse screen display is kept eventually, and when transverse screen display terminal, which is powered, to be started, operating system can obtain vertical screen application program in vertical screen automaticallyOptimum display size W*H in window, usually 1080*1920, is then based on the corresponding adjustment transverse screen window of size of transverse screen windowThe width of mouth is high, calculates matching display size of the vertical screen application program in transverse screen window, such as 607*1080, at this point, due to crossShield the optimum display size that the matching display size in window is less than in vertical screen window, if with this directly by vertical screen application programDisplay content is invested in transverse screen window, will lead to the distorting transformation of display content, to solve this problem, the present invention takes adjustmentIn transverse screen window screen show density scheme so that display scale of the vertical screen application program in transverse screen window in vertical screen windowDisplay scale in mouthful is consistent, i.e., display content and transverse screen window display size are completed in the case where resolution ratio is constantMatching and modification realizes perpendicular so that the display content in transverse screen window, which is compared to vertical screen window, has the effect of uniform zoomShield conversion adaptation of the application program in transverse screen display terminal, i.e., ensure that display content is not lost in the case where resolution ratio is constantTrue deformation.
Another aspect of the present invention provides a kind of device of transverse screen display terminal adaptation vertical screen application program, is applied to above-mentionedIn the method for the transverse screen display terminal adaptation vertical screen application program that technical solution is mentioned, which includes:
Direction setting module, for the fixation display direction in system level setting transverse screen window;
Display size adjustment unit, for obtaining optimum display size of the vertical screen application program in vertical screen window, through aobviousMatching display size of the vertical screen application program in transverse screen window is obtained after showing logic adjustment;
Display scale adjustment unit, the screen for adjusting transverse screen window show density, make vertical screen application program in transverse screenDisplay scale in window is consistent with the display scale in vertical screen window;
Display unit is launched, it is aobvious according to the matching in transverse screen window for showing density based on screen adjustedShow that size launches the display content of vertical screen application program.
Preferably, the display size adjustment unit includes:
Logic calculation module, for obtaining the optimum display size W*H of vertical screen application program Yu vertical screen Window match, whereinW indicates that the width of vertical screen window, H indicate the height of vertical screen window;
Display size matching module, for matching display size of the vertical screen application program in transverse screen window to be adjusted to L*H, wherein L=H* (H/W).
Preferably, the display scale adjustment unit includes:
Screen shows that density adjusts module, for the screen of transverse screen window to be shown that density is set as the screen of vertical screen windowShow W/L times of density.
Preferably, the display scale adjustment unit further include:
Resolution adjustment module makes to erect for the best image resolution ratio based on vertical screen application program in vertical screen windowScreen application program is shown in transverse screen window according to the best image resolution ratio;
Display scale adjusts module, and the screen for setting vertical screen window for the screen display density of transverse screen window is shownW/L times of density realizes vertical screen application program in the display scale in transverse screen window and the display scale one in vertical screen windowIt causes.
Compared with prior art, the beneficial effect of the device of transverse screen display terminal adaptation vertical screen application program provided by the inventionFruit is identical as the beneficial effect of method of transverse screen display terminal adaptation vertical screen application program that above-mentioned technical proposal provides, herein notIt repeats.
The third aspect of the present invention provides a kind of terminal, comprising: processor and memory;
The memory is for storing computer program instructions;
When the terminal operating, the processor executes the computer program instructions in the memory, to execute transverse screenDisplay terminal is adapted to the operating procedure of the method for vertical screen application program.
Compared with prior art, the transverse screen display that the beneficial effect of terminal provided by the invention and above-mentioned technical proposal provideThe beneficial effect of the method for terminal adaptation vertical screen application program is identical, and this will not be repeated here.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes a part of the invention, this hairBright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is display renderings of the vertical screen application program in transverse screen display terminal in the prior art;
Fig. 2 is the flow diagram of the method for transverse screen display terminal adaptation vertical screen application program in the embodiment of the present invention one.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, implement below in conjunction with the present inventionAttached drawing in example, technical scheme in the embodiment of the invention is clearly and completely described.Obviously, described embodimentOnly a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, the common skill in this fieldArt personnel all other embodiment obtained without creative labor belongs to the model that the present invention protectsIt encloses.
Embodiment one
Referring to Fig. 2, the present embodiment provides a kind of methods of transverse screen display terminal adaptation vertical screen application program, comprising:
In the fixation display direction of system level setting transverse screen window;Obtain vertical screen application program in vertical screen window mostGood display size obtains matching display size of the vertical screen application program in transverse screen window after display logic adjusts;Adjustment is horizontalThe screen for shielding window shows density, makes vertical screen application program in the display scale in transverse screen window and the display in vertical screen windowRatio is consistent;Density is shown based on screen adjusted, launches vertical screen application journey according to matching display size in transverse screen windowThe display content of sequence.
In the method for transverse screen display terminal adaptation vertical screen application program provided in this embodiment, by being set in system levelThe fixation display direction of transverse screen window, the display direction that vertical screen application program is kept fixed in transverse screen window, i.e.,Remain transverse screen display, when transverse screen display terminal, which is powered, to be started, operating system can obtain vertical screen application program perpendicular automaticallyShield the optimum display size W*H in window, usually 1080*1920, is then based on the corresponding adjustment transverse screen of size of transverse screen windowThe width of window is high, calculates matching display size of the vertical screen application program in transverse screen window, such as 607*1080, at this point, due toMatching display size in transverse screen window is less than the optimum display size in vertical screen window, if with this directly by vertical screen application programDisplay content be invested in transverse screen window, will lead to display content distorting transformation, to solve this problem, the present embodiment is takenAdjust the scheme that screen in transverse screen window shows density so that display scale of the vertical screen application program in transverse screen window with perpendicularDisplay scale in screen window is consistent, i.e., completes display content in the case where resolution ratio is constant and transverse screen window shows rulerVery little Matching and modification is realized so that the display content in transverse screen window, which is compared to vertical screen window, has the effect of uniform zoomConversion adaptation of the vertical screen application program in transverse screen display terminal, i.e., ensure that display content in the case where resolution ratio is constantUndistorted deformation.
In above-described embodiment, optimum display size of the vertical screen application program in vertical screen window is obtained, through display logic tuneThe method that matching display size of the vertical screen application program in transverse screen window is obtained after whole includes:
The optimum display size W*H of vertical screen application program and vertical screen Window match is obtained, wherein W indicates vertical screen windowWidth, H indicate the height of vertical screen window;Matching display size of the vertical screen application program in transverse screen window is adjusted to L*H, wherein L=H* (H/W).
As described above, the optimum display size of vertical screen application program and vertical screen Window match is usually 1080*1920, inciting somebody to actionWhen vertical screen application program is applied in transverse screen window, the wide L and high H of vertical screen window change immediately, wherein vertical screen windowWide L need to be adjusted to L=H* (H/W) ≈ 607, and the high H of vertical screen window need to be adjusted to the wide H of vertical screen window, and then realize that vertical screen is answeredWith the matching of display size of the program in transverse screen window, this process is equivalent to that the display size in transverse screen window is opposite and vertical screenDisplay size reduces in window, i.e., becomes 607*1080 from original 1080*1920.
Further, the screen of transverse screen window shows that density adjusts formula in above-described embodiment are as follows: the screen of transverse screen windowShow W/L times of the screen display density that density is vertical screen window.
When it is implemented, showing that density adjusts formula, density_scale_port=(W/L) * according to screenDensity_scale_land, wherein density_scale_port indicates that the screen of transverse screen window shows density, density_Scale_land indicates that the screen of vertical screen window shows density, and (W/L) indicates that screen shows the multiple of density, for example, ifVertical screen application program shows dimensions as 1080*1920, matching of the vertical screen application program in transverse screen window in vertical screen window607*1080 is shown dimensions as, then density_scale_port=1080/607*density_scale_land namely transverse screenThe screen of window shows that density is about that the screen of vertical screen window shows 3 times of density, in actual mechanical process, in transverse screen windowMatch display size, screen shows that density can be arranged by window management server and modifies.
Specifically, make vertical screen application program in the display scale in transverse screen window and in vertical screen window in above-described embodimentThe consistent method of display scale include:
Best image resolution ratio based on vertical screen application program in vertical screen window makes vertical screen application program according to best aobviousShow that resolution ratio is shown in transverse screen window;The screen of transverse screen window is shown that density is set as the screen display density of vertical screen windowW/L times, realize vertical screen application program it is consistent with the display scale in vertical screen window in the display scale in transverse screen window.
When it is implemented, usually best image resolution ratio of the vertical screen application program in vertical screen window is 1080*1920, erectShield resolution ratio of the application program in transverse screen window equally with 1080*1920 to show, at this point, due to the display ruler in transverse screen windowIt is very little to be less than display size in vertical screen window, it is same to show content in vertical screen window in this way in the case where resolution ratio is constantDistorting transformation will certainly be caused when display, at this point, by the way that the screen of transverse screen window is shown that density is set as the screen of vertical screen windowW/L times of curtain display density can realize the display effect of uniform zoom in the case where resolution ratio inconvenience, complete vertical screen applicationConversion adaptation of the program in transverse screen display terminal is realized that vertical screen application program runs in transverse screen window to possess and is equal in vertical screenDisplay effect in window
It preferably, include: logical in the method for the fixation display direction of system level setting transverse screen window in above-described embodimentRotation angle when crossing the setting starting horizontal/vertical screen application program in window manager is zero.In addition, may be used also in actual useAccording to use habit, increases or modify display resolution newly under system framework resource distribution file and screen shows and shows under densityThe width and height dimensions of window.
It should be noted that the principle that the present embodiment discloses scheme is equally applicable to vertical screen display terminal adaptation transverse screen applicationThe method of program, solution principle is almost the same, and when specific implementation need to only do corresponding Parameters variation, and specific embodiment existsThis is not repeated them here.
Embodiment two
The present embodiment provides a kind of devices of transverse screen display terminal adaptation vertical screen application program, comprising:
Direction setting module, for the fixation display direction in system level setting transverse screen window;
Display size adjustment unit, for obtaining optimum display size of the vertical screen application program in vertical screen window, through aobviousMatching display size of the vertical screen application program in transverse screen window is obtained after showing logic adjustment;
Display scale adjustment unit, the screen for adjusting transverse screen window show density, make vertical screen application program in transverse screenDisplay scale in window is consistent with the display scale in vertical screen window;
Display unit is launched, it is aobvious according to the matching in transverse screen window for showing density based on screen adjustedShow that size launches the display content of vertical screen application program.
Preferably, the display size adjustment unit includes:
Logic calculation module, for obtaining the optimum display size W*H of vertical screen application program Yu vertical screen Window match, whereinW indicates that the width of vertical screen window, H indicate the height of vertical screen window;
Display size matching module, for matching display size of the vertical screen application program in transverse screen window to be adjusted to L*H, wherein L=H* (H/W).
Preferably, the display scale adjustment unit includes:
Screen shows that density adjusts module, for the screen of transverse screen window to be shown that density is set as the screen of vertical screen windowShow W/L times of density.
Preferably, the display scale adjustment unit further include:
Resolution adjustment module makes to erect for the best image resolution ratio based on vertical screen application program in vertical screen windowScreen application program is shown in transverse screen window according to the best image resolution ratio;
Display scale adjusts module, and the screen for setting vertical screen window for the screen display density of transverse screen window is shownW/L times of density realizes vertical screen application program in the display scale in transverse screen window and the display scale one in vertical screen windowIt causes.
Compared with prior art, the device of transverse screen display terminal adaptation vertical screen application program provided in an embodiment of the present inventionBeneficial effect is identical as the beneficial effect of method of transverse screen display terminal adaptation vertical screen application program that above-described embodiment one provides,This will not be repeated here.
Embodiment three
The present embodiment provides a kind of terminals, comprising: processor and memory;
Memory is for storing computer program instructions;
When above-mentioned terminal operating, processor executes the computer program instructions in memory, to execute transverse screen display terminalIt is adapted to the operating procedure of the method for vertical screen application program.
Compared with prior art, the transverse screen display that the beneficial effect of terminal provided by the invention and above-mentioned technical proposal provideThe beneficial effect of terminal adaptation vertical screen application program method is identical, and this will not be repeated here.
It will appreciated by the skilled person that realizing that all or part of the steps in foregoing invention method is can to lead toProgram is crossed to instruct relevant hardware and complete, above procedure can store in computer-readable storage medium, the programWhen being executed, each step including above-described embodiment method, and storage medium may is that ROM/RAM, magnetic disk, CD, storageCard etc..
More than, only a specific embodiment of the invention, but scope of protection of the present invention is not limited thereto, and it is any to be familiar withThose skilled in the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all coverWithin protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.