CN104252309B - A kind of method and system for realizing intelligent terminal Chinese version editor - Google Patents

A kind of method and system for realizing intelligent terminal Chinese version editor Download PDF

Info

Publication number
CN104252309B
CN104252309B CN201310270578.4A CN201310270578A CN104252309B CN 104252309 B CN104252309 B CN 104252309B CN 201310270578 A CN201310270578 A CN 201310270578A CN 104252309 B CN104252309 B CN 104252309B
Authority
CN
China
Prior art keywords
control
character
text
textual presentation
sub
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
CN201310270578.4A
Other languages
Chinese (zh)
Other versions
CN104252309A (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 Feinno Communication Technology Co Ltd
Original Assignee
Beijing Feinno Communication 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 Feinno Communication Technology Co Ltd filed Critical Beijing Feinno Communication Technology Co Ltd
Priority to CN201310270578.4A priority Critical patent/CN104252309B/en
Publication of CN104252309A publication Critical patent/CN104252309A/en
Application granted granted Critical
Publication of CN104252309B publication Critical patent/CN104252309B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention discloses a kind of method and system for realizing intelligent terminal Chinese version editor, and method includes:Text editing control, textual presentation control and text control are created in the view, set the size of the text control identical with the size of the textual presentation control, and the text control is placed on the textual presentation control;When text editing application starts, main thread is automatically created by intelligent terminal platform;When intelligent terminal screen is clicked, click event is triggered, the click event is handed down to the text control, the click event is handled by the text control;When inputting character in the text editing control, the operation of correspondence input character creates sub-line journey, the character of input is obtained by sub-line journey, the problem of can not being shown word one by one in text editing when being solved by main thread in the textual presentation control with the character present invention acquired by setpoint frequency displaying sub-line journey in character input.

Description

A kind of method and system for realizing intelligent terminal Chinese version editor
Technical field
The present invention relates to intelligent terminal field, more particularly to a kind of method for realizing intelligent terminal Chinese version editor and it is System.
Background technology
Word input is carried out by control in intelligent terminal, control includes text editing control EditText (A) and text Displaying control EditText (B) and text control TextView (C).Textual presentation control is used to show by text editing control The text of input, text editing control is the input interface of user inputs character.Text control shows static text.In existing skill In art, text editing control is used alone and textual presentation control carries out text editing, the word of input is shown one by one.
But, using the method that text editing control and textual presentation control carry out text editing is used alone, work as intelligence When energy terminal screen is clicked, textual presentation control receives click event, and soft keyboard input method can be recalled afterwards, from there through Software keyboard input method inputs character, carries out text importing after validation.Thus, it is impossible to obtain the effect for showing word one by one Really.
The content of the invention
The invention provides the method and system for realizing intelligent terminal Chinese version editor, with solve to obtain by word by The problem of effect of individual displaying.
According to an aspect of the present invention, a kind of method for realizing intelligent terminal Chinese version editor, methods described are disclosed Including:
A kind of method for realizing intelligent terminal Chinese version editor, it is characterised in that methods described includes:
Text editing control, textual presentation control and text control are created in the view, and the chi of the text control is set It is very little identical with the size of the textual presentation control, and the text control is placed on the textual presentation control;
When text editing application starts, main thread is automatically created by intelligent terminal platform;
When intelligent terminal screen is clicked, click event is triggered, the click event is handed down to the text control, The click event is handled by the text control;
When inputting character in the text editing control, the operation of correspondence input character creates sub-line journey, passes through son Thread obtains the character of input, is shown by main thread in the textual presentation control with setpoint frequency acquired by sub-line journey Character.
Wherein, the described text control is placed on the textual presentation control specifically includes:
The property value of relative placement is set in the text control so that the edge of the text control and the text The justified margin of displaying control.
Wherein, the character for obtaining input by sub-line journey is specifically included:
Input operation is handled using sub-line journey, the character inputted in the text editing control is obtained, and send to message Device sends the message Message objects for including acquired character;
It is described to show that the character acquired by sub-line journey has in the textual presentation control with setpoint frequency by main thread Body includes:
The Message objects that sub-line journey is sent are received using message sender, the character in Message objects is obtained, will Character one by one, be periodically sent to main thread;
The character sent is received using main thread, is often received after a character, according to updating the character of the reception Content in textual presentation control.
Wherein, methods described also includes:
After the character acquired by sub-line journey is shown with setpoint frequency in the textual presentation control by main thread, Cursor position is set to after the word of textual presentation control in textual presentation control.
Wherein, methods described also includes:
The pattern of cursor is revised as strigula in textual presentation control.
Wherein, it is described to be specifically included by the text control processing click event:
The text control receives click event, handles clicking on event, and the point is shielded to textual presentation control Hit event.
According to another aspect of the present invention, a kind of system for realizing intelligent terminal Chinese version editor, the system are disclosed Including:
Control creating unit, for creating text editing control, textual presentation control and text control in the view, is set The size of the text control is identical with the size of the textual presentation control, and the text control is placed in into the text exhibition Show on control;
Thread creation unit, for when text editing application starts, main thread to be automatically created by intelligent terminal platform;
Clicking operation processing unit, for when intelligent terminal screen is clicked, click event being triggered, by the click thing Part is handed down to the text control, and the click event is handled by the text control;
Input operation processing unit, for when inputting character in the text editing control, indicating thread creation list The operation of member correspondence input character creates sub-line journey, the character of input is obtained by sub-line journey, by main thread in the text The character acquired by sub-line journey is shown with setpoint frequency in displaying control.
Wherein, the control creating unit, the property value specifically for setting relative placement in the text control, makes Obtain the edge of the text control and the justified margin of the textual presentation control.
Wherein, the input operation processing unit, specifically for handling input operation using sub-line journey, obtains the text The character inputted in edit control, and the message Message objects for including acquired character are sent to message sender;
The input operation processing unit, specifically for receiving Message pairs that sub-line journey is sent using message sender As, obtain Message objects in character, by character one by one, be periodically sent to main thread, utilize main thread receive send Character, is often received after a character, and content in the textual presentation control is updated according to the character of the reception.
Wherein, the input operation processing unit, is additionally operable to setting in the textual presentation control by main thread Determine after the character acquired by frequency displaying sub-line journey, cursor position is set to positioned at textual presentation in textual presentation control After the word of control.
The beneficial effects of the invention are as follows:Placed and an equal amount of text of text displaying control on textual presentation control Control, and when intelligent terminal screen is clicked, click event is triggered, the event of will click on is handed down to text control, passes through text Control handles the click event, it is to avoid textual presentation control receives click event, when inputting character in intelligent terminal, leads to The character that sub-line journey obtains the input of text editing control is crossed, son is shown with setpoint frequency in textual presentation control by main thread Character acquired by thread.Thus, it is possible to intercept click event using text control, and then textual presentation control is prevented to clicking on Event is responded, and soft keyboard input method will not be recalled when clicking on, and then achieve the effect that character is shown with printer mode Really, i.e., acquired character is shown with setpoint frequency.
Brief description of the drawings
Fig. 1 is the flow chart of the method for realizing intelligent terminal Chinese version editor according to one embodiment of the invention;
Fig. 2 is the structure chart of the system for realizing intelligent terminal Chinese version editor according to one embodiment of the invention.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention Formula is described in further detail.
It is the flow chart of the method for realizing intelligent terminal Chinese version editor according to one embodiment of the invention referring to Fig. 1.Such as Shown in figure, this method comprises the following steps.
Step S110, creates text editing control, textual presentation control and text control in the view, sets text control Size it is identical with the size of textual presentation control, and text control is placed on textual presentation control.
In one embodiment, text control is placed on textual presentation control and specifically included:Set in text control The property value of relative placement so that the edge of text control and the justified margin of textual presentation control.For example, setting relative placement Feather edge alignment properties layout_alignBottom, by the feather edge pair of the feather edge of text control and textual presentation control Together;The top edge alignment properties layout_alignTop of relative placement is set, by the top edge of text control and textual presentation control The top edge alignment of part;The left hand edge alignment properties layout_alignLeft of relative placement is set, by the left side of text control Edge aligns with the left hand edge of textual presentation control;The right hand edge alignment properties layout_alignRight of relative placement is set, will The right hand edge of text control aligns with the right hand edge of textual presentation control.
In addition, being additionally may included in cursor to reach in more preferable bandwagon effect, step S110 in textual presentation control Pattern be revised as strigula, and background pattern is set.
For example, as textual presentation control can be set in the following way in Andriod systems.
Afterwards, text control is set, text control is placed on textual presentation control by relative placement.
By above-mentioned steps, text control is placed on textual presentation control, and does not have content in text control, quite In a transparent figure layer.
Step S120, when text editing application starts, main thread is automatically created by intelligent terminal platform.
Step S130, when intelligent terminal screen is clicked, triggers click event, the event of will click on is handed down to text control Part, the click event is handled by text control.
Specifically, the click event is handled by text control to specifically include:Text control receives click event, to point The event of hitting is handled, and the click event is shielded to textual presentation control.
For example, as that can be realized in Andriod systems to the seizure of click event by such as minor function.
Because, in each platform of intelligent terminal, to clicking on the processing of event by the way of being issued by layer.When upper Layer is received after click event handled (return to true), and lower floor will not reprocess the click event.Therefore, by above-mentioned Step, can use text control to intercept click event, and thus textual presentation control will not reprocess click event, Soft keyboard input method would not be called.
Step S140, when inputting character in text editing control, the operation of correspondence input character creates sub-line journey, leads to The character that sub-line journey obtains input is crossed, is shown by main thread in textual presentation control with setpoint frequency acquired by sub-line journey Character.
In addition, step S140 is additionally may included in shows sub-line in textual presentation control by main thread with setpoint frequency After character acquired by journey, in textual presentation control by cursor position be set to positioned at textual presentation control word it Afterwards.Thus, produce and show the effect of cursor at the end of the content word of textual presentation control, and if in step s 110 The pattern of cursor is revised as strigula, then shows short cursor at the end of the content word of textual presentation control.
For example, the character inputted in text editing control is obtained by sub-line journey to specifically include:At sub-line journey Input operation is managed, the character inputted in text editing control is obtained, and disappearing comprising acquired character is sent to message sender Cease Message objects.
Show that the character acquired by sub-line journey is specifically included in textual presentation control with setpoint frequency by main thread:Profit The Message objects that sub-line journey is sent are received with message sender, the character in Message objects is obtained, by character one by one, calmly When be sent to main thread;The character sent is received using main thread, is often received after a character, according to the character of the reception Update content in textual presentation control.
By taking Android system as an example, message sender is processor Handler.
And in wp7(Windows Phone 7)In, can be real by cross-thread mechanism Dispatcher.BeginInvoke The function of existing message sender.
Herein, carried out data transmission by message sender between sub-line journey and main thread, and carried out using main thread Textual presentation control updates, and uses sub-line journey processing character input operation.So, grasped without being inputted using main thread processing character Make, can avoid because of the character entering function exception or processing time time-out so that whole intelligent terminal enters torpor, So as to cause to close by force.Textual presentation control renewal is carried out using main thread, enables to intelligent terminal platform safer.
Message function is sent by the timing of processor message sender so that printer mode is easier realization, message Input character obtained by sub-line journey is sent to main thread by transmitter one by one at a time interval, and main thread only need to be whenever receiving During character, textual presentation control is updated by the character, the character display effect of printer mode just can be obtained.
Thus, using above-described embodiment, text control can be used to intercept click event, and then prevent textual presentation control Click event is responded, soft keyboard input method will not be recalled when clicking on, and then achieve the word for ensureing printer mode Accord with the effect of exhibition method.Also, with setting compared with textual presentation control do not receive the mode of focus, the present embodiment can also be Display highlighting after the word of displaying, further enriches displaying content, it is possible to prompt the user with current input position.
As shown in Fig. 2 being the structure chart of the system for realizing intelligent terminal Chinese version editor according to one embodiment of the invention. The system includes such as lower unit.
Control creating unit 210, for creating text editing control, textual presentation control and text control in the view, Set the size of text control identical with the size of textual presentation control, and text control is placed on textual presentation control.
Thread creation unit 240, for when text editing application starts, main line to be automatically created by intelligent terminal platform Journey.
Clicking operation processing unit 220, for when intelligent terminal screen is clicked, triggering click event, will click on thing Part is handed down to text control, and the click event is handled by text control.
For example, clicking operation processing unit 220, for receiving click event by text control, to clicking on event Handled, and the click event is shielded to textual presentation control
Input operation processing unit 230, for when inputting character in text editing control, indicating thread creating unit The operation of 240 correspondence input characters creates sub-line journey, the character of input is obtained by sub-line journey, by main thread in textual presentation The character acquired by sub-line journey is shown with setpoint frequency in control.
It is preferred that control creating unit 210, the property value specifically for setting relative placement in text control so that The edge of text control and the justified margin of textual presentation control.
It is preferred that input operation processing unit 230, specifically for handling input operation using sub-line journey, obtains text and compiles The character inputted in control is collected, and the message Message objects for including acquired character are sent to processor message sender;And Using message sender receive sub-line journey send Message objects, obtain Message objects in character, by character one by one, Main thread is periodically sent to, the character sent is received using main thread, is often received after a character, according to the word of the reception Symbol updates content in textual presentation control.
It is preferred that input operation processing unit 230, is additionally operable to setting frequency in textual presentation control by main thread After character acquired by rate displaying sub-line journey, cursor position is set to positioned at textual presentation control in textual presentation control Word after.
It is preferred that control creating unit 210, is additionally operable in textual presentation control the pattern of cursor being revised as hyphen Line.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention, this hair Bright technical scheme is also not limited to Andriod systems.That is made within the spirit and principles of the invention any repaiies Change, equivalent substitution, improvement etc., be all contained in protection scope of the present invention.

Claims (10)

1. a kind of method for realizing intelligent terminal Chinese version editor, it is characterised in that methods described includes:
Create text editing control, textual presentation control and text control in the view, set the size of the text control with The size of the textual presentation control is identical, and the text control is placed on the textual presentation control;
When text editing application starts, main thread is automatically created by intelligent terminal platform;
When intelligent terminal screen is clicked, click event is triggered, the click event is handed down to the text control, passed through The text control handles the click event;
When inputting character in the text editing control, the operation of correspondence input character creates sub-line journey, passes through sub-line journey The character of input is obtained, the word acquired by sub-line journey is shown with setpoint frequency in the textual presentation control by main thread Symbol;
The character for obtaining input by sub-line journey is specifically included:
Input operation is handled using sub-line journey, the character inputted in the text editing control is obtained, and send out to message sender Send the message Message objects for including acquired character.
2. according to the method described in claim 1, it is characterised in that
The described text control is placed on the textual presentation control specifically includes:
The property value of relative placement is set in the text control so that the edge of the text control and the textual presentation The justified margin of control.
3. according to the method described in claim 1, it is characterised in that
It is described to show that the character acquired by sub-line journey is specifically wrapped in the textual presentation control with setpoint frequency by main thread Include:
The Message objects that sub-line journey is sent are received using message sender, the character in Message objects are obtained, by character One by one, periodically it is sent to main thread;
The character sent is received using main thread, is often received after a character, the text is updated according to the character of the reception Content in displaying control.
4. according to the method described in claim 1, it is characterised in that
Methods described also includes:
After the character acquired by sub-line journey is shown with setpoint frequency in the textual presentation control by main thread, in text Cursor position is set to after the word of textual presentation control in this displaying control.
5. method according to claim 4, it is characterised in that
Methods described also includes:
The pattern of cursor is revised as strigula in textual presentation control.
6. according to the method described in claim 1, it is characterised in that
It is described to be specifically included by the text control processing click event:
The text control receives click event, handles clicking on event, and the click thing is shielded to textual presentation control Part.
7. a kind of system for realizing intelligent terminal Chinese version editor, it is characterised in that the system includes:
Control creating unit, for creating text editing control, textual presentation control and text control in the view, sets described The size of text control is identical with the size of the textual presentation control, and the text control is placed in into the textual presentation control On part;
Thread creation unit, for when text editing application starts, main thread to be automatically created by intelligent terminal platform;
Clicking operation processing unit, for when intelligent terminal screen is clicked, click event being triggered, by under the click event The text control is issued, the click event is handled by the text control;
Input operation processing unit, for when inputting character in the text editing control, indicating thread creating unit pair The operation that character should be inputted creates sub-line journey, the character of input is obtained by sub-line journey, by main thread in the textual presentation The character acquired by sub-line journey is shown with setpoint frequency in control;
The input operation processing unit, specifically for handling input operation using sub-line journey, obtains the text editing control The character of middle input, and the message Message objects for including acquired character are sent to message sender.
8. system according to claim 7, it is characterised in that
The control creating unit, the property value specifically for setting relative placement in the text control so that the text The justified margin at the edge of this control and the textual presentation control.
9. system according to claim 7, it is characterised in that
The input operation processing unit, specifically for receiving the Message objects that sub-line journey is sent using message sender, takes Character in Message objects, by character one by one, be periodically sent to main thread, the character sent is received using main thread, Often receive after a character, content in the textual presentation control is updated according to the character of the reception.
10. system according to claim 9, it is characterised in that
The input operation processing unit, is additionally operable to show with setpoint frequency in the textual presentation control by main thread After character acquired by sub-line journey, cursor position is set to the word positioned at textual presentation control in textual presentation control Afterwards.
CN201310270578.4A 2013-06-29 2013-06-29 A kind of method and system for realizing intelligent terminal Chinese version editor Active CN104252309B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310270578.4A CN104252309B (en) 2013-06-29 2013-06-29 A kind of method and system for realizing intelligent terminal Chinese version editor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310270578.4A CN104252309B (en) 2013-06-29 2013-06-29 A kind of method and system for realizing intelligent terminal Chinese version editor

Publications (2)

Publication Number Publication Date
CN104252309A CN104252309A (en) 2014-12-31
CN104252309B true CN104252309B (en) 2017-08-04

Family

ID=52187276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310270578.4A Active CN104252309B (en) 2013-06-29 2013-06-29 A kind of method and system for realizing intelligent terminal Chinese version editor

Country Status (1)

Country Link
CN (1) CN104252309B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106484413B (en) * 2016-09-30 2019-09-20 深圳市华傲数据技术有限公司 Document editor and document edit method
CN106648371A (en) * 2016-12-29 2017-05-10 北京小米移动软件有限公司 Method and device for moving text based on text file
CN108614723B (en) * 2018-04-28 2019-09-13 北京字节跳动网络技术有限公司 The method and device thereof for preventing the attribute information of interface control to be stolen

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148048A (en) * 2011-05-12 2011-08-10 北京瑞信在线系统技术有限公司 Lyric display method and device
CN102193905A (en) * 2011-05-26 2011-09-21 广东威创视讯科技股份有限公司 Virtual text editing method and device based on GDI (graphics device interface)/GDI+
CN102622215A (en) * 2011-01-27 2012-08-01 腾讯科技(深圳)有限公司 Method for editing image-text units based on script

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007141148A (en) * 2005-11-22 2007-06-07 Ricoh Co Ltd System, device, method, program and storage medium for information processing
US8200762B2 (en) * 2006-06-01 2012-06-12 Aol Inc. Displaying complex messaging threads into a single display

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622215A (en) * 2011-01-27 2012-08-01 腾讯科技(深圳)有限公司 Method for editing image-text units based on script
CN102148048A (en) * 2011-05-12 2011-08-10 北京瑞信在线系统技术有限公司 Lyric display method and device
CN102193905A (en) * 2011-05-26 2011-09-21 广东威创视讯科技股份有限公司 Virtual text editing method and device based on GDI (graphics device interface)/GDI+

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Android中在EditText输入文字后同步显示在TextView;YoVinci;《URL:http://www.cnblogs.com/sense7/archive/2012/06/14/2549393.html》;20120614;1-3 *
基于FCKeditor多在线文本编辑器的设计;饶永生 等;《电脑知识与技术》;20080831;第3卷(第6期);1198-1199,1220 *
多文档界面文本编辑器的设计与实现;袁灏 等;《微机发展》;20031130;第13卷(第11期);6-8 *
网络编程--多线程技术实现网络聊天程序;乘风736;《URL:http://www.cnblogs.com/chengfeng736/archive/2011/10/16/2214350.html》;20111016;1-4 *

Also Published As

Publication number Publication date
CN104252309A (en) 2014-12-31

Similar Documents

Publication Publication Date Title
US10338793B2 (en) Messaging with drawn graphic input
CN110262715B (en) Information processing method and device, computer readable storage medium and electronic equipment
CN104572822B (en) Text shows method and device
CN105426103B (en) Message editing method and apparatus in a kind of mobile device
JP2011040035A (en) Display input device and computer program
US20190012301A1 (en) Information processing apparatus, information processing method, and information processing program
CN104252309B (en) A kind of method and system for realizing intelligent terminal Chinese version editor
JPWO2013094065A1 (en) Determination apparatus and determination program
CN106855772A (en) A kind of information displaying method and device
CN105607800A (en) Method and device for input display of terminal screen
JP2022120046A (en) Method of synchronizing verification code, apparatus, electronic device, and storage medium
CN103941971A (en) Screen unlocking method and system
CN114116443A (en) Page data transmission method, device, system and medium
EP2990925A1 (en) Apparatus and method for displaying a virtual keyboard
CN106060000A (en) Method and device of identifying verification information
CN108632069B (en) Client configuration method, system and related equipment
CN108681531B (en) Document input control method and device
US10261979B2 (en) Method and apparatus for rendering a screen-representation of an electronic document
CN114415847A (en) Text information deleting method and device and electronic equipment
US10902251B2 (en) Digital assessment user interface with editable recognized text overlay
CN109782925B (en) Processing method and device and electronic equipment
KR101861128B1 (en) Appatus and mathod providing text message based on touch input
CN105208437B (en) Input interactive approach and device in a kind of Multi-screen interaction system
CN110941352B (en) Keyboard generation method, security information input method and device and mobile terminal
CN104219249B (en) The method and apparatus for returning to different content according to the configuration information of server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: Room 810, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Patentee after: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building 6 storey block A room 602

Patentee before: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder