CN109739456A - A kind of adaptive UI adaptation method and system - Google Patents

A kind of adaptive UI adaptation method and system Download PDF

Info

Publication number
CN109739456A
CN109739456A CN201811630282.8A CN201811630282A CN109739456A CN 109739456 A CN109739456 A CN 109739456A CN 201811630282 A CN201811630282 A CN 201811630282A CN 109739456 A CN109739456 A CN 109739456A
Authority
CN
China
Prior art keywords
parameter
adaptation
control
background
safearea
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.)
Pending
Application number
CN201811630282.8A
Other languages
Chinese (zh)
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.)
Suzhou Playing Friends Era Polytron Technologies Inc
Original Assignee
Suzhou Playing Friends Era Polytron Technologies Inc
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 Suzhou Playing Friends Era Polytron Technologies Inc filed Critical Suzhou Playing Friends Era Polytron Technologies Inc
Priority to CN201811630282.8A priority Critical patent/CN109739456A/en
Publication of CN109739456A publication Critical patent/CN109739456A/en
Pending legal-status Critical Current

Links

Abstract

The present invention provides a kind of adaptive UI adaptation methods and system.This method is as follows: in the starting initialization of starting game for the first time, obtaining the screen resolution and SafeArea parameter of current device;The extensograph parameter of UI adaptation, the location parameter and Background extensograph parameter of UI adaptation are calculated according to screen resolution and SafeArea parameter;When UI is opened, stretch processing is carried out to the current Background for opening UI with reference to Background extensograph parameter;When UI is opened, the stretching and positional shift setting of UI control are carried out with reference to the UI extensograph parameter being adapted to and the UI location parameter being adapted to.The present invention also provides a kind of UI adaption systems simultaneously, thus, only to resolution ratio and the region SafeArea value and carry out adaptation data calculating on startup, it is subsequent that each UI is applied, reduce calculation amount, default application the method when UI is created, UI functional development team can not have to consider adaptation issues.

Description

A kind of adaptive UI adaptation method and system
Technical field
The present invention relates to game technical fields, more particularly to a kind of adaptive UI adaptation method and system.
Background technique
Game UI can simply be interpreted as the operational platform design of game.Since UI function panel is player in web game The visualization model of operation, interaction, is the carrier of playing method in game, game system, such as the article knapsack system in game, UI Function panel often accounts for 40% or more workload in web game exploitation.
UI function panel production process are as follows: project staff's design games playing method indicates panel simple layout with line frame graph, with Flow chart indicates panel interactive mode → fine arts personnel according to game and panel layout design design panel specific manifestation, with figure File preservation → developer, by code, realizes game UI function panel according to graphic file and interaction diagrams.
But with the development of mobile communication technology, the type of mobile device is also increasing, different types of movement is set It is standby that usually there is different operating system and screen size.
In the prior art using the bottom difference between mobile middleware technology shielding different operating system, realize across operation The quick exploitation of system, developer only need to develop a set of UI (User Interface, user interface), Bian Kebao for client Card client can be run in different operating system.
But since the screen size of different types of mobile device is not generally also identical, there is still a need for according to not by developer With screen size make different UI, and reseted by hi-fi effect figure, slicing treatment, coding and test, can just make visitor Family end is adapted to a variety of mobile devices, causes screen adaptation heavy workload, screen Adaption efficiency low.
Currently, Unity is UI processing one by one to the major part that UGUI is adaptively used on the market, or UI is individually handled, Although UI can be allowed to adapt to various resolution screens, including to there is full frame (containing fringe or round frame) mobile phone to be adapted to, to reach It shows optimum efficiency, meets each platform specification requirement.But there are still disadvantages:
1) each UI needs to handle alone, and development logic is relative complex;
2) the full frame adaptation of UI Background is also required to that processing is separately provided;
The reason is that not handling background, UGUI merely provides a SafeArea interface, for user Speech needs respectively to calculate UI adaptation resolution processes at each interface, has no unified standard scheme.
Summary of the invention
In order at least solve existing technical problem.
The adaptive UI adaptation method of one kind that provides of the invention is able to solve in above-mentioned technical problem At least one or more.
A kind of adaptive UI adaptation method, wherein method includes the following steps:
In the starting initialization of starting game for the first time, the screen resolution and SafeArea parameter of current device are obtained;
According to screen resolution and SafeArea parameter calculate UI adaptation extensograph parameter, UI adaptation location parameter with And Background extensograph parameter;
When UI is opened, stretch processing is carried out to the current Background for opening UI with reference to Background extensograph parameter;
When UI is opened, stretching and the position of UI control are carried out with reference to the UI extensograph parameter being adapted to and the UI location parameter being adapted to Offset setting.
The beneficial effect is that traditional UI is developed, in order to cope with the screen of a variety of different situations, it usually needs carry out different The UI of type is developed.But the invention provides a kind of scheme, i.e., when game starts and initializes, first goes to obtain The parameter of present terminal equipment is taken, the main parameter including screen resolution and SafeArea interface is calculated by these parameters Location parameter and Background extensograph parameter that extensograph parameter, the UI of suitable UI adaptation are adapted to out.Again to the Background of UI It carries out stretch processing, carry out stretching to UI control and positional shift setting.
After adopting said method, convenient for accelerating the speed of UI exploitation, only on startup to resolution ratio and the region SafeArea Value simultaneously carries out adaptation data calculating, subsequent to apply to each UI, reduces calculation amount, this side of default application when UI is created Method, UI functional development team can not have to consider adaptation issues.
In some embodiments, according to the screen resolution of current device and SafeArea parameter, current device is determined Safety zone,
When UI is opened, with reference to the location parameter that UI is adapted to, positional shift is carried out to UI control within the scope of safety zone and is set It is fixed.
The beneficial effect is that can not directly carry out UI control since the screen of part smart phone belongs to irregular shape Layout, need first to determine the safety zone of current device according to the screen resolution and SafeArea parameter of current device, i.e., The region for determining can to carry out UI layout, carries out UI layout in this safety zone, prevents UI control and be arranged in In some fringe regions, UI control is caused to be laid out unreasonable situation.
In some embodiments, the drawing of UI control is carried out with reference to the UI extensograph parameter being adapted to and the UI location parameter being adapted to Stretch and positional shift setting method particularly includes:
Equal proportion scaling is carried out according to true resolution for Background to stretch;
Ratio is proportionally zoomed in and out according to the length and width of safety zone and the screen aspect of current device for UI control It calculates, according to pantograph ratio the greater, calculates stretch ratio, determine the stretching and positional shift setting of UI control.
In some embodiments, when UI is developed, the background graph region at the interface UI is separated with UI control regions, As mutually independent part.
The beneficial effect is that separate the background graph region at the interface UI with UI control regions when UI exploitation, As mutually independent two parts, in this way when UI is adapted to, so that it may distinguish Background and UI control It being stretched, the stretching of each part does not interfere with the stretching of another part, for developer, functional development Personnel can not have to consider adaptation issues, to simplify development process.
The present invention also provides a kind of adaptive UI adaption systems using the above method, wherein includes: to obtain list Member, arithmetic element, Background adaptation execution unit, UI control are adapted to execution unit;
Acquiring unit is configured to obtain the screen resolution and SafeArea parameter of current device;
Arithmetic element is configured to calculate extensograph parameter, the UI of UI adaptation according to screen resolution and SafeArea parameter The location parameter and Background extensograph parameter of adaptation;
Background is adapted to execution unit, is configured to when UI is opened, and opens UI's to current according to Background extensograph parameter Background carries out stretch processing;
UI control is adapted to execution unit, is configured to when UI is opened, according to the extensograph parameter of UI adaptation and the position of UI adaptation Set stretching and positional shift setting that parameter carries out UI control.
The beneficial effect is that utilizing acquiring unit after using this system, it may be convenient to get the screen of current device Resolution ratio and SafeArea parameter, arithmetic element can calculate extensograph parameter, the UI of corresponding UI adaptation by these parameters The location parameter and Background extensograph parameter of adaptation.UI open when, can use Background adaptation execution unit and UI control adaptation execution unit is handled in real time.Background is adapted to execution unit, according to Background extensograph parameter to currently opening The Background for opening UI carries out stretch processing.UI control is adapted to execution unit, according to the extensograph parameter of UI adaptation and the position of UI adaptation Set stretching and positional shift setting that parameter carries out UI control.
In some embodiments, the background graph region at the interface UI is separated with UI control regions, is become mutually solely Vertical part.
The beneficial effect is that separate the background graph region at the interface UI with UI control regions when UI exploitation, As mutually independent two parts, in this way when UI is adapted to, so that it may distinguish Background and UI control It being stretched, the stretching of each part does not interfere with the stretching of another part, for developer, functional development Personnel can not have to consider adaptation issues, to simplify development process.
In some embodiments, UI control adaptation execution unit includes that UI control stretches execution unit and the offset of UI control Execution unit;
UI control stretches execution unit, and the extensograph parameter according to UI adaptation carries out the stretching of UI control;
UI control deviates execution unit, and the location parameter according to UI adaptation carries out the positional shift setting of UI control.
The beneficial effect is that stretching execution unit for UI control by UI control and being stretched accordingly, passed through UI control deviates execution unit and carries out corresponding positional shift setting, it can the rational deployment for realizing UI control is realized and worked as The adaptive adaptation of preceding terminal.
In some embodiments, further include safety zone detection unit, be configured to be differentiated according to the screen of current device Rate and SafeArea parameter detect the safety zone of current device, and when UI is opened, UI control is adapted to execution unit in safety zone Location parameter in domain according to UI adaptation carries out the positional shift setting of UI control.
The beneficial effect is that can not directly carry out UI control since the screen of part smart phone belongs to irregular shape Layout, safety zone detection unit can first according to the screen resolution of current device and SafeArea parameter determination currently set Standby safety zone determines the region that can carry out UI layout, carries out UI layout in this safety zone, prevent UI control has been arranged in some fringe regions, and UI control is caused to be laid out unreasonable situation.
Simultaneously the invention also discloses a kind of terminal device, including processor, memory and storage in memory and It is configured as the computer program executed by processor, processor realizes method as above when executing computer program.
Meanwhile the present invention also provides a kind of nonvolatile computer storage media, it is stored with computer executable program, Computer executable program for executing adaptive UI adaptation method as above, storage medium include but is not limited to ROM, RAM, Common hard disc, USB flash disk or floppy disk.
The beneficial effect is that, it is only necessary to it can be used for storing corresponding program, can will be held accordingly by storage medium After line program stores, easily corresponding executable program can will be installed in corresponding server, thus real The arbitrary terminal models of adaptively adaptation of existing UI, save memory space.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow chart for adaptive UI adaptation method that one embodiment of the invention provides;
Fig. 2 is a kind of flow chart for adaptive UI adaptation method that further embodiment of this invention provides;
Fig. 3 is the safety zone schematic diagram of iPhoneX;
Fig. 4 is that the structure for the adaptive UI adaption system for applying method as above that one embodiment of the invention provides is shown It is intended to;
Fig. 5 is the structure for the adaptive UI adaption system for applying method as above that another embodiment of the present invention provides Schematic diagram;
Fig. 6 is a kind of structure principle chart for terminal device that one embodiment of the invention provides.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
The adaptive UI adaptation method of one kind provided in an embodiment of the present invention and system are able to solve above-mentioned technical problem and work as At least one of or it is multiple.
Embodiment one
It is as shown in Figure 1 a kind of adaptive UI adaptation method, wherein method includes the following steps:
Step S101: in the starting initialization of starting game for the first time, corresponding peace can be got according to the API that system defines Entire area calculates corresponding safety zone and borderline region ratio according to the screen resolution and safety zone actually obtained (acquired results rectInPercent);
Step S102: when starting initialization, being added to a default starting page, automatic to fill for all UI father nodes Screen gets actual screen resolution ratio (screenRect), according to the peace got in the first step according to this interface size Region-wide bound ratio calculates safety zone size and deviation post;
Be exemplified below: using central point as anchor point (0,0), calculations of offset is as follows:
OffsetX=rectInPercent.x*screenRect.width+rectInPercent.w idth* screenRect.width-screenRect.width/2;
OffsetY=rectInPercent.y*screenRect.height+rectInPercent. height* screenRect.height-screenRect.height/2;
For step S103:UI in production, carry UI SafeArea script additionally has a background node to operating area, It can be set in UI SafeArea parameter;
When step S104:UI is opened, UI SafeArea activation, according to the practical screen recorded in the SafeArea of safety zone Curtain resolution sizes, to determine whether the complete filling interface of energy, when cannot fill, carries out equal proportion and stretch in UISafeArea Background node;
When step S105:UI is opened, with reference to the operating area and shift ratio and practical screen of safety zone SafeArea Curtain position sets deviation post in the size and screen of UISafeArea entirety father node, and child node autoplacement itself can be certainly It is dynamic to be laid out according to father node size without being had an impact to practical interface.
Traditional UI exploitation, in order to cope with the screen of a variety of different situations, it usually needs carry out different types of UI exploitation. But the invention provides a kind of scheme, i.e., when game starts and initializes, first goes to obtain present terminal and set Standby parameter, the main parameter including screen resolution and SafeArea interface, calculates suitable UI by these parameters The location parameter and Background extensograph parameter that extensograph parameter, the UI of adaptation are adapted to.Again to the Background of UI carry out stretch processing, UI control stretch and positional shift is set.
After adopting said method, convenient for accelerating the speed of UI exploitation, only on startup to resolution ratio and the region SafeArea Value simultaneously carries out adaptation data calculating, subsequent to apply to each UI, reduces calculation amount, this side of default application when UI is created Method, UI functional development team can not have to consider adaptation issues.
Embodiment two
As shown in Fig. 2, including the following steps: the present invention also provides a kind of embodiment
Step S201: for the first time starting game starting initialization when, obtain current device screen resolution and SafeArea parameter;
Step S202: the extensograph parameter of UI adaptation is calculated according to screen resolution and SafeArea parameter, UI is adapted to Location parameter and Background extensograph parameter;
Step S203: when according to the design of the screen resolution of current device and SafeArea parameter and current interface Screen occupation rate is compared with the safety zone in SafeArea, is had beyond then should actually showing according to equal than calculating Range and position;
When step S204:UI is opened, stretch processing is carried out to the current Background for opening UI with reference to Background extensograph parameter;
When step S205:UI is opened, the extensograph parameter being adapted to reference to UI carries out the stretching of UI control;
When step S206:UI is opened, with reference to the location parameter that UI is adapted to, position is carried out to UI control within the scope of safety zone Set offset setting.
Since the screen of part smart phone belongs to irregular shape, such as latest version iPhone iPhoneX, in screen Top just have one small forehead black region, be to belong to the region that can not be shown, if corresponding UI control layout arrives this Position can then lead to the problem of inconvenient operation.
So needing first to determine the safety zone of current device according to the screen resolution and SafeArea parameter of current device Domain determines the region that can carry out UI layout, carries out UI layout in this safety zone, prevent UI control arrangement In some fringe regions, UI control is caused to be laid out unreasonable situation.
Specifically, of the invention carry out stretch processing to the current Background for opening UI with reference to Background extensograph parameter Method particularly includes:
Background can be cut according to the artistic design theory of Background using different interface sizes in design.It is transporting When row, the actual size of the Background can be got, is compared with the screen resolution of SafeArea, screen accounting is insufficient When, it will do it equal proportion stretching.
Specifically, the location parameter that the extensograph parameter of the invention being adapted to reference to UI and UI are adapted to carries out the drawing of UI control Stretch and positional shift setting method particularly includes:
Safety zone is set to center anchor point first, according to the deviant and safety zone size in SafeArea, is directly arranged The safety zone size of current UI and position.
It is illustrated below:
As shown in figure 3, being illustrated by taking iPhoneX as an example by newest, safety zone main attention of iPhoneX or so Fillet and fringe position and bottom operating area are all but to answer the requirement of apple IOS, Jin Jinxu except safety zone Operating area is shown within safety zone, but edge non-operational region, need to fill completely, avoids display abnormal, for This situation being likely to occur, we come region disconnecting:
Firstly, Background, carries out equal proportion scaling according to true resolution and stretches;Secondly, UI control is according to Safe area Region, according to the interface iPhoneX actual ratio (such as operating area is 1136:640, according to this ratio and safety zone length and width into Row pantograph ratio calculates, and according to pantograph ratio the greater, actual ratio is calculated, finally to determine operating area layout size.
In order to which UI is in the process of adaptation, guarantee the independence that the background graph region at the interface UI is adapted to UI control regions Property, the background graph region at the interface UI can be separated with UI control regions, become mutually independent part.In this way UI into When row adaptation, so that it may stretch Background and UI control respectively, the stretching of each part does not interfere with The stretching of another part, for developer, functional development personnel can not have to consider adaptation issues, thus simple Change development process.
Embodiment three
As shown in figure 4, the present invention also provides a kind of adaptive UI adaption systems using the above method, wherein packet It includes: acquiring unit 11, arithmetic element 12, Background adaptation execution unit 13, UI control adaptation execution unit 14;
Acquiring unit 11 is configured to obtain the screen resolution and SafeArea parameter of current device;Acquiring unit 11 will The screen resolution and SafeArea parameter of the current device got send arithmetic element 12 to.
Arithmetic element 12, be configured to be calculated according to screen resolution and SafeArea parameter UI adaptation extensograph parameter, The location parameter and Background extensograph parameter of UI adaptation;The position of extensograph parameter, UI adaptation that UI is adapted to by arithmetic element 12 Parameter and Background extensograph parameter send Background adaptation execution unit 13 and UI control adaptation execution unit 14 to.
Background is adapted to execution unit 13, is configured to when UI is opened, and opens UI to current according to Background extensograph parameter Background carry out stretch processing;
UI control is adapted to execution unit 14, is configured to when UI is opened, what the extensograph parameter and UI according to UI adaptation were adapted to Location parameter carries out the stretching and positional shift setting of UI control.
After this system, the screen resolution for getting current device that can be convenient using acquiring unit 11 and SafeArea parameter, arithmetic element 12 are adapted to by extensograph parameter, the UI that these parameters can calculate corresponding UI adaptation Location parameter and Background extensograph parameter.When UI is opened, Background adaptation execution unit 13 and UI control can use Part adaptation execution unit 14 is handled in real time.Background is adapted to execution unit 13, according to Background extensograph parameter to currently opening The Background for opening UI carries out stretch processing.UI control is adapted to execution unit 14, what the extensograph parameter and UI according to UI adaptation were adapted to Location parameter carries out the stretching and positional shift setting of UI control.
In the present invention, the background graph region at the interface UI can be separated with UI control regions, become mutually indepedent Part.Because separating the background graph region at the interface UI with UI control regions when UI exploitation, become mutually solely Two vertical parts, in this way when UI is adapted to, so that it may stretch Background and UI control respectively, often The stretching of a part does not interfere with the stretching of another part, for developer, functional development personnel Without considering adaptation issues, to simplify development process.
Wherein, UI control adaptation execution unit 14 includes that UI control stretches execution unit 141 and UI control offset enforcement division Part 142;
UI control stretches execution unit 141, and the extensograph parameter according to UI adaptation carries out the stretching of UI control;
UI control deviates execution unit 142, and the location parameter according to UI adaptation carries out the positional shift setting of UI control.
The beneficial effect is that stretching execution unit for UI control by UI control and being stretched accordingly, passed through UI control deviates execution unit and carries out corresponding positional shift setting, it can the rational deployment for realizing UI control is realized and worked as The adaptive adaptation of preceding terminal.
Example IV
As shown in figure 5, for embodiment three, the present embodiment four is also wrapped the present invention also provides a kind of embodiment Safety zone detection unit 15 is included, screen resolution and SafeArea parameter according to current device are configured to, is detected current The safety zone of equipment, when UI is opened, UI control is adapted to location parameter that execution unit 14 is adapted to according to UI in safety zone Carry out the positional shift setting of UI control.
Since the screen of part smart phone belongs to irregular shape, the layout of UI control, safety zone can not be directly carried out Domain detection unit can first determine the safety zone of current device according to the screen resolution of current device and SafeArea parameter, The region for determining can to carry out UI layout, carries out UI layout in this safety zone, prevents UI control and be arranged in In some fringe regions, UI control is caused to be laid out unreasonable situation.
Embodiment five
As shown in fig. 6, equipment is showed in the form of universal computing device the invention also discloses a kind of terminal device.Packet It includes processor 21, memory 22 and is stored in the memory 22 and is configured as the computer executed by the processor Program 23, the processor 21 realize method as described above when executing the computer program 23.It further include connection not homology The bus of system component (including memory 22 and processor 21).
Bus indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, outside Enclose bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.Citing For, these architectures include but is not limited to industry standard architecture (ISA) bus, and microchannel architecture (MAC) is total Line, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Terminal device typically comprises a variety of computer system readable media.These media can be it is any can be by terminal The usable medium of equipment access, including volatile and non-volatile media, moveable and immovable medium.
Memory 22 may include the computer system readable media of form of volatile memory, such as random access memory Device (RAM) and/or cache memory.Terminal device may further include other removable/nonremovable, volatile Property/nonvolatile computer system storage medium.Only as an example, memory 22 can be used for reading and writing immovable, non-easy The property lost magnetic medium (commonly referred to as " hard disk drive ").It can also provide for (such as " soft to removable non-volatile magnetic disk Disk ") read-write disc driver, and (such as CD-ROM, DVD-ROM or other light are situated between to removable anonvolatile optical disk Matter) read-write CD drive.In these cases, each driver can by one or more data media interfaces with Bus is connected.Memory may include at least one program product, which has one group of (for example, at least one) program Module, these program modules are configured to perform the function of various embodiments of the present invention.
Terminal device can also be communicated with one or more external equipments (such as keyboard, sensing equipment, display etc.), also Can enable a user to the equipment interacted with the terminal device communication with one or more, and/or with enable the terminal device Any equipment (such as network interface card, modem etc.) communicated with one or more of the other calculating equipment communicates.It is this Communication can be carried out by input/output (I/O) interface.Also, terminal device can also by network adapter with one or The multiple networks of person (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet) communication.
The program that processor 21 is stored in system storage 22 by operation, thereby executing various function application and number According to processing, such as realize the method for being adaptively adapted to arbitrary terminal models of UI provided by the embodiment of the present invention, Ye Ji When the starting initialization of starting game for the first time, the screen resolution and SafeArea parameter of current device are obtained;It is differentiated according to screen Rate and SafeArea parameter calculate the location parameter and Background extensograph parameter of the extensograph parameter of UI adaptation, UI adaptation;UI When opening, stretch processing is carried out to the current Background for opening UI with reference to Background extensograph parameter;When UI is opened, it is adapted to reference to UI Extensograph parameter and UI adaptation location parameter carry out UI control stretching and positional shift setting.
Embodiment six
Meanwhile the present invention also provides a kind of computer storage mediums, are stored with computer executable program, computer can Program is executed for executing adaptive UI adaptation method as above, storage medium includes but is not limited to ROM, RAM, common hard Disk, USB flash disk or floppy disk.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, It further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.? Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service It is connected for quotient by internet).
It only needs to can be used for storing corresponding program, is stored corresponding executable program by storage medium Afterwards, easily corresponding executable program can will be installed in corresponding server, to realize that UI's is adaptive suitable With arbitrary terminal models, memory space is saved.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (10)

1. a kind of adaptive UI adaptation method, wherein described method includes following steps:
In the starting initialization of starting game for the first time, the screen resolution and SafeArea parameter of current device are obtained;
The extensograph parameter of UI adaptation, the location parameter and back of UI adaptation are calculated according to screen resolution and SafeArea parameter Scape figure extensograph parameter;
When UI is opened, stretch processing is carried out to the current Background for opening UI with reference to Background extensograph parameter;
When UI is opened, the stretching and positional shift of UI control are carried out with reference to the UI extensograph parameter being adapted to and the UI location parameter being adapted to Setting.
2. according to the method described in claim 1, wherein, further comprise the steps of: according to the screen resolution of current device and SafeArea parameter determines the safety zone of current device,
When UI is opened, with reference to the location parameter that UI is adapted to, positional shift setting is carried out to UI control within the scope of safety zone.
3. according to the method described in claim 1, wherein, being carried out with reference to the UI extensograph parameter being adapted to and the UI location parameter being adapted to What the stretching of UI control and positional shift were set method particularly includes:
Equal proportion scaling is carried out according to true resolution for Background to stretch;
For UI control, according to the length and width of safety zone and the screen aspect of current device, proportionally zoom in and out than calculating, According to pantograph ratio the greater, stretch ratio is calculated, determines the stretching and positional shift setting of UI control.
4. according to the method described in claim 1, wherein, in UI exploitation, by the background graph region at the interface UI and the controls region UI Domain is separated, and mutually independent part is become.
5. a kind of adaptive UI adaption system of application such as any one of Claims 1-4 the method, wherein include: Acquiring unit, arithmetic element, Background adaptation execution unit, UI control are adapted to execution unit;
The acquiring unit is configured to obtain the screen resolution and SafeArea parameter of current device;
The arithmetic element is configured to calculate extensograph parameter, the UI of UI adaptation according to screen resolution and SafeArea parameter The location parameter and Background extensograph parameter of adaptation;
The Background is adapted to execution unit, is configured to when UI is opened, and opens UI's to current according to Background extensograph parameter Background carries out stretch processing;
The UI control is adapted to execution unit, is configured to when UI is opened, according to the extensograph parameter of UI adaptation and the position of UI adaptation Set stretching and positional shift setting that parameter carries out UI control.
6. system according to claim 5, wherein the background graph region at the interface UI is separated with UI control regions, As mutually independent part.
7. system according to claim 5, wherein the UI control adaptation execution unit includes that UI control stretches enforcement division Part and UI control deviate execution unit;
The UI control stretches execution unit, and the extensograph parameter according to UI adaptation carries out the stretching of UI control;
The UI control deviates execution unit, and the location parameter according to UI adaptation carries out the positional shift setting of UI control.
8. system according to claim 5, wherein further include safety zone detection unit, be configured to according to current device Screen resolution and SafeArea parameter, detect the safety zone of current device, when UI is opened, the UI control adaptation is held Location parameter of the row unit in safety zone according to UI adaptation carries out the positional shift setting of UI control.
9. a kind of terminal device, including processor, memory and storage in the memory and are configured as by described The computer program that device executes is managed, the processor is realized when executing the computer program as any one in Claims 1-4 Method described in.
10. a kind of storage medium is stored with computer executable program, the computer executable program is for executing power as above Benefit require any one of 1 to 4 described in adaptive UI adaptation method, storage medium includes but is not limited to ROM, RAM, common hard Disk, USB flash disk or floppy disk.
CN201811630282.8A 2018-12-29 2018-12-29 A kind of adaptive UI adaptation method and system Pending CN109739456A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811630282.8A CN109739456A (en) 2018-12-29 2018-12-29 A kind of adaptive UI adaptation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811630282.8A CN109739456A (en) 2018-12-29 2018-12-29 A kind of adaptive UI adaptation method and system

Publications (1)

Publication Number Publication Date
CN109739456A true CN109739456A (en) 2019-05-10

Family

ID=66362031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811630282.8A Pending CN109739456A (en) 2018-12-29 2018-12-29 A kind of adaptive UI adaptation method and system

Country Status (1)

Country Link
CN (1) CN109739456A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955485A (en) * 2019-12-17 2020-04-03 网易(杭州)网络有限公司 Method and device for adjusting interface elements
CN110990097A (en) * 2019-11-29 2020-04-10 深圳创维-Rgb电子有限公司 UI (user interface) generation method, storage medium and intelligent terminal
CN111949360A (en) * 2020-09-01 2020-11-17 网易(杭州)网络有限公司 User interface adaptation method and device, electronic equipment and storage medium
CN112379964A (en) * 2020-12-02 2021-02-19 网易(杭州)网络有限公司 Display control method and device of user interface, computer equipment and storage medium
CN113829996A (en) * 2020-06-24 2021-12-24 逸驾智能科技有限公司 Display method, electronic device, and computer-readable storage medium
CN117032468A (en) * 2023-10-09 2023-11-10 深圳市微克科技有限公司 Fillet rectangle drawing method, system and medium based on intelligent bracelet

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103885755A (en) * 2012-12-19 2014-06-25 腾讯科技(深圳)有限公司 Method and device for implementing screen matching of owner-draw controls

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103885755A (en) * 2012-12-19 2014-06-25 腾讯科技(深圳)有限公司 Method and device for implementing screen matching of owner-draw controls

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990097A (en) * 2019-11-29 2020-04-10 深圳创维-Rgb电子有限公司 UI (user interface) generation method, storage medium and intelligent terminal
CN110955485A (en) * 2019-12-17 2020-04-03 网易(杭州)网络有限公司 Method and device for adjusting interface elements
CN113829996A (en) * 2020-06-24 2021-12-24 逸驾智能科技有限公司 Display method, electronic device, and computer-readable storage medium
CN113829996B (en) * 2020-06-24 2023-09-08 逸驾智能科技有限公司 Display method, electronic device, and computer-readable storage medium
CN111949360A (en) * 2020-09-01 2020-11-17 网易(杭州)网络有限公司 User interface adaptation method and device, electronic equipment and storage medium
CN112379964A (en) * 2020-12-02 2021-02-19 网易(杭州)网络有限公司 Display control method and device of user interface, computer equipment and storage medium
CN117032468A (en) * 2023-10-09 2023-11-10 深圳市微克科技有限公司 Fillet rectangle drawing method, system and medium based on intelligent bracelet

Similar Documents

Publication Publication Date Title
CN109739456A (en) A kind of adaptive UI adaptation method and system
US10997328B2 (en) Method and apparatus for simulation test of autonomous driving of vehicles, an apparatus and computer-readable storage medium
US20180088738A1 (en) Pressure-sensitive touch screen display and method
CN104123113B (en) The multi-screen display method and device of a kind of mobile terminal and its multisystem
CN110865898B (en) Method, device, medium and equipment for converging crash call stack
CN108549510A (en) Figure calibration method, equipment and storage medium for showing boarding application
CN108242837A (en) The method of the charging of electronic equipment and control electronics
WO2017032265A1 (en) Application push method and apparatus, and a serving device
CN105338550B (en) A kind of management method and device of the connection for wireless network
CN109213402A (en) A kind of method and mobile terminal of the interface display of mobile terminal
CN107515707B (en) Mobile terminal multilevel menu control method and system, storage medium, electronic equipment
CN110287810B (en) Vehicle door motion detection method, device and computer readable storage medium
CN107609958A (en) Behavioral guidance strategy determines method and device, storage medium and electronic equipment
CN107741902A (en) Program application detection method and program application detection means
CN110363654A (en) A kind of favor information method for pushing, device and electronic equipment
CN109683880A (en) Webpage exchange method, device, equipment and storage medium
CN107341015A (en) Inter-terminal data synchronous method, device, terminal and storage medium
CN107102950A (en) A kind of applied program testing method and device
CN105099871B (en) notification method and device for instant messaging application
CN107835984A (en) Heat mitigates Consumer's Experience
CN110838306A (en) Voice signal detection method, computer storage medium and related equipment
CN108135023A (en) Connection method, equipment and the computer readable storage medium of Wireless LAN
CN107168738A (en) A kind of management method of application tool, device, equipment and storage medium
CN110389702A (en) A kind of screenshot method, device and storage medium
CN110248023A (en) Intelligent terminal control method, device, equipment and medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190510