CN106406888A - An application program interface display method and device - Google Patents

An application program interface display method and device Download PDF

Info

Publication number
CN106406888A
CN106406888A CN201610841262.XA CN201610841262A CN106406888A CN 106406888 A CN106406888 A CN 106406888A CN 201610841262 A CN201610841262 A CN 201610841262A CN 106406888 A CN106406888 A CN 106406888A
Authority
CN
China
Prior art keywords
interface
display
displayed
interface elements
application program
Prior art date
Application number
CN201610841262.XA
Other languages
Chinese (zh)
Inventor
张磊
Original Assignee
武汉斗鱼网络科技有限公司
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 武汉斗鱼网络科技有限公司 filed Critical 武汉斗鱼网络科技有限公司
Priority to CN201610841262.XA priority Critical patent/CN106406888A/en
Publication of CN106406888A publication Critical patent/CN106406888A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The invention relates to the technical field of application programs and in particular relates to an application program interface display method and device. The method comprises the steps of determining a display area used for displaying an application program interface; judging whether interface elements to be displayed in the display area at the current moment are all the interface elements of the application program interface; if the interface elements to be displayed at the current moment are a part of the interface elements of the application program interface, performing analysis and instantiation on the interface elements to be displayed in the display area at the current moment and displaying the instantiated interface elements in the display area. The method judges whether interface elements to be displayed in a display area at the current moment are all the interface elements of an application program interface and, if the interface elements to be displayed in the display area at the current moment are a part of the interface elements of the application program interface, only analyzes and instantiates the to-be-displayed interface elements, so that the application program interface loading speed is increased.

Description

一种应用程序界面的显示方法及装置 A method and apparatus for displaying an application interface

技术领域 FIELD

[0001] 本发明涉及应用程序技术领域,尤其涉及一种应用程序界面的显示方法及装置。 [0001] The present invention relates to an application technology, and particularly relates to a display apparatus and a method of application interface.

背景技术 Background technique

[0002] 应用程序通常包含有很多界面,而界面上又包含有很多界面元素,如图片、文字等。 [0002] There are many applications often contain interface, while the interface and contains a lot of interface elements, such as pictures, text, and so on. 在现有技术中,对应用程序界面进行显示时,将会把应用程序界面包含的所有界面元素都进行解析,并在解析后将所有界面元素都进行实例化,最终,根据显示屏的显示范围将部分实例化的界面元素在显示屏上展现,然而,采用上述方法对应用程序界面进行显示存在加载速度慢的问题,用户往往需要等待较长的时间才能在显示屏上看到应用程序界面,用户体验差。 In the prior art, when the display of the application interface, the application interface will contains all the interface elements are parsed, and all interface elements are instantiated after parsing, finally, according to the display range of the display screen examples of the portion of the interface element show on the display screen, however, the above method an application interface problem loading slow display, users often need to wait a long time to see the application interface on the display screen, poor user experience.

发明内容 SUMMARY

[0003] 本发明通过提供一种应用程序界面的显示方法及装置,解决了现有技术中应用程序界面加载速度慢的技术问题。 [0003] The present invention provides a display apparatus and a method for an application program interface, the prior art to solve the slow loading application interface technical problems.

[0004] 本发明实施例提供一种应用程序界面的显示方法,包括: [0004] The embodiment provides an application interface display method embodiment of the present invention, comprising:

[0005] 确定用于显示应用程序界面的显示区域; [0005] determining a display area for displaying the application program interface;

[0006] 判断在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素是否为所述应用程序界面的全部界面元素; [0006] In the current time determination of the application program interface to be displayed all interface elements in the area of ​​interface elements whether the application program interface on the display;

[0007] 若在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素为所述应用程序界面的部分界面元素,则,对当前时刻下待显示在所述显示区域内的界面元素进行解析和实例,并将实例后的界面元素展现在所述显示区域内。 [0007] When the application program interface to be displayed at the current time in the region of the interface element is part of the interface element of the application program interface, then, for the current time to be displayed in the display area of ​​the parsing and interface elements instance, the interface elements and the examples show in the display area.

[0008] 可选的,在所述判断在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素是否为所述应用程序界面的全部界面元素之后,所述方法还包括: [0008] Optionally, the determination at this time of the application program interface to be displayed on the display interface elements in the area whether all the interface elements after the application interface, said method further comprising :

[0009] 若在当前时刻下所述应用程序中待显示在所述显示区域内的界面元素为所述应用程序界面的全部界面元素,则,对所述应用程序界面的全部界面元素进行解析和实例,并将实例后的界面元素展现在所述显示区域内。 [0009] If the current time of the application interface elements to be displayed within the display area of ​​interface elements all of the application interface, then, for all the UI elements of an application interface and parses example, the interface elements and examples displayed in the display area.

[0010] 可选的,在所述判断在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素是否为所述应用程序界面的全部界面元素之后,所述方法还包括: [0010] Optionally, the determination at this time of the application program interface to be displayed on the display interface elements in the area whether all the interface elements after the application interface, said method further comprising :

[0011] 若在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素为所述应用程序界面的部分界面元素,则,对所述显示区域内的滑动事件进行监听; [0011] If the current time of the application program interface to be displayed interface elements in the area of ​​the interface elements for the portion of the application interface, is, in the event of sliding the display area of ​​the display monitor;

[0012]当监听到所述滑动事件时,根据所述滑动事件确定在当前时刻的下一时刻下待显示在所述显示区域内的新增的界面元素; [0012] When the event listener to the slide, according to the slide next timing event is determined at the current time the new interface elements to be displayed within the display area;

