CN113835790A - Paging page display method and device based on Android - Google Patents

Paging page display method and device based on Android Download PDF

Info

Publication number
CN113835790A
CN113835790A CN202010579281.6A CN202010579281A CN113835790A CN 113835790 A CN113835790 A CN 113835790A CN 202010579281 A CN202010579281 A CN 202010579281A CN 113835790 A CN113835790 A CN 113835790A
Authority
CN
China
Prior art keywords
data
page
user interface
displayed
loading
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.)
Granted
Application number
CN202010579281.6A
Other languages
Chinese (zh)
Other versions
CN113835790B (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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010579281.6A priority Critical patent/CN113835790B/en
Publication of CN113835790A publication Critical patent/CN113835790A/en
Application granted granted Critical
Publication of CN113835790B publication Critical patent/CN113835790B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application discloses a paging page display method and device based on Android. One embodiment of the method comprises: obtaining paging page data, wherein the paging page data comprises data to be displayed and an identifier for representing whether more data exist; calling a matched data rendering interface from preset data rendering interfaces according to whether the data to be displayed of the paging page data is empty or not; and calling the matched user interface display interface from the preset user interface display interface according to the identification for representing whether more data exists or not so as to update the user interface, wherein the user interface comprises an element for representing whether more data is allowed to be loaded or not. The embodiment reduces repeated development of general logic displayed on each paging page, thereby improving development efficiency.

Description

Paging page display method and device based on Android
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a paging page display method and device based on Android.
Background
With the rapid development of computer technology, the development and application of the mobile internet are more and more extensive. On the premise that the type of the returned result cannot be known, the returned result of the server of the paging interface of the mobile gateway cannot be distinguished from the returned results of the servers of other interfaces, so that the paging loaded general logic cannot be encapsulated by directly applying a subclass inheritance base class mode.
At present, the related manner is to implement the display logic of whether to have display data and whether to load more data, etc. again and update the display page when loading each paged page, so as to implement the display of each paged page.
Disclosure of Invention
The embodiment of the application provides a paging page display method and device based on Android.
In a first aspect, an embodiment of the present application provides a paging page display method based on Android, including: acquiring paging page data, wherein the paging page data comprises data to be displayed and an identifier for representing whether more data exist; calling a matched data rendering interface from preset data rendering interfaces according to whether the data to be displayed of the paging page data is empty or not; and calling the matched user interface display interface from the preset user interface display interface according to the identification for representing whether more data exists or not so as to update the user interface, wherein the user interface comprises an element for representing whether more data is allowed to be loaded or not.
In some embodiments, the obtaining paged page data includes: creating a loading data class, wherein the loading data class comprises a field for representing data to be displayed and a field for representing whether more data exists; paged page data that is the object of the load data class is obtained.
In some embodiments, the preset data rendering interface includes a function in the View base class for indicating that data loading is successful and a function for indicating that data loading is failed.
In some embodiments, the obtaining paged page data as an object of the load data class includes: acquiring a data loading function in the Presensor base class, wherein the data loading function comprises a lambda expression (lambda expression) with a return value of an object for loading the data class; and acquiring paging page data through a data loading function.
In some embodiments, the preset user interface display interface includes a function for indicating whether to display an element related to the next page data, and the element related to the next page data includes at least one of: the page display device comprises an element for representing whether next page data exists, an element for representing page loading progress and a paging vernier corresponding to data to be displayed.
In a second aspect, an embodiment of the present application provides an Android-based paginated page display device, which includes: the display device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is configured to acquire paging page data, and the paging page data comprises data to be displayed and an identifier for representing whether more data exist; the first calling unit is configured to call a matched data rendering interface from preset data rendering interfaces according to whether data to be displayed of the paging page data is empty or not; and the second calling unit is configured to call the matched user interface display interface from the preset user interface display interface according to the identification for representing whether more data exists or not so as to update the user interface, wherein the user interface comprises an element for representing whether more data is allowed to be loaded or not.
In some embodiments, the obtaining unit includes: the creating module is configured to create a loading data class, wherein the loading data class comprises a field for representing data to be displayed and a field for representing whether more data exists; an obtaining module configured to obtain paged page data as an object of the load data class.
In some embodiments, the preset data rendering interface includes a function in the View base class for indicating that data loading is successful and a function for indicating that data loading is failed.
In some embodiments, the obtaining module includes: the first obtaining submodule is configured to obtain a data loading function in the Presenter base class, wherein the data loading function comprises a lambda expression of which the return value is an object for loading the data class; and the second obtaining submodule is configured to obtain the paged page data through a data loading function.
In some embodiments, the preset user interface display interface includes a function for indicating whether to display an element related to the next page data, and the element related to the next page data includes at least one of: the page display device comprises an element for representing whether next page data exists, an element for representing page loading progress and a paging vernier corresponding to data to be displayed.
In a third aspect, an embodiment of the present application provides a terminal, where the terminal includes: one or more processors; a storage device having one or more programs stored thereon; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described in any implementation of the first aspect.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, which when executed by a processor implements the method described in any implementation manner of the first aspect.
According to the paging page display method and device based on the Android, paging page data are obtained firstly. The pagination page data comprises data to be displayed and an identifier for representing whether more data exist. And then, calling a matched data rendering interface from preset data rendering interfaces according to whether the data to be displayed of the paging page data is empty or not. And finally, calling the matched user interface display interface from the preset user interface display interface according to the identifier for representing whether more data exist or not so as to update the user interface. Wherein the user interface comprises an element for characterizing whether loading of more data is allowed. Therefore, by calling the matched data rendering interface and the user interface display interface, repeated development of general logic displayed on each paging page is reduced, and development efficiency is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flowchart of an embodiment of an Android-based paginated page displaying method according to the application;
fig. 3 is a schematic diagram of an application scenario of an Android-based paginated page display method according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for displaying Android-based paginated pages according to another embodiment of the present application;
FIG. 5 is a schematic structural diagram illustrating an embodiment of an Android-based paginated page display device according to the application;
FIG. 6 is a schematic block diagram of an electronic device suitable for use in implementing embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary architecture 100 to which the Android-based paginated page displaying method or the Android-based paginated page displaying apparatus of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 101, 102, 103 interact with a server 105 via a network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting page display, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103. The background server may perform processing such as analysis on the page to be displayed, and feed back a processing result (e.g., paged page data) to the terminal device).
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the Android-based paginated page display method provided in the embodiment of the present application is generally executed by the terminal devices 101, 102, and 103, and accordingly, the Android-based paginated page display apparatus is generally disposed in the terminal devices 101, 102, and 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flowchart 200 of an embodiment of an Android-based paginated page displaying method according to the application is shown. The page display method based on the Android comprises the following steps:
step 201, obtaining paged page data.
In this embodiment, an execution main body (such as the terminal devices 101, 102, and 103 shown in fig. 1) of the Android-based pagination page display method may acquire pagination page data in a wired connection manner or a wireless connection manner. The paginated page data can comprise data to be displayed and an identifier for representing whether more data exist. The data to be displayed usually corresponds to a paging cursor (cursor). As an example, the execution agent may obtain the page data of the page stored in advance from the local. As yet another example, the execution entity may obtain the paginated page data from an electronic device (e.g., the server 105 shown in fig. 1) communicatively coupled thereto.
In some optional implementations of this embodiment, the executing body may further obtain the paged page data according to the following steps:
first, a load data class is created.
In these implementations, the execution agent may first create a load data class (e.g., a loadMoreinfo class). The load data class may include a field (e.g., data) for representing data to be displayed and a field (e.g., hasMore) for representing whether there is more data. The values corresponding to the fields characterizing the data to be displayed may be consistent with the list of objects by instantiating the loaded data class. As an example, the above-mentioned loading data class may include fields for characterizing data to be displayed, which may be obtained by: + data List < Item >.
Based on the page cursor corresponding to the data to be displayed, the loaded data class may further include a field for representing the page cursor corresponding to the data to be displayed. Specifically, the value corresponding to the field included in the loaded data class for characterizing the paging cursor corresponding to the data to be displayed may be identical to the paging cursor corresponding to the paged page data of the object by instantiating the loaded data class.
Second, paged page data as an object of the load data class is acquired.
In these implementations, the execution main body may acquire paged page data that is an object of the load data class created in the first step in various ways.
Step 202, according to whether the data to be displayed of the paged page data is empty, calling a matched data rendering interface from preset data rendering interfaces.
In this embodiment, according to whether the data to be displayed of the paginated page data is empty, the execution main body may invoke the matched data rendering interface from the preset data rendering interfaces in various ways. The preset data rendering interface may include a package packet capable of rendering incoming data to be displayed. As an example, in response to determining that the data to be displayed of the paged page data is empty, the execution main body may call a function (e.g., onLoadListFail method) representing data loading failure from a preset data rendering interface as the matched data rendering interface. As another example, in response to determining that the data to be displayed of the paged page data is not empty, the execution main body may call, from a preset data rendering interface, a function that characterizes a successful data loading (e.g., onLoadListSuccess method) as the matched data rendering interface.
In some optional implementation manners of this embodiment, based on an Android MVP (Model, View, Presenter) architecture, the preset data rendering interface may include a function that represents a successful data loading and a function that represents a failed data loading in a View base class.
Step 203, calling the matched user interface display interface from the preset user interface display interface to update the user interface.
In this embodiment, according to the identifier obtained in step 201 to indicate whether there is more data, the execution main body may invoke a matching User Interface display Interface from a preset User Interface (UI) display Interface in various ways to update the User Interface. The preset user interface display interface may include an element (e.g., a "next page" control) for indicating whether to allow more data to be loaded.
In some optional implementations of this embodiment, the preset user interface display interface may include a function that characterizes whether to display an element related to the next page data. Wherein the element related to the next page data may include at least one of: an element for characterizing whether the next page of data exists, an element for characterizing the progress of page loading (e.g., a percentage or progress bar), and a paging cursor corresponding to the data to be displayed.
With continued reference to fig. 3, fig. 3 is a schematic view of an application scenario of the Android-based paginated page display method according to the embodiment of the present application. In the application scenario of fig. 3, a user 301 views web page information using a terminal device 302. The terminal apparatus 302 first acquires the paginated page data 303 from a server (not shown in the figure). The paginated page data 303 may include data to be displayed of each page and an identifier for indicating whether a next page including the data still exists. In response to acquiring the page 3 page data, the terminal device 302 calls the data rendering interface 304 representing that the data loading is completed, so as to display the element 3041. According to the identifier that the representation corresponding to the page 3 data has page 4 data, the terminal device 302 calls the user interface display interface 305 representing the display of "next page" to display the element 3051.
At present, in one of the prior art, when pages of each page are loaded, display logic such as whether display data exists or whether more data are loaded needs to be implemented again and the display pages need to be updated, and the development efficiency is low due to the need of repeatedly writing the execution logic. According to the method provided by the embodiment of the application, the repeated development of the general logic displayed on each paging page is reduced by calling the matched data rendering interface and the user interface display interface, so that the development efficiency is improved.
With further reference to fig. 4, a flow 400 of yet another embodiment of an Android-based paginated page displaying method is shown. The process 400 of the Android-based paginated page display method comprises the following steps:
step 401, create a load data class.
Step 402, obtaining a data loading function in the Presenter base class.
In this embodiment, an execution subject of the Android-based pagination page display method (e.g., the terminal devices 101, 102, and 103 shown in fig. 1) may acquire a data loading function (e.g., a loadList method) in the Presenter base class in a wired connection manner or a wireless connection manner. The data loading function in the Presenter base class may include a lambda expression whose return value is the object of the loaded data class. As an example, the data loading function may be: + < Resp > loadList (isRefresh: Boolean, Observable: Observable < Resp >, map (Resp) - > LoadmureInfo < Item >). The loadList method may include a generic type, i.e., a Response type. The parameter of the lambda expression may be a general type of Response, and the return value may be a loadMoreinfo object instance.
In this embodiment, as an example, the execution subject may locally acquire a data loading function in the pre-stored Presenter base. As yet another example, the execution principal may obtain the data loading function in the Presenter base class from an electronic device (e.g., server 105 shown in fig. 1) communicatively coupled thereto.
In step 403, paging page data is obtained through a data loading function.
In this embodiment, the execution agent may obtain the paged page data through the data loading function obtained in step 402. The obtaining manner may be consistent with the data loading logic indicated by the data loading function obtained in step 402.
And step 404, calling a matched data rendering interface from preset data rendering interfaces according to whether the data to be displayed of the paginated page data is empty or not.
And step 405, calling a matched user interface display interface from a preset user interface display interface according to the identifier for representing whether more data exist, so as to update the user interface.
Step 401, step 404, and step 405 are respectively consistent with the optional implementation manner, step 202, step 203, and optional implementation manner thereof in step 201 in the foregoing embodiment, and the above description for the optional implementation manner, step 202, step 203, and optional implementation manner thereof in step 201 also applies to step 401, step 404, and step 405, and is not described herein again.
In some optional implementations of this embodiment, the preset user interface display interface may include a function that characterizes whether to display an element related to the next page data. The above-mentioned elements related to the next page data may include at least one of: the page display device comprises an element for representing whether next page data exists, an element for representing page loading progress and a paging vernier corresponding to data to be displayed.
As can be seen from fig. 4, the flow 400 of the Android-based pagination page display method in this embodiment embodies a step of obtaining pagination page data through a data loading function including a lambda expression whose return value is an object of a loading data class in the Presenter base class. Therefore, the scheme described in this embodiment can directly return the type of the subclass through the lambda expression, so that the encapsulation of the specific logic for obtaining the paged data of the pages under the MVP architecture is realized, therefore, developers can inherit the preset base class to realize the loading method and the rendering logic of the developers, and the development efficiency is greatly improved.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present application provides an embodiment of an Android-based paginated page display apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2 or fig. 4, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the Android-based paginated page display device 500 provided by the embodiment includes an obtaining unit 501, a first calling unit 502 and a second calling unit 503. The obtaining unit 501 is configured to obtain paginated page data, where the paginated page data includes data to be displayed and an identifier for representing whether more data exists; a first calling unit 502 configured to call a matched data rendering interface from preset data rendering interfaces according to whether data to be displayed of the paginated page data is empty; a second calling unit 503 configured to call the matched user interface display interface from the preset user interface display interface according to the identifier for characterizing whether the data has more data, so as to update the user interface, wherein the user interface includes an element for characterizing whether the loading of the data is allowed.
In this embodiment, in the Android-based paginated page display device 500: the specific processing of the obtaining unit 501, the first calling unit 502, and the second calling unit 503 and the technical effects thereof can refer to the related descriptions of step 201, step 202, and step 203 in the corresponding embodiment of fig. 2, which are not described herein again.
In some optional implementation manners of this embodiment, the obtaining unit 501 may include: a creating module (not shown in the figure), and an obtaining module (not shown in the figure). Wherein the creating module may be configured to create a load data class. The load data class may include a field for representing data to be displayed and a field for representing whether there is more data. The obtaining module may be configured to obtain paged page data that is an object of the load data class.
In some optional implementation manners of this embodiment, the preset data rendering interface may include a function in the View base class that characterizes data loading success and a function that characterizes data loading failure.
In some optional implementations of this embodiment, the obtaining module may include a first obtaining sub-module (not shown in the figure) and a second obtaining sub-module (not shown in the figure). The first obtaining submodule may be configured to obtain a data loading function in the Presenter base class. The data load function may include a lambda expression that returns an object whose value is a load data class. The second obtaining submodule may be configured to obtain the paged page data through a data loading function.
In some optional implementations of this embodiment, the preset user interface display interface may include a function that characterizes whether to display an element related to the next page data. The above-mentioned elements related to the next page data may include at least one of: the page display device comprises an element for representing whether next page data exists, an element for representing page loading progress and a paging vernier corresponding to data to be displayed.
The apparatus provided in the above embodiment of the present application first obtains paged page data through the obtaining unit 501. The pagination page data comprises data to be displayed and an identifier for representing whether more data exist. Then, the first calling unit 502 calls a matched data rendering interface from the preset data rendering interfaces according to whether the data to be displayed of the paged page data is empty. Finally, the second invoking unit 503 invokes a matched user interface display interface from a preset user interface display interface according to the identifier for representing whether there is more data, so as to update the user interface. Wherein the user interface comprises an element for characterizing whether loading of more data is allowed. Therefore, by calling the matched data rendering interface and the user interface display interface, repeated development of general logic displayed on each paging page is reduced, and development efficiency is improved.
Referring now to fig. 6, shown is a schematic diagram of an electronic device (e.g., the terminal device in fig. 1) 600 suitable for implementing embodiments of the present application. The terminal device in the embodiments of the present application may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, a Flash memory Card (Flash Card); and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present application.
It should be noted that the computer readable medium described in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be included in the terminal device; or may exist separately without being assembled into the terminal device. The computer readable medium carries one or more programs which, when executed by the terminal device, cause the terminal device to: acquiring paging page data, wherein the paging page data comprises data to be displayed and an identifier for representing whether more data exist; calling a matched data rendering interface from preset data rendering interfaces according to whether the data to be displayed of the paging page data is empty or not; and calling the matched user interface display interface from the preset user interface display interface according to the identification for representing whether more data exists or not so as to update the user interface, wherein the user interface comprises an element for representing whether more data is allowed to be loaded or not.
Computer program code for carrying out operations for embodiments of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor comprises an acquisition unit, a first calling unit and a second calling unit. The names of these units do not form a limitation on the units themselves in some cases, for example, the acquiring unit may also be described as a unit for acquiring paginated page data, wherein the paginated page data includes data to be displayed and an identifier for representing whether more data exists.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present application is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) the features with similar functions disclosed in the embodiments of the present application are mutually replaced to form the technical solution.

