CN110618772B - View adding method, device, equipment and storage medium - Google Patents

View adding method, device, equipment and storage medium Download PDF

Info

Publication number
CN110618772B
CN110618772B CN201811513807.XA CN201811513807A CN110618772B CN 110618772 B CN110618772 B CN 110618772B CN 201811513807 A CN201811513807 A CN 201811513807A CN 110618772 B CN110618772 B CN 110618772B
Authority
CN
China
Prior art keywords
view
sub
data
rendering
display content
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
CN201811513807.XA
Other languages
Chinese (zh)
Other versions
CN110618772A (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 Shiguang Renran Technology Co ltd
Original Assignee
Beijing Shiguang Renran 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 Shiguang Renran Technology Co ltd filed Critical Beijing Shiguang Renran Technology Co ltd
Priority to CN201811513807.XA priority Critical patent/CN110618772B/en
Publication of CN110618772A publication Critical patent/CN110618772A/en
Application granted granted Critical
Publication of CN110618772B publication Critical patent/CN110618772B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure discloses a view adding method, a device, equipment and a storage medium, wherein the view adding method comprises the following steps: acquiring data of a sub-view included in a head view in a slidable list view to be displayed, wherein the data includes an identifier of the sub-view and rendering rule data; and requesting the display content data of the sub-view from the server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server. The view adding method, device, terminal and readable medium provided by the embodiment of the disclosure are used for improving the view display efficiency.

Description

View adding method, device, equipment and storage medium
Technical Field
The embodiment of the disclosure relates to computer software technology, and in particular, to a view adding method, device, equipment, and storage medium.
Background
When the page layout is carried out on the intelligent terminal, multiple views can be placed in the same slidable list view for displaying in consideration of various requirements such as reasonable content, attractive layout and the like, and a user can select the current view to be browsed by sliding the screen left and right or sliding the screen up and down.
When a certain view is slid to be displayed, the style of the view (such as a drawing style, a two-drawing style and a graph-text style) is determined firstly, then a rendering rule defined in advance for the view of the style is searched, and the view is rendered and displayed according to the rendering rule.
If a view of a new style needs to be added to an existing slidable list view, the current implementation method is to modify the program code corresponding to the slidable list view, so that the modified program code has a rendering function on the view of the new style.
According to the scheme for adding the new style view into the slidable list view by modifying the original program code of the slidable list view, the expandability is poor, the maintainability of the code is poor along with the continuous expansion of the code, and when a certain view is displayed, the corresponding view rendering rule code needs to be searched from a large amount of codes, so that the workload is large, the time and the labor are consumed, and the view display efficiency is reduced.
Disclosure of Invention
In view of this, the present disclosure provides a view adding method, device, apparatus, and storage medium, which are used to improve view display efficiency.
In a first aspect, an embodiment of the present disclosure provides a view adding method, including:
acquiring data of a sub-view included in a head view in a slidable list view to be displayed, wherein the data includes an identifier of the sub-view and rendering rule data;
and requesting display content data of the sub-view from a server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server.
Optionally, before acquiring data of a sub-view included in a header view in a slidable list view to be displayed, the method includes:
acquiring data of a new view to be added to the slidable list view, wherein the data comprises an identifier of the new view and rendering rule data;
adding data of the new view as data of a child view to a head view in the slidable list view.
Optionally, adding the data of the new view as data of a sub-view to a header view in the slidable list view, including:
based on the data of the new view, a predefined interface is called to add the data of the new view as data of a child view to a head view in the slidable list view.
Optionally, the head view includes a plurality of sub-views; requesting display content data of the sub-view from a server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server, including:
requesting display content data of each sub-view from a server based on the identifier of each sub-view in the plurality of sub-views;
and determining the display positions of the multiple sub-views according to the sequence numbers of the multiple sub-views, rendering each sub-view according to the rendering rule data of each sub-view and the display content data of each sub-view returned by the server, and then displaying each sub-view according to the display positions.
Optionally, after rendering and displaying the sub-view, the method further includes:
when a page refreshing trigger event is detected, requesting updated display content data of the sub-view from a server based on the identifier of the sub-view, and re-rendering and displaying the sub-view according to the rendering rule data and the updated display content data returned by the server; and/or the presence of a gas in the gas,
and when a page destruction triggering event is detected, executing destruction operation on the sub-view and releasing the memory resources occupied by the sub-view.
Optionally, the slidable list view includes: list view ListView and recycle view RecycleView; the head view is HeadView. .
In a second aspect, an embodiment of the present disclosure provides a view adding apparatus, including:
the system comprises a sub-view data acquisition module, a display module and a display module, wherein the sub-view data acquisition module is used for acquiring data of a sub-view included in a head view in a slidable list view to be displayed, and the data comprises an identifier of the sub-view and rendering rule data;
and the sub-view rendering module is used for requesting the display content data of the sub-view from a server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server.
Optionally, the view adding apparatus further includes:
a new view data acquisition module, configured to acquire data of a new view that needs to be added to the slidable list view, where the data includes an identifier of the new view and rendering rule data;
and the new view adding module is used for adding the data of the new view as the data of the sub-view into the head view in the slidable list view.
In a third aspect, an embodiment of the present disclosure provides a terminal device, including:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a view addition method as in any embodiment of the present disclosure.
In a fourth aspect, the embodiments of the present disclosure provide a computer storage medium, on which a computer program is stored, which when executed by a processor, implements a view adding method according to any one of the embodiments of the present disclosure.
The view adding method comprises the steps of obtaining data of a sub-view included in a head view in a slidable list view to be displayed, wherein the data comprises an identifier of the sub-view and rendering rule data; and requesting display content data of the sub-view from the server based on the identifier of the sub-view, and rendering and displaying the sub-view according to rendering rule data and the display content data returned by the server, so as to improve the view display efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief description will be given below to the drawings required for the embodiments or the technical solutions in the prior art, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1a is a flow chart of a view adding method provided in the first embodiment of the present disclosure;
FIG. 1b is a schematic diagram illustrating a client interface in a view adding method according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a view adding method provided by the second embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a view adding method provided by a third embodiment of the present disclosure;
fig. 4 shows a schematic structural diagram of a view adding apparatus provided in the fourth embodiment of the present disclosure;
fig. 5 shows a schematic diagram of a hardware structure of a terminal device according to a fifth embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure will be clearly and completely described below through embodiments with reference to the accompanying drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In the following embodiments, optional features and examples are provided in each embodiment, and various features described in the embodiments may be combined to form a plurality of alternatives, and each numbered embodiment should not be regarded as only one technical solution.
Example one
Fig. 1a shows a flowchart of a view adding method provided in an embodiment of the present disclosure, which may be applied to a view adding situation, and the method may be implemented by a terminal, and may specifically be implemented by software and/or hardware in the terminal.
As shown in fig. 1a, the view adding method provided in the embodiment of the present disclosure includes the following steps:
s110, acquiring data of a sub-view included in a head view in the slidable list view to be displayed, wherein the data includes an identifier of the sub-view and rendering rule data.
Wherein the slideable list view comprises a head view and a sub-view of the slideable list view, wherein the head view comprises the sub-view of the head view. When a new view needs to be added to an existing slidable list view, the child view of the slidable list view does not need to be added, and only the child view of the head view needs to be added to the head view, so that the modification operation of the program code corresponding to the slidable list view for adding the child view of the slidable list is avoided.
When the sub-view of the head view is added to the head view, the data of the sub-view included in the head view in the slidable list view to be displayed can be acquired, that is, the data of the sub-view to be added to the head view can be acquired. The terminal device may obtain data of the sub-view included in the header view in the slidable list view to be displayed through accessing a set storage path, and may also obtain data of the sub-view included in the header view in the slidable list view to be displayed through accessing a set protocol interface.
Wherein the data of the sub-view may include an identification of the sub-view and rendering rule data. The sub-view identifier may be information uniquely identifying the sub-view, such as name information, ID information, and/or view address information, and the sub-view name information, ID information, and/or view address information may be a character string composed of numbers, letters, and/or special symbols. The rendering rule data may include data of rendering rules such as shadows, masks, fillets and the like, the rendering rule code compiling may be performed through the obtained rendering rule data, and the rendering of the sub-view to be displayed may be completed by running the rendering rule code.
And S120, requesting the display content data of the sub-view from the server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server.
After receiving the identifier of the sub-view sent by the terminal device, the server can determine the storage address of the display content data of the sub-view through the identifier of the sub-view, acquire the display content data of the sub-view through accessing the storage address, and distribute the display content data of the sub-view to the terminal device.
Rendering and displaying the sub-views according to the rendering rule data and the display content data returned by the server, wherein the display content data can be loaded into the sub-views rendered according to the rendering rule data by the terminal equipment for displaying; the terminal equipment can also load the display content data to the sub-view, and then render the sub-view according to the rendering rule data; the terminal device may also be configured to render the sub-view according to the rendering rule data while loading the display content data to the sub-view.
Optionally, the head view includes a plurality of sub-views; requesting the display content data of the sub-view from the server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server, wherein the method comprises the following steps:
requesting display content data of each sub-view from a server based on the identification of each sub-view in the plurality of sub-views; and determining the display positions of the multiple sub-views according to the sequence numbers of the multiple sub-views, rendering each sub-view according to the rendering rule data of each sub-view and the display content data of each sub-view returned by the server, and then displaying each sub-view according to the display positions.
When a plurality of sub-views of the head view are added to the head view, the data of the sub-views included in the head view in the slidable list view to be displayed, which is obtained, may include sequence numbers according to the plurality of sub-views in addition to the identifiers of the sub-views in the plurality of sub-views and rendering rule data of the sub-views. According to the sequence numbers of the multiple sub-views, the display positions of the multiple sub-views can be determined, for example, when the sequence numbers of the multiple sub-views are respectively 1, 2 and 3, the sub-view 1, the sub-view 2 and the sub-view 3 can be considered to be sequentially displayed in the head view from top to bottom according to the sequence numbers; that is, the three sub-views are sequentially displayed from top to bottom in the head view of the slidable list view on the page.
After the display position of each sub-view is determined, the display content data of the sub-view is added at each display position, and the sub-views are rendered according to the rendering rule data of each sub-view, so that the adding operation of the plurality of sub-views is realized.
Fig. 1b shows a schematic view of a client interface in a view adding method provided in an embodiment of the present disclosure, where a slidable list view includes a head view 110 and a sub-view 120 of the slidable list view, where the head view 110 includes a sub-view 111 of the head view and a sub-view 112 of the head view. When a new view needs to be added to an existing slidable list view, the child view 120 of the slidable list view does not need to be added, and only the child view of the head view needs to be added to the head view 110, so that the modification operation of the program code corresponding to the slidable list view for adding the child view of the slidable list is avoided.
For example, when the sub-view 113 of the head view and the sub-view 114 of the head view are added to the head view 110, the identifiers, rendering rule data, and sequence numbers of the sub-view 113 and the sub-view 114 may be obtained, respectively. The display positions of the sub-view 113 and the sub-view 114 can be determined to be sequentially displayed below the sub-view 112 according to the sequence numbers; display content data of the server sub-view 113 and sub-view 114 may be requested based on the identification; the sub-view 113 and the sub-view 114 may be rendered, respectively, according to rendering rule data; and respectively loading the display content data of each sub-view at each display position, and rendering the sub-views according to the rendering rule data of each sub-view, thereby realizing the adding operation of the sub-views 113 and 114.
Optionally, the slidable list view includes: list view ListView and recycle view RecycleView; the head view is HeadView. Wherein the sub-views in the head view and the sub-views of the slideable list view may be itemviews.
The view adding method provided by the embodiment of the disclosure obtains data of a child view included in a head view in a slidable list view to be displayed, wherein the data includes an identifier of the child view and rendering rule data; and requesting the display content data of the sub-view from the server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server. When the view needs to be added to the slidable list view, the sub-view of the slidable list view does not need to be added, and only the sub-view of the head view needs to be added to the head view, so that the modification operation of the program code corresponding to the slidable list view for adding the sub-view of the slidable list is avoided, and the view display efficiency is improved.
Example two
On the basis of the above embodiment, how to add data of a new view to a head view before acquiring data of a sub-view included in the head view in a slidable list view to be displayed is further described in this embodiment, which belongs to the same inventive concept as the view adding method proposed in the above embodiment, and technical details that are not described in detail in this embodiment may be referred to in the above embodiment.
Fig. 2 shows a flowchart of a view adding method provided in the second embodiment of the present disclosure. As shown in fig. 2, the view adding method provided in the embodiment of the present disclosure includes the following steps:
s210, acquiring data of a new view which needs to be added into the slidable list view, wherein the data comprises an identifier of the new view and rendering rule data;
s220, adding the data of the new view as the data of the sub-view into a head view in the slidable list view;
s230, acquiring data of a sub-view included in a head view in the slidable list view to be displayed, wherein the data includes an identifier of the sub-view and rendering rule data;
s240, requesting the display content data of the sub-view from the server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server.
Before acquiring data of a sub-view included in a head view in a slidable list view to be displayed, the data of a new view can be added to the head view, so that the terminal device can acquire the data of the new view to be displayed in the head view of the slidable list view.
Optionally, adding the data of the new view as the data of the sub-view to the head view in the slidable list view, including:
based on the data of the new view, a predefined interface is invoked to add the data of the new view as data of a child view to a head view in the slidable list view.
Wherein data of the new view can be added to the head view in the slidable list view by calling a predefined interface. The predefined Interface protocol may be, for example, an http Interface protocol, an Application Programming Interface (API) protocol, or the like.
On the basis of the above embodiment, how to add data of a new view to a head view before acquiring data of a sub-view included in the head view in a slidable list view to be displayed is further described in the present embodiment, which belongs to the same inventive concept as the view adding method proposed in the above embodiment, and technical details that are not described in detail in the present embodiment may refer to the above embodiment, and the present embodiment has the same beneficial effects as the above embodiment.
EXAMPLE III
On the basis of the above embodiment, how to re-render and destroy the sub-view after rendering and displaying the sub-view is further described in the present embodiment, the view adding method provided by the above embodiment is the same inventive concept, and the technical details not described in the present embodiment in detail can be referred to the above embodiment.
Fig. 3 shows a flowchart of a view adding method provided by the third embodiment of the present disclosure. As shown in fig. 3, the view adding method provided in the embodiment of the present disclosure includes the following steps:
s310, acquiring data of a sub-view included in a head view in the slidable list view to be displayed, wherein the data includes an identifier of the sub-view and rendering rule data;
s320, requesting the display content data of the sub-view from the server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server;
s330, when a page refreshing trigger event is detected, requesting updated display content data of the sub-view from the server based on the identifier of the sub-view, and re-rendering and displaying the sub-view according to the rendering rule data and the updated display content data returned by the server; and/or when a page destruction triggering event is detected, executing destruction operation on the sub-view and releasing the memory resource occupied by the sub-view.
The page refresh listener may be predefined to detect a page refresh trigger event, and when the page refresh trigger event is detected, the updated display content data of the child view may be requested from the server based on the acquired identifier of the child view, and the child view may be re-rendered and displayed according to the rendering rule data and the updated display content data returned by the server. The page destruction monitor may be predefined to detect a page destruction trigger event, when the page destruction trigger event is detected, the serial number of the sub-view to be destroyed may be obtained, the position of the sub-view to be destroyed may be determined according to the serial number, and the view destruction method may be invoked to execute destruction operation on the sub-view at the corresponding position and release the memory resource occupied by the sub-view.
On the basis of the above embodiment, how to re-render and destroy the sub-view after rendering and displaying the sub-view is further described in the present embodiment, the same inventive concept as the view adding method proposed in the above embodiment belongs to the same inventive concept, and technical details that are not described in the present embodiment in detail can be referred to the above embodiment, and the present embodiment has the same beneficial effects as the above embodiment.
Example four
Fig. 4 is a schematic structural diagram of a view adding apparatus provided in the fourth embodiment of the present disclosure, where the fourth embodiment of the present disclosure is applicable to a view adding situation.
As shown in fig. 4, the view adding apparatus in the embodiment of the present disclosure includes:
a sub-view data obtaining module 410, configured to obtain data of a sub-view included in a header view in a slidable list view to be displayed, where the data includes an identifier of the sub-view and rendering rule data;
and the sub-view rendering module 420 is configured to request the server for the display content data of the sub-view based on the identifier of the sub-view, and render and display the sub-view according to the rendering rule data and the display content data returned by the server.
Optionally, the view adding apparatus further includes:
the new view data acquisition module is used for acquiring data of a new view which needs to be added into the slidable list view, wherein the data comprises the identification of the new view and rendering rule data;
and the new view adding module is used for adding the data of the new view as the data of the sub-view into the head view in the slidable list view.
Optionally, the new view adding module is specifically configured to:
based on the data of the new view, a predefined interface is invoked to add the data of the new view as data of a child view to a head view in the slidable list view.
Optionally, the head view includes a plurality of sub-views; accordingly, the sub-view rendering module 420 includes:
the display content data request submodule is used for requesting the display content data of each sub-view from the server based on the identification of each sub-view in the plurality of sub-views;
and the sub-view rendering sub-module is used for determining the display positions of the multiple sub-views according to the sequence numbers of the multiple sub-views, rendering each sub-view according to the rendering rule data of each sub-view and the display content data of each sub-view returned by the server, and then displaying each sub-view according to the display positions.
Optionally, the view adding apparatus further includes:
the child view re-rendering module is used for requesting updated display content data of the child view from the server based on the identifier of the child view when a page refreshing trigger event is detected, and re-rendering and displaying the child view according to the rendering rule data and the updated display content data returned by the server;
and the child view destroying module is used for executing destroying operation on the child view and releasing the memory resource occupied by the child view when the page destroying triggering event is detected.
Optionally, the slidable list view includes: list view ListView and recycle view RecycleView; the head view is HeadView.
The view adding apparatus provided by the embodiment of the present disclosure and the view adding method provided by the first to third embodiments belong to the same inventive concept, and technical details that are not described in detail in the embodiment of the present disclosure can be referred to in the first to third embodiments, and the embodiment of the present disclosure and the first to third embodiments have the same beneficial effects.
EXAMPLE five
Fig. 5 shows a schematic diagram of a hardware structure of a terminal device according to a fifth embodiment of the present disclosure. The terminal device in the embodiments of the present disclosure 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 stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device 500 may include a processing means (e.g., central processor, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read-Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 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.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure 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 in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.
The terminal provided by the embodiment of the present disclosure and the view adding method provided by the embodiments one to three belong to the same inventive concept, and technical details that are not described in detail in the embodiment of the present disclosure may be referred to in the embodiments one to three, and the embodiment of the present disclosure and the embodiments one to three have the same advantageous effects.
EXAMPLE six
The disclosed embodiments provide a computer storage medium having stored thereon a computer program that, when executed by a processor, implements the view adding method provided by the above-described embodiments.
It should be noted that the computer storage media described above in this disclosure can be computer readable signal media or computer readable storage media 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 (FLASH), 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 present disclosure, 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 contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either 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 storage may be contained in the electronic device; or may exist separately without being assembled into the electronic device.
The computer stores one or more programs that, when executed by the electronic device, cause the electronic device to: acquiring data of a sub-view included in a head view in a slidable list view to be displayed, wherein the data includes an identifier of the sub-view and rendering rule data; and requesting the display content data of the sub-view from the server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring data of a sub-view included in a head view in a slidable list view to be displayed, wherein the data includes an identifier of the sub-view and rendering rule data; and requesting the display content data of the sub-view from the server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server.
Computer program code for carrying out operations for aspects of the present disclosure 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 disclosure. 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 disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The foregoing description is only exemplary of the preferred embodiments of the disclosure 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 disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (8)

1. A view adding method, comprising:
acquiring data of a sub-view included in a head view in a slidable list view to be displayed, wherein the data includes an identifier of the sub-view and rendering rule data;
requesting display content data of the sub-view from a server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server;
before acquiring data of a sub-view included in a head view in a slidable list view to be displayed, the method comprises the following steps:
acquiring data of a new view to be added to the slidable list view, wherein the data comprises an identifier of the new view and rendering rule data;
adding data of the new view as data of a child view to a head view in the slidable list view.
2. The method of claim 1, wherein adding the data of the new view as data of a child view to a head view in the slidable list view comprises:
based on the data of the new view, a predefined interface is called to add the data of the new view as data of a child view to a head view in the slidable list view.
3. The method of claim 1, wherein the head view comprises a plurality of sub-views; requesting display content data of the sub-view from a server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server, including:
requesting display content data of each sub-view from a server based on the identifier of each sub-view in the plurality of sub-views;
and determining the display positions of the multiple sub-views according to the sequence numbers of the multiple sub-views, rendering each sub-view according to the rendering rule data of each sub-view and the display content data of each sub-view returned by the server, and then displaying each sub-view according to the display positions.
4. The method of claim 1, wherein after rendering and displaying the sub-view, the method further comprises:
when a page refreshing trigger event is detected, requesting updated display content data of the sub-view from a server based on the identifier of the sub-view, and re-rendering and displaying the sub-view according to the rendering rule data and the updated display content data returned by the server; and/or the presence of a gas in the gas,
and when a page destruction triggering event is detected, executing destruction operation on the sub-view and releasing the memory resources occupied by the sub-view.
5. The method of any of claims 1-4, wherein the slidable list view comprises: list view ListView and recycle view RecycleView; the head view is HeadView.
6. A view adding apparatus, comprising:
the system comprises a sub-view data acquisition module, a display module and a display module, wherein the sub-view data acquisition module is used for acquiring data of a sub-view included in a head view in a slidable list view to be displayed, and the data comprises an identifier of the sub-view and rendering rule data;
the sub-view rendering module is used for requesting display content data of the sub-view from a server based on the identifier of the sub-view, and rendering and displaying the sub-view according to the rendering rule data and the display content data returned by the server;
a new view data acquisition module, configured to acquire data of a new view that needs to be added to the slidable list view, where the data includes an identifier of the new view and rendering rule data;
and the new view adding module is used for adding the data of the new view as the data of the sub-view into the head view in the slidable list view.
7. A terminal device, characterized in that the terminal comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the view addition method as recited in any of claims 1-5.
8. A computer storage medium on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the view adding method according to any one of claims 1-5.
CN201811513807.XA 2018-12-11 2018-12-11 View adding method, device, equipment and storage medium Active CN110618772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811513807.XA CN110618772B (en) 2018-12-11 2018-12-11 View adding method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811513807.XA CN110618772B (en) 2018-12-11 2018-12-11 View adding method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110618772A CN110618772A (en) 2019-12-27
CN110618772B true CN110618772B (en) 2021-01-22

Family

ID=68920805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811513807.XA Active CN110618772B (en) 2018-12-11 2018-12-11 View adding method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110618772B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328255A (en) * 2020-10-26 2021-02-05 成都商通时代数字科技有限公司 Page turning refreshing method and refreshing system for universal integrated list based on IOS (input/output system)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106777036A (en) * 2016-12-09 2017-05-31 武汉斗鱼网络科技有限公司 A kind of data rendering method and data render system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170091244A1 (en) * 2015-09-24 2017-03-30 Microsoft Technology Licensing, Llc Searching a Data Structure

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106777036A (en) * 2016-12-09 2017-05-31 武汉斗鱼网络科技有限公司 A kind of data rendering method and data render system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Android优雅的为RecyclerView添加HeaderView和FooterView;鸿洋_;《CSDN博客》;20160708;全文 *
UIView如何管理它的子视图;志伟入归未有时;《CSDN博客》;20160823;全文 *
多Header or Footer的RecyclerViewAdapter;点融黑帮;《搜狐博客》;20170913;全文 *

Also Published As

Publication number Publication date
CN110618772A (en) 2019-12-27

Similar Documents

Publication Publication Date Title
CN109618177B (en) Video processing method and device, electronic equipment and computer readable storage medium
CN110046021B (en) Page display method, device, system, equipment and storage medium
CN109634490B (en) List display method, device, equipment and storage medium
US11711441B2 (en) Method and apparatus for publishing video synchronously, electronic device, and readable storage medium
US20220075932A1 (en) Method and apparatus for inserting information into online document
CN109857486B (en) Method, device, equipment and medium for processing program page data
CN109491742B (en) Page table rendering method and device
CN110365973B (en) Video detection method and device, electronic equipment and computer readable storage medium
CN110070593B (en) Method, device, equipment and medium for displaying picture preview information
CN111291244B (en) House source information display method, device, terminal and storage medium
CN110865852B (en) Webpage component loading method and device, electronic equipment and storage medium
CN111580924B (en) Page display method and device, electronic equipment and readable storage medium
CN110618772B (en) View adding method, device, equipment and storage medium
CN110069186B (en) Method and equipment for displaying operation interface of application
CN110147283B (en) Display content switching display method, device, equipment and medium
CN111177634A (en) Multi-language supporting file content loading method, device, equipment and medium
CN115878115A (en) Page rendering method, device, medium and electronic equipment
CN111241368B (en) Data processing method, device, medium and equipment
CN112835671A (en) Application page scene switching method, device and equipment
CN111552705A (en) Data processing method and device based on chart, electronic equipment and medium
CN111294657A (en) Information processing method and device
CN114357348B (en) Display method and device and electronic equipment
CN110099122B (en) Method and apparatus for sending network request
CN111294321B (en) Information processing method and device
CN111641692B (en) Session 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