[0013] 对所述新增的界面元素进行解析和实例,以使实例后的所述新增的界面元素能够在当前时刻的下一时刻在所述显示区域内进行展现。 [0013] Examples of the parsing and the new interface elements, such that the new instance of the interface elements can be demonstrated in the display area at the next moment the current time.

[0014] 可选的,在所述对当前时刻下待显示在所述显示区域内的界面元素进行解析和实例之前,所述方法还包括: [0014] Optionally, in the display of the current time to be before the interface element in the region and analyzing example, the method further comprises the display:

[0015] 将所述应用程序界面对应的布局文件解析为文档对象模型。 [0015] The application program interface corresponding to the layout file is parsed document object model.

[0016] 可选的,所述对当前时刻下待显示在所述显示区域内的界面元素进行解析和实例,包括: [0016] Optionally, the display of the current time to be parsed and examples in the interface elements in the display area, comprising:

[0017] 遍历所述文档对象模型,分别提取出当前时刻下待显示在所述显示区域内的各个界面元素的数据信息; [0017] traversing the document object model, respectively, to extract data to be displayed at the current time information for each of the interface elements in the area of ​​the display;

[0018] 根据各个界面元素的数据信息,分别对各个界面元素进行实例。 [0018] The information data of each of the interface elements, the interface elements are each instance.

[0019] 基于同一发明构思,本发明另一实施例还提供一种应用程序界面的显示装置,包括: [0019] Based on the same inventive concept, a further embodiment of the present invention further provides a display device application interface, comprising:

[0020] 第一确定模块,用于确定用于显示应用程序界面的显示区域; [0020] a first determining module, for determining a display area for displaying the application program interface;

[0021]判断模块,用于判断在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素是否为所述应用程序界面的全部界面元素; [0021] determination means for determining the current time in the application program interface to be displayed on the display interface elements in the area whether all the interface elements of the application program interface;

[0022] 第一处理模块,用于若在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素为所述应用程序界面的部分界面元素,则,对当前时刻下待显示在所述显示区域内的界面元素进行解析和实例,并将实例后的界面元素展现在所述显示区域内。 [0022] The first processing module, configured to, if the current time of the application program interface to be displayed on the display interface elements in the area of ​​the interface elements for the portion of the application interface, is, at the present time to be parse and display examples in the interface elements in the display area, the interface element and the examples show in the display area.

[0023] 可选的,还包括: [0023] Optionally, further comprising:

[0024] 第二处理模块,用于若在当前时刻下所述应用程序中待显示在所述显示区域内的界面元素为所述应用程序界面的全部界面元素,则,对所述应用程序界面的全部界面元素进行解析和实例,并将实例后的界面元素展现在所述显示区域内。 [0024] The second processing module, configured to, if the current time of the application interface elements to be displayed within the display area of ​​interface elements all of the application interface, then, the application interface all examples and parse interface elements, the interface elements and the examples show in the display area.

[0025] 可选的,还包括: [0025] Optionally, further comprising:

[0026] 监听模块,用于若在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素为所述应用程序界面的部分界面元素,则,对所述显示区域内的滑动事件进行监听; [0026] The monitoring module, if the current time for the application program interface to be displayed on the display interface element in the region of the interface elements for the portion of the application interface, then, the display area of ​​the slip events listens;

[0027] 第二确定模块,用于当监听到所述滑动事件时,根据所述滑动事件确定在当前时刻的下一时刻下待显示在所述显示区域内的新增的界面元素; [0027] The second determination module, configured to, when the event listener to the slide, according to the slide next timing event is determined at the current time the new interface elements to be displayed within the display area;

[0028] 第三处理模块,用于对所述新增的界面元素进行解析和实例,以使实例后的所述新增的界面元素能够在当前时刻的下一时刻在所述显示区域内进行展现。 [0028] The third processing module for parsing and examples of the new interface elements, such that the new instance of the interface element can be performed within the display area at the next moment the current time show.

[0029] 可选的,还包括: [0029] Optionally, further comprising:

[0030] 解析模块,用于将所述应用程序界面对应的布局文件解析为文档对象模型。 [0030] The parsing module configured to parse the application program interface corresponding to the layout file for the document object model.

[0031] 可选的,所述第一处理模块包括: [0031] Optionally, the first processing module comprises:

[0032] 提取单元,用于遍历所述文档对象模型,分别提取出当前时刻下待显示在所述显示区域内的各个界面元素的数据信息; [0032] The extracting unit, configured to traverse the document object model, respectively, to extract the current time data to be displayed on the display screen of each information element in the region;

[0033] 实例单元,用于根据各个界面元素的数据信息,分别对各个界面元素进行实例。 [0033] Examples of means according to the data information for each of the interface elements, the interface elements are each instance.

[0034] 本发明实施例中的一个或多个技术方案,至少具有如下技术效果或优点: [0034] One or more embodiments of the aspect of embodiments of the present invention, at least the following technical effects or advantages:

[0035] 本发明通过在对应用程序界面中的界面元素进行解析之前,先对当前时刻下应用程序界面中待显示在显示区域内的界面元素进行判断,判断当前时刻下待显示在显示区域内的界面元素是否为应用程序界面的全部界面元素,若当前时刻下待显示在显示区域内的界面元素为应用程序界面的部分界面元素,则仅对待显示的界面元素进行解析和实例,从而避免了对并不需要在当前时刻下显示的界面元素的解析和实例,节省了对界面元素解析和实例的时间,提高了应用程序界面的加载速度,同时还提升了用户的体验。 [0035] The present invention prior to application interface interface element parsed prior to the current time application program interface interface elements in a display area to be displayed is judged by determining whether the current time at to be displayed within the display area interface elements whether all the interface elements of the application interface, if to be the current time display interface elements in the display area is part of the interface elements of the application interface, then treat only the interface element display parses and examples, thus avoiding interface elements do not need to be displayed in the current time parsing and examples, saving time and resolve instances of interface elements, improved loading speed application interface, while improving the user experience.

