Method for displaying data correctly in input box in Webview based on Android platform

An Android platform, a technology for displaying data, applied in electrical digital data processing, special data processing applications, instruments, etc., can solve the problems of delayed update, the data of the control cannot be updated in time, and the data is skipped.

Active Publication Date: 2013-12-25
FUJIAN CENTM INFORMATION
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Moreover, the most important problem is that all the Input tags share an Android input control, which makes the data of the control may be different when switching the input box due to calling timing and other reasons when using Javascript special effects for input control. Until timely update, or delayed update, this will appear, the current data problem
[0005] like figure 1 As shown, since Webview initiates Javascript data operation and Editview redraw operation are carried out by two different threads, so the running sequence is unknown, but the normal sequence should be, first perform data operation to change the value of the current input tag, and then change Editview Bit redraw binding operation, because the running timing is unknown due to two threads, so there will be a problem of jumping data

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
  • Method for displaying data correctly in input box in Webview based on Android platform
  • Method for displaying data correctly in input box in Webview based on Android platform
  • Method for displaying data correctly in input box in Webview based on Android platform

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0015] Webview is a control for Android to implement browser technology, and its core technology is Webcore. Browser functions can be realized by using Webview, including the use of Javascript technology. In the prior art, when Javascript is used to perform complex operations such as emptying and data formatting on the Input tag in the Webview, abnormal data displacement of the Input tag in the Webview occurs. Find the cause of the problem, then the present invention provides concrete basis for solving the problem, since the phenomenon presented is that the code on the Javascript side is redrawn in Editview, it can only improve the running time of Javascript, and the technology in this area is difficult to solve because of hardware and software bottlenecks. solve.

[0016] In order to be able to use Webview and solve the problem of jumping data, use the following technical solution, that is, perform data formatting in the function where the previous input tag .blur() loses fo...

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

A method for displaying data correctly in an input box in Webview based on an Android platform includes that data formatting is conducted in a function of last input label. blur () losing a focus, data resetting operation is conducted in a function of next input label. focus () obtaining the focus, and assignment reduction or assignment emptying is conducted; the assignment is an original value, namely a value in the input box is not changed; the assignment is empty, namely the value in the input box is empty. Emptying is that a unique Editview input box control is found through a method of conducting finding step by step by using a parent label, the content of the control is emptied when the input box is switched, and webview data is operated at an application end. By means of the method, complex Javascript can be used for conducting data formatting in an Input label, and the phenomenon that displaying can not be conducted normally due to hardware and software limitation is avoided.

Description

【Technical field】 [0001] The invention belongs to the technical field of software, and specifically refers to a method for correctly displaying data in an input box in a Webview based on an Android platform. 【Background technique】 [0002] The webpage program developed based on Android Webview technology, its architecture is divided into Webcore core layer and Android display layer, and the webpage tags parsed by Webcore must be displayed through the Android presentation layer. Currently, the input box control defined by the Android presentation layer is a corresponding webpage Multiple labels of , will cause abnormal input data. [0003] Webview is a bridge control between Html and Android. Webview is responsible for the parsing and display of Html. For the Input input box, the Html side is displayed as <input> In the form of tags, when Webview loads Html, it parses the Html and displays it on the screen. For the Input input box label, in order to realize the input ...

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
Patent Type & AuthorityApplications(China)
IPC IPC(8): G06F9/44G06F17/30
Inventor吕宏伟张登峰余杭军
OwnerFUJIAN CENTM INFORMATION