CN103034468B - A kind of method and device showing text - Google Patents

A kind of method and device showing text Download PDF

Info

Publication number
CN103034468B
CN103034468B CN201210551925.6A CN201210551925A CN103034468B CN 103034468 B CN103034468 B CN 103034468B CN 201210551925 A CN201210551925 A CN 201210551925A CN 103034468 B CN103034468 B CN 103034468B
Authority
CN
China
Prior art keywords
character
text
parameter value
value
quantity parameter
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
CN201210551925.6A
Other languages
Chinese (zh)
Other versions
CN103034468A (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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201210551925.6A priority Critical patent/CN103034468B/en
Publication of CN103034468A publication Critical patent/CN103034468A/en
Application granted granted Critical
Publication of CN103034468B publication Critical patent/CN103034468B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a kind of method and the device that show text, the method comprises: the character quantity parameter value detecting text; When described character quantity parameter value is positioned at preset range, show the alphabet of described text.The method of the display text that the embodiment of the present invention provides and device, whether the character quantity had by detection text is at preset range, determine display text alphabet, still show a part, hide a part of text character, decrease processing load, the content of display text, reduces the interaction times of terminal and server flexibly, reduce costs, improve Consumer's Experience.

Description

A kind of method and device showing text
Technical field
The present invention relates to communication technique field, particularly relate to a kind of method and the device that show text.
Background technology
In today that mechanics of communication develops rapidly, mobile phone has become the necessity that most people works and lives every day.Utilizing mobile phone to browse text, as forum postings, is mode popular at present.
At present, user effort a lot of time on mobile phone browsing content, as browsed microblogging, rice etc.When browsing owing to using mobile phone, model is arranged in order one by one, if notice's content is very long, occupies a large amount of display space resource, is unfavorable for that user reads.General way is when model content-length is capable more than N, and only display N is capable, and remaining content is hidden, and after click launches, then shows in full.
But the content often hidden when reality uses only has the situation of one or two character.Therefore, current technology all hides model content according to fixed threshold.From the terminal point of display model content, showing terminal when hiding content needs to server obtaining information, adds the interaction times of server and terminal, there is the problem strengthening cost.From user perspective, content is hidden in display needs user's clicking operation, lacks dirigibility, there is the problem of losing time.
Summary of the invention
Embodiments provide a kind of method and the device that show text, in order to show the content of text flexibly, reduce the interaction times of terminal and server, reduce costs, improve the effect of Consumer's Experience.
A kind of method showing text that the embodiment of the present invention provides, comprising:
Detect the character quantity parameter value of text;
When described character quantity parameter value is positioned at preset range, show the alphabet of described text.
A kind of device showing text that the embodiment of the present invention provides, comprising:
Detection module, for detecting the character quantity parameter value of text;
Display module, for when described character quantity parameter value is positioned at preset range, shows the alphabet of described text.
The beneficial effect of the embodiment of the present invention comprises:
The method of the display text that the embodiment of the present invention provides and device, for detecting the character quantity parameter value of text; When described character quantity parameter value is positioned at preset range, show the alphabet of described text.The method of the display text that the embodiment of the present invention provides and device, the character quantity had by detection text, whether at preset range, determines display text alphabet, or a display part, hiding a part of text character.Like this, number of characters can be made to be greater than preset range first end point value and to be less than the text display full content of the second endpoint value, after avoiding user to put out hiding content, only occurring the situation of one or two character.Decrease processing load, the content of display text, reduces the interaction times of terminal and server, reduces costs flexibly, improves Consumer's Experience.
Accompanying drawing explanation
The method flow diagram of the display text that Fig. 1 provides for the embodiment of the present invention;
The method flow diagram of the display text that Fig. 2 provides for another embodiment of the present invention;
The method flow diagram of the display text that Fig. 3 provides for another embodiment of the present invention;
The plan structural representation of the device void of the display text of the video image that Fig. 4 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the method for display text provide the embodiment of the present invention and the embodiment of device are described in detail.
The method of the display text that the embodiment of the present invention provides, as shown in Figure 1, specifically comprises the following steps:
The character quantity parameter value of step 101, detection text;
Step 102, when character quantity parameter value is positioned at preset range, display text alphabet.
Wherein, above-mentioned text is mainly used in recording and storing Word message, instead of image, sound and formatted data, and the extension name of common text document has .txt .doc. .docx .wps etc.
Preferably, in one embodiment, preset range is made up of the numerical value between two end points and two end points, and the first end point value of preset range is less than the second endpoint value of preset range.Thus, when character quantity parameter value is less than first end point value, the alphabet of display text; When character quantity parameter value is greater than the second endpoint value, display text character number parameter value is less than the character portion of first end point value, and the number parameter value that hides character is not less than the character portion of first end point value.
Such as: preset range is 5 walk to 10 row, and its first end point value is the 5, second endpoint value is 10, and when the character quantity parameter value of text is 4 row, it is less than first end point value 5, then show the alphabet of text; When the character quantity parameter value of text is 8 row, be positioned at preset range, then show the alphabet of text; When the character quantity parameter value of text is 15 row, be greater than the second endpoint value 10, that is the character portion that display text character number parameter value is less than first end point value the 1st walks to the 4th row, and that is the character portion that the number parameter value that hides character is not less than first end point value the 5th walks to the 15th row.
Preferably, in one embodiment, receive after upgrading preset range instruction, the numerical value according to input upgrades preset range.Preset range can carry out renewal amendment, such as, preset range is walked to 10 row by 5 and revises and be updated to 7 and walk to 10 row.User, when operating, by clicking the option of amendment preset range, demonstrating the interface of amendment preset range, this interface can have scope input frame, input numerical value voluntarily by user; Also can have value range preset selective item, be convenient to user and directly select input numerical value in multiple option.After input numerical value to be determined, the processor to terminal (as mobile phone, computer etc.) sends and upgrades preset range instruction, and terminal upgrades preset range according to the numerical value of input again.
Preferably, in one embodiment, when character quantity parameter value is character line number, detects the character quantity parameter value of text, comprising: whether the often row of text of lining by line scan has character; If have character, then the character quantity parameter value of accumulative text adds one; If not there is character, then detect complete.
Preferably, in one embodiment, when character quantity parameter value is character number, detects the character quantity parameter value of text, comprising: whether there is character according to the current character position of the scan text one by one of order from top to bottom, from left to right; If have character, then the character quantity parameter value of accumulative text adds one; If not there is character, then detect complete.
Can be found out by foregoing description, the method for the display text that the embodiment of the present invention provides, the character quantity had by detection text, whether at preset range, determines display text alphabet, or a display part, hiding a part of text character.Like this, number of characters can be made to be greater than preset range first end point value and to be less than the text display full content of the second endpoint value, after avoiding user to put out hiding content, only occurring the situation of one or two character.Decrease processing load, the content of display text, reduces the interaction times of terminal and server, reduces costs flexibly, improves Consumer's Experience.
Preset range is made up of the numerical value between two end points and two end points, and the first end point value of preset range is less than the second endpoint value of preset range.When alphabetic character number parameter value is alphabetic character line number, suppose that first end point value be the 6, second endpoint value is 12, as shown in Figure 2, the method that the embodiment of the present invention provides, comprises the following steps:
Step 201, acquisition need the text shown; Such as, in the forum text such as pre-release model.
Whether the often row of step 202, text of lining by line scan has character; If have character, then perform step 203; Otherwise, detect complete, perform step 204;
The alphabetic character line number of step 203, accumulative text adds one, performs step 202;
The character line number of step 204, acquisition text, and preset range;
Step 205, judge whether character line number is positioned at preset range, if be positioned at, perform step 206; Otherwise, perform step 207;
Whole alphabetic characters of step 206, display text.
Step 207, judge the magnitude relationship of the endpoint value of character line number and preset range; When character line number is less than first end point value 6, perform step 206; When alphabetic character line number is greater than the second endpoint value 12, perform step 208;
Step 208, text importing the 1st walks to the content of the 5th row, the content that hidden text 5 row is later.
Can be found out by the description of the present embodiment, the method that the embodiment of the present invention provides, the character quantity had by detection text, whether at preset range, determines display text alphabet, or a display part, hiding a part of text character.Like this, number of characters can be made to be greater than preset range first end point value and to be less than the text display full content of the second endpoint value, after avoiding user to put out hiding content, only occurring the situation of one or two character.Decrease processing load, the content of display text, reduces the interaction times of terminal and server, reduces costs flexibly, improves Consumer's Experience.
Preset range is made up of the numerical value between two end points and two end points, and the first end point value of preset range is less than the second endpoint value of preset range.When character quantity parameter value is character number, suppose that first end point value be the 70, second endpoint value is 90, as shown in Figure 3, the method that the embodiment of the present invention provides, comprises the following steps:
Step 301, acquisition need the text shown;
Step 302, whether there is character according to the current character position of the scan text one by one of order from top to bottom, from left to right; If have character, then perform step 303; Otherwise, detect complete, perform step 304;
The character number of step 303, accumulative text adds one, performs step 302;
The character number of step 304, acquisition text, and preset range;
Step 305, judge whether character number is positioned at preset range, if be positioned at, perform step 306; Otherwise, perform step 307;
The alphabet of step 306, display text.
Step 307, judge the magnitude relationship of the endpoint value of character number and preset range; When character number is less than first end point value 70, perform step 306; When character number is greater than the second endpoint value 90, perform step 308;
The content of step 308, display character 1 to character 70, hide character 70 later contents.
Can be found out by the description of the present embodiment, the method that the embodiment of the present invention provides, the character quantity had by detection text, whether at preset range, determines display text alphabet, or a display part, hiding a part of text character.Like this, number of characters can be made to be greater than preset range first end point value and to be less than the text display full content of the second endpoint value, after avoiding user to put out hiding content, only occurring the situation of one or two character.Decrease processing load, the content of display text, reduces the interaction times of terminal and server, reduces costs flexibly, improves Consumer's Experience.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of device showing text, the principle of dealing with problems due to this device is similar to a kind of aforementioned method showing text, and therefore the enforcement of this device see the enforcement of method, can repeat part and repeat no more.
A kind of device showing text that the embodiment of the present invention provides, as shown in Figure 4, comprising:
Detection module 401, for detecting the character quantity parameter value of text;
Display module 402, for when character quantity parameter value is positioned at preset range, the alphabet of display text.
Preferably, when character quantity parameter value is less than first end point value, display module 402 shows the alphabet of text; When character quantity parameter value is greater than described second endpoint value, display module shows the character portion that 402 text character number parameter values are less than first end point value, and the number parameter value that hides character is not less than the character portion of first end point value; Wherein, preset range is made up of the numerical value between two end points and two end points, and the first end point value of preset range is less than the second endpoint value of preset range.
Preferably, this device also comprises:
Update module 403, after receiving the instruction of renewal preset range, the numerical value according to input upgrades preset range.
Preferably, when character quantity parameter value is character line number, detection module 401 line by line scan text often row whether there is character; If have character, then the character quantity parameter value of accumulative text adds one; If not there is character, then detect complete.
Preferably, when character quantity parameter value is character number, whether detection module 401 has character according to the current character position of the scan text one by one of order from top to bottom, from left to right; If have character, then the character quantity parameter value of accumulative described text adds one; If not there is character, then detect complete.
Known by foregoing description, the method for the display text that the embodiment of the present invention provides and device, the character quantity had by detection text, whether at preset range, determines display text alphabet, or a display part, hiding a part of text character.Like this, number of characters can be made to be greater than preset range first end point value and to be less than the text display full content of the second endpoint value, after avoiding user to put out hiding content, only occurring the situation of one or two character.Decrease processing load, the content of display text, reduces the interaction times of terminal and server, reduces costs flexibly, improves Consumer's Experience.
Through the above description of the embodiments, those skilled in the art can be well understood to the embodiment of the present invention can by hardware implementing, and the mode that also can add necessary general hardware platform by software realizes.Based on such understanding, the technical scheme of the embodiment of the present invention can embody with the form of software product, it (can be CD-ROM that this software product can be stored in a non-volatile memory medium, USB flash disk, portable hard drive etc.) in, comprise some instructions and perform method described in each embodiment of the present invention in order to make a computer equipment (can be personal computer, server, or the network equipment etc.).
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device in embodiment can carry out being distributed in the device of embodiment according to embodiment description, also can carry out respective change and be arranged in the one or more devices being different from the present embodiment.The module of above-described embodiment can merge into a module, also can split into multiple submodule further.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (8)

1. show a method for text, it is characterized in that, comprising:
Detect the character quantity parameter value of text;
When described character quantity parameter value is positioned at preset range, show the alphabet of described text;
Wherein, described preset range is made up of the numerical value between two end points and two end points, and the first end point value of described preset range is less than the second endpoint value of described preset range; Described method also comprises: when described character quantity parameter value is less than described first end point value, show the alphabet of described text; When described character quantity parameter value is greater than described second endpoint value, show the character portion that described text character number parameter value is less than described first end point value, hide the character portion that described character quantity parameter value is not less than described first end point value.
2. method according to claim 1, is characterized in that, described method also comprises:
Receive after upgrading preset range instruction, the numerical value according to input upgrades described preset range.
3. method according to claim 1, is characterized in that, when described character quantity parameter value is character line number, the character quantity parameter value of described detection text, comprising:
Whether the often capable of described text of lining by line scan has character;
If have character, then the character quantity parameter value of accumulative described text adds one;
If not there is character, then detect complete.
4. method according to claim 1, is characterized in that, when described character quantity parameter value is character number, the character quantity parameter value of described detection text, comprising:
Whether the current character position scanning described text according to order from top to bottom, from left to right one by one has character;
If have character, then the character quantity parameter value of accumulative described text adds one;
If not there is character, then detect complete.
5. show a device for text, it is characterized in that, comprising:
Detection module, for detecting the character quantity parameter value of text;
Display module, for when described character quantity parameter value is positioned at preset range, shows the alphabet of described text;
Wherein, when described character quantity parameter value is less than first end point value, described display module shows the alphabet of described text; When described character quantity parameter value is greater than the second endpoint value, described display module shows the character portion that described text character number parameter value is less than described first end point value, hides the character portion that described character quantity parameter value is not less than described first end point value; Wherein, described preset range is made up of the numerical value between two end points and two end points, and the first end point value of described preset range is less than the second endpoint value of described preset range.
6. device according to claim 5, is characterized in that, described device also comprises:
Update module, after receiving the instruction of renewal preset range, the numerical value according to input upgrades described preset range.
7. device according to claim 5, is characterized in that, when described character quantity parameter value is character line number, described detection module line by line scan described text often row whether there is character; If have character, then the character quantity parameter value of accumulative described text adds one; If not there is character, then detect complete.
8. device according to claim 5, is characterized in that, when described character quantity parameter value is character number, whether the current character position that described detection module scans described text one by one according to order from top to bottom, from left to right has character; If have character, then the character quantity parameter value of accumulative described text adds one; If not there is character, then detect complete.
CN201210551925.6A 2012-12-18 2012-12-18 A kind of method and device showing text Active CN103034468B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210551925.6A CN103034468B (en) 2012-12-18 2012-12-18 A kind of method and device showing text

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210551925.6A CN103034468B (en) 2012-12-18 2012-12-18 A kind of method and device showing text

Publications (2)

Publication Number Publication Date
CN103034468A CN103034468A (en) 2013-04-10
CN103034468B true CN103034468B (en) 2016-02-24

Family

ID=48021398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210551925.6A Active CN103034468B (en) 2012-12-18 2012-12-18 A kind of method and device showing text

Country Status (1)

Country Link
CN (1) CN103034468B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020289A (en) * 2017-09-30 2019-07-16 北京国双科技有限公司 Text display method, device and equipment in a kind of browser
CN110012156B (en) * 2019-02-28 2021-09-14 努比亚技术有限公司 Information display method, mobile terminal and non-transitory computer readable storage medium
CN113377220B (en) * 2021-06-30 2023-05-05 维沃移动通信(杭州)有限公司 Information storage method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002062792A (en) * 2000-08-21 2002-02-28 Akio Toshima Memory study system
CN101305336A (en) * 2005-11-14 2008-11-12 Oz通信公司 Context sensitive concealment of an input field
CN101727275A (en) * 2006-09-06 2010-06-09 苹果公司 Portable electronic device, method, and graphical user interface for displaying structured electronic documents
CN102436439A (en) * 2010-09-29 2012-05-02 鸿富锦精密工业(深圳)有限公司 Text box and text display method
CN102646089A (en) * 2011-02-16 2012-08-22 汉王科技股份有限公司 Text hiding and displaying method and device for electronic reader

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002062792A (en) * 2000-08-21 2002-02-28 Akio Toshima Memory study system
CN101305336A (en) * 2005-11-14 2008-11-12 Oz通信公司 Context sensitive concealment of an input field
CN101727275A (en) * 2006-09-06 2010-06-09 苹果公司 Portable electronic device, method, and graphical user interface for displaying structured electronic documents
CN102436439A (en) * 2010-09-29 2012-05-02 鸿富锦精密工业(深圳)有限公司 Text box and text display method
CN102646089A (en) * 2011-02-16 2012-08-22 汉王科技股份有限公司 Text hiding and displaying method and device for electronic reader

Also Published As

Publication number Publication date
CN103034468A (en) 2013-04-10

Similar Documents

Publication Publication Date Title
RU2645276C2 (en) Creation of variations when converting data to consumer content
CN102693280B (en) Webpage browsing method, WebApp framework, method and device for executing JavaScript, and mobile terminal
CN101335722B (en) Method for implementing same user interface and operation convention on different terminals
JP2020504865A (en) Application data processing method, apparatus, and storage medium
CN104704522A (en) Recommending native applications
CN103995884A (en) Hybrid application page switching method and system
CN105791352B (en) Message pushing method and system for application
CN102411614A (en) Display Of Image Search Results
CN105404458B (en) Webpage content updating method and device
CN104111950A (en) Webpage image loading method and webpage image loading device
CN103714141A (en) Information pushing method and device
KR20170030529A (en) Visualization suggestions
KR20220127334A (en) Table browsing methods, devices, electronic devices and storage media in documents
CN102436344A (en) Context menu
CN104750851A (en) Webpage content lazy loading method and system
CN105027116A (en) Flat book to rich book conversion in e-readers
CN104767810A (en) Cloud-client cooperative service system and cloud-client cooperative work method
Kim The library mobile experience: Practices and user expectations
TWI427490B (en) Methods and systems for viewing web pages, and computer program products thereof
CN103034468B (en) A kind of method and device showing text
EP4058907A1 (en) Modularizing and embedding supplemental textual and visual content in different environments
CN106371706A (en) Method and device for site selection of application shortcuts
CN103617043A (en) Method and system with picture webpage data uploading function
CN116569159A (en) Automatic depiction and extraction of tabular data in portable document format using a graph neural network
CN104572981A (en) Web page caching method and mobile terminal device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant after: Xiaomi Technology Co., Ltd.

Address before: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant before: Beijing Xiaomi Technology Co., Ltd.

C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 100085 Beijing city Haidian District Qinghe Street No. 68 Huarun colorful city shopping center two floor 13

Applicant after: Xiaomi Technology Co., Ltd.

Address before: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant before: Xiaomi Technology Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant