WO2022017154A1 - 界面显示方法、装置、电子设备和介质 - Google Patents

界面显示方法、装置、电子设备和介质 Download PDF

Info

Publication number
WO2022017154A1
WO2022017154A1 PCT/CN2021/104144 CN2021104144W WO2022017154A1 WO 2022017154 A1 WO2022017154 A1 WO 2022017154A1 CN 2021104144 W CN2021104144 W CN 2021104144W WO 2022017154 A1 WO2022017154 A1 WO 2022017154A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
data object
list item
display
container
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.)
Ceased
Application number
PCT/CN2021/104144
Other languages
English (en)
French (fr)
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 US18/006,333 priority Critical patent/US12282783B2/en
Publication of WO2022017154A1 publication Critical patent/WO2022017154A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Definitions

  • Embodiments of the present disclosure relate to the field of computer technology, and in particular, to an interface display method, apparatus, electronic device, and medium.
  • the purpose of some embodiments of the present disclosure is to provide an interface display method, apparatus, electronic device and medium to solve the technical problems mentioned in the above background art section.
  • some embodiments of the present disclosure provide an interface display method, the method includes: for a list item in a data object list, creating an interface container proxy and placing the interface data object of the above list item in the above interface container proxy in response to the first update operation of the display interface, if the first update operation is used to instruct the list item to be updated to the display interface for display, then bind the interface container agent to the corresponding interface container on the display interface ; According to the binding relationship between the interface container and the interface container proxy, the interface data object of the list item in the interface container proxy is displayed in the area corresponding to the interface container on the display interface.
  • some embodiments of the present disclosure provide an interface display device, the device includes: a creation unit configured to, for a list item in a data object list, create an interface container proxy and place the interface data object of the list item in the interface data object.
  • the binding unit is configured to respond to the first update operation of the display interface, if the above-mentioned first update operation is used to instruct the above-mentioned list item to be updated to the above-mentioned display interface for display, then the above-mentioned interface container
  • the agent is bound to the corresponding interface container on the above-mentioned display interface;
  • the display unit is configured to, according to the binding relationship between the above-mentioned interface container and the above-mentioned interface container agent, in the area corresponding to the above-mentioned interface container on the above-mentioned display interface, to the above-mentioned interface container.
  • the interface data object of the above list item in the interface container agent is displayed.
  • some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, when one or more programs are stored by one or more The processors execute such that the one or more processors implement a method as in any of the first aspects.
  • some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of the first aspects.
  • One of the above-mentioned embodiments of the present disclosure has the following beneficial effects: by creating an interface container proxy for a list item in a data object list. Then, in response to the first update operation of the display interface, the interface container proxy is bound to the corresponding interface container on the display interface. Finally, according to the binding relationship between the interface container and the interface container proxy, the interface data object of the list item in the interface container proxy is displayed. This implementation enables individual updating of each list item in the list.
  • FIG. 1 is a schematic diagram of an application scenario of an interface display method according to some embodiments of the present disclosure
  • FIG. 2 is a flowchart of some embodiments of an interface display method according to the present disclosure
  • FIG. 3 is a flowchart of other embodiments of an interface display method according to the present disclosure.
  • FIG. 4 is a schematic structural diagram of some embodiments of an interface display device according to the present disclosure.
  • FIG. 5 is a schematic structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure.
  • FIG. 1 is a schematic diagram of an application scenario of an interface display method according to some embodiments of the present disclosure
  • the terminal device 101 can create interface container agents 107-110 for the list items 103-106 in the data object list 102 and create the interface data objects 111 of the above list items 103-106 -114 is placed in the above-mentioned interface container agent 107-110; in response to the first update operation of the display interface 115, if the above-mentioned first update operation is used to indicate that the above-mentioned list items 103-105 are updated to the above-mentioned display interface 115 for display, then Bind the above-mentioned interface container agents 107-109 to the corresponding interface containers 116-118 on the above-mentioned display interface 115; according to the binding relationship between the above-mentioned interface containers 116-118 and the above-mentioned interface container agents 107-110, in the above-mentioned display interface In the area corresponding to the above-mentioned interface containers 116-118 on the 115, the interface data objects 107-110.
  • the interface display method may be executed by the terminal device 101, or may also be executed by a server, or may also be executed by various software programs.
  • the terminal device 101 may be, for example, various electronic devices having a display screen, including but not limited to smart phones, tablet computers, e-book readers, laptop computers, desktop computers, and the like.
  • the execution body may also be embodied as a server, software, or the like. When the execution body is software, it can be installed in the electronic devices listed above. It can be implemented, for example, as multiple software or software modules for providing distributed services, or as a single software or software module. There is no specific limitation here.
  • FIG. 1 the number of cell phones in FIG. 1 is merely illustrative. There can be any number of handsets depending on implementation needs.
  • the interface display method includes the following steps:
  • Step 201 for a list item in the data object list, create an interface container proxy and place the interface data object of the above list item in the above interface container proxy.
  • the execution body of the interface display method may create an interface container proxy for the list items in the data object list and place the interface data objects of the list items in the above-mentioned list items.
  • Interface container proxy As an example, the above data object list may be "'Zhang San, 1, 010032', 'Li Si, 2, 010033', 'Wang Wu, 2, 010034'". Wherein, the above list item may be 'Zhang San, 1, 010032'.
  • the above interface container proxy can be considered as a network access method.
  • the interface container proxy described above may be an access interface.
  • the above-mentioned placing the interface data object of the above-mentioned list item in the above-mentioned interface container agent may be "A: Zhang San, 1, 010032".
  • the above interface data objects may belong to the ViewModel layer.
  • the data objects in the above data object list may belong to the Model (data) layer.
  • the above-mentioned data object list may display data objects (Model) in the form of a list.
  • each list item (Item) is used to store a data object.
  • the interface data object (ViewModel) can store and manage the data related to the UI (User Interface, interface) in a life cycle-aware manner.
  • interface data objects allow data to survive configuration changes (such as screen rotations).
  • the interface data object has the advantages of type safety and cohesion.
  • the above-mentioned data object list (List) is a very important component in android development. It displays specific content in the form of a list according to the length of the data.
  • the interface container proxy (ViewHolder Poxy) usually adds a life cycle for each interface data object.
  • Step 202 in response to the first update operation of the display interface, if the first update operation is used to instruct the list item to be updated to the display interface for display, then bind the interface container agent to the corresponding interface on the display interface container.
  • the execution body may determine the first update operation of the display interface, and when the first update operation is used to indicate that the list item is updated to the display interface for display, the interface container agent is bound to the The corresponding interface container on the above display interface.
  • the above-mentioned interface container may be an area on the above-mentioned display interface for displaying list items. As an example, as shown in FIG. 1 , the list item 103 is displayed on the display interface 115 , and the interface container proxy 107 of the list item 103 is bound to the corresponding interface container 116 on the above-mentioned display interface 115 .
  • the display interface may belong to the View layer.
  • the interface container usually appears in the adapter (Adapter), in order to quickly set the value when the list scrolls, without having to recreate many objects each time, thereby improving performance.
  • Step 203 Display the interface data object of the list item in the interface container proxy in the area corresponding to the interface container on the display interface according to the binding relationship between the interface container and the interface container proxy.
  • the execution body may, according to the binding relationship between the interface container and the interface container proxy, in the area corresponding to the interface container on the display interface, the interface of the list item in the interface container proxy
  • the data object is displayed.
  • the interface container 116 and the interface container proxy 107 in the area corresponding to the interface container 116 on the display interface 115, the interface data of the list item 103 in the interface container proxy 107 Object 111 is displayed.
  • the interface data object of the list item is subscribed to the state of the interface container; the state may include at least one of the following : Create state (onCreate), start state (onStart), stop state (onStop) and destroy state (onDestroy).
  • the above creation state can be called once for each list item, which can be buried.
  • the above start state and stop state can be called during slide in slide out. It can also be called by the parent LifecycleOwner when it is called back.
  • the purpose of Lifecycles is that when the state of Android components (activities, fragments) changes (onStart, onStop), other parts can correspondingly change the components.
  • the monitored weather forecast is the State, and the Owner manages these State changes.
  • the above destruction state is usually called once for each interface container, following the call of the parent LifecycleOwner. The above state is the same as the life state in which the interface container agent exists. If the state of the interface data object of the list item changes, the interface data object of the list item in the interface container proxy is updated.
  • the interface data object corresponding to the above-mentioned interface container proxy is obtained when the above-mentioned subscription is obtained, and the interface data object of the above-mentioned list item is updated by using the interface data object corresponding to the above-mentioned interface container proxy, so that the above-mentioned interface container proxy
  • the corresponding interface data object is the same as the interface data object of the above list item.
  • the interface container agent only enters the interface container on the display interface for the first time is in the created state, the front-to-background transition of the above-mentioned display interface on the terminal device where the above-mentioned display interface is located is the start and stop states, and the above-mentioned display interface is displayed on the above-mentioned terminal device.
  • the interface is closed is the destroyed state.
  • all subscriptions by default, will call back the last value when the ViewHolder slides back into the screen to restore the UI of the corresponding item.
  • the above-mentioned updating the interface data object of the above-mentioned list item in the above-mentioned interface container proxy according to the data object of the above-mentioned list item is specifically: in the case that the Diff result is correct, through DiffUtil Callback to update the interface data object of the above list item in the above interface container proxy.
  • the above Diff can be used to compare two files.
  • the output of Diff shows what needs to be done on one file to match the second file.
  • the role of the above DiffUtil can be to compare two data lists and can calculate a series of operations to convert the old data table into the new data table.
  • the interface data object of the above-mentioned list item in the above-mentioned interface container agent is updated according to the operation in the above-mentioned Diff result.
  • notify() can be used to wake up the waiting thread in the program. If the monitor has only one waiting thread, notify() can be used to wake up. But if there are multiple threads notify() will wake up one of them randomly.
  • the state of the interface container agent corresponding to each list item in the above-mentioned data object list is determined;
  • the set conditions are usually preset.
  • the above preset condition may be "the number is greater than 10".
  • an interface container proxy is created for a list item in a data object list. Then, in response to the first update operation of the display interface, the interface container proxy is bound to the corresponding interface container on the display interface. Finally, according to the binding relationship between the above-mentioned interface container and the above-mentioned interface container agent, the interface data object of the above-mentioned list item in the above-mentioned interface container agent is displayed. This implementation enables individual updating of each list item in the list.
  • the interface display methods disclosed by some embodiments of the present disclosure support common basic requirements such as Header (header)/Footer (footer), Loading (loading)/Error (error reporting)/Empty (no data).
  • Header can be a string sent by the server before the server transmits HTML (Hyper Text Markup Language, Hypertext Markup Language) data to the browser using the HTTP (HyperText Transfer Protocol) protocol. separated by one line.
  • HTTP HyperText Transfer Protocol
  • Adapter adapter
  • Builder builder
  • the Widget Complementing the existing Widget (Web widget, widget) system, in the absence of Widget nesting, the Widget contains a list of scenarios.
  • the above Widget usually refers to a derivative of Web 2.0, which can be a small application, it can be a clock, a diary, a video, a weather forecast, and so on.
  • the interface display method includes the following steps:
  • Step 301 for a list item in the data object list, create an interface container proxy and place the interface data object of the above list item in the above interface container proxy.
  • Step 302 in response to the first update operation of the display interface, if the first update operation is used to instruct the list item to be updated to the display interface for display, then bind the interface container agent to the corresponding interface on the display interface container.
  • Step 303 Display the interface data object of the list item in the interface container proxy in the area corresponding to the interface container on the display interface according to the binding relationship between the interface container and the interface container proxy.
  • steps 301-303 for the specific implementation of steps 301-303 and the technical effects brought about, reference may be made to steps 201-203 in those embodiments corresponding to FIG. 2, and details are not repeated here.
  • Step 304 in response to the second update operation of the display interface, if the second update operation is used to indicate that the list item is updated and no longer displayed on the display interface, the binding between the interface container agent and the interface container is released. relation.
  • the execution body of the interface display method may, when it is determined that the second update operation of the display interface occurs, when the second update operation is used to indicate that the list item is If it is updated that the above-mentioned display interface is no longer displayed, the binding relationship between the above-mentioned interface container agent and the above-mentioned interface container is released. So that the list items displayed on the above-mentioned interface container are changed according to the second update operation. As an example, as shown in FIG.
  • the above-mentioned second update operation is a sliding operation from top to bottom on the display interface 115, and the list item 106 will be updated with the above-mentioned second update operation.
  • the display interface 115 is no longer displayed, and the binding relationship between the interface container proxy 110 and the interface container 118 is released.
  • the process 300 of the information display method in some embodiments corresponding to FIG. 3 embodies the second update operation in response to the display interface.
  • the second update operation is used to indicate that the above-mentioned list item is updated so that the above-mentioned display interface is no longer displayed, and the binding relationship between the above-mentioned interface container agent and the above-mentioned interface container is released. Therefore, the solutions described in these embodiments can introduce that each interface container can be reused, and the binding relationship between the interface container proxy and the interface container is constantly changing.
  • the present disclosure provides some embodiments of an interface display device, these device embodiments correspond to those method embodiments described above in FIG. 2 , and the device can be applied in various electronic devices.
  • the interface display apparatus 400 of some embodiments includes: a creation unit 401 , a binding unit 402 and a display unit 403 .
  • the creating unit 401 is configured to create an interface container proxy for the list item in the data object list and place the interface data object of the above-mentioned list item in the above-mentioned interface container proxy;
  • the binding unit 402 is configured to respond to the display interface The first update operation, if the above-mentioned first update operation is used to indicate that the above-mentioned list item is updated to the above-mentioned display interface for display, the above-mentioned interface container agent is bound to the corresponding interface container on the above-mentioned display interface;
  • the display unit 403 is configured According to the binding relationship between the interface container and the interface container proxy, the interface data object of the list item in the interface container proxy is displayed in the area corresponding to the interface container on the display interface.
  • the interface display device 400 is further configured to: in response to the second update operation of the display interface, if the second update operation It is used to indicate that the above-mentioned list item is updated so that the above-mentioned display interface is no longer displayed, and the binding relationship between the above-mentioned interface container agent and the above-mentioned interface container is released.
  • the interface display device 400 is further configured to: during the binding of the interface container to the interface container proxy, subscribe the interface data object status of the list item in the interface container; if the interface of the list item is When the state of the data object changes, the interface data object of the above-mentioned list item in the above-mentioned interface container agent is updated.
  • the interface display apparatus 400 is further configured to update the interface data object of the above-mentioned list item in the above-mentioned interface container proxy through the DiffUtil callback when the Diff result is correct.
  • the above states include at least one of the following: a created state, a started state, a stopped state, and a destroyed state.
  • the interface display device 400 is further configured to: in response to the number of list items in the data object list meeting a preset condition, determine the state of the interface container agent corresponding to each list item in the data object list; Store the list items whose state of the interface container agent is in the stopped state; and perform a deletion operation on the stored list items in the data object list to obtain the deleted data object list.
  • the units recorded in the apparatus 400 correspond to the respective steps in the method described with reference to FIG. 2 . Therefore, the operations, features, and beneficial effects described above with respect to the method are also applicable to the apparatus 400 and the units included therein, and details are not described herein again.
  • FIG. 5 it shows a schematic structural diagram of an electronic device (eg, the server in FIG. 1 ) 500 suitable for implementing some embodiments of the present disclosure.
  • Terminal devices in some embodiments of the present disclosure may include, but are not limited to, such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals Mobile terminals such as in-vehicle navigation terminals, etc., and stationary terminals such as digital TVs, desktop computers, and the like.
  • the terminal device shown in FIG. 5 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • an electronic device 500 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 501 that may be loaded into random access according to a program stored in a read only memory (ROM) 502 or from a storage device 508 Various appropriate actions and processes are executed by the programs in the memory (RAM) 503 . In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored.
  • the processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504.
  • An input/output (I/O) interface 505 is also connected to bus 504 .
  • the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration an output device 507 such as a computer; a storage device 508 including, for example, a memory card; and a communication device 509 .
  • Communication means 509 may allow electronic device 500 to communicate wirelessly or by wire with other devices to exchange data. While FIG. 5 shows electronic device 500 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in FIG. 5 can represent one device, and can also represent multiple devices as required.
  • the processes described above with reference to the flowcharts may be implemented as computer software programs.
  • some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from a network via communication device 509, or from storage device 508, or from ROM 502.
  • the processing device 501 When the computer program is executed by the processing device 501, the above-mentioned functions defined in the methods of some embodiments of the present disclosure are performed.
  • the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the foregoing two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein.
  • Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the client and server can use any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) to communicate, and can communicate with digital data in any form or medium Communication (eg, a communication network) interconnects.
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: for the list items in the data object list, an interface container agent is created and the above-mentioned list items are created.
  • the interface data object is placed in the above-mentioned interface container agent; in response to the first update operation of the display interface, if the above-mentioned first update operation is used to indicate that the above-mentioned list item is updated to the above-mentioned display interface for display, then the above-mentioned interface container agent is bound to locate the corresponding interface container on the above-mentioned display interface; according to the binding relationship between the above-mentioned interface container and the above-mentioned interface container agent, in the area corresponding to the above-mentioned interface container on the above-mentioned display interface, the above-mentioned list item in the above-mentioned interface container agent The interface data object is displayed.
  • Computer program code for carrying out operations of some embodiments of the present disclosure may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, or a combination thereof, Also included are conventional procedural programming languages - such as the "C" 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.
  • 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 (eg, using an Internet service provider to via Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks 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.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units described in some embodiments of the present disclosure may be implemented by means of software, and may also be implemented by means of hardware.
  • the described unit can also be provided in the processor, for example, it can be described as: a processor includes a creation unit, a binding unit and a display unit. Among them, the names of these units do not constitute a limitation of the unit itself in some cases, for example, the creation unit can also be described as "for the list items in the data object list, create an interface container proxy and put the above list items.
  • the UI data object is placed in the unit of the UI container proxy described above".
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLDs Complex Programmable Logical Devices
  • an interface display method including: for a list item in a data object list, creating an interface container proxy and placing the interface data object of the above list item in the above interface container proxy
  • the above-mentioned first update operation is used to indicate that the above-mentioned list item is updated to the above-mentioned display interface for display
  • the above-mentioned interface container agent is bound to the corresponding interface container on the above-mentioned display interface
  • the interface data object of the list item in the interface container proxy is displayed in the area corresponding to the interface container on the display interface.
  • the method further includes: in response to a second update operation of the display interface, if the above-mentioned second update operation uses After indicating that the list item is updated so that the display interface is no longer displayed, the binding relationship between the interface container agent and the interface container is released.
  • the method further includes: during the binding of the interface container to the interface container proxy, subscribing to the interface container for the state of the interface data object of the list item; When the state of the interface data object changes, the interface data object of the above-mentioned list item in the above-mentioned interface container agent is updated.
  • the above-mentioned updating the interface data object of the above-mentioned list item in the above-mentioned interface container agent according to the data object of the above-mentioned list item is specifically: in the case that the Diff result is correct, calling back through DiffUtil, The interface data object of the above-mentioned list item in the above-mentioned interface container agent is updated.
  • the above state includes at least one of the following: a creation state, a start state, a stop state, and a destruction state.
  • the method further includes: in response to the number of list items in the data object list meeting a preset condition, determining the state of the interface container agent corresponding to each list item in the data object list ; Store the list items whose status of the interface container agent is in the stopped state; and delete the stored list items in the data object list to obtain the deleted data object list.
  • an interface display apparatus comprising: a creation unit configured to, for a list item in a data object list, create an interface container proxy and place the interface data object of the list item in the interface data object.
  • the binding unit is configured to respond to the first update operation of the display interface, if the above-mentioned first update operation is used to instruct the above-mentioned list item to be updated to the above-mentioned display interface for display, then the above-mentioned interface container
  • the agent is bound to the corresponding interface container on the above-mentioned display interface; the display unit is configured to, according to the binding relationship between the above-mentioned interface container and the above-mentioned interface container agent, in the area corresponding to the above-mentioned interface container on the above-mentioned display interface, to the above-mentioned interface container.
  • the interface data object of the above list item in the interface container agent is displayed.
  • the apparatus is further configured to: in response to the second update operation of the display interface, if the above-mentioned first The second update operation is used to indicate that the above-mentioned list item is updated so that the above-mentioned display interface is no longer displayed, and the binding relationship between the above-mentioned interface container agent and the above-mentioned interface container is released.
  • the apparatus is further configured to: subscribe to the state of the interface data object of the list item in the interface container during the binding of the interface container to the interface container proxy; if the list When the state of the interface data object of the item changes, the interface data object of the above-mentioned list item in the above-mentioned interface container proxy is updated.
  • the above-mentioned updating the interface data object of the above-mentioned list item in the above-mentioned interface container agent according to the data object of the above-mentioned list item is specifically: in the case that the Diff result is correct, calling back through DiffUtil, The interface data object of the above-mentioned list item in the above-mentioned interface container agent is updated.
  • the above state includes at least one of the following: a creation state, a start state, a stop state, and a destruction state.
  • the apparatus is further configured to: in response to the number of list items in the data object list meeting a preset condition, determine the interface container proxy corresponding to each list item in the data object list The state of the interface container agent is stored; the list item whose state is the stop state is stored; and the stored list item in the data object list is deleted to obtain the deleted data object list.
  • an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, when the one or more programs are stored by one or more
  • the execution of the processor causes one or more processors to implement a method as described in any of the above embodiments.
  • a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the foregoing embodiments.

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)
  • Computer Security & Cryptography (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开的实施例公开了界面显示方法、装置、电子设备和介质。该方法的一具体实施方式包括:针对数据对象列表中的列表项,创建界面容器代理并将该列表项的界面数据对象置于该界面容器代理中;响应于显示界面的第一更新操作,若该第一更新操作用于指示该列表项被更新到该显示界面进行显示,则将该界面容器代理绑定到该显示界面上相应的界面容器;按照该界面容器与该界面容器代理之间的绑定关系,在该显示界面上该界面容器对应的区域中,对该界面容器代理中该列表项的界面数据对象进行显示。该实施方式实现了列表中的每个列表项的单独更新。

Description

界面显示方法、装置、电子设备和介质
相关申请的交叉引用
本申请要求于2020年07月23日提交的、申请号为202010716130.0、发明名称为“界面显示方法、装置、电子设备和介质”的中国专利申请的优先权,该申请的全文通过引用结合在本申请中。
技术领域
本公开的实施例涉及计算机技术领域,具体涉及界面显示方法、装置、电子设备和介质。
背景技术
对于列表在MVVM(Model-View-ViewModel)框架中的应用,现有的技术只能对整个列表进行更新。目前无法对列表中的而每个Item进行单独更新。
发明内容
本发明内容部分用于以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。本发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
本公开的一些实施例的目的在于提出一种界面显示方法、装置、电子设备和介质,来解决以上背景技术部分提到的技术问题。
第一方面,本公开的一些实施例提供了一种界面显示方法,该方法包括:针对数据对象列表中的列表项,创建界面容器代理并将上述列表项的界面数据对象置于上述界面容器代理中;响应于显示界面的第一更新操作,若上述第一更新操作用于指示上述列表项被更新到上 述显示界面进行显示,则将上述界面容器代理绑定到上述显示界面上相应的界面容器;按照上述界面容器与上述界面容器代理之间的绑定关系,在上述显示界面上上述界面容器对应的区域中,对上述界面容器代理中上述列表项的界面数据对象进行显示。
第二方面,本公开的一些实施例提供了一种界面显示装置,装置包括:创建单元,被配置成针对数据对象列表中的列表项,创建界面容器代理并将上述列表项的界面数据对象置于上述界面容器代理中;绑定单元,被配置成响应于显示界面的第一更新操作,若上述第一更新操作用于指示上述列表项被更新到上述显示界面进行显示,则将上述界面容器代理绑定到上述显示界面上相应的界面容器;显示单元,被配置成按照上述界面容器与上述界面容器代理之间的绑定关系,在上述显示界面上上述界面容器对应的区域中,对上述界面容器代理中上述列表项的界面数据对象进行显示。
第三方面,本公开的一些实施例提供了一种电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第一方面中任一的方法。
第四方面,本公开的一些实施例提供了一种计算机可读介质,其上存储有计算机程序,其中,程序被处理器执行时实现如第一方面中任一的方法。
本公开的上述各个实施例中的一个实施例具有如下有益效果:通过为数据对象列表中的列表项创建界面容器代理。然后,响应于显示界面的第一更新操作,将上述界面容器代理绑定到上述显示界面上相应的界面容器。最后,按照上述界面容器与上述界面容器代理之间的绑定关系,对上述界面容器代理中上述列表项的界面数据对象进行显示。该实施方式实现了列表中的每个列表项的单独更新。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附 图标记表示相同或相似的元素。应当理解附图是示意性的,元件和元素不一定按照比例绘制。
图1是根据本公开的一些实施例的界面显示方法的一个应用场景的示意图;
图2是根据本公开的界面显示方法的一些实施例的流程图;
图3是根据本公开的界面显示方法的另一些实施例的流程图;
图4是根据本公开的界面显示装置的一些实施例的结构示意图;
图5是适于用来实现本公开的一些实施例的电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例。相反,提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
下面将参考附图并结合实施例来详细说明本公开。
图1是根据本公开的一些实施例的界面显示方法的一个应用场景的示意图;
在如图1的应用场景中所示,首先,终端设备101可以针对数据对象列表102中的列表项103-106,创建界面容器代理107-110并将上述列表项103-106的界面数据对象111-114置于上述界面容器代理107-110中;响应于显示界面115的第一更新操作,若上述第一更新操作用于指示上述列表项103-105被更新到上述显示界面115进行显示,则将上述界面容器代理107-109绑定到上述显示界面115上相应的界面容器116-118;按照上述界面容器116-118与上述界面容器代理107-110之间的绑定关系,在上述显示界面115上上述界面容器116-118对应的区域中,对上述界面容器代理107-109中上述列表项103-105的界面数据对象111-113进行显示。
可以理解的是,界面显示方法可以是由终端设备101来执行,或者也可以是由服务器来执行,或者还可以是各种软件程序来执行。其中,终端设备101例如可以是具有显示屏的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、膝上型便携计算机和台式计算机等等。此外,执行主体也可以体现为服务器、软件等。当执行主体为软件时,可以安装在上述所列举的电子设备中。其可以实现成例如用来提供分布式服务的多个软件或软件模块,也可以实现成单个软件或软件模块。在此不做具体限定。
应该理解,图1中的手机的数目仅仅是示意性的。根据实现需要,可以具有任意数目的手机。
继续参考图2,示出了根据本公开的界面显示方法的一些实施例的流程200。该界面显示方法,包括以下步骤:
步骤201,针对数据对象列表中的列表项,创建界面容器代理并将上述列表项的界面数据对象置于上述界面容器代理中。
在一些实施例中,界面显示方法的执行主体(例如,图1所示的终端设备101)可以针对数据对象列表中的列表项,创建界面容器代理并将上述列表项的界面数据对象置于上述界面容器代理中。作为示 例,上述数据对象列表可以是“‘张三,1,010032’,‘李四,2,010033’,‘王五,2,010034’”。其中,上述列表项可以是‘张三,1,010032’。上述界面容器代理可以认为是一种网络访问方式。例如,上述界面容器代理可以是一个访问接口。上述将上述列表项的界面数据对象置于上述界面容器代理中可以是“A:张三,1,010032”。
作为示例,在MVVM框架中,上述界面数据对象可以属于ViewModel层。上述数据对象列表中的数据对象可以属于Model(数据)层。
作为示例,在MVVM框架中,上述数据对象列表(List)可以是以列表形式进行展示数据对象(Model)。其中,每个列表项(Item)用于存储一个数据对象。界面数据对象(ViewModel)可以是在以生命周期意识的方式存储和管理与UI(User Interface,界面)相关的数据。其中,界面数据对象允许数据在配置更改(例如屏幕旋转)后继续存在。其中,界面数据对象具有类型安全、内聚的优点。在android开发中上述数据对象列表(List)是一个很重要的组件,它以列表的形式根据数据的长自适应展示具体内容。界面容器代理(ViewHolder Poxy)通常是为了每个界面数据对象添加生命周期。
步骤202,响应于显示界面的第一更新操作,若上述第一更新操作用于指示上述列表项被更新到上述显示界面进行显示,则将上述界面容器代理绑定到上述显示界面上相应的界面容器。
在一些实施例中,上述执行主体可以在确定显示界面的第一更新操作,当上述第一更新操作用于指示上述列表项被更新到上述显示界面进行显示,则将上述界面容器代理绑定到上述显示界面上相应的界面容器。上述界面容器可以是上述显示界面上用于展示列表项的区域。作为示例,如图1所示,列表项103在显示界面115上显示,将列表项103的界面容器代理107绑定到上述显示界面115上相应的界面容器116。
作为示例,在MVVM框架中,显示界面(View)可以属于View层。界面容器(ViewHolder)通常出现在适配器(Adapter)里,为的是list滚动的时候快速设置值,而不必每次都重新创建很多对象,从 而提升性能。
步骤203,按照上述界面容器与上述界面容器代理之间的绑定关系,在上述显示界面上上述界面容器对应的区域中,对上述界面容器代理中上述列表项的界面数据对象进行显示。
在一些实施例中,上述执行主体可以按照上述界面容器与上述界面容器代理之间的绑定关系,在上述显示界面上上述界面容器对应的区域中,对上述界面容器代理中上述列表项的界面数据对象进行显示。作为示例,如图1所示,按照界面容器116与界面容器代理107之间的绑定关系,在显示界面115上界面容器116对应的区域中,对界面容器代理107中列表项103的界面数据对象111进行显示。
在一些实施例的一些可选的实现方式中,在上述界面容器与上述界面容器代理绑定期间,在上述界面容器中订阅上述列表项的界面数据对象的状态;上述状态可以包括以下至少一项:创建状态(onCreate),开始状态(onStart),停止状态(onStop)和销毁状态(onDestroy)。其中,上述创建状态可以是对每个列表项都会调用一次,可以做埋点。上述开始状态和停止状态可以在滑入滑出过程中调用。也可以在回调时,跟随父级LifecycleOwner调用。其中,Lifecycles的目的就是安卓组件(activities,fragments)在发生状态变化(onStart,onStop)的时候,其它的部分能够相应组件的变化。例如,有两个人需要知道天气预报的情况,这两个人可以用Observer表示,监听的的天气预报就是State,Owner就是管理这些State变化的。上述销毁状态通常对每个界面容器调用一次,跟随父级LifecycleOwner调用。上述状态与界面容器代理存在的生命状态相同。若上述列表项的界面数据对象的状态发生改变,对上述界面容器代理中上述列表项的界面数据对象进行更新。作为示例,当上述状态为创建状态,获取上述订阅时上述界面容器代理对应的界面数据对象,利用上述界面容器代理对应的界面数据对象对上述列表项的界面数据对象进行更新,使得上述界面容器代理对应的界面数据对象与上述列表项的界面数据对象相同。
作为示例,界面容器代理只有第一次进入显示界面上的界面容器是创建状态,上述显示界面在上述显示界面所在的终端设备上前后台 转换是开始与停止状态,在上述终端设备上将上述显示界面关闭是销毁状态。
作为另一示例,所有的订阅,默认会在ViewHolder重新滑入屏幕时,重新回调一次上一次的值,用来恢复对应item的UI。通过配置uniqueOnly=false,使重新滑入时订阅不再回调。
在一些实施例的一些可选的实现方式中,上述根据上述列表项的数据对象对上述界面容器代理中上述列表项的界面数据对象进行更新,具体为:在Diff结果正确的情况下,通过DiffUtil回调,对上述界面容器代理中上述列表项的界面数据对象进行更新。上述Diff可以是用来比较两个文件。Diff的输出结果表明需要对一个文件做怎样的操作之后才能与第二个文件相匹配。上述DiffUtil的作用可以是比较两个数据列表并能计算出一系列将旧数据表转换成新数据表的操作。作为示例,在Diff结果正确的情况下,按照上述Diff结果中的操作,对上述界面容器代理中上述列表项的界面数据对象进行更新。
作为示例,结合DiffUtil回调可以完全基于全量列表变化进行更新,不需要手动调用notify()。其中,在程序中notify()可以用于唤醒等待的线程,如果监视器种只有一个等待线程,使用notify()可以唤醒。但是如果有多条线程notify()是随机唤醒其中一条线程。
在一些实施例的一些可选的实现方式中,响应于上述数据对象列表中的列表项的数量满足预设条件,确定上述数据对象列表中每个列表项对应的界面容器代理的状态;上述预设条件通常是预先设定的。例如,上述预设条件可以是“数量大于10条”。对上述界面容器代理的状态为停止状态的列表项进行存储;对上述数据对象列表中进行存储后的列表项进行删除操作,得到删除后数据对象列表。这样可以保证数据对象列表中不会有过多的列表项,从而避免因为数据过多造成的终端设备运行较慢。
本公开的一些实施例公开的界面显示方法,通过为数据对象列表中的列表项创建界面容器代理。然后,响应于显示界面的第一更新操作,将上述界面容器代理绑定到上述显示界面上相应的界面容器。最后,按照上述界面容器与上述界面容器代理之间的绑定关系,对上述 界面容器代理中上述列表项的界面数据对象进行显示。该实施方式实现了列表中的每个列表项的单独更新。
本公开的一些实施例公开的界面显示方法,支持Header(标头)/Footer(页脚)、Loading(加载中)/Error(报错)/Empty(无数据)等通用基础需求。Header可以是服务器以HTTP(HyperText Transfer Protocol,超文本传输)协议传HTML(Hyper Text Markup Language,超文本标记语言)资料到浏览器前所送出的字串,在Header与HTML文件之间尚需空一行分隔。提供与ListViewModel的默认联动,简化基础列表订阅。提供Adapter(适配器)、Builder(构建器),简化简单列表构建。
与现存Widget(Web widget,微件)体系相辅相成,在没有Widget嵌套的情况下,实现Widget包含列表的场景。其中,上述Widget通常是指一种Web2.0的衍生物,它可以是一个小型的应用程式,它可以是一个时钟,一个日记簿,一段视频,天气预报等等。
继续参考图3,示出了根据本公开的界面显示方法的一些实施例的流程300。该界面显示方法,包括以下步骤:
步骤301,针对数据对象列表中的列表项,创建界面容器代理并将上述列表项的界面数据对象置于上述界面容器代理中。
步骤302,响应于显示界面的第一更新操作,若上述第一更新操作用于指示上述列表项被更新到上述显示界面进行显示,则将上述界面容器代理绑定到上述显示界面上相应的界面容器。
步骤303,按照上述界面容器与上述界面容器代理之间的绑定关系,在上述显示界面上上述界面容器对应的区域中,对上述界面容器代理中上述列表项的界面数据对象进行显示。
在一些实施例中,步骤301-303的具体实现及所带来的技术效果可以参考图2对应的那些实施例中的步骤201-203,在此不再赘述。
步骤304,响应于显示界面的第二更新操作,若上述第二更新操作用于指示上述列表项被更新出上述显示界面不再显示,则解除上述界面容器代理与上述界面容器之间的绑定关系。
在一些实施例中,界面显示方法的执行主体(例如,图1所示的 终端设备101)可以在确定显示界面的第二更新操作发生时,当上述第二更新操作用于指示上述列表项被更新出上述显示界面不再显示,则解除上述界面容器代理与上述界面容器之间的绑定关系。以使得上述界面容器上显示的列表项是根据第二更新操作而变化的。作为示例,如图1所示,在确定显示界面115的第二更新操作发生时,上述第二更新操作为在显示界面115上从上向下的滑动操作,将在列表项106被更新出上述显示界面115不再显示,解除界面容器代理110与界面容器118之间的绑定关系。
从图3中可以看出,与图2对应的一些实施例的描述相比,图3对应的一些实施例中的信息显示方法的流程300体现了响应于显示界面的第二更新操作,若上述第二更新操作用于指示上述列表项被更新出上述显示界面不再显示,则解除上述界面容器代理与上述界面容器之间的绑定关系。由此,这些实施例描述的方案可以引入了每个界面容器都是可以重复使用的,且界面容器代理与界面容器之间的绑定关系是不断变化的。
进一步参考图4,作为对上述各图上述方法的实现,本公开提供了一种界面显示装置的一些实施例,这些装置实施例与图2上述的那些方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图5所示,一些实施例的界面显示装置400包括:创建单元401、绑定单元402和显示单元403。创建单元401,被配置成针对数据对象列表中的列表项,创建界面容器代理并将上述列表项的界面数据对象置于上述界面容器代理中;绑定单元402,被配置成响应于显示界面的第一更新操作,若上述第一更新操作用于指示上述列表项被更新到上述显示界面进行显示,则将上述界面容器代理绑定到上述显示界面上相应的界面容器;显示单元403,被配置成按照上述界面容器与上述界面容器代理之间的绑定关系,在上述显示界面上上述界面容器对应的区域中,对上述界面容器代理中上述列表项的界面数据对象进行显示。
在一些实施例中,界面显示装置400在上述对上述界面容器代理 中上述列表项的界面数据对象进行显示之后,被进一步配置成:响应于显示界面的第二更新操作,若上述第二更新操作用于指示上述列表项被更新出上述显示界面不再显示,则解除上述界面容器代理与上述界面容器之间的绑定关系。
在一些实施例中,界面显示装置400被进一步配置成:在上述界面容器与上述界面容器代理绑定期间,在上述界面容器中订阅上述列表项的界面数据对象的状态;若上述列表项的界面数据对象的状态发生改变,对上述界面容器代理中上述列表项的界面数据对象进行更新。
在一些实施例中,界面显示装置400被进一步配置成:在Diff结果正确的情况下,通过DiffUtil回调,对上述界面容器代理中上述列表项的界面数据对象进行更新。
在一些实施例中,上述状态包括以下至少一项:创建状态,开始状态,停止状态和销毁状态。
在一些实施例中,界面显示装置400被进一步配置成:响应于上述数据对象列表中的列表项的数量满足预设条件,确定上述数据对象列表中每个列表项对应的界面容器代理的状态;对上述界面容器代理的状态为停止状态的列表项进行存储;对上述数据对象列表中进行存储后的列表项进行删除操作,得到删除后数据对象列表。
可以理解的是,该装置400中记载的诸单元与参考图2描述的方法中的各个步骤相对应。由此,上文针对方法描述的操作、特征以及产生的有益效果同样适用于装置400及其中包含的单元,在此不再赘述。
下面参考图5,其示出了适于用来实现本公开的一些实施例的电子设备(例如图1中的服务器)500的结构示意图。本公开的一些实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图5示出的终端设备仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何 限制。
如图5所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储装置508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有电子设备500操作所需的各种程序和数据。处理装置501、ROM 502以及RAM503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置507;包括例如存储卡等的存储装置508;以及通信装置509。通信装置509可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备500,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。图5中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。
特别地,根据本公开的一些实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的一些实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的一些实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理装置501执行时,执行本公开的一些实施例的方法中限定的上述功能。
需要说明的是,本公开的一些实施例上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有 一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开的一些实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开的一些实施例中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:针对数据对象列表中的列表项,创建界面容器代理并将上述列表项的界面数据对象置于上述界面容器代理中;响应于显示界面的第一更新操作,若上述第一更新操作用于指示上述列表项被更新到上述显示界面进行显示,则将上述界面容器代理绑定到上述显示界面上相应的界面容器;按照上述界面容器与上述界面容器代理之间 的绑定关系,在上述显示界面上上述界面容器对应的区域中,对上述界面容器代理中上述列表项的界面数据对象进行显示。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的一些实施例的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开的一些实施例中的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括创建单元、绑定单元和显示单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,创建单元还可以被描述为“针对数据对象列表中的列表项,创建界面容器代理并将上述列表项的界面数据对象置于上述界面容器代理中的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
根据本公开的一个或多个实施例,提供了一种界面显示方法,包括:针对数据对象列表中的列表项,创建界面容器代理并将上述列表项的界面数据对象置于上述界面容器代理中;响应于显示界面的第一更新操作,若上述第一更新操作用于指示上述列表项被更新到上述显示界面进行显示,则将上述界面容器代理绑定到上述显示界面上相应的界面容器;按照上述界面容器与上述界面容器代理之间的绑定关系,在上述显示界面上上述界面容器对应的区域中,对上述界面容器代理中上述列表项的界面数据对象进行显示。
根据本公开的一个或多个实施例,在上述对上述界面容器代理中上述列表项的界面数据对象进行显示之后,还包括:响应于显示界面的第二更新操作,若上述第二更新操作用于指示上述列表项被更新出上述显示界面不再显示,则解除上述界面容器代理与上述界面容器之间的绑定关系。
根据本公开的一个或多个实施例,该方法还包括:在上述界面容器与上述界面容器代理绑定期间,在上述界面容器中订阅上述列表项的界面数据对象的状态;若上述列表项的界面数据对象的状态发生改变,对上述界面容器代理中上述列表项的界面数据对象进行更新。
根据本公开的一个或多个实施例,上述根据上述列表项的数据对象对上述界面容器代理中上述列表项的界面数据对象进行更新,具体为:在Diff结果正确的情况下,通过DiffUtil回调,对上述界面容器代理中上述列表项的界面数据对象进行更新。
根据本公开的一个或多个实施例,上述状态包括以下至少一项:创建状态,开始状态,停止状态和销毁状态。
根据本公开的一个或多个实施例,该方法还包括:响应于上述数据对象列表中的列表项的数量满足预设条件,确定上述数据对象列表 中每个列表项对应的界面容器代理的状态;对上述界面容器代理的状态为停止状态的列表项进行存储;对上述数据对象列表中进行存储后的列表项进行删除操作,得到删除后数据对象列表。
根据本公开的一个或多个实施例,提供了一种界面显示装置,包括:创建单元,被配置成针对数据对象列表中的列表项,创建界面容器代理并将上述列表项的界面数据对象置于上述界面容器代理中;绑定单元,被配置成响应于显示界面的第一更新操作,若上述第一更新操作用于指示上述列表项被更新到上述显示界面进行显示,则将上述界面容器代理绑定到上述显示界面上相应的界面容器;显示单元,被配置成按照上述界面容器与上述界面容器代理之间的绑定关系,在上述显示界面上上述界面容器对应的区域中,对上述界面容器代理中上述列表项的界面数据对象进行显示。
根据本公开的一个或多个实施例,该装置在上述对上述界面容器代理中上述列表项的界面数据对象进行显示之后,被进一步配置成:响应于显示界面的第二更新操作,若上述第二更新操作用于指示上述列表项被更新出上述显示界面不再显示,则解除上述界面容器代理与上述界面容器之间的绑定关系。
根据本公开的一个或多个实施例,该装置被进一步配置成:在上述界面容器与上述界面容器代理绑定期间,在上述界面容器中订阅上述列表项的界面数据对象的状态;若上述列表项的界面数据对象的状态发生改变,对上述界面容器代理中上述列表项的界面数据对象进行更新。
根据本公开的一个或多个实施例,上述根据上述列表项的数据对象对上述界面容器代理中上述列表项的界面数据对象进行更新,具体为:在Diff结果正确的情况下,通过DiffUtil回调,对上述界面容器代理中上述列表项的界面数据对象进行更新。
根据本公开的一个或多个实施例,上述状态包括以下至少一项:创建状态,开始状态,停止状态和销毁状态。
根据本公开的一个或多个实施例,该装置被进一步配置成:响应于上述数据对象列表中的列表项的数量满足预设条件,确定上述数据 对象列表中每个列表项对应的界面容器代理的状态;对上述界面容器代理的状态为停止状态的列表项进行存储;对上述数据对象列表中进行存储后的列表项进行删除操作,得到删除后数据对象列表。
根据本公开的一个或多个实施例,提供了一种电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如上述任一实施例描述的方法。
根据本公开的一个或多个实施例,提供了一种计算机可读介质,其上存储有计算机程序,其中,程序被处理器执行时实现如上述任一实施例描述的方法。
以上描述仅为本公开的一些较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开的实施例中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开的实施例中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (9)

  1. 一种界面显示方法,包括:
    针对数据对象列表中的列表项,创建界面容器代理并将所述列表项的界面数据对象置于所述界面容器代理中;
    响应于显示界面的第一更新操作,若所述第一更新操作用于指示所述列表项被更新到所述显示界面进行显示,则将所述界面容器代理绑定到所述显示界面上相应的界面容器;
    按照所述界面容器与所述界面容器代理之间的绑定关系,在所述显示界面上所述界面容器对应的区域中,对所述界面容器代理中所述列表项的界面数据对象进行显示。
  2. 根据权利要求1所述的方法,其中,在所述对所述界面容器代理中所述列表项的界面数据对象进行显示之后,还包括:
    响应于显示界面的第二更新操作,若所述第二更新操作用于指示所述列表项被更新出所述显示界面不再显示,则解除所述界面容器代理与所述界面容器之间的绑定关系。
  3. 根据权利要求1所述的方法,其中,还包括:
    在所述界面容器与所述界面容器代理绑定期间,在所述界面容器中订阅所述列表项的界面数据对象的状态;
    若所述列表项的界面数据对象的状态发生改变,对所述界面容器代理中所述列表项的界面数据对象进行更新。
  4. 根据权利要求3所述的方法,其中,所述根据所述列表项的数据对象对所述界面容器代理中所述列表项的界面数据对象进行更新,具体为:
    在Diff结果正确的情况下,通过DiffUtil回调,对所述界面容器代理中所述列表项的界面数据对象进行更新。
  5. 根据权利要求3所述的方法,其中,所述状态包括以下至少一项:创建状态,开始状态,停止状态和销毁状态。
  6. 根据权利要求5所述的方法,其中,还包括:
    响应于所述数据对象列表中的列表项的数量满足预设条件,确定所述数据对象列表中每个列表项对应的界面容器代理的状态;
    对所述界面容器代理的状态为停止状态的列表项进行存储;
    对所述数据对象列表中进行存储后的列表项进行删除操作,得到删除后数据对象列表。
  7. 一种界面显示装置,包括:
    创建单元,被配置成针对数据对象列表中的列表项,创建界面容器代理并将所述列表项的界面数据对象置于所述界面容器代理中;
    绑定单元,被配置成响应于显示界面的第一更新操作,若所述第一更新操作用于指示所述列表项被更新到所述显示界面进行显示,则将所述界面容器代理绑定到所述显示界面上相应的界面容器;
    显示单元,被配置成按照所述界面容器与所述界面容器代理之间的绑定关系,在所述显示界面上所述界面容器对应的区域中,对所述界面容器代理中所述列表项的界面数据对象进行显示。
  8. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,其上存储有一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-6中任一所述的方法。
  9. 一种计算机可读介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求1-6中任一所述的方法。
PCT/CN2021/104144 2020-07-23 2021-07-02 界面显示方法、装置、电子设备和介质 Ceased WO2022017154A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/006,333 US12282783B2 (en) 2020-07-23 2021-07-02 Data object list display method, data object list display apparatus, electronic device and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010716130.0 2020-07-23
CN202010716130.0A CN113971060B (zh) 2020-07-23 2020-07-23 界面显示方法、装置、电子设备和介质

Publications (1)

Publication Number Publication Date
WO2022017154A1 true WO2022017154A1 (zh) 2022-01-27

Family

ID=79585293

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/104144 Ceased WO2022017154A1 (zh) 2020-07-23 2021-07-02 界面显示方法、装置、电子设备和介质

Country Status (3)

Country Link
US (1) US12282783B2 (zh)
CN (1) CN113971060B (zh)
WO (1) WO2022017154A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113971060B (zh) 2020-07-23 2023-10-27 抖音视界有限公司 界面显示方法、装置、电子设备和介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100070924A1 (en) * 2008-09-18 2010-03-18 Microsoft Corporation Rendering a customized list of controls
CN103778128A (zh) * 2012-10-18 2014-05-07 腾讯科技(深圳)有限公司 一种列表信息的绘制方法和装置
US8887085B1 (en) * 2008-03-20 2014-11-11 Amazon Technologies, Inc. Dynamic content navigation
CN105607909A (zh) * 2015-12-21 2016-05-25 武汉斗鱼网络科技有限公司 一种基于mvc框架改进列表开发效率的方法和系统
US20160154543A1 (en) * 2014-12-02 2016-06-02 Facebook, Inc. Generating a List of Content Items
CN109669756A (zh) * 2018-12-25 2019-04-23 北京金山安全软件有限公司 数据刷新方法、装置、电子设备及存储介质

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100035474A (ko) * 2008-09-26 2010-04-05 삼성전자주식회사 휴대 단말기의 컨텐츠 리스트 표시 방법
US9311069B2 (en) * 2013-03-13 2016-04-12 Google Inc. Search in application launcher
CN107797833B (zh) * 2016-08-29 2020-08-28 雪球(北京)技术开发有限公司 智能设备上应用程序的界面显示方法
CN106445314B (zh) * 2016-09-07 2019-07-26 Oppo广东移动通信有限公司 显示界面刷新方法及装置
CN107484003B (zh) * 2017-07-01 2019-11-15 武汉斗鱼网络科技有限公司 电视列表数据局部刷新方法、存储介质、电子设备及系统
US20190146645A1 (en) * 2017-11-14 2019-05-16 Renew.com Inc. Replaying event-based sessions between a user device and an agent device
CN110618821A (zh) * 2018-06-19 2019-12-27 普天信息技术有限公司 基于Docker的容器集群系统及快速搭建方法
US10860603B2 (en) * 2018-06-29 2020-12-08 Lucid Software, Inc. Visualization customization
CN109976620B (zh) * 2019-03-28 2020-09-01 北京字节跳动网络技术有限公司 列表项展现属性信息的确定方法、装置、设备及存储介质
CN110109670B (zh) * 2019-05-16 2020-06-23 北京字节跳动网络技术有限公司 视图列表数据的处理方法、装置、电子设备及存储介质
CN110750323A (zh) * 2019-10-28 2020-02-04 北京字节跳动网络技术有限公司 社交界面入口的显示方法、装置、电子设备及存储介质
CN111309417B (zh) * 2020-01-19 2024-07-26 北京有竹居网络技术有限公司 应用程序中的数据显示方法、装置、电子设备和可读介质
CN113971060B (zh) 2020-07-23 2023-10-27 抖音视界有限公司 界面显示方法、装置、电子设备和介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8887085B1 (en) * 2008-03-20 2014-11-11 Amazon Technologies, Inc. Dynamic content navigation
US20100070924A1 (en) * 2008-09-18 2010-03-18 Microsoft Corporation Rendering a customized list of controls
CN103778128A (zh) * 2012-10-18 2014-05-07 腾讯科技(深圳)有限公司 一种列表信息的绘制方法和装置
US20160154543A1 (en) * 2014-12-02 2016-06-02 Facebook, Inc. Generating a List of Content Items
CN105607909A (zh) * 2015-12-21 2016-05-25 武汉斗鱼网络科技有限公司 一种基于mvc框架改进列表开发效率的方法和系统
CN109669756A (zh) * 2018-12-25 2019-04-23 北京金山安全软件有限公司 数据刷新方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
US20230273802A1 (en) 2023-08-31
US12282783B2 (en) 2025-04-22
CN113971060A (zh) 2022-01-25
CN113971060B (zh) 2023-10-27

Similar Documents

Publication Publication Date Title
WO2023040443A1 (zh) 用于绘制画布的方法和装置
WO2023040948A1 (zh) 信息的处理方法、装置、终端和存储介质
CN111597467A (zh) 展示方法、装置和电子设备
CN114817631A (zh) 媒体内容的发布方法、装置、设备、存储介质和程序产品
CN115334027B (zh) 信息处理方法、装置、电子设备和存储介质
WO2023124962A1 (zh) 任务参与者的添加方法、装置、电子设备以及存储介质
CN114331331A (zh) 信息处理方法、装置、电子设备和存储介质
US20230385080A1 (en) Method and apparatus for presenting information on lock screen interface, terminal, and storage medium
WO2025055917A1 (zh) 话题界面的显示方法、装置、电子设备和存储介质
CN111596991A (zh) 交互操作执行方法、装置和电子设备
CN118627481B (zh) 表格处理方法、装置、终端和存储介质
JP2024509808A (ja) ドキュメント作成方法、装置、デバイス及び記憶媒体
JP2025533416A (ja) テーブルデータ処理方法、装置、電子機器、記憶媒体及びコンピュータプログラム
CN111274503B (zh) 数据处理的方法、装置、电子设备及计算机可读介质
CN107205031B (zh) 信息提醒方法、装置和终端设备
CN110633126B (zh) 信息显示方法、装置和电子设备
CN112035030A (zh) 信息展示方法、装置和电子设备
CN111460211A (zh) 音频信息播放方法、装置和电子设备
CN111459364A (zh) 图标更新方法、装置和电子设备
CN111273830A (zh) 显示数据方法、装置、电子设备和计算机可读介质
CN114697285A (zh) 信息展示和信息发送方法、装置、设备、介质和产品
WO2022148485A1 (zh) 信息展示方法、装置和电子设备
CN117234588A (zh) 信息处理方法、装置、电子设备和存储介质
CN115145560B (zh) 业务编排方法、装置、设备、计算机可读介质和程序产品
CN111399872A (zh) 页面更新方法、装置和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21846692

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 020523)

122 Ep: pct application non-entry in european phase

Ref document number: 21846692

Country of ref document: EP

Kind code of ref document: A1

WWG Wipo information: grant in national office

Ref document number: 18006333

Country of ref document: US