附图说明 BRIEF DESCRIPTION

[0036] 通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。 [0036] By reading the following detailed description of preferred embodiments Hereinafter, a variety of other advantages and benefits to those of ordinary skill in the art will become apparent. 附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。 The drawings are only for purposes of illustrating a preferred embodiment and are not to be considered limiting of the present invention. 而且在整个附图中,用相同的参考图形表示相同的部件。 And throughout the drawings indicate same components with the same reference pattern. 在附图中: In the drawings:

[0037]图1示出了本发明实施例的一种应用程序界面的显示方法的流程图; [0037] FIG. 1 shows a flowchart of a display method of the present invention is an application program interface according to the embodiment;

[0038]图2示出了本发明实施例的一种应用程序界面的显示装置的结构图。 [0038] FIG. 2 shows a block diagram of a display device of the present invention is an application program interface according to the embodiment.

具体实施方式 Detailed ways

[0039] 下面将参照附图更详细地描述本公开的示例性实施例。 [0039] The following exemplary embodiments of the present disclosure will be described in more detail with reference to the drawings. 虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。 While the exemplary embodiment shows an exemplary embodiment of the present disclosure in the drawings, it should be understood that the present disclosure may be implemented embodiments and should not be set forth herein to limit in various forms. 相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。 Rather, these embodiments are able to more thorough understanding of the present disclosure, and the scope of the present disclosure can be completely conveying to those skilled in the art.

[0040] 本发明实施例提供一种应用程序界面的显示方法,应用于具有一显示屏的电子设备中,该电子设备的系统中安装有应用程序,其中,该电子设备的系统可以为安卓系统(Android),在用户打开该应用程序后,应用程序的界面将通过显示屏进行展现,对于该应用程序界面在该显示屏上的显示方法,如图1所示,所述方法包括: The display method embodiment [0040] The present invention provides an application program interface, is applied to the electronic device having a display screen, the system is installed in an electronic device application, wherein the electronic device system may Andrews (the Android), the user opens the application, the application's interface by the display presentation, a display method for the application interface on the display screen, shown in Figure 1, the method comprising:

[0041] 步骤101:确定用于显示应用程序界面的显示区域。 [0041] Step 101: determining a display area for displaying an application interface.

[0042] 通常来讲,应用程序界面的显示区域与电子设备的显示屏的大小相对应,电子设备的显示屏即为应用程序界面的显示区域。 [0042] Generally speaking, the size of the display area of ​​the display screen of the electronic device corresponding to the application program interface, the display area of ​​the display is the application interface of the electronic device. 另外,也可以在电子设备的显示屏上预先划定一小于显示屏实际尺寸的预设显示区域,并将该预设显示区域作为显示应用程序界面的显示区域,本申请对如何在显示屏上划定用于显示应用程序界面的显示区域不做限定,本领域技术人员可以根据实际需要按照不同规则进行划定。 Further, may be designated in advance on the display screen of the electronic device is smaller than the actual size of a preset display area, the predetermined display area and the display area as a display application interface, on a display screen how the present application a display for displaying the designated areas of the application interface is not defined, one skilled in the art can be delineated according to actual needs in different rules.

[0043] 步骤102:判断在当前时刻下应用程序界面中待显示在显示区域内的界面元素是否为应用程序界面的全部界面元素。 [0043] Step 102: determining whether all elements of the interface in the interface element display area is an interface for the application in the current time to be displayed in the application interface.

[0044] 具体来讲,应用程序界面由若干界面元素组成,进一步,应用程序界面包含的若干界面元素的类型可以相同,也可以不同。 [0044] Specifically, the application program interface consists of several screen elements, further, the type of application program interface comprising a plurality of interface element may be the same or different. 其中,界面元素的类型可以为图片,也可以为文字,还可以为用于表现应用程序界面的其他类型,本申请对此不做限定。 Among them, the type of interface elements may be pictures, it can also text, may also be used for other types of performance application interface, which is not limited in this application. 在一具体实施例中,应用程序界面中的界面元素的类型可以均为图片,在另一具体实施例中,应用程序界面中不仅包括类型为图片的界面元素,同时还包括类型为文字的界面元素。 In a particular embodiment, the type of interface application interface elements are pictures can, in another embodiment, the application program interface includes not only the type of image interface elements, but also includes a text type of interface element. 通常来说,应用程序界面中包括不同类型的各式界面元素。 Typically, the application program interface comprising a variety of different types of interface elements.

[0045] 本申请在确定出显示区域后,根据应用程序界面对应的布局文件判断当前时刻下待显示在显示区域内的界面元素是否为应用程序界面的全部界面元素,其中,布局文件中包含应用程序界面的所有界面元素的位置信息,根据界面元素的位置信息能够确定界面元素在应用程序界面中所处的位置。 [0045] This application after determining a display area, according to the application program interface corresponding to the layout file is determined that the current time all the interface element interface elements in the display area is for the application program interface to be displayed, wherein the layout file containing the application location information of all interface elements of the program interface, the position information can determine the position of the interface elements of the interface element is located in the application interface. 布局文件可以为利用可扩展标记语言(ExtensibleMarkup Language,XML)编译的文件。 File layout files can use Extensible Markup Language (ExtensibleMarkup Language, XML) compilation.