Claims (10)

1. A paging page display method based on Android comprises the following steps:
obtaining paging page data, wherein the paging page data comprises data to be displayed and an identifier for representing whether more data exist;
calling a matched data rendering interface from preset data rendering interfaces according to whether the data to be displayed of the paging page data is empty or not;
and calling a matched user interface display interface from a preset user interface display interface according to the identifier for representing whether more data exists or not so as to update the user interface, wherein the user interface comprises an element for representing whether more data is allowed to be loaded or not.
2. The method of claim 1, wherein the obtaining paginated page data comprises:
creating a loading data class, wherein the loading data class comprises a field for representing data to be displayed and a field for representing whether more data exists;
and acquiring paging page data which is the object of the loading data class.
3. The method of claim 2, wherein the preset data rendering interface comprises a function in the View base class for characterizing data loading success and a function for characterizing data loading failure.
4. The method of claim 2, wherein the obtaining paged page data that is an object of the load data class comprises:
acquiring a data loading function in a Presensor base class, wherein the data loading function comprises a lambda expression of which the return value is an object of the loaded data class;
and acquiring the paging page data through the data loading function.
5. The method according to one of claims 1 to 4, wherein the preset user interface display interface comprises a function characterizing whether to display elements related to next page data, the elements related to next page data comprising at least one of: the page display device comprises an element for representing whether next page data exists, an element for representing page loading progress and a paging vernier corresponding to data to be displayed.
6. A paging page display device based on Android comprises:
the display device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is configured to acquire paging page data, and the paging page data comprises data to be displayed and an identifier for representing whether more data exist;
the first calling unit is configured to call a matched data rendering interface from preset data rendering interfaces according to whether data to be displayed of the paging page data is empty or not;
and the second calling unit is configured to call the matched user interface display interface from a preset user interface display interface according to the identification for representing whether more data exists or not so as to update the user interface, wherein the user interface comprises an element for representing whether more data is allowed to be loaded or not.
7. The apparatus of claim 6, wherein the obtaining unit comprises:
a creating module configured to create a load data class, wherein the load data class comprises a field for representing data to be displayed and a field for representing whether more data exists;
an obtaining module configured to obtain paged page data that is an object of the load data class.
8. The apparatus of claim 7, the obtaining module comprising:
the first obtaining submodule is configured to obtain a data loading function in a Presenter base class, wherein the data loading function comprises a lambda expression of which the return value is an object of the loaded data class;
a second obtaining submodule configured to obtain the paged page data through the data loading function.
9. A terminal, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN202010579281.6A 2020-06-23 2020-06-23 Paging page display method and device based on Android Active CN113835790B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010579281.6A CN113835790B (en) 2020-06-23 2020-06-23 Paging page display method and device based on Android

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010579281.6A CN113835790B (en) 2020-06-23 2020-06-23 Paging page display method and device based on Android

Publications (2)

Publication Number Publication Date
CN113835790A true CN113835790A (en) 2021-12-24
CN113835790B CN113835790B (en) 2024-03-19

Family

ID=78963941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010579281.6A Active CN113835790B (en) 2020-06-23 2020-06-23 Paging page display method and device based on Android

Country Status (1)

Country Link
CN (1) CN113835790B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816586A (en) * 2022-06-28 2022-07-29 深圳高灯计算机科技有限公司 Visible data loading method and device, computer equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100017702A1 (en) * 2008-07-16 2010-01-21 International Business Machines Corporation Asynchronous Partial Page Updates Based On Dynamic Dependency Calculation
CN105069043A (en) * 2015-07-23 2015-11-18 上海斐讯数据通信技术有限公司 Paging reading method and system for web data information
CN105608196A (en) * 2015-12-22 2016-05-25 国云科技股份有限公司 Paging method based on HTML fragmenting technology
CN106874010A (en) * 2017-02-28 2017-06-20 山东大学 A kind of method of the quick paging loadings of ListView in android system
US20170293593A1 (en) * 2016-04-12 2017-10-12 International Business Machines Corporation Managing node pagination for a graph data set
CN108829311A (en) * 2017-04-27 2018-11-16 北京京东尚科信息技术有限公司 A kind of method and apparatus based on Widget display data
CN109656637A (en) * 2018-12-13 2019-04-19 高新兴科技集团股份有限公司 Cross-platform rendering method, device and the computer storage medium for calling OpenGL ES
CN109684000A (en) * 2018-09-07 2019-04-26 平安科技(深圳)有限公司 APP data display method, device, equipment and computer readable storage medium
CN109684578A (en) * 2018-12-28 2019-04-26 北京字节跳动网络技术有限公司 Method and apparatus for showing information
CN109840115A (en) * 2017-11-27 2019-06-04 中移(杭州)信息技术有限公司 RecyclerView paging loading method and device in a kind of android system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100017702A1 (en) * 2008-07-16 2010-01-21 International Business Machines Corporation Asynchronous Partial Page Updates Based On Dynamic Dependency Calculation
CN105069043A (en) * 2015-07-23 2015-11-18 上海斐讯数据通信技术有限公司 Paging reading method and system for web data information
CN105608196A (en) * 2015-12-22 2016-05-25 国云科技股份有限公司 Paging method based on HTML fragmenting technology
US20170293593A1 (en) * 2016-04-12 2017-10-12 International Business Machines Corporation Managing node pagination for a graph data set
CN106874010A (en) * 2017-02-28 2017-06-20 山东大学 A kind of method of the quick paging loadings of ListView in android system
CN108829311A (en) * 2017-04-27 2018-11-16 北京京东尚科信息技术有限公司 A kind of method and apparatus based on Widget display data
CN109840115A (en) * 2017-11-27 2019-06-04 中移(杭州)信息技术有限公司 RecyclerView paging loading method and device in a kind of android system
CN109684000A (en) * 2018-09-07 2019-04-26 平安科技(深圳)有限公司 APP data display method, device, equipment and computer readable storage medium
CN109656637A (en) * 2018-12-13 2019-04-19 高新兴科技集团股份有限公司 Cross-platform rendering method, device and the computer storage medium for calling OpenGL ES
CN109684578A (en) * 2018-12-28 2019-04-26 北京字节跳动网络技术有限公司 Method and apparatus for showing information

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816586A (en) * 2022-06-28 2022-07-29 深圳高灯计算机科技有限公司 Visible data loading method and device, computer equipment and storage medium
CN114816586B (en) * 2022-06-28 2022-09-27 深圳高灯计算机科技有限公司 Visible data loading method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113835790B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN111581555B (en) Document loading method, device, equipment and storage medium
CN111443909B (en) Method and device for generating page
CN110618768B (en) Information presentation method and device
CN111273830A (en) Data display method and device, electronic equipment and computer readable medium
CN113760438A (en) Page display method and device for webpage application
CN111324376B (en) Function configuration method, device, electronic equipment and computer readable medium
CN113835790B (en) Paging page display method and device based on Android
CN110069186B (en) Method and equipment for displaying operation interface of application
CN110618811B (en) Information presentation method and device
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN111309406A (en) Event processing method and device of application program and electronic equipment
CN111290812B (en) Display method, device, terminal and storage medium of application control
CN113778566A (en) Native application calling method and device, electronic equipment and computer readable medium
CN109669720B (en) Chain type asynchronous request processing method and device based on Promise and electronic equipment
CN112230986A (en) Project file generation method and device, electronic equipment and computer readable medium
CN109669679B (en) Service detection and processing method and device and electronic equipment
CN113296771A (en) Page display method, device, equipment and computer readable medium
CN111753238A (en) Data mapping method and device and electronic equipment
CN112306317A (en) Unread message notification method and device and electronic equipment
CN111324349A (en) Method, device, terminal and storage medium for generating interactive interface
CN113220293B (en) Page display method, page display device, electronic equipment and computer readable medium
CN112688863B (en) Gateway data processing method and device and electronic equipment
CN110086880B (en) Method and apparatus for creating instances of network requests
CN112346728B (en) Device adaptation method, apparatus, device and computer readable medium
CN110099122B (en) Method and apparatus for sending network request

Legal Events

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