User interface updating method and device

A technology of user interface and implementation method, applied in the direction of user interface execution, program control device, software deployment, etc., can solve the problems of complex implementation, inconvenient maintenance, and confusion of program results.

Active Publication Date: 2018-05-08
WUHAN DOUYU NETWORK TECH CO LTD
View PDF2 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In order to overcome the problems of complex implementation, confusing program results and inconvenient maintenance in the above-mentioned existing us

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • User interface updating method and device
  • User interface updating method and device
  • User interface updating method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] The specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0037] In one embodiment of the present invention, a method for implementing user interface update is provided, figure 1 A schematic diagram of the overall flow of the implementation method for updating the user interface provided by the embodiment of the present invention, the method includes: S1, defining an interface protocol, defining a time-consuming task processing function and a user interface updating function in the interface protocol; S2, using the HandlerThread class Constructing a message sender, after calling the time-consuming task processing function in the time-consuming task processing sub-thread to complete the time-consuming task, calling the message sen...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a user interface updating method and device. The method includes the steps: S1 defining an interface protocol, and defining a time-consuming task processing function and a userinterface updating function in the interface protocol; S2 building a message sender by the aid of Handler Threads, and calling the message sender in a sub thread to send a completion message of a time-consuming task to a main thread after the time-consuming task is finished by a time-consuming task processing function called in the sub thread; S3 calling-back the user interface updating function in the main thread after the completion message of the time-consuming task is received by the main thread, and updating a user interface by the user interface updating function. According to the method, on one hand, the threads are automatically switched, system overhead is reduced, communication accuracy is improved, on the other handle, development efficiency is improved, a logical structure of aprogram is clearer, and later maintenance is facilitated.

Description

technical field [0001] The invention belongs to the field of software development, and more specifically relates to a method and device for updating a user interface. Background technique [0002] In Android, the update of the user interface is often involved. When updating the user interface, sometimes it is necessary to process many time-consuming tasks first, and the user interface can only be updated after the time-consuming tasks are processed and the results are obtained. In the Android system, if the time-consuming operation in the main thread exceeds 5 seconds, an ANR (Application Not Responding) error will be generated, which seriously affects the user experience. [0003] In the traditional development process, time-consuming tasks are stored in sub-threads for processing. However, the processing of time-consuming tasks in sub-threads will cause a problem of communication between sub-threads and the main thread. In Android, the tool for communication between the ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F8/38G06F8/65G06F9/451
CPCG06F8/38G06F8/65
Inventor 张磊陈少杰张文明
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products