CN104252309A - Method and system for realizing text editing in intelligent terminal - Google Patents

Method and system for realizing text editing in intelligent terminal Download PDF

Info

Publication number
CN104252309A
CN104252309A CN201310270578.4A CN201310270578A CN104252309A CN 104252309 A CN104252309 A CN 104252309A CN 201310270578 A CN201310270578 A CN 201310270578A CN 104252309 A CN104252309 A CN 104252309A
Authority
CN
China
Prior art keywords
control
character
thread
text
textual presentation
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.)
Granted
Application number
CN201310270578.4A
Other languages
Chinese (zh)
Other versions
CN104252309B (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 invention discloses a method and a system for realizing text editing in an intelligent terminal. The method comprises the steps of establishing a text edit control, a text display control and a text control in a view, setting the size of the text control to be the same as that of the text display control, and setting the text control above the text display control; automatically establishing a main thread through a platform of the intelligent terminal when a text edit application is started; triggering a click event when a screen of the intelligent terminal is clicked, issuing the click event to the text control, and processing the click event through the text control; establishing a sub thread corresponding to the operation of inputting characters when the characters are input in the text edit control, obtaining the input characters through the sub thread, and displaying the characters which are obtained by the sub thread in the text display control in set frequency through the main thread. According to the method and the system, disclosed by the invention, the problem that the characters cannot be displayed one by one during text editing when the characters are input is solved.

Description

A kind of method and system realizing intelligent terminal Chinese version editor
Technical field
The present invention relates to intelligent terminal field, particularly a kind of method and system realizing intelligent terminal Chinese version editor.
Background technology
Carry out text event detection by control in intelligent terminal, control comprises text editing control EditText (A) and textual presentation control EditText (B) and text control TextView (C).Textual presentation control is for representing the text inputted by text editing control, and text editing control is the input interface of user inputs character.Text control shows static text.In the prior art, use text editing control and textual presentation control to carry out text editing individually, the word of input is shown one by one.
But, adopt and use text editing control and textual presentation control to carry out the method for text editing individually, when intelligent terminal screen is clicked, textual presentation control receives click event, soft keyboard input method can be recalled afterwards, carry out input character by software keyboard input method thus, carry out text importing after validation.Thus, the effect of being shown one by one by word cannot be obtained.
Summary of the invention
The invention provides the method and system realizing intelligent terminal Chinese version editor, to solve the problem that cannot obtain the effect of being shown one by one by word.
According to an aspect of the present invention, disclose a kind of method realizing intelligent terminal Chinese version editor, described method comprises:
Realize an intelligent terminal Chinese version editor's method, it is characterized in that, described method comprises:
Create text editing control, textual presentation control and text control in the view, the size of described text control and the measure-alike of described textual presentation control are set, and described text control are placed on described textual presentation control;
When text editing application start, automatically create main thread by intelligent terminal platform;
When intelligent terminal screen is clicked, triggers click event, described click event is handed down to described text control, by click event described in described text control process;
When in described text editing control during input character, the operation of corresponding input character creates sub-thread, is obtained the character of input by sub-thread, shows the character acquired by sub-thread by main thread in described textual presentation control with setpoint frequency.
Wherein, described described text control being placed on described textual presentation control specifically comprises:
The property value of relative placement is set in described text control, makes the justified margin of the edge of described text control and described textual presentation control.
Wherein, the described character obtaining input by sub-thread specifically comprises:
Utilize sub-thread process input operation, obtain the character inputted in described text editing control, and send the message Message object comprising acquired character to message sender;
Describedly in described textual presentation control, show that sub-thread acquired by character specifically comprise with setpoint frequency by main thread:
Utilize message sender to receive the Message object of sub-thread transmission, obtain the character in Message object, character is sent to main thread one by one, periodically;
Utilize main thread to receive the character sent, after often receiving a character, upgrade content in described textual presentation control according to the character of this reception.
Wherein, described method also comprises:
After showing the character acquired by sub-thread with setpoint frequency by main thread in described textual presentation control, be set to cursor position to be positioned at the word of textual presentation control in textual presentation control after.
Wherein, described method also comprises:
In textual presentation control, the pattern of cursor is revised as strigula.
Wherein, describedly specifically to be comprised by click event described in described text control process:
Described text control receives click event, processes, and shield this click event to textual presentation control to click event.
According to a further aspect in the invention, disclose a kind of system realizing intelligent terminal Chinese version editor, described system comprises:
Control creating unit, for creating text editing control, textual presentation control and text control in the view, arranging the size of described text control and the measure-alike of described textual presentation control, and described text control being placed on described textual presentation control;
Thread creation unit, for when text editing application start, creates main thread automatically by intelligent terminal platform;
Clicking operation processing unit, for when intelligent terminal screen is clicked, triggers click event, described click event is handed down to described text control, by click event described in described text control process;
Input operation processing unit, for when in described text editing control during input character, the operation of the corresponding input character of instruction thread creating unit creates sub-thread, obtained the character of input by sub-thread, in described textual presentation control, show sub-thread acquired by character with setpoint frequency by main thread.
Wherein, described control creating unit, specifically for arranging the property value of relative placement in described text control, makes the justified margin of the edge of described text control and described textual presentation control.
Wherein, described input operation processing unit, specifically for utilizing sub-thread process input operation, obtains the character inputted in described text editing control, and sends the message Message object comprising acquired character to message sender;
Described input operation processing unit, specifically for the Message object utilizing message sender to receive the transmission of sub-thread, obtain the character in Message object, character is sent to main thread one by one, periodically, main thread is utilized to receive the character sent, after often receiving a character, upgrade content in described textual presentation control according to the character of this reception.
Wherein, described input operation processing unit, also for after showing the character acquired by sub-thread with setpoint frequency by main thread in described textual presentation control, be set to cursor position to be positioned at the word of textual presentation control in textual presentation control after.
The invention has the beneficial effects as follows: on textual presentation control, place the text control onesize with text displaying control, and when intelligent terminal screen is clicked, trigger click event, click event is handed down to text control, by this click event of text control process, textual presentation control is avoided to receive click event, when in intelligent terminal during input character, obtained the character of text editing control input by sub-thread, in textual presentation control, show sub-thread acquired by character with setpoint frequency by main thread.Text control can be used thus to tackle click event, and then stop textual presentation control to respond click event, soft keyboard input method can not be recalled when clicking, and then achieve the effect of showing character with printer mode, the character acquired by namely showing with setpoint frequency.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the method realizing intelligent terminal Chinese version editor according to an embodiment of the invention;
Fig. 2 is the structural drawing of the system realizing intelligent terminal Chinese version editor according to an embodiment of the invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
See Fig. 1, for realizing the process flow diagram of the method for intelligent terminal Chinese version editor according to an embodiment of the invention.As shown in the figure, the method comprises the following steps.
Step S110, creates text editing control, textual presentation control and text control in the view, arranges the size of text control and the measure-alike of textual presentation control, and text control be placed on textual presentation control.
In one embodiment, text control is placed on textual presentation control and specifically comprises: the property value that relative placement is set in text control, make the edge of text control and the justified margin of textual presentation control.Such as, the feather edge alignment properties layout_alignBottom of relative placement is set, the feather edge of the feather edge of text control with textual presentation control is alignd; The top edge alignment properties layout_alignTop of relative placement is set, the top edge of the top edge of text control with textual presentation control is alignd; The left hand edge alignment properties layout_alignLeft of relative placement is set, the left hand edge of the left hand edge of text control with textual presentation control is alignd; The right hand edge alignment properties layout_alignRight of relative placement is set, the right hand edge of the right hand edge of text control with textual presentation control is alignd.
In addition, for reaching better bandwagon effect, can also be included in textual presentation control in step S110 and the pattern of cursor is revised as strigula, and background pattern is set.
For example, as textual presentation control can be arranged in the following way in Andriod system.
Afterwards, text control is set, by relative placement, text control is placed on textual presentation control.
By above-mentioned steps, text control is placed on textual presentation control, and does not have content in text control, is equivalent to a transparent layer.
Step S120, when text editing application start, creates main thread automatically by intelligent terminal platform.
Step S130, when intelligent terminal screen is clicked, triggers click event, click event is handed down to text control, by this click event of text control process.
Particularly, specifically comprised by click event described in text control process: text control receives click event, processes, and shield this click event to textual presentation control to click event.
For example, as realized by such as minor function the seizure of click event in Andriod system.
Because in each platform of intelligent terminal, all adopt to the process of click event the mode issued by layer.When upper strata receives after click event carries out processing (returning true), lower floor can not this click event of reprocessing.Therefore, by above-mentioned steps, text control can be used to tackle click event, textual presentation control can not reprocessing click event thus, also would not call soft keyboard input method.
Step S140, when in text editing control during input character, the operation of corresponding input character creates sub-thread, is obtained the character of input by sub-thread, shows the character acquired by sub-thread by main thread in textual presentation control with setpoint frequency.
In addition, after step S140 can also be included in and show the character acquired by sub-thread with setpoint frequency by main thread in textual presentation control, be set to cursor position to be positioned at the word of textual presentation control in textual presentation control after.Thus, produce the effect of showing 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 show short cursor at the end of the content word of textual presentation control.
For example, obtain by sub-thread the character inputted in text editing control specifically to comprise: utilize sub-thread process input operation, obtain the character inputted in text editing control, and send the message Message object comprising acquired character to message sender.
In textual presentation control, show that sub-thread acquired by character specifically comprise with setpoint frequency by main thread: utilize message sender to receive the Message object of sub-thread transmission, obtain the character in Message object, character is sent to main thread one by one, periodically; Utilize main thread to receive the character sent, after often receiving a character, the character according to this reception upgrades content in textual presentation control.
For Android system, message sender is processor Handler.
And at wp7(Windows Phone 7) in, the function of message sender can be realized by cross-thread mechanism Dispatcher.BeginInvoke.
, between sub-thread and main thread, carry out data transmission by message sender herein, and use main thread to carry out the renewal of textual presentation control, use sub-thread process character entering function.Like this, the input operation of main thread processing character need not be used, can avoid making whole intelligent terminal enter torpor because of this character entering function exception or processing time time-out, thus cause closing by force.Use main thread to carry out the renewal of textual presentation control, intelligent terminal platform can be made safer.
By the timed sending message function of processor message sender, printer mode is more easily realized, sub-thread gained input character is sent to main thread with certain hour interval by message sender one by one, main thread only need whenever receiving character, upgrade textual presentation control by this character, just can obtain the Charactes Display effect of printer mode.
Thus, adopt above-described embodiment, text control can be used to tackle click event, and then stop textual presentation control to respond click event, soft keyboard input method can not be recalled when clicking, and then achieve the effect of the character exhibition method ensureing printer mode.Further, compared with textual presentation control be set do not receive the mode of focus, the present embodiment can also after the word shown display highlighting, enriched displaying content further, and current input position can have been pointed out to user.
As shown in Figure 2, for realizing the structural drawing of the system of intelligent terminal Chinese version editor according to an embodiment of the invention.This system comprises as lower unit.
Control creating unit 210, for creating text editing control, textual presentation control and text control in the view, arranging the size of text control and the measure-alike of textual presentation control, and text control being placed on textual presentation control.
Thread creation unit 240, for when text editing application start, creates main thread automatically by intelligent terminal platform.
Clicking operation processing unit 220, for when intelligent terminal screen is clicked, triggers click event, click event is handed down to text control, by this click event of text control process.
For example, clicking operation processing unit 220, for receiving click event by text control, processes click event, and shields this click event to textual presentation control
Input operation processing unit 230, for when in text editing control during input character, the operation of the corresponding input character of instruction thread creating unit 240 creates sub-thread, obtained the character of input by sub-thread, in textual presentation control, show sub-thread acquired by character with setpoint frequency by main thread.
Preferably, control creating unit 210, specifically for arranging the property value of relative placement in text control, makes the edge of text control and the justified margin of textual presentation control.
Preferably, input operation processing unit 230, specifically for utilizing sub-thread process input operation, obtains the character inputted in text editing control, and sends the message Message object comprising acquired character to processor message sender; And utilize message sender to receive the Message object of sub-thread transmission, obtain the character in Message object, character is sent to main thread one by one, periodically, main thread is utilized to receive the character sent, after often receiving a character, the character according to this reception upgrades content in textual presentation control.
Preferably, input operation processing unit 230, also for after showing the character acquired by sub-thread with setpoint frequency by main thread in textual presentation control, after being set to be positioned at the word of textual presentation control in textual presentation control by cursor position.
Preferably, control creating unit 210, also for the pattern of cursor being revised as strigula in textual presentation control.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention, technical scheme of the present invention is also not only confined to Andriod system.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.

Claims (10)

1. realize an intelligent terminal Chinese version editor's method, it is characterized in that, described method comprises:
Create text editing control, textual presentation control and text control in the view, the size of described text control and the measure-alike of described textual presentation control are set, and described text control are placed on described textual presentation control;
When text editing application start, automatically create main thread by intelligent terminal platform;
When intelligent terminal screen is clicked, triggers click event, described click event is handed down to described text control, by click event described in described text control process;
When in described text editing control during input character, the operation of corresponding input character creates sub-thread, is obtained the character of input by sub-thread, shows the character acquired by sub-thread by main thread in described textual presentation control with setpoint frequency.
2. method according to claim 1, is characterized in that,
Described described text control being placed on described textual presentation control specifically comprises:
The property value of relative placement is set in described text control, makes the justified margin of the edge of described text control and described textual presentation control.
3. method according to claim 1, is characterized in that,
The described character obtaining input by sub-thread specifically comprises:
Utilize sub-thread process input operation, obtain the character inputted in described text editing control, and send the message Message object comprising acquired character to message sender;
Describedly in described textual presentation control, show that sub-thread acquired by character specifically comprise with setpoint frequency by main thread:
Utilize message sender to receive the Message object of sub-thread transmission, obtain the character in Message object, character is sent to main thread one by one, periodically;
Utilize main thread to receive the character sent, after often receiving a character, upgrade content in described textual presentation control according to the character of this reception.
4. method according to claim 1, is characterized in that,
Described method also comprises:
After showing the character acquired by sub-thread with setpoint frequency by main thread in described textual presentation control, be set to cursor position to be positioned at the word of textual presentation control in textual presentation control after.
5. method according to claim 4, is characterized in that,
Described method also comprises:
In textual presentation control, the pattern of cursor is revised as strigula.
6. method according to claim 1, is characterized in that,
Describedly specifically to be comprised by click event described in described text control process:
Described text control receives click event, processes, and shield this click event to textual presentation control to click event.
7. realize an intelligent terminal Chinese version editor's system, it is characterized in that, described system comprises:
Control creating unit, for creating text editing control, textual presentation control and text control in the view, arranging the size of described text control and the measure-alike of described textual presentation control, and described text control being placed on described textual presentation control;
Thread creation unit, for when text editing application start, creates main thread automatically by intelligent terminal platform;
Clicking operation processing unit, for when intelligent terminal screen is clicked, triggers click event, described click event is handed down to described text control, by click event described in described text control process;
Input operation processing unit, for when in described text editing control during input character, the operation of the corresponding input character of instruction thread creating unit creates sub-thread, obtained the character of input by sub-thread, in described textual presentation control, show sub-thread acquired by character with setpoint frequency by main thread.
8. system according to claim 7, is characterized in that,
Described control creating unit, specifically for arranging the property value of relative placement in described text control, makes the justified margin of the edge of described text control and described textual presentation control.
9. system according to claim 7, is characterized in that,
Described input operation processing unit, specifically for utilizing sub-thread process input operation, obtains the character inputted in described text editing control, and sends the message Message object comprising acquired character to message sender; And utilize message sender to receive the Message object of sub-thread transmission, obtain the character in Message object, character is sent to main thread one by one, periodically, main thread is utilized to receive the character sent, after often receiving a character, upgrade content in described textual presentation control according to the character of this reception.
10. system according to claim 9, is characterized in that,
Described input operation processing unit, also for after showing the character acquired by sub-thread with setpoint frequency by main thread in described textual presentation control, after being set to be positioned at the word of textual presentation control in textual presentation control by cursor position.
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 true CN104252309A (en) 2014-12-31
CN104252309B 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)

Cited By (3)

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

Citations (5)

* 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
US20070282956A1 (en) * 2006-06-01 2007-12-06 Aol, Llc Displaying complex messaging threads into a single display
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

Patent Citations (5)

* 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
US20070282956A1 (en) * 2006-06-01 2007-12-06 Aol, Llc Displaying complex messaging threads into a single display
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
YOVINCI: "Android中在EditText输入文字后同步显示在TextView", 《URL:HTTP://WWW.CNBLOGS.COM/SENSE7/ARCHIVE/2012/06/14/2549393.HTML》 *
乘风736: "网络编程--多线程技术实现网络聊天程序", 《URL:HTTP://WWW.CNBLOGS.COM/CHENGFENG736/ARCHIVE/2011/10/16/2214350.HTML》 *
袁灏 等: "多文档界面文本编辑器的设计与实现", 《微机发展》 *
饶永生 等: "基于FCKeditor多在线文本编辑器的设计", 《电脑知识与技术》 *

Cited By (3)

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

Also Published As

Publication number Publication date
CN104252309B (en) 2017-08-04

Similar Documents

Publication Publication Date Title
US20190324632A1 (en) Messaging with drawn graphic input
CN101834938A (en) Device and method for realizing horizontal/vertical screen switching of mobile terminal
CN105630939B (en) A kind of general painting canvas input interface design method and device
US20160162139A1 (en) Information display terminal
CN110297636B (en) Page automatic generation and parameter management method, system and device based on page configuration file
CN104298721B (en) A kind of arbitrarily a object split screen layout edit methods of the online courseware development based on Web
CN106610826B (en) Method and device for manufacturing online scene application
CN111767563A (en) Method, device, terminal and storage medium for setting authority of online document
CN104020950A (en) Input method based on touch screen and input device with touch screen
US20110128291A1 (en) Program generation device, program generation method, and computer-readable storage medium
CN112445564B (en) Interface display method, electronic device and computer readable storage medium
CN105117232A (en) Method and system for generating text image on user interface
CN104199917A (en) Method and device for translating webpage content and client
US20230269418A1 (en) Video display method, apparatus and storage medium
CN104252309A (en) Method and system for realizing text editing in intelligent terminal
CN106855772A (en) A kind of information displaying method and device
CN104881201B (en) Data display method and electronic equipment
CN114116443A (en) Page data transmission method, device, system and medium
CN112163432A (en) Translation method, translation device and electronic equipment
CN111934985A (en) Media content sharing method, device and equipment and computer readable storage medium
CN107908433A (en) Verify method, apparatus, equipment and the computer-readable recording medium of input content
CN108632069B (en) Client configuration method, system and related equipment
WO2016034067A1 (en) Webpage processing method and device
CN103838501A (en) Information processing method and electronic device
CN104951314A (en) Dialog box display method and system

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
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.