CN105094891B - effect display method and device - Google Patents

effect display method and device Download PDF

Info

Publication number
CN105094891B
CN105094891B CN201510374242.1A CN201510374242A CN105094891B CN 105094891 B CN105094891 B CN 105094891B CN 201510374242 A CN201510374242 A CN 201510374242A CN 105094891 B CN105094891 B CN 105094891B
Authority
CN
China
Prior art keywords
configuration
value
smart machine
configuration file
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510374242.1A
Other languages
Chinese (zh)
Other versions
CN105094891A (en
Inventor
吴俊洲
闫昊
张建春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiaomi Inc
Original Assignee
Xiaomi 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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510374242.1A priority Critical patent/CN105094891B/en
Publication of CN105094891A publication Critical patent/CN105094891A/en
Application granted granted Critical
Publication of CN105094891B publication Critical patent/CN105094891B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure discloses a kind of effect display method and device, belongs to technical field of intelligent equipment.The effect display method includes:When initializing the system of smart machine, corresponding with smart machine configuration file is read from configuration file generator, configuration file is generated according to the configuration parameter of smart machine, and includes configuration attribute corresponding with each configuration parameter and its value;When smart machine starts application program, the value of the configuration attribute for the display effect for determining application program is read from configuration file;According to the value of configuration attribute, the display effect of application program is determined, and shown using display effect.Different effects is realized according to the value of configuration attribute in configuration file by application program, in newly-increased type, the code that application program need not be changed needs to increase the problem of type judges, increases the maintenance cost of code newly in the code of application program when solving newly-increased type;The maintenance cost for reducing code is achieved the effect that.

Description

Effect display method and device
Technical field
This disclosure relates to technical field of intelligent equipment, more particularly to a kind of effect display method and device.
Background technology
Since the smart machine of different model is typically configured different hardware, same application is with different hard When being run on the smart machine of part configuration, the slack situation of operation may result in.
In order to enable same application smooth can be run on the smart machine of various models, common method For:It is provided with the code segment for showing different-effect according to different hardware configurations in the code of the application program, works as application program When being run in smart machine, the hardware configuration for the smart machine for being currently running application program is obtained, according to the application program The hardware configuration of code segment and the smart machine shows the display effect that the hardware configuration can be supported.For example, a certain application Program needs the display effect A in the mobile phone of model X1, needs the display effect B in the mobile phone of model X2, then may be used at this time To add the content of the code segment with following function in the code of application program:The model for obtaining current phone, if currently The model X1 of mobile phone, then display effect A;If the model X2 of current phone, display effect B.The application program then can be with It operates in the mobile phone of model X1 and the mobile phone of model X2.
Invention content
Need to increase type newly in the code of application program when in order to solve newly-increased type and judge, increase the maintenance of code at This problem of, a kind of effect display method of disclosure offer and device.Technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of effect display method is provided, the method is applied to intelligence and sets Standby, this method includes:
When initializing the system of the smart machine, read from configuration file generator corresponding with the smart machine Configuration file, and the configuration file is write with a brush dipped in Chinese ink into the system of the smart machine, the configuration file is the configuration File generator is generated according to the configuration parameter of the smart machine, and includes that configuration corresponding with each configuration parameter belongs to The value of property and configuration attribute;
When the smart machine starts application program, is read from the configuration file and determine the aobvious of the application program Show the value of the configuration attribute of effect;
According to the value of the configuration attribute, the display effect of the application program is determined, and utilize the display effect It is shown.
Optionally, the value according to the configuration attribute determines the display effect of the application program, including:
When the value of the configuration attribute is the first value, it is determined that the display effect of the application program is first aobvious Show effect;
When the value of the configuration attribute is the second value, it is determined that the display effect of the application program is second aobvious Show effect.
Optionally, the method further includes:
If matching for the display effect for determining the application program is read from the configuration file of the memory not successfully The value of attribute is set, then is shown according to the minimum display effect of configuration parameter request.
Optionally, configuration file corresponding with various types is stored in the configuration file generator, it is described from configuration text Configuration file corresponding with the smart machine is read in part generator, including:
The type for obtaining the smart machine reads configuration corresponding with the type from the configuration file generator File.
Optionally, described when the smart machine starts application program, it is read from the configuration file described in determining The value of the configuration attribute of the display effect of application program, including:
After the system of the smart machine starts, configuration corresponding with the smart machine will be stored in the system File is read to memory;
When the smart machine starts application program, reads from the configuration file of the memory and answered described in determining With the value of the configuration attribute of the display effect of program.
According to the second aspect of the embodiment of the present disclosure, a kind of effect display device is provided, described device is applied to intelligence and sets Standby, which includes:
First read module is configured as when initializing the system of the smart machine, from configuration file generator Configuration file corresponding with the smart machine is read, and the configuration file is write with a brush dipped in Chinese ink into the system of the smart machine, The configuration file is that the configuration file generator is generated according to the configuration parameter of the smart machine, and include with respectively A value for configuring the corresponding configuration attribute of parameter and configuration attribute;
Second read module is configured as when the smart machine starts application program, from first read module The value of the configuration attribute for the display effect for determining the application program is read in the configuration file read;
First display module is configured as the value of the configuration attribute read according to second read module, really The display effect of the fixed application program, and shown using the display effect.
Optionally, first display module, including:
First display sub-module is configured as when the value of the configuration attribute is the first value, it is determined that described to answer It is the first display effect with the display effect of program;
Second display sub-module is configured as when the value of the configuration attribute is the second value, it is determined that described to answer It is the second display effect with the display effect of program.
Optionally, described device further includes:
Second display module is answered if being configured as reading from the configuration file of the memory not successfully described in decision With the value of the configuration attribute of the display effect of program, then shown according to the minimum display effect of configuration parameter request.
Optionally, first read module is additionally configured to:
The type for obtaining the smart machine reads configuration corresponding with the type from the configuration file generator File.
Optionally, second read module, including:
First reading submodule is configured as after the system of the smart machine starts, by what is stored in the system Configuration file corresponding with the smart machine is read to memory;
Second reading submodule is configured as when the smart machine starts application program, described in the memory The value of the configuration attribute for the display effect for determining the application program is read in configuration file.
According to the third aspect of the embodiment of the present disclosure, a kind of effect display device is provided, described device is applied to intelligence and sets Standby, which includes:
Processor;
Memory for storing processor-executable instruction;
Wherein, processor is configured as:
When initializing the system of the smart machine, read from configuration file generator corresponding with the smart machine Configuration file, and the configuration file is write with a brush dipped in Chinese ink into the system of the smart machine, the configuration file is the configuration File generator is generated according to the configuration parameter of the smart machine, and includes that configuration corresponding with each configuration parameter belongs to The value of property and configuration attribute;
When the smart machine starts application program, is read from the configuration file and determine the aobvious of the application program Show the value of the configuration attribute of effect;
According to the value of the configuration attribute, the display effect of the application program is determined, and utilize the display effect It is shown.
The technical scheme provided by this disclosed embodiment can include the following benefits:
By the way that when initializing the system of smart machine, match corresponding with smart machine is read from configuration file generator File is set, and configuration file is write with a brush dipped in Chinese ink into the system of smart machine, when smart machine starts application program, from configuration file The value of the middle configuration attribute for reading the display effect for determining application program determines application program according to the value of configuration attribute Display effect, and shown using display effect;Since application program is according to the value of the configuration attribute in configuration file Judge, to realize different effects, in newly-increased type, the code of application program need not be changed, be needed when solving newly-increased type The problem of increasing type judgement newly in the code of application program, increasing the maintenance cost of code;Having reached reduces the dimension of code Protect the effect of cost.
It should be understood that above general description and following detailed description is merely exemplary, this can not be limited It is open.
Description of the drawings
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and consistent with the instructions for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of effect display method shown according to an exemplary embodiment;
Fig. 2A is a kind of flow chart of the effect display method shown according to another exemplary embodiment;
Fig. 2 B are according to the configuration file schematic diagram after the reading shown in an exemplary embodiment;
Fig. 2 C are the display effects that application program is determined according to the value according to configuration attribute shown in an exemplary embodiment Fruit, and the flow chart shown using display effect;
Fig. 2 D are the schematic diagrames that display effect is determined according to the Picture-viewer shown in an exemplary embodiment;
Fig. 3 A are a kind of flow charts of effect display method shown according to another exemplary embodiment;
Fig. 3 B according to shown in an exemplary embodiment smart machine start application program when, read from configuration file Determine the flow chart of the value of the configuration attribute of the display effect of application program;
Fig. 4 is a kind of block diagram of effect display device shown according to an exemplary embodiment;
Fig. 5 is a kind of block diagram of the effect display device shown according to another exemplary embodiment;
Fig. 6 is a kind of block diagram of effect display device shown according to another exemplary embodiment.
Specific implementation mode
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of flow chart of effect display method shown according to an exemplary embodiment, the effect display method Applied in smart machine, smart machine may include the smart mobile phone, tablet computer, multimedia player for having display function Deng.The effect display method includes the following steps.
In a step 101, when initializing the system of smart machine, reading and smart machine from configuration file generator Corresponding configuration file, and configuration file is write with a brush dipped in Chinese ink into the system of smart machine.
Wherein, to be configuration file generator generate configuration file according to the configuration parameter of smart machine, and include with Each value for configuring the corresponding configuration attribute of parameter and configuration attribute.
In a step 102, it when smart machine starts application program, is read from configuration file and determines the aobvious of application program Show the value of the configuration attribute of effect.
In step 103, according to the value of configuration attribute, the display effect of application program is determined, and utilize display effect It is shown.
In conclusion the effect display method provided in the embodiment of the present disclosure, passes through the system in initialization smart machine When, configuration file corresponding with smart machine is read from configuration file generator, and configuration file is write with a brush dipped in Chinese ink to smart machine System in, when smart machine starts application program, read from configuration file and determine that the display effect of application program is matched The value for setting attribute determines the display effect of application program, and shown using display effect according to the value of configuration attribute Show;Since application program realizes different effects according to the judgement of the value of the configuration attribute in configuration file, in newly-increased type When, the code of application program need not be changed, the newly-increased type in the code of application program is needed to sentence when solving newly-increased type The problem of breaking, increasing the maintenance cost of code;The maintenance cost for reducing code is achieved the effect that.
Fig. 2A is a kind of flow chart of the effect display method shown according to another exemplary embodiment, the effect display side Method is applied in smart machine, and smart machine may include the smart mobile phone, tablet computer, multimedia for having display function Device etc..The effect display method includes the following steps.
In step 201, when initializing the system of smart machine, reading and smart machine from configuration file generator Corresponding configuration file, and configuration file is write with a brush dipped in Chinese ink into the system of smart machine.
Wherein, to be configuration file generator generate configuration file according to the configuration parameter of smart machine, and include with Each value for configuring the corresponding configuration attribute of parameter and configuration attribute.
Corresponding system can be configured generally in smart machine, provided with software for managing and controlling smart machine hardware Source.User can carry out refreshing replacement to the system of smart machine.In the system of initialization, read from configuration file generator Configuration file corresponding with smart machine, and configuration file is write with a brush dipped in Chinese ink into the system of smart machine.
Configuration file generator is used to generate configuration file according to the configuration parameter of smart machine.In practical implementations, may be used Configuration file is generated to be manually entered in the configuration parameter to configuration file generator of smart machine, can also be configuration file life The automatic configuration parameter for reading smart machine of growing up to be a useful person generates configuration file.Configuration file generator is located at and may be implemented in general It is generated in the terminal of configuration file function, including the intelligent terminals such as computer, tablet computer.
Here configuration parameter refers to the hardware environment information of smart machine, is stored in the system of smart machine.Citing For, it can specifically include screen size, resolution ratio, central processing unit (full name in English:Central Processing Unit, Abbreviation CPU), the parameter information of memory, memory, camera, the hardware such as battery.In general, different types can configure not With hardware environment, here different hardware environment show as the difference of at least one configuration parameter.
Configuration file is the file that configuration file generator is generated according to the configuration parameter of smart machine, and configuration file includes There is the value of configuration attribute corresponding with each configuration parameter and configuration attribute.Configuration attribute refers to the attribute for configuring parameter, The value of configuration attribute is arranged by configuration file generator according to the numerical value of configuration parameter.
For example, the threshold value for the memory being arranged in configuration file generator is 200MB, if a certain intelligence obtained is set 320MB is saved as in standby, then the memory attribute value that type corresponding to the smart machine is arranged is true;If what is obtained is a certain 120MB is saved as in smart machine, then the memory attribute value that type corresponding to the smart machine is arranged is false.
In general, it in order to distinguish type corresponding to smart machine, can usually be distinguished by configuring parameter as follows:Screen Curtain size, resolution ratio, CPU and corresponding numerical information etc..Corresponding, which is matching for smart machine generation It includes configuration attribute screen size, resolution ratio, CPU and corresponding value to set file.
In step 202, it when smart machine starts application program, is read from configuration file and determines the aobvious of application program Show the value of the configuration attribute of effect.
It is stored with the value of configuration attribute and corresponding configuration attribute in configuration file, is write with a brush dipped in Chinese ink to intelligence and is set when configuration file After standby system, smart machine system upon actuation, then can read the configuration file.
Optionally, user can also can be passed through by predetermined interface query configuration file, the configuration file being queried The form or other forms of list are shown.For example, referring to Fig. 2 B, Fig. 2 B is shown according to an exemplary embodiment Reading after configuration file schematic diagram.After reading the configuration file of mobile phone of certain model, the type is shown in the form of a list The configuration attribute and value in configuration file corresponding to number.
In step 203, according to the value of configuration attribute, the display effect of application program is determined, and utilize display effect It is shown.
In general, the display effect of application program is determined by the configuration parameter of smart machine, and application program can be according to not With configuration parameter determine display effect.In the disclosure, application program determines to show in configuration file by directly reading The configuration attribute of effect and the value of configuration attribute determined the display effect of application program, and shown using display effect, Application program need to only judge the code of the value of configuration attribute and configuration attribute, and configuration is obtained without interminable code is added Parameter simultaneously determines the effect that can be shown according to the configuration parameter of acquisition.
The specific implementation of step 203 may refer to shown in Fig. 2 C, and Fig. 2 C are the bases shown according to an exemplary embodiment The value of configuration attribute determines the display effect of application program, and the flow chart shown using display effect, including following Step.
In step 203, when the value of configuration attribute is the first value, it is determined that the display effect of application program is First display effect.
In general, the value of configuration attribute can be indicated with different modes, for example, can use " true " and " false " is indicated;It can also be indicated with " 0 " and " 1 ";It can also be indicated with "true" and "false", here not to value Form limits.The present embodiment is not defined the mode of the value of configuration attribute.
The value of configuration attribute can generally indicate that a value in two values is used for a value in two values Indicate that the attainable performance of configuration attribute institute is higher, another value in two values is for indicating that the configuration attribute can reach The performance arrived is relatively low.
When the value of configuration attribute is the first value, in that case it can be decided that the display effect of application program is that the first display is imitated Fruit.
For example, as shown in Figure 2 D, Fig. 2 D are to be determined to show according to the Picture-viewer shown in an exemplary embodiment Show the schematic diagram of effect.It determines that the corresponding configuration attribute of Picture-viewer display effect is resolution ratio and screen size, differentiates First value of rate is " true ", and the first value of screen size is " true ", and corresponding first display effect is " clear ".When When reading " resolution ratio=true " and " screen size=true " of type 1, realize that effect is " clear ", with the effect of " clear " Fruit shows picture.
In step 203b, when the value of configuration attribute is the second value, it is determined that the display effect of application program is Second display effect.
When the value of configuration attribute is the second value, in that case it can be decided that the display effect of application program is that the second display is imitated Fruit.For example, Fig. 2 D are also referred to, determine that the corresponding configuration attribute of Picture-viewer display effect is resolution ratio and screen Size, if the second value of resolution ratio is " false " (namely not being " true "), the second value of screen size is " false " (namely not being " true "), corresponding second display effect is " fuzzy ".When " resolution ratio=false " for reading type 2 and When " screen size=false ", realizes that effect is " fuzzy ", picture is shown with the effect of " fuzzy ".
In step 204, if reading matching for the display effect for determining application program from the configuration file of memory not successfully The value of attribute is set, then is shown according to the minimum display effect of configuration parameter request.
In practical implementations, it is write with a brush dipped in Chinese ink since the configuration file of type is generated in advance, and application program can make It is installed during, therefore the configuration parameter that application program is considered when realizing display effect may be not present in In the configuration file write with a brush dipped in Chinese ink, can not then succeed to read out from the configuration file of memory at this time determines the application program The value of the configuration attribute of display effect, in order to avoid current type can not run the display effect high to configuration parameter request, The not smooth of operation is caused, can be shown according to the minimum display effect of configuration parameter request.
For example, determine that the corresponding configuration attribute of Picture-viewer display effect is resolution ratio and screen size, it is right It is " fuzzy " to configure the minimum display effect of parameter request.It is " resolution ratio=false " only to get corresponding configuration attribute, not In the case of getting screen size, effect " fuzzy " is realized, picture is shown with the effect of " fuzzy ".
In conclusion the effect display method provided in the embodiment of the present disclosure, passes through the system in initialization smart machine When, configuration file corresponding with smart machine is read from configuration file generator, and configuration file is write with a brush dipped in Chinese ink to smart machine System in, when smart machine starts application program, read from configuration file and determine that the display effect of application program is matched The value for setting attribute determines the display effect of application program, and shown using display effect according to the value of configuration attribute Show;Since application program realizes different effects according to the judgement of the value of the configuration attribute in configuration file, in newly-increased type When, the code of application program need not be changed, the newly-increased type in the code of application program is needed to sentence when solving newly-increased type The problem of breaking, increasing the maintenance cost of code;The maintenance cost for reducing code is achieved the effect that.
Meanwhile when the value of the configuration attribute in the failed display effect for reading and determining application program, according to configuration The minimum display effect of parameter request shown, solve apply run on the low smart machine of hardware configuration it is slack Problem has achieved the effect that the smooth operation application program on configuring different smart machines.
Fig. 3 A are a kind of flow chart of effect display method shown according to another exemplary embodiment, the effect display side Method is applied in smart machine, and smart machine may include the smart mobile phone, tablet computer, multimedia for having display function Device etc..The effect display method includes the following steps.
In step 301, when initializing the system of smart machine, the type of smart machine is obtained, is given birth to from configuration file Grow up to be a useful person it is middle read corresponding with type configuration file, and configuration file is write with a brush dipped in Chinese ink into smart machine system.
In a kind of possible realization, each type and its corresponding configuration file are prestored in configuration file generator, When obtaining type, you can read the configuration file of corresponding type.For example, there is the hand of type X1 in configuration file generator Machine corresponds to configuration file A, and the mobile phone of type X2 corresponds to configuration file B.It is to read correspondence to match for X1 in the type for reading mobile phone Set file A.
In step 302, it when smart machine starts application program, is read from configuration file and determines the aobvious of application program Show the value of the configuration attribute of effect.
In practical applications, the value of the configuration attribute and configuration attribute that are preserved in configuration file will not be changed, every The reading that configuration file is all carried out when secondary startup application program, will cause the waste of time and resource.In order to solve this problem, Configuration file is preserved to Installed System Memory, application system is read out again.Specific steps are as shown in Figure 3B, and Fig. 3 B are according to an example Property implement exemplify smart machine start application program when, from configuration file read determine application program display effect Configuration attribute value flow chart, include the following steps.
In step 302a, after the system of smart machine starts, match corresponding with smart machine will be stored in system File is set to read to memory.
By configuration file read to memory can be by configuration file preserve to read-only memory (Read Only Memory, ROM) in file, read-only memory file here is located in Installed System Memory for preserving configuration file, can be read, can not change.
In step 302b, when smart machine starts application program, is read from the configuration file of memory and determine application The value of the configuration attribute of the display effect of program.
It is read to memory in configuration file, application program need to only be read in the configuration file of memory determines application program Display effect configuration attribute value.When closing application program, configuration file still preserves in systems, works as application program When being again started up, taking for the configuration attribute for the display effect for determining application program still need to be only read from the configuration file of memory Value.
In step 303, according to the value of configuration attribute, the display effect of application program is determined, and utilize display effect It is shown.
This step is similar with step 203, and referring specifically to the description of step 203, this will not be repeated here.
In conclusion the effect display method provided in the embodiment of the present disclosure, passes through the system in initialization smart machine When, configuration file corresponding with smart machine is read from configuration file generator, and configuration file is write with a brush dipped in Chinese ink to smart machine System in, when smart machine starts application program, read from configuration file and determine that the display effect of application program is matched The value for setting attribute determines the display effect of application program, and shown using display effect according to the value of configuration attribute Show;Since application program realizes different effects according to the judgement of the value of the configuration attribute in configuration file, in newly-increased type When, the code of application program need not be changed, the newly-increased type in the code of application program is needed to sentence when solving newly-increased type The problem of breaking, increasing the maintenance cost of code;The maintenance cost for reducing code is achieved the effect that.
Meanwhile it by preserving configuration file to Installed System Memory, all being configured when solving startup application program every time The reading of file, has achieved the effect that quick startup application program at the problem of causing the waste of time and resource.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.It is real for disclosure device Undisclosed details in example is applied, embodiments of the present disclosure is please referred to.
Fig. 4 is a kind of block diagram of effect display device shown according to an exemplary embodiment, which answers For in smart machine, smart machine to may include the smart mobile phone, tablet computer, multimedia player for having display function Deng.The effect display device includes but not limited to:First read module 401, the second read module 402, the first display module 403。
First read module 401 is configured as, when initializing the system of smart machine, reading from configuration file generator Configuration file corresponding with smart machine is taken, and configuration file is write with a brush dipped in Chinese ink into the system of smart machine, configuration file is configuration File generator is generated according to the configuration parameter of smart machine, and include configuration attribute corresponding with each configuration parameter with And the value of configuration attribute;
Second read module 402 is configured as, when smart machine starts application program, reading from the first read module 401 The value of the configuration attribute for the display effect for determining application program is read in the configuration file taken;
First display module 403 is configured as the value of the configuration attribute read according to the second read module 402, determines The display effect of application program, and shown using display effect.
In one possible implementation, shown in Figure 5, Fig. 5 is shown according to another exemplary embodiment A kind of block diagram of effect display device, first display module 403 can also include:First display sub-module 403a, second show Show submodule 403b.
First display sub-module 403a is configured as when the value of configuration attribute is the first value, it is determined that apply journey The display effect of sequence is the first display effect;
Second display sub-module 403b is configured as when the value of configuration attribute is the second value, it is determined that apply journey The display effect of sequence is the second display effect.
In one possible implementation, please referring further to shown in Fig. 5, which further includes:Second display Module 404.
Second display module 404 determines application program if being configured as reading from the configuration file of memory not successfully The value of the configuration attribute of display effect is then shown according to the minimum display effect of configuration parameter request.
In one possible implementation, please referring further to shown in Fig. 5, which is additionally configured to:
The type for obtaining smart machine reads configuration file corresponding with type from configuration file generator.
In one possible implementation, please referring further to shown in Fig. 5, second read module 402, including:First reads Take submodule 402a and the second reading submodule 402b.
First reading submodule 402a is configured as after the system of smart machine starts, by stored in system and intelligence The corresponding configuration file of energy equipment is read to memory;
Second reading submodule 402b is configured as when smart machine starts application program, from the configuration file of memory The value of the middle configuration attribute for reading the display effect for determining application program.
In conclusion the effect display device provided in the embodiment of the present disclosure, passes through the system in initialization smart machine When, configuration file corresponding with smart machine is read from configuration file generator, and configuration file is write with a brush dipped in Chinese ink to smart machine System in, when smart machine starts application program, read from configuration file and determine that the display effect of application program is matched The value for setting attribute determines the display effect of application program, and shown using display effect according to the value of configuration attribute Show;Since application program realizes different effects according to the judgement of the value of the configuration attribute in configuration file, in newly-increased type When, the code of application program need not be changed, the newly-increased type in the code of application program is needed to sentence when solving newly-increased type The problem of breaking, increasing the maintenance cost of code;The maintenance cost for reducing code is achieved the effect that.
Meanwhile when the value of the configuration attribute in the failed display effect for reading and determining application program, according to configuration The minimum display effect of parameter request shown, solve apply run on the low smart machine of hardware configuration it is slack Problem has achieved the effect that the smooth operation application program on configuring different smart machines.
In addition, by preserving configuration file to Installed System Memory, all configured when solving startup application program every time The reading of file, has achieved the effect that quick startup application program at the problem of causing the waste of time and resource.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
One exemplary embodiment of the disclosure provides a kind of effect display device, can realize that the effect that the disclosure provides is aobvious Show method, which includes:
Processor;
Memory for storing processor-executable instruction;
Wherein, processor is configured as:
When initializing the system of smart machine, configuration text corresponding with smart machine is read from configuration file generator Part, and configuration file is write with a brush dipped in Chinese ink into the system of smart machine, configuration file is configuration file generator according to smart machine It configures what parameter generated, and includes the value of configuration attribute corresponding with each configuration parameter and configuration attribute;
When smart machine starts application program, the configuration for the display effect for determining application program is read from configuration file The value of attribute;
According to the value of configuration attribute, the display effect of application program is determined, and shown using display effect.
Fig. 6 is a kind of block diagram of effect display device shown according to another exemplary embodiment.For example, device 600 can To be mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices are good for Body equipment, personal digital assistant etc..
With reference to Fig. 6, device 600 may include following one or more components:Processing component 602, memory 604, power supply Component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor module 614, Yi Jitong Believe component 616.
The integrated operation of 602 usual control device 600 of processing component, such as with display, call, data communication, phase Machine operates and record operates associated operation.Processing component 602 may include that one or more processors 618 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 602 may include one or more modules, just Interaction between processing component 602 and other assemblies.For example, processing component 602 may include multi-media module, it is more to facilitate Interaction between media component 608 and processing component 602.
Memory 604 is configured as storing various types of data to support the operation in device 600.These data are shown Example includes instruction for any application program or method that are operated on device 600, contact data, and telephone book data disappears Breath, picture, video etc..Memory 604 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static RAM (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 606 provides electric power for the various assemblies of device 600.Power supply module 606 may include power management system System, one or more power supplys and other generated with for device 600, management and the associated component of distribution electric power.
Multimedia component 608 is included in the screen of one output interface of offer between device 600 and user.In some realities It applies in example, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen can To be implemented as touch screen, to receive input signal from the user.Touch panel include one or more touch sensors with Sense the gesture on touch, slide, and touch panel.Touch sensor can not only sense the boundary of a touch or slide action, and And also detection and touch or the relevant duration and pressure of slide.In some embodiments, multimedia component 608 includes One front camera and/or rear camera.It is preceding when such as screening-mode or video mode when device 600 is in operation mode External multi-medium data can be received by setting camera and/or rear camera.Each front camera and rear camera can Be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 610 is configured as output and/or input audio signal.For example, audio component 610 includes a Mike Wind (MIC), when device 600 is in operation mode, when such as call model, logging mode and speech recognition mode, microphone by with It is set to reception external audio signal.The received audio signal can be further stored in memory 604 or via communication set Part 616 is sent.In some embodiments, audio component 610 further includes a loud speaker, is used for exports audio signal.
I/O interfaces 612 provide interface between processing component 602 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.
Sensor module 614 includes one or more sensors, and the state for providing various aspects for device 600 is commented Estimate.For example, sensor module 614 can detect the state that opens/closes of device 600, the relative positioning of component, such as component For the display and keypad of device 600, sensor module 614 can be with the position of 600 1 components of detection device 600 or device Set change, the existence or non-existence that user contacts with device 600, the temperature of 600 orientation of device or acceleration/deceleration and device 600 Variation.Sensor module 614 may include proximity sensor, be configured to detect without any physical contact near The presence of object.Sensor module 614 can also include optical sensor, such as CMOS or ccd image sensor, for being answered in imaging With middle use.In some embodiments, which can also include acceleration transducer, gyro sensor, magnetic Sensor, pressure sensor or temperature sensor.
Communication component 616 is configured to facilitate the communication of wired or wireless way between device 600 and other equipment.Device 600 can access the wireless network based on communication standard, such as Wi-Fi, 2G or 3G or combination thereof.In an exemplary reality It applies in example, communication component 616 receives broadcast singal or the related letter of broadcast from external broadcasting management system via broadcast channel Breath.In one exemplary embodiment, communication component 616 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 600 can be believed by one or more application application-specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing said effect display methods.
In the exemplary embodiment, it includes the non-transitorycomputer readable storage medium instructed, example to additionally provide a kind of Such as include the memory 604 of instruction, above-metioned instruction can be executed by the processor 618 of device 600 to complete said effect display side Method.For example, non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, Floppy disk and optical data storage devices etc..
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (11)

1. a kind of effect display method, which is characterized in that the method is applied to smart machine, the method includes:
When initializing the system of the smart machine, match corresponding with the smart machine is read from configuration file generator File is set, and the configuration file is write with a brush dipped in Chinese ink into the system of the smart machine, the configuration file is the configuration file Generator is generated according to the configuration parameter of the smart machine, and include configuration attribute corresponding with each configuration parameter with And the value of configuration attribute;
When the smart machine starts application program, the display effect for determining the application program is read from the configuration file The value of the configuration attribute of fruit, the value of the configuration attribute the matching according to the smart machine by the configuration file generator The numerical value setting of parameter is set, the value of the configuration attribute is indicated with a value in two values, in described two values One value is high for indicating the attainable performance of the configuration attribute institute, another value in described two values is for indicating described The attainable performance of configuration attribute institute is low;
According to the value of the configuration attribute, the display effect of the application program is determined, and carry out using the display effect Display.
2. according to the method described in claim 1, it is characterized in that, the value according to the configuration attribute, determine described in The display effect of application program, including:
When the value of the configuration attribute is the first value, it is determined that the display effect of the application program is that the first display is imitated Fruit;
When the value of the configuration attribute is the second value, it is determined that the display effect of the application program is that the second display is imitated Fruit.
3. according to the method described in claim 1, it is characterized in that, the method further includes:
If the configuration attribute for the display effect for determining the application program is read from the configuration file of memory not successfully Value is then shown according to the minimum display effect of configuration parameter request.
4. according to the method described in claim 1, it is characterized in that, being stored and various types pair in the configuration file generator The configuration file answered, the reading configuration file corresponding with the smart machine from configuration file generator, including:
The type for obtaining the smart machine reads configuration text corresponding with the type from the configuration file generator Part.
5. according to any method in Claims 1-4, which is characterized in that described start in the smart machine is applied When program, the value of the configuration attribute for the display effect for determining the application program is read from the configuration file, including:
After the system of the smart machine starts, configuration file corresponding with the smart machine will be stored in the system It reads to memory;
When the smart machine starts application program, it is described using journey that decision is read from the configuration file of the memory The value of the configuration attribute of the display effect of sequence.
6. a kind of effect display device, which is characterized in that described device is applied to smart machine, and described device includes:
First read module is configured as, when initializing the system of the smart machine, reading from configuration file generator Configuration file corresponding with the smart machine, and the configuration file is write with a brush dipped in Chinese ink into the system of the smart machine, it is described Configuration file is that the configuration file generator is generated according to the configuration parameter of the smart machine, and includes to match with each Set the value of the corresponding configuration attribute of parameter and configuration attribute;
Second read module is configured as, when the smart machine starts application program, reading from first read module The configuration file in read the display effect for determining the application program configuration attribute value, the configuration attribute Value is arranged by the configuration file generator according to the numerical value of the configuration parameter of the smart machine, the configuration attribute Value indicates that in described two values a value is for indicating that the configuration attribute can reach with a value in two values Performance it is high, another value in described two values is for indicating that the attainable performance of the configuration attribute institute is low;
First display module is configured as the value of the configuration attribute read according to second read module, determines institute The display effect of application program is stated, and is shown using the display effect.
7. device according to claim 6, which is characterized in that first display module, including:
First display sub-module is configured as when the value of the configuration attribute is the first value, it is determined that described to apply journey The display effect of sequence is the first display effect;
Second display sub-module is configured as when the value of the configuration attribute is the second value, it is determined that described to apply journey The display effect of sequence is the second display effect.
8. device according to claim 6, which is characterized in that described device further includes:
Second display module determines the application program if being configured as reading from the configuration file of memory not successfully The value of the configuration attribute of display effect is then shown according to the minimum display effect of configuration parameter request.
9. device according to claim 6, which is characterized in that first read module is additionally configured to:
The type for obtaining the smart machine reads configuration text corresponding with the type from the configuration file generator Part.
10. according to any device in claim 6 to 9, which is characterized in that second read module, including:
First reading submodule is configured as after the system of the smart machine starts, will be stored in the system and institute The corresponding configuration file of smart machine is stated to read to memory;
Second reading submodule is configured as when the smart machine starts application program, from the configuration of the memory The value of the configuration attribute for the display effect for determining the application program is read in file.
11. a kind of effect display device, which is characterized in that described device is applied to smart machine, and described device includes:
Processor;
Memory for storing the processor-executable instruction;
Wherein, the processor is configured as:
When initializing the system of the smart machine, match corresponding with the smart machine is read from configuration file generator File is set, and the configuration file is write with a brush dipped in Chinese ink into the system of the smart machine, the configuration file is the configuration file Generator is generated according to the configuration parameter of the smart machine, and include configuration attribute corresponding with each configuration parameter with And the value of configuration attribute;
When the smart machine starts application program, the display effect for determining the application program is read from the configuration file The value of the configuration attribute of fruit, the value of the configuration attribute the matching according to the smart machine by the configuration file generator The numerical value setting of parameter is set, the value of the configuration attribute is indicated with a value in two values, in described two values One value is high for indicating the attainable performance of the configuration attribute institute, another value in described two values is for indicating described The attainable performance of configuration attribute institute is low;
According to the value of the configuration attribute, the display effect of the application program is determined, and carry out using the display effect Display.
CN201510374242.1A 2015-06-30 2015-06-30 effect display method and device Active CN105094891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510374242.1A CN105094891B (en) 2015-06-30 2015-06-30 effect display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510374242.1A CN105094891B (en) 2015-06-30 2015-06-30 effect display method and device

Publications (2)

Publication Number Publication Date
CN105094891A CN105094891A (en) 2015-11-25
CN105094891B true CN105094891B (en) 2018-11-06

Family

ID=54575403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510374242.1A Active CN105094891B (en) 2015-06-30 2015-06-30 effect display method and device

Country Status (1)

Country Link
CN (1) CN105094891B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108173675A (en) * 2017-12-12 2018-06-15 北京小米移动软件有限公司 Resource information processing method and equipment
CN110286952B (en) * 2019-06-28 2020-11-20 联想(北京)有限公司 Information processing method of electronic equipment and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1713140A (en) * 2004-06-25 2005-12-28 华为技术有限公司 Interface generating method and device for computer
CN101179647A (en) * 2006-12-22 2008-05-14 腾讯科技(深圳)有限公司 Method, device and system of displaying program interface on television
CN101551746A (en) * 2009-05-08 2009-10-07 上海华勤通讯技术有限公司 UI interface configuration method of mobile communication terminal
CN102298495A (en) * 2011-06-27 2011-12-28 上海北大方正科技电脑系统有限公司 Method for enabling android software to adapt to different screen densities
CN103365616A (en) * 2012-03-29 2013-10-23 宇龙计算机通信科技(深圳)有限公司 Self-adaptive display method and device for display module
CN103744595A (en) * 2013-12-30 2014-04-23 广州华多网络科技有限公司 Self-adaption display method and configuration file generating method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9111007B2 (en) * 2009-02-04 2015-08-18 Jataayu Software Limited Adaptive rendering of a webpage on an electronic display device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1713140A (en) * 2004-06-25 2005-12-28 华为技术有限公司 Interface generating method and device for computer
CN101179647A (en) * 2006-12-22 2008-05-14 腾讯科技(深圳)有限公司 Method, device and system of displaying program interface on television
CN101551746A (en) * 2009-05-08 2009-10-07 上海华勤通讯技术有限公司 UI interface configuration method of mobile communication terminal
CN102298495A (en) * 2011-06-27 2011-12-28 上海北大方正科技电脑系统有限公司 Method for enabling android software to adapt to different screen densities
CN103365616A (en) * 2012-03-29 2013-10-23 宇龙计算机通信科技(深圳)有限公司 Self-adaptive display method and device for display module
CN103744595A (en) * 2013-12-30 2014-04-23 广州华多网络科技有限公司 Self-adaption display method and configuration file generating method and device

Also Published As

Publication number Publication date
CN105094891A (en) 2015-11-25

Similar Documents

Publication Publication Date Title
CN105653323B (en) Application management method and device
CN107919123A (en) More voice assistant control method, device and computer-readable recording medium
CN104837154B (en) The control method and device of wireless access points
CN107145800A (en) Method for protecting privacy and device, terminal and storage medium
CN105512545B (en) Access rights management method and device
CN109658927A (en) Wake-up processing method, device and the management equipment of smart machine
CN105094577A (en) Method and apparatus for application switching
CN104238912A (en) Application control method and application control device
CN104298547A (en) Terminal setting method and device
CN105354017B (en) Information processing method and device
CN105430715B (en) Control the method and device of WIFI scanning
CN104766005A (en) Management method and device for application software access authority
CN104035995A (en) Method and device for generating group tags
CN108038102A (en) Recommendation method, apparatus, terminal and the storage medium of facial expression image
CN107919124A (en) Equipment awakening method and device
CN106537288B (en) The method and device of self-starting is applied in control
CN104991752A (en) Method and device for controlling screen to rotate
CN105550035A (en) Background process control method and device
CN109039877A (en) A kind of method, apparatus, electronic equipment and storage medium showing unread message quantity
CN107783715A (en) Using startup method and device
CN107301242A (en) Method, device and the storage medium of page jump
CN104375760B (en) Method for information display and device
CN104463047B (en) The device and method of control module work
CN105187671A (en) Recording method and device
CN106455002A (en) Wireless search method and device, and terminal

Legal Events

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