CN113835790B - 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
CN113835790B
CN113835790B CN202010579281.6A CN202010579281A CN113835790B CN 113835790 B CN113835790 B CN 113835790B CN 202010579281 A CN202010579281 A CN 202010579281A CN 113835790 B CN113835790 B CN 113835790B
Authority
CN
China
Prior art keywords
data
page
user interface
interface
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.)
Active
Application number
CN202010579281.6A
Other languages
Chinese (zh)
Other versions
CN113835790A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application discloses a paging page display method and device based on Android. One embodiment of the method comprises the following steps: acquiring paging page data, wherein the paging page data comprises data to be displayed and a mark for representing whether the data have more data; according to whether the data to be displayed of the paged page data is empty or not, calling a matched data rendering interface from a preset data rendering interface; and calling a matched user interface display interface from a preset user interface display interface according to the identification for representing whether the user interface has more data so as to update the user interface, wherein the user interface comprises an element for representing whether the user interface is allowed to load more data. The implementation reduces repeated development of the 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 also becoming more and more widespread. On the premise that the type of the returned result cannot be known, the returned result of the server side of the paging interface of the mobile gateway cannot be distinguished from the returned results of the server sides of other interfaces, so that the general logic of the paging loading cannot be packaged in a manner of directly applying the sub-class inheritance base class.
Currently, the related method is to re-implement display logic for whether to have display data and whether to load more data when loading pages of each page, and update the display page, so as to implement display of the pages of each 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 an Android-based paging page display method, where the method includes: acquiring paging page data, wherein the paging page data comprises data to be displayed and a mark for representing whether the data have more data; according to whether the data to be displayed of the paged page data is empty or not, calling a matched data rendering interface from a preset data rendering interface; and calling a matched user interface display interface from a preset user interface display interface according to the identification for representing whether the user interface has more data so as to update the user interface, wherein the user interface comprises elements for representing whether the user interface is allowed to load more data.
In some embodiments, the acquiring the 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 the data has more data; paged page data that is an object of the load dataclass is acquired.
In some embodiments, the preset data rendering interface includes a function indicating that the data loading is successful and a function indicating that the data loading is failed in the View base class.
In some embodiments, the obtaining the paged page data as the object of the loaded data class includes: obtaining a data loading function in the Presenter base class, wherein the data loading function comprises a lambda expression (lambda expression) with a return value of an object loading the data class; paging page data is obtained through a data loading function.
In some embodiments, the preset user interface display interface includes a function that characterizes whether to display elements related to next page data, the elements related to next page data including at least one of: the page cursor display device comprises an element for representing whether next page data exists, an element for representing page loading progress and a page cursor corresponding to data to be displayed.
In a second aspect, an embodiment of the present application provides an Android-based paged page display device, where the device includes: the 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 identification for representing whether the data have more data; the first calling unit is configured to call a matched data rendering interface from a preset data rendering interface according to whether the data to be displayed of the paged page data is empty or not; and a second calling unit configured to call a matched user interface display interface from a preset user interface display interface according to the identification for representing whether the user interface has more data or not so as to update the user interface, wherein the user interface comprises an element for representing whether the user interface is allowed to load more data or not.
In some embodiments, the acquiring unit includes: a creation module configured to create a load data class, wherein the load data class includes a field for characterizing data to be displayed and a field for characterizing whether there is more data; and the acquisition module is configured to acquire paging page data serving as an object of the loading data class.
In some embodiments, the preset data rendering interface includes a function indicating that the data loading is successful and a function indicating that the data loading is failed in the View base class.
In some embodiments, the acquiring module includes: a first acquisition sub-module configured to acquire a data loading function in the Presenter base class, wherein the data loading function comprises a lambda expression with a return value being an object loading the data class; and the second acquisition sub-module is configured to acquire the paging page data through the data loading function.
In some embodiments, the preset user interface display interface includes a function that characterizes whether to display elements related to next page data, the elements related to next page data including at least one of: the page cursor display device comprises an element for representing whether next page data exists, an element for representing page loading progress and a page cursor corresponding to data to be displayed.
In a third aspect, an embodiment of the present application provides a terminal, including: one or more processors; a storage device having one or more programs stored thereon; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described in any of the implementations of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a method as described in any of the implementations of the first aspect.
According to the Android-based paging page display method and device, paging page data are acquired first. The paging page data comprises data to be displayed and an identification for representing whether the paging page data has more data. And then, according to whether the data to be displayed of the paged page data is empty, calling a matched data rendering interface from the preset data rendering interfaces. And finally, calling the matched user interface display interface from the preset user interface display interface according to the identification for representing whether the user interface has 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.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings, in which:
FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present application may be applied;
FIG. 2 is a flow chart of one embodiment of an Android-based paged page display method according to the present application;
FIG. 3 is a schematic diagram of an application scenario of an Android-based paginated page display method according to embodiments of the present application;
FIG. 4 is a flow chart of yet another embodiment of an Android-based paged page display method according to the present application;
FIG. 5 is a schematic diagram illustrating one embodiment of an Android-based paged page display device according to the present application;
fig. 6 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present application.
Detailed Description
The present application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary architecture 100 to which the Android-based paged page display method or the Android-based paged page display device of the present application may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 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 smartphones, tablet computers, electronic book readers, laptop and desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., software or software modules for providing distributed services) or as a single software or software module. The present invention 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 can analyze the page to be displayed and the like, and feed back the processing result (such as paging page data) to the terminal device.
The server may be hardware or software. When the server is hardware, the server may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (e.g., software or software modules for providing distributed services), or as a single software or software module. The present invention is not particularly limited herein.
It should be noted that, the Android-based paging page display method provided in the embodiments of the present application is generally executed by the terminal devices 101, 102, 103, and accordingly, the Android-based paging page display device is generally set in the terminal devices 101, 102, 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 flow 200 of one embodiment of an Android-based paged page display method in accordance with the present application is shown. The Android-based paging page display method comprises the following steps of:
step 201, obtaining paging page data.
In this embodiment, the execution body (such as the terminal devices 101, 102, 103 shown in fig. 1) of the Android-based paging page display method may acquire paging page data through a wired connection manner or a wireless connection manner. The paging page data may include data to be displayed and an identifier for indicating whether the paging page data has more data. The data to be displayed generally corresponds to a cursor. As an example, the execution body may obtain the page data of the page stored in advance from the local. As yet another example, the executing entity may obtain the paged page data from an electronic device (e.g., server 105 shown in fig. 1) communicatively coupled thereto.
In some optional implementations of this embodiment, the executing entity may further obtain the paged page data according to the following steps:
first, a load data class is created.
In these implementations, the execution body may first create a load data class (e.g., loadMoreinfo class). The loading data class may include a field (e.g., data) for characterizing data to be displayed and a field (e.g., hasMore) for characterizing whether there is more data. The value corresponding to the field used to characterize the data to be displayed may be consistent with the list of objects by instantiating the load data class. As an example, the fields included in the loading data class that may include a field for characterizing the data to be displayed may be obtained by: +data: list < Item >.
Based on the paging cursor corresponding to the data to be displayed, the loading data class may further include a field for characterizing the paging cursor corresponding to the data to be displayed. Specifically, the value included in the load data class and used for representing the field of the paging cursor corresponding to the data to be displayed may be consistent with the paging cursor corresponding to the paging page data of the object of the load data class by instantiating.
Second, the paged page data, which is the object of the loaded class of data, is acquired.
In these implementations, the execution body may acquire the paged page data, which is the 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 the preset data rendering interfaces.
In this embodiment, the execution body may call the matched data rendering interface from the preset data rendering interfaces in various manners according to whether the data to be displayed of the paged page data is empty. The preset data rendering interface may include an encapsulation 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 body may call a function (e.g., onLoadListFail method) characterizing data loading failure from a preset data rendering interface as the matched data rendering interface. As yet another example, in response to determining that the data to be displayed of the paged page data is not null, the execution body may call a function characterizing that the data is loaded successfully (e.g., onLoadListSuccess method) from a preset data rendering interface as the matched data rendering interface.
In some optional implementations of this embodiment, the preset data rendering interface may include a function indicating that the data loading is successful and a function indicating that the data loading is failed in the View base class based on an Android MVP (Model, view) architecture.
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 for characterizing whether there is more data acquired in step 201, the executing body may call the matched User Interface display Interface from the preset User Interface (UI) display Interface in various manners to update the User Interface. Wherein the preset user interface display interface may include an element (e.g., a "next page" control) for characterizing whether loading of more data is allowed.
In some optional implementations of this embodiment, the preset user interface display interface may include a function that characterizes whether to display elements associated with the next page of data. Wherein, the element related to the next page data may include at least one of the following: an element for indicating whether or not there is next page data, an element (e.g., a percentage or progress bar) indicating the progress of page loading, and a paging cursor corresponding to data to be displayed.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the Android-based paginated page display method according to an 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 device 302 first acquires the paged page data 303 from a server (not shown in the figure). The paged page data 303 may include data to be displayed of each page and an identifier for indicating whether there is a next page including the data. In response to acquiring page 3 data, the terminal device 302 invokes the data rendering interface 304 that characterizes the completion of the data loading to display the element 3041. According to the identity corresponding to page 3 page data representing page 4 data, the terminal device 302 invokes the user interface display interface 305 representing display "next page" to display element 3051.
Currently, in the prior art, when loading pages of each page, it is generally required to re-implement display logic for whether to have display data and whether to load more data, and update the display page, and the development efficiency is low due to the need of repeatedly writing the execution logic. By calling the matched data rendering interface and the user interface display interface, the method provided by the embodiment of the application reduces repeated development of the general logic for displaying each paginated page, thereby improving the development efficiency.
With further reference to FIG. 4, a flow 400 of yet another embodiment of an Android-based paged page display method is shown. The process 400 of the Android-based paging page display method includes the following steps:
in step 401, a load data class is created.
Step 402, a data loading function in the Presenter base class is obtained.
In this embodiment, the execution body (for example, the terminal devices 101, 102, 103 shown in fig. 1) of the paging page display method based on Android may acquire a data loading function (for example, loadList method) in the Presenter base class through a wired connection manner or a wireless connection manner. Wherein, 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 described above may be: < Resp > loadList (isRefresh: boolean, observable: observable < Resp >, map (Resp) - > loadMoreinfo < Item >). The loadList method may include a generic type, i.e., a Response type. The parameters of the lambda expression may be the Response's generic type, and its return value may typically be the loadMoreinfo object instance.
In this embodiment, the execution body may obtain the data loading function in the pre-stored Presenter base class from the local as an example. As yet another example, the execution body may obtain the data loading function in the Presenter base class from an electronic device (e.g., server 105 shown in fig. 1) communicatively connected thereto.
Step 403, obtaining the paging page data through the data loading function.
In this embodiment, the execution body may obtain the paged page data through the data loading function obtained in the step 402. The acquiring manner may be consistent with the data loading logic indicated by the data loading function acquired in step 402.
And step 404, calling 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 or not.
Step 405, according to the identification for representing whether there is more data, calling the matched user interface display interface from the preset user interface display interface to update the user interface.
The above steps 401, 404, and 405 are respectively consistent with the optional implementation manners in step 201, step 202, step 203, and optional implementation manners in the foregoing embodiments, and the descriptions of the optional implementation manners in step 201, step 202, step 203, and optional implementation manners in step 203 are also applicable to step 401, step 404, and step 405, which are not repeated herein.
In some optional implementations of this embodiment, the preset user interface display interface may include a function that characterizes whether to display elements associated with the next page of data. The element related to the next page of data may include at least one of: the page cursor display device comprises an element for representing whether next page data exists, an element for representing page loading progress and a page cursor corresponding to data to be displayed.
As can be seen from fig. 4, the flow 400 of the Android-based paged page display method in this embodiment represents the step of obtaining paged page data by a data loading function in the Presenter base class that includes a lambda expression whose return value is the object of the loaded data class. Therefore, the scheme described in this embodiment can directly return the types of the subclasses through the lambda expression, so that the encapsulation of the specific logic for acquiring the paged page data under the MVP architecture is realized, and therefore, a developer can realize the loading method and the rendering logic by inheriting the preset base class, thereby greatly improving the development efficiency.
With further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present application provides an embodiment of an Android-based paged page display device, where the embodiment of the device corresponds to the embodiment of the method shown in fig. 2 or fig. 4, and the device may be specifically applied to various electronic devices.
As shown in fig. 5, the Android-based paged page display device 500 provided in this embodiment includes an obtaining unit 501, a first calling unit 502, and a second calling unit 503. The acquiring unit 501 is configured to acquire paging page data, where the paging page data includes data to be displayed and an identifier for characterizing whether there is more data; the first calling unit 502 is configured to call a matched data rendering interface from preset data rendering interfaces according to whether the data to be displayed of the paged page data is empty or not; a second invoking unit 503 is configured to invoke a matched user interface display interface from a preset user interface display interface according to the identification for characterizing whether there is more data, to update the user interface, wherein the user interface comprises an element for characterizing whether loading of more data is allowed.
In this embodiment, in the Android-based paged page display device 500: the specific processes of the obtaining unit 501, the first invoking unit 502 and the second invoking unit 503 and the technical effects thereof may refer to the descriptions related to step 201, step 202 and step 203 in the corresponding embodiment of fig. 2, and are not repeated herein.
In some optional implementations of this embodiment, the acquiring unit 501 may include: a creation module (not shown), an acquisition module (not shown). Wherein the creation module may be configured to create a load data class. The loading data class may include a field for characterizing data to be displayed and a field for characterizing whether there is more data. The above-described acquisition module may be configured to acquire paged page data that is an object of the loaded dataclass.
In some optional implementations of this embodiment, the preset data rendering interface may include a function indicating that the data loading is successful and a function indicating that the data loading is failed in the View base class.
In some optional implementations of this embodiment, the acquisition module may include a first acquisition sub-module (not shown in the figure) and a second acquisition 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 loading function may include a lambda expression whose return value is the object of the loaded data class. The second acquiring submodule may be configured to acquire the paged page data through the 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 elements associated with the next page of data. The element related to the next page of data may include at least one of: the page cursor display device comprises an element for representing whether next page data exists, an element for representing page loading progress and a page cursor corresponding to data to be displayed.
The apparatus provided in the above embodiment of the present application first acquires the paged page data through the acquisition unit 501. The paging page data comprises data to be displayed and an identification for representing whether the paging page data has more data. Then, the first calling unit 502 calls the 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 calling unit 503 calls the matched user interface display interface from the preset user interface display interface according to the identifier for characterizing 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, a schematic diagram of a configuration of an electronic device (e.g., the terminal device of fig. 1) 600 suitable for use in implementing embodiments of the present application is shown. The terminal device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The terminal device shown in fig. 6 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to 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 required 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 through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a liquid crystal display (LCD, liquid Crystal Display), a speaker, a vibrator, and the like; storage 608 including, for example, a Flash 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 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 6 may represent one device or a plurality of devices as needed.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts 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 shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present application are performed when the computer program is executed by the processing means 601.
It should be noted that, the computer readable medium according to 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. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 the context of the present 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. Whereas in embodiments of the present application, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (Radio Frequency), and the like, or any suitable combination thereof.
The computer readable medium may be contained in the terminal device; or may exist alone without being fitted 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 a mark for representing whether the data have more data; according to whether the data to be displayed of the paged page data is empty or not, calling a matched data rendering interface from a preset data rendering interface; and calling a matched user interface display interface from a preset user interface display interface according to the identification for representing whether the user interface has more data so as to update the user interface, wherein the user interface comprises elements for representing whether the user interface is allowed to load more data.
Computer program code for carrying out operations for embodiments of the present application may be written in 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware. The described units may also be provided in a processor, for example, described as: a processor includes an acquisition unit, a first call unit, and a second call unit. The names of these units do not in some cases limit the unit itself, for example, the acquisition unit may also be described as "a unit that acquires page data, where the page data includes data to be displayed and an identification for characterizing whether there is more data.
The foregoing description is only of the preferred embodiments of the present application and is presented as a description of the principles of the technology being utilized. 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 technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the technical solution formed by mutually replacing the above features and the technical features with similar functions (but not limited to) disclosed in the embodiments of the present application.

Claims (10)

1. An Android-based paging page display method comprises the following steps:
acquiring paging page data, wherein the paging page data comprises data to be displayed and a mark for representing whether the data have more data;
according to whether the data to be displayed of the paginated page data is empty or not, calling a matched data rendering interface from a preset data rendering interface; the method comprises the steps of responding to the fact that data to be displayed of the paged page data are empty, and calling a function representing data loading failure from a preset data rendering interface to serve as the matched data rendering interface; in response to determining that the data to be displayed of the paged page data is not empty, calling a function representing successful data loading from a preset data rendering interface as the matched data rendering interface;
and calling a matched user interface display interface from a preset user interface display interface according to the identification for representing whether the user interface has more data so as to update the user interface, wherein the user interface comprises elements for representing whether the user interface is allowed to load more data.
2. The method of claim 1, wherein the obtaining paged 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 the data has more data;
paging page data serving as an object of the loading data class is acquired.
3. The method of claim 2, wherein the preset data rendering interface includes a function indicating successful data loading and a function indicating failed data loading in a View base class.
4. The method of claim 2, wherein the obtaining paged page data that is the object of the load dataclass comprises:
obtaining a data loading function in a Presenter base class, wherein the data loading function comprises a lambda expression with a return value being 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-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 cursor display device comprises an element for representing whether next page data exists, an element for representing page loading progress and a page cursor corresponding to data to be displayed.
6. An Android-based paged page display device, comprising:
the 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 the data have more data;
the first calling unit is configured to call a matched data rendering interface from a preset data rendering interface according to whether the data to be displayed of the paged page data is empty or not; the method comprises the steps of responding to the fact that data to be displayed of the paged page data are empty, and calling a function representing data loading failure from a preset data rendering interface to serve as the matched data rendering interface; in response to determining that the data to be displayed of the paged page data is not empty, calling a function representing successful data loading from a preset data rendering interface as the matched data rendering interface;
and the second calling unit is configured to call a matched user interface display interface from a preset user interface display interface according to the identification for representing whether the user interface has more data so as to update the user interface, wherein the user interface comprises an element for representing whether the user interface is allowed to load more data.
7. The apparatus of claim 6, wherein the acquisition unit comprises:
a creation module configured to create a loaded data class, wherein the loaded data class includes a field for characterizing data to be displayed and a field for characterizing whether there is more data;
and the acquisition module is configured to acquire paging page data serving as an object of the loading data class.
8. The apparatus of claim 7, the acquisition module comprising:
a first acquisition sub-module configured to acquire a data loading function in a Presenter base class, wherein the data loading function comprises a lambda expression with a return value of an object of the loaded data class;
and the second acquisition sub-module is configured to acquire the paging 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, causes the one or more processors to implement the method of any of claims 1-5.
10. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any 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 CN113835790A (en) 2021-12-24
CN113835790B true 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)