[0046] 步骤103:若在当前时刻下应用程序界面中待显示在显示区域内的界面元素为应用程序界面的部分界面元素,则,对当前时刻下待显示在显示区域内的界面元素进行解析和实例,并将实例后的界面元素展现在显示区域内。 [0046] Step 103: If the application program interface to be displayed interface elements in the display area is part of the interface elements of the application interface in the present time, then, to the current time to be displayed interface elements in the display region were and examples, and the examples of interface elements displayed in the display area.

[0047] 在本申请中,若当前时刻下应用程序界面中的所有界面元素并不是都需要显示在显示区域内,即,当前时刻下应用程序界面中待显示在显示区域内的界面元素为应用程序的部分界面元素,则,仅对当前时刻下待显示在显示区域内的界面元素进行解析和实例。 [0047] In the present application, if the application interface at the present time not all need interface elements displayed in the display area, i.e., the current application time to be displayed in the screen interface elements in the display area for the application part of the interface element of a program, then, only the current time to be displayed and examples parsing interface elements in the display region. 例如,应用程序界面中包含界面元素A和界面元素B,在第一时刻下,界面元素A将会显示在显示区域内,而,界面元素B不会显示在显示区域内,通过用户对显示屏的滑动操作,界面元素B在第一时刻之后的第二时刻将会显示在显示区域内,若当前时刻为上述第一时刻,在当前时刻下,待显示在显示区域内的界面元素仅为界面元素A,则,对界面元素A进行解析,并在解析后对界面元素A实例,最后将实例后的界面元素A展现在显示区域内,由于本申请在当前时刻下仅对界面元素A进行解析和实例,并没有对界面元素B进行解析和实例,因此,节省了解析和实例界面元素的时间,提高了应用程序界面的加载速度。 For example, application interface contains interface elements A and elements B interface, at a first time, A interface element is displayed in the display area, the interface element B is not displayed in the display area, the display screen by the user sliding operation, interface element B of the second time after the first time will be displayed in the display area, the interface element in the display region only when the current time is the interface to the first time point, at the present time, to be displayed element a, then, to the a interface element parsing and analyzing the elements of a interface instance, the interface element a after the last instance of the presentation in the display area, as the application interface elements is only at this time a parse and examples, and no instance of the interface and analyzing the elements B, thus saving time and analytical examples of interface elements, to improve the speed of loading the application interface.

[0048] 进一步,在判断在当前时刻下应用程序界面中待显示在显示区域内的界面元素是否为应用程序界面的全部界面元素之后,若在当前时刻下应用程序中待显示在显示区域内的界面元素为应用程序界面的全部界面元素,则,对应用程序界面的全部界面元素进行解析和实例,并将实例后的界面元素展现在显示区域内。 [0048] Further, it is determined in the application at the present time interface to be displayed after the screen elements in the display area whether all the interface elements of the application interface, if to be at the present time the application is displayed in the display region interface element to interface elements all of the application interface, then, for all interface elements of the application interface and parses instance, the interface elements and examples displayed in the display area. 例如,应用程序界面包含界面元素C和界面元素D,且,在当前时刻下,界面元素C和界面元素D均为待显示在显示区域内的界面元素,则,分别对界面元素C和界面元素D进行解析和实例,并将实例后的界面元素C和界面元素D展现在显示区域内。 For example, the application interface elements interface comprises interface elements D and C, and, at the present time, the interface elements and interface elements C D interface elements are to be displayed within the display area, then, are interface elements and interface elements of C D parsed and examples, and the examples of interface elements C and D show the interface elements in the display area.

[0049] 在本申请中,在判断在当前时刻下应用程序界面中待显示在显示区域内的界面元素是否为应用程序界面的全部界面元素之后,若在当前时刻下应用程序界面中待显示在显示区域内的界面元素为应用程序界面的部分界面元素,则,所述方法还包括: After [0049] In the present application, it is determined at the present time the application program interface to be displayed interface elements in the display area whether all the interface elements of the application interface, if the pending application interface at the current time is displayed in interface elements in the display region as part of the interface elements of the application interface, then the method further comprises:

[0050] 对显示区域内的滑动事件进行监听; [0050] The slide show events within the listening area;

[0051]当监听到滑动事件时,根据滑动事件确定在当前时刻的下一时刻下待显示在显示区域内的新增的界面元素; [0051] When listening to slip event, the event is determined in accordance with the slide in the new interface element display region to be displayed at the next timing a current time;

[0052] 对新增的界面元素进行解析和实例,以使实例后的新增的界面元素能够在当前时刻的下一时刻在所述显示区域内进行展现。 [0052] The parse the new interface elements and examples, so that after the new interface elements can be demonstrated in the instance display area at the next moment the current time.

