Interface element display method and device, computer equipment and storage medium
阅读说明:本技术 界面元素的显示方法、装置、计算机设备及存储介质 (Interface element display method and device, computer equipment and storage medium ) 是由 梁超 刘智洪 于 2019-11-12 设计创作,主要内容包括:本申请公开了一种界面元素的显示方法、装置、计算机设备及存储介质,属于计算机技术领域。本申请通过接收到目标界面的显示指令时,获取该目标界面内至少一个界面元素对应的至少一个资源标识,基于至少一个资源标识,查询目标界面的代码文件,当通过查询确定未命中该代码文件时,基于该至少一个资源标识,查询应用配置文件,得到该至少一个资源标识对应的配置信息,基于该至少一个资源标识对应的配置信息,在目标界面中,对各个界面元素进行显示,在上述界面元素的显示过程中,可以基于资源标识从配置文件中读取该资源标识所对应的配置信息,无需再对配置文件进行格式转换,提高了配置信息的读取速度,进而可以提高界面元素的加载和显示效率。(The application discloses a display method and device of interface elements, computer equipment and a storage medium, and belongs to the technical field of computers. The method comprises the steps of acquiring at least one resource identifier corresponding to at least one interface element in a target interface when a display instruction of the target interface is received, inquiring a code file of the target interface based on the at least one resource identifier, when the code file is determined to be missed through query, querying an application configuration file based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier, and in a target interface, and displaying each interface element, wherein in the display process of the interface elements, the configuration information corresponding to the resource identifier can be read from the configuration file based on the resource identifier without format conversion of the configuration file, so that the reading speed of the configuration information is increased, and the loading and display efficiency of the interface elements can be improved.)
1. A method for displaying an interface element, the method comprising:
when a display instruction of a target interface is received, acquiring at least one resource identifier corresponding to at least one interface element in the target interface;
querying a code file of the target interface based on the at least one resource identifier;
when the code file is determined to be missed through query, querying an application configuration file based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier;
and displaying the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier.
2. The method of claim 1, wherein querying the code file of the target interface based on the at least one resource identification comprises:
traversing a code file of the target interface based on the at least one resource identifier;
and acquiring at least one section of program code containing the at least one resource identifier, and determining that the interface element corresponding to any section of program code misses the code file when any section of program code does not contain configuration information.
3. The method of claim 1, wherein before querying an application configuration file based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier when it is determined that the code file is not hit through querying, the method further comprises:
comparing the information abstract value of the applied resource packet with the information abstract value of a target resource packet in the server;
if the two information abstract values are different, a resource updating list is obtained;
and if the resource updating list comprises the file identification of the configuration file, acquiring the configuration file in the target resource packet.
4. The method of claim 1, wherein the displaying the at least one interface element in the target interface based on the corresponding configuration information of the at least one interface element identification comprises:
determining the display type of any interface element based on the configuration information of any interface element;
when the display type of any interface element is trigger display, setting the interface element to be in a hidden state;
and when the display type of any interface element is resident display, displaying the interface element based on the configuration information.
5. The method according to claim 4, wherein when the display type of any interface element is trigger display, the setting the interface element to the hidden state comprises:
and when any interface element is in trigger display, adjusting the transparency of the interface element to the maximum value.
6. The method of claim 5, wherein after adjusting the transparency of the interface element to a maximum value, the method further comprises:
and when the triggering condition of the interface element is met, adjusting the transparency of the interface element to the minimum value.
7. The method of claim 1, wherein the configuration information comprises: at least one of the position coordinates of the interface element, the display type of the interface element, the displacement reference point, the transparency and the rotation angle.
8. The method of claim 1, wherein the configuration file is of a target file type.
9. An apparatus for displaying interface elements, the apparatus comprising:
the identification acquisition module is used for acquiring at least one resource identification corresponding to at least one interface element in a target interface when a display instruction of the target interface is received;
the query module is used for querying the code file of the target interface based on the at least one resource identifier;
the information acquisition module is used for inquiring an application configuration file based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier when the code file is determined to be missed through inquiry;
and the display module is used for displaying the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier.
10. The apparatus of claim 9, wherein the query module is configured to:
traversing a code file of the target interface based on the at least one resource identifier;
and acquiring at least one section of program code containing the at least one resource identifier, and determining that the interface element corresponding to any section of program code misses the code file when any section of program code does not contain configuration information.
11. The apparatus of claim 9, further comprising:
the comparison module is used for comparing the information abstract value of the applied resource packet with the information abstract value of the target resource packet in the server;
the list acquisition module is used for acquiring a resource updating list if the two information abstract values are different;
and the configuration file acquisition module is used for acquiring the configuration file in the target resource package if the resource update list comprises the file identifier of the configuration file.
12. The apparatus of claim 9, wherein the display module is configured to:
determining the display type of any interface element based on the configuration information of any interface element;
when the display type of any interface element is trigger display, setting the interface element to be in a hidden state;
and when the display type of any interface element is resident display, displaying the interface element based on the configuration information.
13. The apparatus of claim 12, wherein the display module is configured to:
and when any interface element is in trigger display, adjusting the transparency of the interface element to the maximum value.
14. A computer device comprising one or more processors and one or more memories having stored therein at least one program code, the at least one program code loaded into and executed by the one or more processors to perform operations performed by a display method of an interface element according to any one of claims 1 to 8.
15. A computer-readable storage medium having at least one program code stored therein, the at least one program code being loaded and executed by a processor to perform operations performed by a display method of an interface element according to any one of claims 1 to 8.
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for displaying an interface element, a computer device, and a storage medium.
Background
With the development of computer technology and the diversification of terminal functions, more and more network games are beginning to face users. The game interface often includes a large number of visual resources, such as button icons, status display icons, and the like, and when the game interface is loaded, it is necessary to obtain performance information of each resource, including position coordinates, transparency, and the like of each resource, from the resource configuration table, and display each resource in the game interface based on the obtained performance information.
In the display mode of the interface elements, the performance information of each interface element is stored in the resource configuration table, when the interface elements are loaded and displayed, the resource configuration table needs to be analyzed into files in other formats to read the performance information of the interface elements, and the time consumption for reading and analyzing the resource configuration table is long, so that the loading and displaying speed of the interface elements is slow, and therefore how to optimize the resource configuration mode to improve the loading and displaying efficiency of the interface elements is an important research direction at present.
Disclosure of Invention
The embodiment of the application provides a display method and device of an interface element, computer equipment and a storage medium, and can solve the problems of low loading and display efficiency of the interface element in the related technology. The technical scheme is as follows:
in one aspect, a method for displaying an interface element is provided, and the method includes:
when a display instruction of a target interface is received, acquiring at least one resource identifier corresponding to at least one interface element in the target interface;
querying a code file of the target interface based on the at least one resource identifier;
when the code file is determined to be missed through query, querying an application configuration file based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier;
and displaying the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier.
In one aspect, there is provided a display device for an interface element, the device including:
the identification acquisition module is used for acquiring at least one resource identification corresponding to at least one interface element in a target interface when a display instruction of the target interface is received;
the query module is used for querying the code file of the target interface based on the at least one resource identifier;
the information acquisition module is used for inquiring the application configuration file based on the at least one resource identifier when the code file is determined to be missed through inquiry, and obtaining the configuration information corresponding to the at least one resource identifier;
and the display module is used for displaying the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier.
In one possible implementation, the display module is further configured to:
and when the triggering condition of the interface element is met, adjusting the transparency of the interface element to the minimum value.
In one possible implementation, the configuration information includes: at least one of the position coordinates of the interface element, the display type of the interface element, the displacement reference point, the transparency and the rotation angle.
In one possible implementation, the configuration file is of a target file type.
In one aspect, a computer device is provided that includes one or more processors and one or more memories having at least one program code stored therein, the at least one program code being loaded and executed by the one or more processors to implement operations performed by a display method of the interface element.
In one aspect, a computer-readable storage medium having at least one program code stored therein is loaded and executed by a processor to implement operations performed by a display method of the interface element.
According to the technical scheme provided by the embodiment of the application, when a display instruction of a target interface is received, at least one resource identifier corresponding to at least one interface element in the target interface is obtained, a code file of the target interface is inquired based on the at least one resource identifier, when the code file is determined to be not hit through inquiry, an application configuration file is inquired based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier, the at least one interface element is displayed in the target interface based on the configuration information corresponding to the at least one resource identifier, the configuration information of resources can be respectively obtained from the code file and the configuration file in the display process of the interface element, the configuration information corresponding to the resource identifier can be read from the configuration file based on the resource identifier without carrying out format conversion on the configuration file, the reading speed of the configuration information is improved, and the loading and displaying efficiency of the interface elements can be further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an implementation environment of a display method of an interface element according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for displaying an interface element according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a configuration file provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of a specific form of a target interface provided by an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a display manner of an interface element according to an embodiment of the present disclosure;
FIG. 6 is a flow chart of interface element creation and display provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of a configuration page provided by an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a display device of an interface element according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
To make the purpose, technical solutions and advantages of the present application clearer, the following will describe embodiments of the present application in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in this application are used for distinguishing between similar items and items that have substantially the same function or similar functionality, and it should be understood that "first," "second," and "nth" do not have any logical or temporal dependency or limitation on the number or order of execution.
In order to facilitate understanding of the technical processes of the embodiments of the present application, some terms referred to in the embodiments of the present application are explained below:
virtual scene: is a virtual scene that is displayed (or provided) by an application program when the application program runs on a terminal. The virtual scene may be a simulation environment of a real world, a semi-simulation semi-fictional virtual environment, or a pure fictional virtual environment. The virtual scene may be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, and a three-dimensional virtual scene, which is not limited in this application. For example, a virtual scene may include sky, land, ocean, etc., the land may include environmental elements such as deserts, cities, etc., and a user may control a virtual object to move in the virtual scene.
Intra-office UI (User Interface): that is, the local user interface, for example, a game application, may display a virtual scene, a function button, and other visual elements corresponding to a game in the user interface of the game.
Fig. 1 is a schematic diagram of an implementation environment of a display method of an interface element provided in an embodiment of the present application, and referring to fig. 1, the implementation environment includes:
The
The
Those skilled in the art will appreciate that the number of computer devices described above may be greater or fewer. For example, the number of the computer devices may be only one, or several tens or hundreds, or more. The number and the type of the computer devices are not limited in the embodiments of the present application.
Fig. 2 is a flowchart of a method for displaying an interface element according to an embodiment of the present application, and referring to fig. 2, the method may specifically include the following steps:
201. when the computer equipment receives a display instruction of a target interface, at least one resource identifier corresponding to at least one interface element in the target interface is obtained.
The computer device may be a computer device used by any user, a target application may be installed and run on the computer device, and the target application may be a Game application, for example, a shooting Game (STG), a Multiplayer Online Battle sports Game (MOBA), a Multiplayer gunfight survival Game, and the like.
In a possible implementation manner, the display instruction of the target interface may be triggered by operations such as starting of the target application program, switching pages, and the like. Taking the target interface as a game scene interface as an example, when a user requests to start a game, a display instruction of the target interface may be triggered, in a possible implementation manner, the display instruction of the target interface may carry an interface identifier of the target interface, the computer device may query and analyze resource data corresponding to the target interface based on the interface identifier, the resource data may be a code file of the target interface, and the like, the computer device may determine at least one interface element associated with the target interface based on the queried resource data, and obtain resource identifiers corresponding to the interface elements, where one interface identifier may be used to uniquely indicate one interface and one resource identifier may be used to uniquely indicate one interface element.
202. The computer device queries a code file of the target interface based on the at least one resource identification.
The code file of the target page may be a code file locally stored in the computer device, or may also be a code file stored in a server, which is not specifically limited in this embodiment of the present application, and the server may provide a background service for the running of the target application program.
In a possible implementation manner, the computer device may traverse the code file of the target interface based on the at least one resource identifier, obtain at least one section of program code including the at least one resource identifier, when any section of program code includes configuration information, the computer device may determine that an interface element corresponding to any section of program code hits in the code file, obtain the configuration information included in any section of program code as the configuration information of the interface element, when any section of program code does not include the configuration information, determine that an interface element corresponding to any section of program code misses in the code file, and the computer device continues to perform
203. When the code file is determined to be missed through query, the computer equipment queries an application configuration file based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier.
In a possible implementation manner, the configuration file may be a JSON (JavaScript Object Notation) format file, the configuration information of each interface element may be stored by applying the lightweight JSON format file, flexible configuration of the interface element may be achieved, and the configuration mode of the JSON format file is simple and easy to be read by a computer device. In one possible implementation, the configuration information may include: at least one of the position coordinates of the interface element, the display type of the interface element, the displacement reference point, the transparency, and the rotation angle, of course, the configuration information may further include information such as the size of the interface element, which is not specifically limited in this embodiment of the application. Referring to fig. 3, fig. 3 is a schematic diagram of a configuration file provided in an embodiment of the present application, the configuration file may include a plurality of sets of configuration information, one set of configuration information may be used to indicate a display state of an interface element, taking a set of configuration information 301 as an example, the set of configuration information 301 may be used to indicate a display state of "second fire button", including a display size of the "second fire button", such as "Scale", "defaultscreen", "MaxScale", "MinScale", and the like, a display position of the second fire button in the target interface, such as "xPos", "yPos", "zPos", and the like, and a transparency, a rotation angle, a displacement reference point "Anchor" and the like of the second fire button, wherein the displacement reference point "Anchor" is used to indicate which point in the reference interface element is to be shifted, for example, a displacement of the second fire button is set as "right reference point", namely, the bottom and the right side, the position coordinates are set to (-100, -110), the position of the second firing button is deviated from the bottom and the right side of the target interface, and the X-axis coordinate and the Y-axis coordinate are both 1.
The configuration file is applied to configure the display state of each interface element, the configuration information of each interface element is stored in the same configuration file, the display state of each interface element can be managed and modified conveniently, and when the display state of each interface element is modified, a developer can only modify the configuration file without modifying the code file of the target interface.
Before loading the configuration file, the computer device needs to determine whether the content of the configuration file is updated, that is, whether the configuration file locally stored in the computer device is the same as the version of the configuration file stored in the server. In a possible implementation manner, the computer device may compare the information digest value of the resource package of the application with the information digest value of the target resource package in the server, and if the two information digest values are different, the computer device may obtain a resource update list, and if the resource update list includes the file identifier of the configuration file, obtain the configuration file in the target resource package, and if the resource update list does not include the file identifier of the configuration file, the configuration file does not need to be updated. Specifically, the computer device may send a request to the server, obtain an information Digest value configuration file of the target resource package in the server, that is, an MD5(Message Digest Algorithm MD 5) code configuration file, compare the MD5 code configuration file in the server with an MD5 code configuration file stored locally, count a file list of inconsistent MD5 codes one by one for each MD5 code of each file, that is, obtain a resource update list, and download and update files included in the list from the server based on the resource update list.
204. The computer device displays the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier.
The computer device may display the at least one interface element based on the code file of the target interface and the configuration information acquired from the configuration file, see fig. 4, where fig. 4 is a schematic diagram of a specific form of a target interface provided in an embodiment of the present application, and a plurality of
In the embodiment of the application, some interface elements are displayed on the target interface only when the trigger condition is reached, and the interface elements are in a hidden state when the trigger condition is not reached. In a possible implementation manner, the computer device may determine a display type of any interface element based on the configuration information of the interface element, set the interface element in a hidden state when the display type of any resource is a triggered display, and display the interface element based on the configuration information when the display type of any resource is a resident display, for example, when the configuration information of any interface element includes a target statement, the display type of the interface element is a triggered display, and when the target statement is not included, the display type of any interface element is a resident display, where the target statement may be set by a developer, and in a possible implementation manner, the target statement may be set to "CanHideBtn: true ", when the configuration information of the interface element contains" CanHideBtn: and when true', the display type of the interface element is trigger display.
In a possible implementation manner, for an interface element whose display type is trigger display, the display state of the interface element may be adjusted by adjusting transparency, specifically, when any interface element is trigger display, the computer device may adjust the transparency of the interface element to a maximum value, that is, when the target interface is loaded, the interface element is displayed in a transparent state, and when a trigger condition of the interface element is met, the computer device may adjust the transparency of the interface element to a minimum value, where the trigger condition may be set by a developer, which is not specifically limited in this embodiment of the present application. Referring to fig. 5, fig. 5 is a schematic view of a display manner of an interface element provided in an embodiment of the present application, for example, an
In the display process of the interface element, the interface element is hidden by modifying the transparency, when the interface element needs to be displayed under the triggering condition, the transparency of the interface element can be modified again, and by applying the display mode of the interface element, when the display state of the interface element is changed, the interface of an application program does not need to be refreshed, so that the performance consumption of the computer equipment can be effectively reduced.
According to the technical scheme provided by the embodiment of the application, when a display instruction of a target interface is received, at least one resource identifier corresponding to at least one interface element in the target interface is obtained, a code file of the target interface is inquired based on the at least one resource identifier, when the code file is determined to be not hit through inquiry, an application configuration file is inquired based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier, the at least one interface element is displayed in the target interface based on the configuration information corresponding to the at least one resource identifier, the configuration information of resources can be respectively obtained from the code file and the configuration file in the display process of the interface element, the configuration information corresponding to the resource identifier can be read from the configuration file based on the resource identifier without carrying out format conversion on the configuration file, the reading speed of the configuration information is improved, and the loading and displaying efficiency of the interface elements can be further improved.
In the embodiment of the present application, each element in the target interface, whether it is a page function button, a user operation button, or an information display element, needs to individually correspond to a resource file, for example, a still picture file, a dynamic picture file, etc., when being created, each element needs to support individual setting of its display position, size, etc., after the display content in the target interface is divided into a plurality of independent interface elements, configuration information may be added to each interface element in the configuration file, an interface is reserved in the code file of the target page, and when the target interface is displayed, the configuration information of each interface element may be read through the interface. Fig. 6 is a flowchart of interface element creation and display provided in an embodiment of the present application, and referring to fig. 6, in a possible implementation manner, after a new interface element is created, that is, after a visual resource corresponding to the interface element is created, a developer may determine, based on a display state modification requirement of the interface element, whether configuration information of the interface element is stored in a configuration file, specifically, when the display state of the interface element does not need to be modified, the configuration information of the interface element may be stored in a code file of the target interface, when the display state modification requirement of the interface element is higher, the configuration information of the interface element may be stored in the configuration file, and when the code file of the target page is generated, the configuration information of the interface element is not added. Referring to fig. 7, fig. 7 is a schematic diagram of a configuration page provided in an embodiment of the present application, a
In the interface element configuration process, the configuration information of each interface element can be stored respectively based on the display state modification requirement of the interface element, the interface elements without the need of modifying the display state are directly configured on the configuration page of the resource file, the configuration file does not need to be read when the interface elements are displayed, and the configuration information is independently added in the configuration file for the interface elements with the need of modifying the display state, so that the display state of each interface element can be modified conveniently. In game application programs, because the updating requirement of visual elements in the local UI (User Interface) is large, when the configuration mode is applied to modify the visual elements in the Interface, the modification of bottom codes in a large range can be avoided, and the resource iteration efficiency is improved.
Fig. 8 is a schematic structural diagram of a display device of an interface element according to an embodiment of the present application, and referring to fig. 8, the display device includes:
an identifier obtaining module 801, configured to obtain, when a display instruction of a target interface is received, at least one resource identifier corresponding to at least one interface element in the target interface;
a
an
a
In one possible implementation, the
traversing the code file of the target interface based on the at least one resource identifier;
and acquiring at least one section of program code containing the at least one resource identifier, and determining that the interface element corresponding to any section of program code misses the code file when any section of program code does not contain configuration information.
In one possible implementation, the apparatus further includes:
the comparison module is used for comparing the information abstract value of the applied resource packet with the information abstract value of the target resource packet in the server;
the list acquisition module is used for acquiring a resource updating list if the two information abstract values are different;
and the configuration file acquisition module is used for acquiring the configuration file in the target resource package if the resource update list comprises the file identifier of the configuration file.
In one possible implementation, the
determining the display type of any resource based on the configuration information of any resource;
when the display type of any interface element is trigger display, setting the interface element into a hidden state;
and when the display type of any interface element is resident display, displaying the interface element based on the configuration information.
In one possible implementation, the
and when any interface element is in trigger display, adjusting the transparency of the interface element to the maximum value.
In one possible implementation, the
and when the triggering condition of the interface element is met, adjusting the transparency of the interface element to the minimum value.
In one possible implementation, the configuration information includes: at least one of the position coordinates of the interface element, the display type of the interface element, the displacement reference point, the transparency and the rotation angle.
In one possible implementation, the configuration file is of a target file type.
The device provided by the embodiment of the application, when receiving a display instruction of a target interface, obtains at least one resource identifier corresponding to at least one interface element in the target interface, queries a code file of the target interface based on the at least one resource identifier, queries an application configuration file based on the at least one resource identifier when determining that the code file is not hit through querying, obtains configuration information corresponding to the at least one resource identifier, displays the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier, and applies the display device of the interface element, so that the configuration information of the resource can be obtained from the code file and the configuration file respectively, and the configuration information corresponding to the resource identifier can be read from the configuration file based on the resource identifier without performing format conversion on the configuration file, the reading speed of the configuration information is improved, and the loading and displaying efficiency of the interface elements can be further improved.
All the above optional technical solutions may be combined arbitrarily to form optional embodiments of the present application, and are not described herein again.
It should be noted that: in the display device of the interface element provided in the above embodiment, when the interface element is displayed, only the division of each function module is illustrated, and in practical applications, the function distribution may be completed by different function modules according to needs, that is, the internal structure of the device is divided into different function modules, so as to complete all or part of the functions described above. In addition, the display apparatus of the interface element and the display method of the interface element provided in the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
The computer device provided by the above technical solution can be implemented as a terminal, for example, fig. 9 is a schematic structural diagram of a terminal provided in the embodiment of the present application. The terminal 900 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer.
In general,
In some embodiments, terminal 900 can also optionally include: a
The
The
The
The
The
In some embodiments, terminal 900 can also include one or more sensors 910. The one or more sensors 910 include, but are not limited to: acceleration sensor 911, gyro sensor 912, pressure sensor 913, fingerprint sensor 914, optical sensor 915, and proximity sensor 916.
The acceleration sensor 911 can detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 900. For example, the acceleration sensor 911 may be used to detect the components of the gravitational acceleration in three coordinate axes. The
The gyro sensor 912 may detect a body direction and a rotation angle of the terminal 900, and the gyro sensor 912 may cooperate with the acceleration sensor 911 to acquire a 3D motion of the user on the
The pressure sensor 913 may be disposed on a side bezel of the terminal 900 and/or underneath the
The fingerprint sensor 914 is used for collecting a fingerprint of the user, and the
The optical sensor 915 is used to collect ambient light intensity. In one embodiment, the
Proximity sensor 916, also known as a distance sensor, is typically disposed on the front panel of
Those skilled in the art will appreciate that the configuration shown in fig. 9 does not constitute a limitation of
Fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application, where the
In an exemplary embodiment, there is also provided a computer readable storage medium, such as a memory including at least one program code executable by a processor to perform the method of displaying an interface element in the above embodiments. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or implemented by at least one program code associated with hardware, where the program code is stored in a computer readable storage medium, such as a read only memory, a magnetic or optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.
- 上一篇:一种医用注射器针头装配设备
- 下一篇:一种网页网络游戏小窗口的打开方法