Families Citing this family (1)

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

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
CN109684578A (en) * 2018-12-28 2019-04-26 北京字节跳动网络技术有限公司 Method and apparatus for showing information
CN109684000A (en) * 2018-09-07 2019-04-26 平安科技(深圳)有限公司 APP data display method, device, equipment and computer readable storage medium
CN109840115A (en) * 2017-11-27 2019-06-04 中移(杭州)信息技术有限公司 RecyclerView paging loading method and device in a kind of android system

Family Cites Families (2)

* 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
US20170293593A1 (en) * 2016-04-12 2017-10-12 International Business Machines Corporation Managing node pagination for a graph data set

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Also Published As

Publication number Publication date
CN113835790A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
CN111443909B (en) Method and device for generating page
CN110069308B (en) Page starting method and device, electronic equipment and storage medium
CN111555940A (en) Client test method and device, electronic equipment and computer readable storage medium
CN111581555B (en) Document loading method, device, equipment and storage medium
CN111324376B (en) Function configuration method, device, electronic equipment and computer readable medium
CN111273830A (en) Data display method and device, electronic equipment and computer readable medium
CN112965916B (en) Page testing method, page testing device, electronic equipment and readable storage medium
CN113835790B (en) Paging page display method and device based on Android
CN111580883B (en) Application program starting method, device, computer system and medium
CN110442416B (en) Method, electronic device and computer-readable medium for presenting information
CN110069186B (en) Method and equipment for displaying operation interface of application
CN110618811B (en) Information presentation method and device
CN111309406A (en) Event processing method and device of application program and electronic equipment
CN111177634A (en) Multi-language supporting file content loading method, device, equipment and medium
CN111290812B (en) Display method, device, terminal and storage medium of application control
CN113672317B (en) Method and device for rendering topic pages
CN110086880B (en) Method and apparatus for creating instances of network requests
CN113704079B (en) Protobuf-based interface testing method and device
CN109669679B (en) Service detection and processing method and device and electronic equipment
CN115373869A (en) Process processing method and device based on AAR and electronic equipment
CN113296771A (en) Page display method, device, equipment and computer readable medium
CN112306317A (en) Unread message notification method and device and electronic equipment
CN113220293B (en) Page display method, page display device, electronic equipment and computer readable medium
CN110099122B (en) Method and apparatus for sending network request
CN112688863B (en) Gateway data processing method and device and electronic equipment

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