[0053]具体来讲,若在当前时刻下待显示在显示区域内的界面元素仅为应用程序界面中的部分界面元素,用户通过在显示区域内进行滑动操作,其余的界面元素将有可能会在当前时刻的下一时刻下显示在显示区域内。 [0053] Specifically, if the current time to be displayed in the interface elements in the display area is only part of the interface elements of the application interface, the user performs a slide operation in the display area, the rest of the interface elements will likely be displayed in the display area at a next time of the current moment. 其中,用户在显示区域内所进行的滑动操作与显示区域内的滑动事件相对应,当电子设备监听到显示区域内存在滑动事件时,表明用户在显示区域内进行了滑动操作,进而,根据滑动事件确定在当前时刻的下一时刻下待显示在显示区域内的新增的界面元素。 Wherein the sliding operation of the slide event within the display area of ​​a user in the display area carried out corresponds, when the electronic device listens to the display area of ​​the memory when the slip event, indicating that the user performed a sliding operation in the display area, Furthermore, according to the sliding event determine the new interface elements in the display area to be displayed at the next moment the current moment. 例如,在当前时刻下待显示在显示区域内的界面元素为界面元素A,根据滑动事件确定出在当前时刻的下一时刻下待显示在显示区域内的新增的界面元素为界面元素B,则,对界面元素B进行解析和实例,实例后的界面元素B将在当前时刻的下一时刻在显示区域内进行展现。 For example, the current time to be displayed in the interface elements in the display area of ​​interface elements A, is determined to be displayed at the next timing to add the current time in the display area of ​​the interface element B according to the sliding interface element events, is, for analyzing and interface element B instance, the example interface element B will be displayed in the display area at the next moment the current time.

[0054] 需要说明的是,新增的界面元素为当前时刻的下一时刻下待显示的界面元素中与当前时刻下待显示的界面元素不同的界面元素。 [0054] Incidentally, the interface elements of the new interface element displayed at the current time is to be a next time point different from the current time to be displayed interface elements interface element. 具体来讲,若当前时刻下待显示的界面元素的集合为第一界面元素集合,当前时刻的下一时刻待显示的界面元素的集合为第二界面元素集合,则,新增的界面元素为属于第二界面元素集合且不属于第一界面元素集合的界面元素。 Specifically, if the set of interface elements to be displayed at the current time as a first set of interface elements, the current set of interface elements to be displayed next time is the time the second set of elements of the interface, then, the new interface elements interface element belonging to the second set of interface elements does not belong to a first set of interface elements. 例如,当前时刻的下一时刻待显示在显示区域内的界面元素为界面元素E和界面元素F,而当前时刻待显示在显示区域内的界面元素为界面元素E和界面元素G,则,新增的界面元素为界面元素F。 For example, the current time to be displayed next time interface elements in the display area of ​​interface elements and interface elements E F., And the current time interface element to be displayed in the display area of ​​interface elements and interface elements E G, then, a new growing interface elements interface element F. 其中,新增的界面元素可以为多个。 Wherein the new interface elements may be a plurality. 另外,若在用户的滑动操作下,显示区域内并不会增加新的界面元素,则保持显示区域内的显示内容不变。 Further, if the sliding operation by a user, the display does not increase the area of ​​a new interface element, then the display contents held in the constant region.

[0055] 进一步,本申请可以通过se tOnScro I IingListener接口来实现对滑动事件的监听。 [0055] Further, the present application can se I IingListener interface to achieve tOnScro listening to slip through the event. 其中,滑动事件可以为向上滑动事件、向下滑动事件、向左滑动事件和向右滑动事件中的任一滑动事件。 Wherein the slip event may be slid up event, event slide downward, leftward, rightward sliding slip event and any event a slip event. 对于滑动事件的监听,一种具体的实施方式为:判断显示区域内是否存在滑动操作。 For listening slip event, a particular embodiment of: determining whether the output operation of the slide area. 当存在滑动操作时,获得与滑动操作对应的滑动轨迹,根据滑动轨迹能够确定滑动事件的类型,具体的,根据滑动轨迹中的起始点的坐标和终止点的坐标确定滑动事件的类型,例如,滑动轨迹中起始点的坐标为(X1,Y1),终止点的坐标为(Χ2,Υ2),以显示区域的左下角作为原点、显示区域的右侧作为X轴正方向、显示区域的上侧作为Y轴正方向,若Xl等于Χ2且Yl小于Υ2,则表明滑动事件为向上滑动事件,按照上述方法可以对滑动事件的类型进行判断。 When there is a sliding operation, the sliding operation corresponding to the obtained sliding track can be determined according to the type of slip event sliding track, specifically, is determined according to the type of slip event and the end point coordinates of the starting point of the sliding track, for example, sliding track start point coordinates (X1, Y1), coordinates of the end point is (Χ2, Υ2), to the lower left corner area of ​​the display as an origin, the display area on the right side as the positive direction of the X axis, the display area on the side as the positive direction of the Y-axis, if Xl and Yl Χ2 less than v2 is equal, it indicates that the event is a slide sliding up event, the method can be determined according to the above type of slip event.

[0056] 在本申请中,对于界面元素的解析,可以采用文档对象模型(Document ObjectModel,D0M)的解析方式,具体来讲,在对当前时刻下待显示在显示区域内的界面元素进行解析和实例之前,首先将应用程序界面的布局文件解析为文档对象模型,从而,通过遍历文档对象模型,分别提取出当前时刻下待显示在显示区域内的各个界面元素的数据信息,以实现对当前时刻下待显示的界面元素的解析,进而,根据各个界面元素的数据信息,分别对各个界面元素进行实例。 [0056] In the present application, the interface element for parsing may be employed Document Object Model (Document ObjectModel, D0M) of analytical methods, specifically, in the parsing of the current time to be displayed within the display area of ​​the interface elements and prior to examples, first application interface layout file parsing a document object model, so that, by traversing the document object model, respectively, to extract the current time data information of each interface elements in the display area to be displayed, in order to achieve the current time parsing the interface element to be displayed, and further, according to the respective data interface elements, the interface elements are each instance. 由于文档对象模型结构简单,因此,遍历简单、易用性强。 Due to the simple structure of the document object model, therefore, traverse the simplicity, ease of use and strong.

[0057] 进一步,在将应用程序界面的布局文件解析为文档对象模型时,可以先通过系统接ODocumentBuilderFactory-1iewInstance ()来获取工厂角军析器,DocumentBuiIderFactory.newlnstance O的主要作用是通过工厂实例化一个工厂解析器,接着,调用工厂解析器中的newDocumentBuilder O函数来获得DOM解析器,进而,通过DOM解析器调用parse函数来解析布局文件,获得文档对象模型。 [0057] Further, when the application interface layout file is parsed document object model, you can first take ODocumentBuilderFactory-1iewInstance () to get the plant through the angle analyzer military system, the main role is DocumentBuiIderFactory.newlnstance O factory by instantiating a factory parser then calls the parser factory in newDocumentBuilder O function to obtain a DOM parser, and then to call the parse function parses the file layout by DOM parser, get the document Object model.

[0058] 基于同一发明构思,本发明实施例还提供一种应用程序界面的显示装置,如图2所示,包括: [0058] Based on the same inventive concept, an embodiment of the present invention further provides a display device application interface shown in Figure 2, comprising:

[0059] 第一确定模块201,用于确定用于显示应用程序界面的显示区域; [0059] a first determining module 201 for determining a display area for displaying the application program interface;

[0060] 判断模块202,用于判断在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素是否为所述应用程序界面的全部界面元素; [0060] The judging module 202, configured to determine the current time of the application program interface to be displayed on the display interface elements in the area whether all the interface elements of the application program interface;

[0061] 第一处理模块203,用于若在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素为所述应用程序界面的部分界面元素,则,对当前时刻下待显示在所述显示区域内的界面元素进行解析和实例,并将实例后的界面元素展现在所述显示区域内。 [0061] The first processing module 203, configured to, if the application program interface to be displayed at the current time in the region of the interface element for the application program interface section of the interface elements of the display, then, the current time examples of parsing to be displayed at the interface and within the area of ​​the display element, the interface element and the examples show in the display area.

[0062] 所述显示装置还包括: [0062] The display apparatus further comprises:

[0063] 第二处理模块,用于若在当前时刻下所述应用程序中待显示在所述显示区域内的界面元素为所述应用程序界面的全部界面元素,则,对所述应用程序界面的全部界面元素进行解析和实例,并将实例后的界面元素展现在所述显示区域内。 [0063] The second processing module, configured to, if the current time of the application interface elements to be displayed within the display area of ​​interface elements all of the application interface, then, the application interface all examples and parse interface elements, the interface elements and the examples show in the display area.

[0064] 所述显示装置还包括: [0064] The display apparatus further comprises:

[0065] 监听模块,用于若在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素为所述应用程序界面的部分界面元素,则,对所述显示区域内的滑动事件进行监听; [0065] The monitoring module, if the current time for the application program interface to be displayed on the display interface element in the region of the interface elements for the portion of the application interface, then, the display area of ​​the slip events listens;

[0066] 第二确定模块,用于当监听到所述滑动事件时,根据所述滑动事件确定在当前时刻的下一时刻下待显示在所述显示区域内的新增的界面元素; [0066] The second determining module, configured to, when the event listener to the slide, according to the slide next timing event is determined at the current time the new interface elements to be displayed within the display area;

[0067] 第三处理模块,用于对所述新增的界面元素进行解析和实例,以使实例后的所述新增的界面元素能够在当前时刻的下一时刻在所述显示区域内进行展现。 [0067] The third processing module for parsing and examples of the new interface elements, such that the new instance of the interface element can be performed within the display area at the next moment the current time show.

[0068] 所述显示装置还包括: [0068] The display apparatus further comprises:

[0069] 解析模块,用于将所述应用程序界面对应的布局文件解析为文档对象模型。 [0069] The parsing module configured to parse the application program interface corresponding to the layout file for the document object model.

[0070] 其中,第一处理模块203包括: [0070] The first processing module 203 comprises:

[0071] 提取单元,用于遍历所述文档对象模型,分别提取出当前时刻下待显示在所述显示区域内的各个界面元素的数据信息; [0071] The extracting unit, configured to traverse the document object model, respectively, to extract the current time data to be displayed on the display screen of each information element in the region;

[0072] 实例单元,用于根据各个界面元素的数据信息,分别对各个界面元素进行实例。 [0072] Examples of means according to the data information for each of the interface elements, the interface elements are each instance.

[0073]上述本申请实施例中的技术方案,至少具有如下的技术效果或优点: [0073] The technical solutions in the present application embodiment, at least the following technical effects or advantages:

[0074] 本发明通过在对应用程序界面中的界面元素进行解析之前,先对当前时刻下应用程序界面中待显示在显示区域内的界面元素进行判断,判断当前时刻下待显示在显示区域内的界面元素是否为应用程序界面的全部界面元素,若当前时刻下待显示在显示区域内的界面元素为应用程序界面的部分界面元素,则仅对待显示的界面元素进行解析和实例,从而避免了对并不需要在当前时刻下显示的界面元素的解析和实例,节省了对界面元素解析和实例的时间,提高了应用程序界面的加载速度,同时还提升了用户的体验。 [0074] The present invention prior to application interface interface element parsed prior to the current time application program interface interface elements in a display area to be displayed is judged by determining whether the current time at to be displayed within the display area interface elements whether all the interface elements of the application interface, if to be the current time display interface elements in the display area is part of the interface elements of the application interface, then treat only the interface element display parses and examples, thus avoiding interface elements do not need to be displayed in the current time parsing and examples, saving time and resolve instances of interface elements, improved loading speed application interface, while improving the user experience.

[0075] 尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。 [0075] While the present invention has been described with preferred embodiments, but those skilled in the art from the underlying inventive concept can make other modifications and variations to these embodiments. 所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。 Therefore, the appended claims are intended to explain embodiments including the preferred embodiment as fall within the scope of the invention and all changes and modifications.

[0076]显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。 [0076] Obviously, those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. 这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。 Thus, if these modifications and variations of the present invention fall within the claims of the invention and the scope of equivalents thereof, the present invention intends to include these modifications and variations.

Claims (10)

1.一种应用程序界面的显示方法,其特征在于,包括: 确定用于显示应用程序界面的显示区域; 判断在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素是否为所述应用程序界面的全部界面元素; 若在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素为所述应用程序界面的部分界面元素,则,对当前时刻下待显示在所述显示区域内的界面元素进行解析和实例,并将实例后的界面元素展现在所述显示区域内。 1. A method of displaying an application interface, characterized by comprising: determining a display area for displaying the application program interface; determines the current time of the application program interface to be displayed within the interface element display region whether all the interface elements for the application program interface; if the application program interface to be the current time display elements within the display interface portion of a region of the application interface elements of the interface, then, the current time and parsing the standby display examples in the interface elements in the display area, the interface element and the examples show in the display area.
2.如权利要求1所述的显示方法,其特征在于,在所述判断在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素是否为所述应用程序界面的全部界面元素之后,所述方法还包括: 若在当前时刻下所述应用程序中待显示在所述显示区域内的界面元素为所述应用程序界面的全部界面元素,则,对所述应用程序界面的全部界面元素进行解析和实例,并将实例后的界面元素展现在所述显示区域内。 2. The display method according to claim 1, wherein the current time is determined at the application program interface to be displayed in all of the interface element display area is for the application program interface after the interface element, the method further comprising: if the current time of the application interface elements to be displayed in the entire area of ​​the interface element to display the application program interface, then, the application interface all examples and parse interface elements, the interface elements and the examples show in the display area.
3.如权利要求1所述的显示方法,其特征在于,在所述判断在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素是否为所述应用程序界面的全部界面元素之后,所述方法还包括: 若在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素为所述应用程序界面的部分界面元素,则,对所述显示区域内的滑动事件进行监听; 当监听到所述滑动事件时,根据所述滑动事件确定在当前时刻的下一时刻下待显示在所述显示区域内的新增的界面元素; 对所述新增的界面元素进行解析和实例,以使实例后的所述新增的界面元素能够在当前时刻的下一时刻在所述显示区域内进行展现。 The display method according to claim 1, wherein the current time is determined at the application program interface to be displayed in all of the interface element display area is for the application program interface after the interface element, the method further comprising: if the application program interface to be displayed in the current time display interface element within the region is part of the interface element of the application program interface, then, the display region in the event the slide listens; when listening to the slip event is determined at the next timing a current time to be displayed on the display of the new interface elements in the area according to the slip event; the new interface elements parsed and examples, the following additional examples of interface elements can be demonstrated in the display area at the next moment the current time.
4.如权利要求1所述的显示方法,其特征在于,在所述对当前时刻下待显示在所述显示区域内的界面元素进行解析和实例之前,所述方法还包括: 将所述应用程序界面对应的布局文件解析为文档对象模型。 The display method according to claim 1, wherein, in the display of the current time to be before the interface element within the display region is parsed and examples, the method further comprising: the application program interface corresponding layout file parsing document object model.
5.如权利要求4所述的显示方法,其特征在于,所述对当前时刻下待显示在所述显示区域内的界面元素进行解析和实例,包括: 遍历所述文档对象模型,分别提取出当前时刻下待显示在所述显示区域内的各个界面元素的数据信息; 根据各个界面元素的数据信息,分别对各个界面元素进行实例。 5. The display method according to claim 4, characterized in that, for the current time to be displayed on the display interface elements in the area to be parsed and examples, comprising: traversing the document object model, respectively extract current time information for each data to be displayed interface elements within the display area; data according to each of the interface elements, the interface elements are each instance.
6.一种应用程序界面的显示装置,其特征在于,包括: 第一确定模块,用于确定用于显示应用程序界面的显示区域; 判断模块,用于判断在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素是否为所述应用程序界面的全部界面元素; 第一处理模块,用于若在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素为所述应用程序界面的部分界面元素,则,对当前时刻下待显示在所述显示区域内的界面元素进行解析和实例,并将实例后的界面元素展现在所述显示区域内。 A display device of the application interface, characterized by comprising: a first determining module, for determining a display area for displaying the application program interface; determining means for determining the current time in the application program interface the interface element to be displayed in the area whether all of the interface elements of the application interface; first processing means for displaying within the area if the application program interface to be displayed at the current time interface elements of the interface elements for the portion of the application interface, is, for the current time to be displayed on the display interface element in the region, and analyzing instance, the interface elements and examples displayed in the display region .
7.如权利要求6所述的显示装置,其特征在于,还包括: 第二处理模块,用于若在当前时刻下所述应用程序中待显示在所述显示区域内的界面元素为所述应用程序界面的全部界面元素,则,对所述应用程序界面的全部界面元素进行解析和实例,并将实例后的界面元素展现在所述显示区域内。 The display device according to claim 6, characterized in that, further comprising: a second processing module, configured to, if the applications at the present time to be displayed in said interface element to said display region all interface application interface element, then, for all the UI elements of an application interface and parses instance, the interface elements and examples displayed in the display area.
8.如权利要求6所述的显示装置,其特征在于,还包括: 监听模块,用于若在当前时刻下所述应用程序界面中待显示在所述显示区域内的界面元素为所述应用程序界面的部分界面元素,则,对所述显示区域内的滑动事件进行监听;第二确定模块,用于当监听到所述滑动事件时,根据所述滑动事件确定在当前时刻的下一时刻下待显示在所述显示区域内的新增的界面元素; 第三处理模块,用于对所述新增的界面元素进行解析和实例,以使实例后的所述新增的界面元素能够在当前时刻的下一时刻在所述显示区域内进行展现。 The display device according to claim 6, characterized in that, further comprising: a monitoring module, if the application for the application program interface to be displayed in the current time display interface element within the region is part of interface elements of the program interface, then, the slide show events within the listening area; second determining module configured to monitor when the slip event, determining the next point in the current time according to the slip event to be displayed on the display at the new interface elements in the area; a third processing module for parsing and examples of the new interface elements, such that the new instance of the interface elements capable of the next time in the current time of the presentation display region.
9.如权利要求6所述的显示装置,其特征在于,还包括: 解析模块,用于将所述应用程序界面对应的布局文件解析为文档对象模型。 The display device according to claim 6, characterized in that, further comprising: a parsing module configured to parse the application program interface corresponding to the layout file for the document object model.
10.如权利要求9所述的显示装置,其特征在于,所述第一处理模块包括: 提取单元,用于遍历所述文档对象模型,分别提取出当前时刻下待显示在所述显示区域内的各个界面元素的数据信息; 实例单元,用于根据各个界面元素的数据信息,分别对各个界面元素进行实例。 10. The display apparatus according to claim 9, wherein the first processing module comprises: an extracting unit, configured to traverse the document object model, the current time are extracted to be displayed in the display area the respective data interface element; means example, according to the data information for each of the interface elements, the interface elements are each instance.
CN201610841262.XA 2016-09-22 2016-09-22 An application program interface display method and device CN106406888A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610841262.XA CN106406888A (en) 2016-09-22 2016-09-22 An application program interface display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610841262.XA CN106406888A (en) 2016-09-22 2016-09-22 An application program interface display method and device

Publications (1)

Publication Number Publication Date
CN106406888A true CN106406888A (en) 2017-02-15

Family

ID=57996927

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610841262.XA CN106406888A (en) 2016-09-22 2016-09-22 An application program interface display method and device

Country Status (1)

Country Link
CN (1) CN106406888A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463318A (en) * 2017-06-26 2017-12-12 北京小度信息科技有限公司 Interface element processing method and processing device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102262541A (en) * 2011-08-12 2011-11-30 北京思创银联科技股份有限公司 Dynamic configuration plug-initiated method
CN103853729A (en) * 2012-11-29 2014-06-11 腾讯科技(深圳)有限公司 Page loading method and system
CN104025084A (en) * 2011-09-27 2014-09-03 亚马逊技术有限公司 Historical browsing session management
US20160041696A1 (en) * 2010-10-01 2016-02-11 Z124 Annunciator drawer
CN105700928A (en) * 2016-01-15 2016-06-22 北京金山安全软件有限公司 Widget information display method, device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160041696A1 (en) * 2010-10-01 2016-02-11 Z124 Annunciator drawer
CN102262541A (en) * 2011-08-12 2011-11-30 北京思创银联科技股份有限公司 Dynamic configuration plug-initiated method
CN104025084A (en) * 2011-09-27 2014-09-03 亚马逊技术有限公司 Historical browsing session management
CN103853729A (en) * 2012-11-29 2014-06-11 腾讯科技(深圳)有限公司 Page loading method and system
CN105700928A (en) * 2016-01-15 2016-06-22 北京金山安全软件有限公司 Widget information display method, device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463318A (en) * 2017-06-26 2017-12-12 北京小度信息科技有限公司 Interface element processing method and processing device

Similar Documents

Publication Publication Date Title
US20030001854A1 (en) Capturing graphics primitives associated with any display object rendered to a graphical user interface
US8429551B2 (en) Application-based copy and paste operations
US20110202854A1 (en) Metadata Capture for Screen Sharing
US20160307002A1 (en) Method and apparatus for displaying information content
US9355081B2 (en) Transforming HTML forms into mobile native forms
CN102932197B (en) A test method and test system
CN105556482A (en) Mobile application performance monitoring
US9342237B2 (en) Automated testing of gesture-based applications
US20140149877A1 (en) Method and terminal device for displaying push message
CN101876897A (en) System and method used for processing Widget on Web browser
CN103685251A (en) Android malicious software detecting platform oriented to mobile internet
JP2003173270A (en) Software debugging device
US20030066052A1 (en) API to increase debug log performance
WO2011153740A1 (en) Method and device for processing widget system appearance
KR20150128671A (en) Application scenario identification method, power consumption management method, apparatus, and terminal device
US8387017B2 (en) Black box testing optimization using information from white box testing
CN103345405A (en) Method and device for starting application program and client side
JP2007122708A (en) System and method for text legibility enhancement
CN103593116A (en) Method and device for displaying and controlling portable terminal toolbar
US7428729B2 (en) Methods, systems, and computer program products for integrating legacy applications into a platform-independent environment
CN102799640B (en) Page loading apparatus and method of loading the page
CN101364988A (en) Method and apparatus determining webpage security
CN102331934B (en) Method for implementing desktop component based on GO desktop system
CN103294688A (en) Web page browsing method and system
US20120278698A1 (en) Method and system for processing a webpage

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination