WO2022111406A1 - 控件显示方法、装置和电子设备 - Google Patents

控件显示方法、装置和电子设备 Download PDF

Info

Publication number
WO2022111406A1
WO2022111406A1 PCT/CN2021/132058 CN2021132058W WO2022111406A1 WO 2022111406 A1 WO2022111406 A1 WO 2022111406A1 CN 2021132058 W CN2021132058 W CN 2021132058W WO 2022111406 A1 WO2022111406 A1 WO 2022111406A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
cursor
displayed
text
arrow
Prior art date
Application number
PCT/CN2021/132058
Other languages
English (en)
French (fr)
Inventor
谢志恒
Original Assignee
维沃移动通信有限公司
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 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2022111406A1 publication Critical patent/WO2022111406A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0489Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using dedicated keyboard keys or combinations thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing

Definitions

  • the present application belongs to the technical field of text processing, and in particular relates to a control display method, device and electronic device.
  • the user may need to click or slide multiple times to accurately move the cursor to the back of the text to be deleted. improve the efficiency of text editing.
  • the purpose of the embodiments of the present application is to provide a control display method, device and electronic device, which can solve the technical problem of low text editing efficiency.
  • an embodiment of the present application provides a control display method, including:
  • the target control is used to delete characters in the displayed text, and the display parameter of the target control is associated with the display position of the cursor.
  • an embodiment of the present application provides a control display device, including:
  • a first receiving module for receiving the first input of the displayed text
  • a first display module for displaying a cursor in the displayed text in response to the first input
  • a second display module configured to display a target control in the interface according to the display position of the cursor
  • the target control is used to delete characters in the displayed text, and the display parameter of the target control is associated with the display position of the cursor.
  • embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
  • an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
  • an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.
  • a computer program product is provided, the computer program product is stored in a non-transitory storage medium, the computer program product is executed by at least one processor to implement the method of the first aspect.
  • the user in the process of text processing, displays a cursor in the displayed text according to the user's first input to the displayed text, and displays a target control in the interface according to the display position of the cursor. Since the display parameters of the target control are associated with the display position of the cursor, the display position of the cursor in this embodiment can be flexibly set, and the user can delete characters in the displayed text by performing related operations on the target control. Compared with the prior art, where the display position of the cursor can only be set behind the characters to be deleted, the display position of the cursor in this embodiment can be flexibly set, thereby enriching the user's operation mode and enabling the user to delete the text. More convenient, thereby improving the efficiency of text editing.
  • FIG. 2 is a schematic diagram of an application scenario of the control display method provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of another application scenario of the control display method provided by the embodiment of the present application.
  • FIG. 4 is a schematic diagram of another application scenario of the control display method provided by the embodiment of the present application.
  • 5a-5c are schematic diagrams of another application scenario of the control display method provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of yet another application scenario of the control display method provided by the embodiment of the present application.
  • FIG. 7 is a structural diagram of a control display device provided by an embodiment of the present application.
  • FIG. 8 is a structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 1 is a flowchart of a control display method provided by an embodiment of the present application.
  • the control display method provided by the embodiment of the present application includes the following steps:
  • control display method provided in this embodiment can be applied to a control display device, and the control display device can be an electronic device.
  • the technical solution is described by taking the application of the control display method to an electronic device as an example.
  • the text is displayed on the text display interface of the display screen of the electronic device, and the first input of the displayed text by the user is received.
  • the above-mentioned first input may be a user's touch operation on the display screen, or may be a user's sliding operation on the display screen, which is not specifically limited in this embodiment.
  • a cursor is displayed in the displayed text, wherein the position of the cursor in the displayed text can be determined according to the position of the first input.
  • the text display interface includes a first display interface and a second display interface, wherein the first display interface is used to display text, and the second display interface is used to display a virtual keyboard.
  • the display parameters include parameters such as display brightness, display icons, and display colors of the target controls.
  • the above-mentioned target control is used to delete characters in the displayed text
  • the above-mentioned virtual keyboard may be a virtual 9-key keyboard, a 26-key keyboard or a virtual keyboard in other input forms.
  • An optional implementation is that, in the process of using the electronic device for text processing, the user sets the display position of the cursor after the last character of the text content to be deleted through the first input, and then the user sets the display position of the cursor after the last character of the text content to be deleted.
  • the second input is to delete the text content to be deleted.
  • the display position of the cursor needs to be set at a specific position, that is, after the last character of the text content to be deleted, and due to other factors such as the size of the display screen of the electronic device, the user is prone to misoperation, which may It takes several operations to accurately set the cursor to a specific position.
  • the user displays the cursor in the displayed text according to the user's first input to the displayed text, and displays the target control in the interface according to the display position of the cursor
  • the display position of the cursor in this embodiment can be flexibly set, and the user can delete characters in the displayed text by performing related operations on the target control.
  • the display position of the cursor in this embodiment can be flexibly set, thereby enriching the user's operation mode and enabling the user to delete the text. More convenient, thereby improving the efficiency of text editing.
  • the method further includes:
  • a second input from the user for the target control is received, where the second input may be a user's touch operation on the display screen or a user's sliding operation on the display screen, which is not specifically limited in this embodiment.
  • delete the target text content which may be N characters in the displayed text before the cursor; or M characters in the displayed text after the cursor, where M and N are both positive integers.
  • displaying the target control in the interface includes:
  • the display position of the cursor is the starting position of the displayed text
  • display a target control in the interface and the target control is displayed in the first manner
  • the target control is displayed in the interface, and the target control is displayed in the second manner
  • the target control is displayed in the interface
  • a target control which is displayed in a third manner.
  • the first possible situation is that the display position of the cursor is the starting position of the displayed text, and the target control is displayed in the first way.
  • the target control displayed in the first way includes the first arrow, wherein the first An arrow points to the right.
  • the current text input order is from left to right. Therefore, when the position of the cursor is the starting position of the displayed text, the order of the subsequent text in the entire text is in the cursor position. On the right, in this case, the user only needs to delete the content of the text on the right.
  • the first character in the display text is the "root" character, as shown, the cursor is in front of the "root” character, in this case, the target control is displayed in the first way.
  • the second possible situation is that the display position of the cursor is the end position of the displayed text, and the target control is displayed in the second way.
  • the target control displayed in the second way includes a second arrow, where the second The arrow points to the left.
  • the current text input order is input from left to right. Therefore, when the position of the cursor is the end position of the displayed text, the order of the preceding text in the entire text is on the left side of the cursor. Yes, in this case, the user only needs to delete the content of the text on the left.
  • the last character of the displayed text is before the display position of the cursor, and there is no character after the display position of the cursor.
  • the last character in the displayed text is the ".” character, as shown, the cursor is located after the ".” character, in this case, the target control is displayed in the second way.
  • the third possible situation is that the display position of the cursor is the middle position of the displayed text, and the target control is displayed in the third way.
  • the target control displayed in the third way includes the first arrow and the second arrow.
  • the current text input order is from left to right. Therefore, when the position of the cursor is the middle position of the displayed text, there is text before and after it. In this case, the user needs Any text content on the left and right sides is deleted. Therefore, the first arrow and the second arrow can be an arrow pointing to the right and an arrow pointing to the left, respectively.
  • the display position of the cursor is the middle position of the displayed text
  • the display position of the cursor is set between adjacent characters of the displayed text. Referring to Figure 4, as shown, the cursor is located between the character ",” and the character "By", in this case, the target control is displayed in the third way.
  • the target control includes a first target arrow
  • the receiving a second input from the user to the target control includes:
  • Receiving a second input from the user to the first target arrow; the deleting the target text content in response to the second input includes: determining a corresponding target according to the display position of the cursor and the pointing direction of the first target arrow Text content; delete the target text content.
  • the target control includes a first target arrow, and the first target arrow is a first arrow or a second arrow.
  • the pointing direction of the first arrow is to the right, and the direction of the second arrow is to the left.
  • the cursor is located at the starting position of the displayed text.
  • the target control is displayed in the first way, that is, the target control includes the first arrow.
  • the above-mentioned first arrow is the target arrow.
  • the user's operation of clicking or sliding the first arrow may be used as the second input, and the target text content may be determined according to the user's second input.
  • the first arrow points to the right, and all characters on the right side of the cursor in the text line where the cursor is located are determined as the target text content, that is, "according to the current mobile terminal and input method control settings".
  • the cursor is located at the end position of the displayed text.
  • the target control is displayed in the second way, that is, the target control includes a second arrow.
  • the above-mentioned second arrow is the target arrow.
  • the user's operation of clicking or sliding the second arrow may be used as the second input, and the target text content may be determined according to the user's second input.
  • the pointing direction of the first arrow is to the left, and all characters on the left side of the cursor in the text line where the cursor is located are determined as the target text content, that is, “Quick and Easy.”.
  • the cursor is located in the middle of the displayed text.
  • the target control is displayed in a third way, that is, the target control includes a first arrow and a second Arrow, then, the arrow the user taps or swipes can be the target arrow.
  • the target text content is deleted.
  • the content of the previous line or the next line can be deleted in order. For example, after deleting "due to movement" on the right side of the cursor, the user continues to click or slide the first arrow (rightward arrow) to delete "the editing area on the terminal" in the next line in sequence.
  • the user can delete multiple characters located at different positions of the cursor by performing one operation on the target arrow, which enriches the way the user edits the text, thereby improving the efficiency of text editing.
  • the target control includes a second target arrow
  • the receiving user's second input to the target control includes:
  • the deleting the target text content in response to the second input includes: determining a target text line according to the input parameter of the second input, wherein the target text line Different from the text line where the cursor is located; according to the display position of the cursor and the pointing direction of the second target arrow, determine the target text content in the target text line; delete the target text content.
  • the target control may include a second target arrow, wherein the second target arrow may be It includes a first arrow pointing right, a second arrow pointing left, a third arrow pointing up, and a fourth arrow pointing down.
  • the second target arrow may also include any one or a combination of the first arrow, the second arrow, the third arrow and the fourth arrow.
  • the displayed text includes a total of 9 lines, and the cursor is located in the last line of the displayed text.
  • the user can click or slide the third arrow pointing upward to delete the line before the 9th line in the display text, that is, all characters included in the 8th line, that is, delete the "cursor moves to the" in the display text
  • the correct position leads to insufficient operation.
  • the user can click or swipe the second left-pointing arrow to delete all characters in the ninth line before the cursor, that is, delete the "Quick and easy.” in the displayed text.
  • the processing deletes all the characters in the 8th row, and also according to the cursor position in the 9th row.
  • the position of the line with selective deletion of characters in line 9. For example, as shown in Figure 5a, after the user clicks the third arrow pointing upward, and determines that the corresponding position of the cursor in the 9th row in the 8th row is "moving", the word "cursor moving" is determined as possible Deleted text, the user can delete the characters by multiple clicks.
  • the displayed text includes 9 lines in total, and the cursor is located on the first line in the displayed text.
  • the user can click or slide the fourth arrow pointing downwards to delete the line after line 1 in the display text, that is, all characters included in the second line, that is, delete the "meter” in the display text, when the user When you need to delete the entered content, you need to ".
  • the user can click or slide the first arrow pointing to the right to delete all characters located after the cursor in the target text line, that is, delete "according to the current mobile terminal and input method space settings" in the displayed text.
  • FIG. 5c As shown in the figure, the displayed text includes 9 lines in total, and the cursor is located on the 5th line in the displayed text.
  • the user can click or slide the third arrow pointing upwards to delete the line before the 5th line in the display text, that is, all characters included in the 4th line, that is, delete the "move the cursor to the display text" in the display text. You have to delete the back of the content to get through.”
  • the user can click or slide the fourth arrow pointing downward to delete the line after line 5 in the displayed text, that is, all characters included in the sixth line, that is, delete the "Editing area and font size limit on the terminal" in the displayed text. , the user has passed.”
  • the user can click or slide the second arrow pointing to the left to delete all characters in the target text line before the cursor, that is, delete the "Delete through the delete button in the keyboard.” in the displayed text.
  • the user can click or slide the first arrow pointing to the right to delete all characters located after the cursor in the target text line, that is, delete "due to movement" in the displayed text.
  • the target text line in the displayed text may be determined according to the input parameter of the second input by the user to the second target arrow, wherein the input parameter may be the duration of the user pressing the second target arrow.
  • the displayed text includes 9 text lines, wherein the cursor is located on the 5th line of the displayed text.
  • the input duration may be preset to 2 seconds, and the target text line is determined according to the relationship between the input parameters and the preset input duration.
  • the third arrow For example, if the user presses the third arrow for 4 seconds, that is, the input parameter is 4 seconds, then when the cursor is in the 5th line, since the third arrow points upward, the difference between the third arrow and the 5th line will be two Line 3 of the line is determined as the target text line.
  • the seventh line of the two lines is determined as the target text line.
  • the length of the third arrow can be set to multiple segments, for example, the third arrow is set to 2 segments, and when the user presses the first segment of the third arrow, the line before the text line where the cursor is located is deleted. Included characters; when the user presses the second segment of the third arrow, the characters included in the second line before the text line where the cursor is located are deleted.
  • the display text includes 9 lines in total, and the cursor is located on the 5th line in the display text, that is, the target text line is the 5th line.
  • the third arrow is set to 2 segments, the user can press the first segment of the third arrow to delete the line before the 5th line in the displayed text, that is, all characters included in the 4th line; the user can also press the third The second paragraph of the arrow, deletes all characters included in the display text two lines before line 5, that is, line 3.
  • the length of the fourth arrow can be set to multiple segments.
  • the fourth arrow is set to two segments.
  • the first segment of the fourth arrow the text line where the cursor is located is deleted after the text line.
  • the displayed text includes 9 lines, and the cursor is located on the 5th line in the displayed text.
  • the fourth arrow is set to 2 segments, the user can press the first segment of the fourth arrow to delete the line after the 5th line in the displayed text, that is, all characters included in the 6th line; the user can also press the fourth The second paragraph of the arrow, deletes the 2nd line after the 5th line in the display text, that is, all characters included in the 7th line.
  • the method further includes:
  • the user can perform a touch operation on the target control, so that the display screen displays the target control interface.
  • the target control interface includes 4 moving controls and a first target control, wherein the first target control includes a first arrow pointing to the right and a second arrow pointing to the left.
  • the four movement controls are the first movement control pointing upward, the second movement control pointing downward, the third movement control pointing left, and the fourth movement control pointing right. Movement controls are used to move the cursor's position within the displayed text. The user can click or slide the mobile control to move the cursor.
  • the user can click or slide the first arrow or the second arrow to delete the characters in the displayed text.
  • the user can accurately move the cursor to the corresponding position by moving the control, and does not need to click the screen for many times to move the cursor, which reduces the redundant operation of the user and improves the efficiency of text editing.
  • control display device 200 includes:
  • the first receiving module 201 is used for receiving the first input of the displayed text
  • a first display module 202 configured to display a cursor in the display text in response to the first input
  • the second display module 203 is configured to display the target control in the interface according to the display position of the cursor.
  • the display device 200 further includes:
  • a second receiving module configured to receive a second input from the user to the target control
  • a deletion module configured to delete the target text content in response to the second input.
  • the second display module 203 is also used for:
  • a target control is displayed in the interface, and the target control is displayed in the first manner;
  • a target control is displayed in the interface, and the target control is displayed in a third manner.
  • the second receiving module is also used for:
  • the deletion module is also used to:
  • the second receiving module is also used for:
  • the deletion module is also used to:
  • the control display device in the embodiment of the present application may be a mobile terminal, or may be a component, an integrated circuit, or a chip in the terminal.
  • the apparatus may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant).
  • UMPC ultra-mobile personal computer
  • netbook or a personal digital assistant
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
  • Network Attached Storage NAS
  • personal computer personal computer, PC
  • television television
  • teller machine or self-service machine etc.
  • the control display device in the embodiment of the present application may be a device with an operating system.
  • the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
  • control display device provided in the embodiment of the present application can implement each process implemented by the control display method in the method embodiment of FIG. 1 , and to avoid repetition, details are not repeated here.
  • the user in the process of text processing, displays a cursor in the displayed text according to the user's first input to the displayed text, and displays a target control in the interface according to the display position of the cursor. Since the display parameters of the target control are associated with the display position of the cursor, the display position of the cursor in this embodiment can be flexibly set, and the user can delete the characters in the displayed text by performing related operations on the target control. Compared with the prior art, where the display position of the cursor can only be set behind the characters to be deleted, the display position of the cursor in this embodiment can be flexibly set, thereby enriching the user's operation mode and enabling the user to delete the text. More convenient, thereby improving the efficiency of text editing.
  • an embodiment of the present application further provides an electronic device, including a processor 310, a memory 309, a program or instruction stored in the memory 309 and executable on the processor 310, the program or instruction being executed by the processor
  • an electronic device including a processor 310, a memory 309, a program or instruction stored in the memory 309 and executable on the processor 310, the program or instruction being executed by the processor
  • the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 300 includes but is not limited to: a radio frequency unit 301, a network module 302, an audio output unit 303, an input unit 304, a sensor 305, a display unit 306, a user input unit 307, an interface unit 308, a memory 309, and a processor 310, etc. part.
  • the electronic device 300 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 310 through a power management system, so that the power management system can manage charging, discharging, and power management. consumption management and other functions.
  • a power source such as a battery
  • the structure of the electronic device shown in FIG. 8 does not constitute a limitation on the electronic device.
  • the electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
  • the processor 310 is configured to receive the first input of the displayed text
  • the target control is displayed in the interface.
  • the processor 310 is further configured to receive a second input from the user to the target control;
  • the target text content is deleted.
  • the processor 310 is further configured to display a target control in the interface when the display position of the cursor is the starting position of the displayed text, and the target control is displayed in the first manner; or,
  • a target control is displayed in the interface, and the target control is displayed in a second manner;
  • a target control is displayed in the interface, and the target control is displayed in a third manner.
  • the processor 310 is further configured to receive a second user input on the first target arrow;
  • the processor 310 is further configured to receive a second input from the user on the second target arrow;
  • the user in the process of text processing, displays a cursor in the displayed text according to the user's first input to the displayed text, and displays a target control in the interface according to the display position of the cursor. Since the display parameters of the target control are associated with the display position of the cursor, the display position of the cursor in this embodiment can be flexibly set, and the user can delete characters in the displayed text by performing related operations on the target control. Compared with the prior art, where the display position of the cursor can only be set behind the characters to be deleted, the display position of the cursor in this embodiment can be flexibly set, thereby enriching the user's operation mode and enabling the user to delete the text. More convenient, thereby improving the efficiency of text editing.
  • Embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, each process of the above-mentioned embodiment of the control display method is implemented, and the same can be achieved. In order to avoid repetition, the technical effect will not be repeated here.
  • the processor is the processor in the electronic device described in the foregoing embodiments.
  • the readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
  • An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the control display method embodiments described above.
  • the chip includes a processor and a communication interface
  • the communication interface is coupled to the processor
  • the processor is configured to run a program or an instruction to implement the control display method embodiments described above.
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
  • the embodiment of the present application further provides a computer program product, wherein the computer program product is stored in a non-transitory readable storage medium, and the computer program product is executed by at least one process to realize the above-mentioned shown in FIG. 1 .
  • Each process of the method embodiment can achieve the same technical effect, and in order to avoid repetition, it will not be repeated here.
  • the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
  • a storage medium such as ROM/RAM, magnetic disk, CD-ROM

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请公开了一种控件显示方法、装置和电子设备,所述方法包括以下步骤:接收对显示文本的第一输入;响应于第一输入,在显示文本中显示光标;根据光标的显示位置,在界面中显示目标控件;其中,目标控件用于删除显示文本中的字符,目标控件的显示参数与光标的显示位置相关联。

Description

控件显示方法、装置和电子设备
相关申请的交叉引用
本申请主张在2020年11月27日在中国提交的中国专利申请No.202011353969.9的优先权,其全部内容通过引用包含于此。
技术领域
本申请属于文本处理技术领域,具体涉及一种控件显示方法、装置和电子设备。
背景技术
随着电子设备,特别是移动终端受到用户的青睐,电子设备的应用越来越广泛,更多的用户选择使用电子设备进行文本处理。目前,用户在文本处理的过程中,如若需要删除文本中的某些文字,需要点击电子设备的屏幕或进行滑动操作,将光标移动到文字的后面,然后通过点击虚拟键盘中的相关控件删除文字。
受限于电子设备的屏幕大小和文本字体大小,用户可能需要通过多次点击或滑动操作,才能准确的将光标移动至待删除文字的后方,这样,导致对文本进行删除的方式不够便捷,降低了文本编辑的效率。
发明内容
本申请实施例的目的是提供一种控件显示方法、装置和电子设备,能够解决文本编辑效率较低的技术问题。
为了解决上述技术问题,本申请是这样实现的:
第一方面,本申请实施例提供了一种控件显示方法,包括:
接收对显示文本的第一输入;
响应于所述第一输入,在所述显示文本中显示光标;
根据所述光标的显示位置,在界面中显示目标控件;
其中,所述目标控件用于删除所述显示文本中的字符,所述目标控件的 显示参数与所述光标的显示位置相关联。
第二方面,本申请实施例提供了一种控件显示装置,包括:
第一接收模块,用于接收对显示文本的第一输入;
第一显示模块,用于响应于所述第一输入,在所述显示文本中显示光标;
第二显示模块,用于根据所述光标的显示位置,在界面中显示目标控件;
其中,所述目标控件用于删除所述显示文本中的字符,所述目标控件的显示参数与所述光标的显示位置相关联。
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。
第六方面,提供了一种计算机程序产品,所述计算机程序产品被存储在非瞬态的存储介质中,所述计算机程序产品被至少一个处理器执行以实现如第一方面所述的方法。
本申请实施例中,用户在文本处理的过程中,根据用户对显示文本的第一输入,在显示文本中显示光标,根据光标的显示位置,在界面中显示目标控件。由于目标控件的显示参数与光标的显示位置相关联,因此本实施例中的光标的显示位置可以灵活设定,用户通过对目标控件进行相关操作,即可删除显示文本中的字符。相比于现有技术中只能将光标的显示位置设置在待删除字符的后方,本实施例中光标的显示位置可以灵活设定,以此丰富了用户的操作方式,使得用户删除文本的方式更为便捷,从而提高了文本编辑的效率。
附图说明
图1是本申请实施例提供的控件显示方法的流程图;
图2是本申请实施例提供的控件显示方法的一应用场景示意图;
图3是本申请实施例提供的控件显示方法的另一应用场景示意图;
图4是本申请实施例提供的控件显示方法的又一应用场景示意图;
图5a-图5c是本申请实施例提供的控件显示方法的又一应用场景示意图;
图6是本申请实施例提供的控件显示方法的再一应用场景示意图;
图7是本申请实施例提供的控件显示装置的结构图;
图8是本申请实施例提供的电子设备的结构图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的控件显示方法进行详细地说明。
请参阅图1,图1是本申请实施例提供的控件显示方法的流程图。本申请实施例提供的控件显示方法包括以下步骤:
S101,接收对显示文本的第一输入。
本实施例提供的控件显示方法可以应用在控件显示装置上,该控件显示装置可以是电子设备,以控件显示方法应用在电子设备上为例,对技术方案进行说明。
在电子设备显示屏的文本显示界面显示文本,接收用户对显示文本的第 一输入。上述第一输入可以是用户对显示屏的触控操作,也可以是用户在显示屏上的滑动操作,本实施例不作具体限制。
S102,响应于所述第一输入,在所述显示文本中显示光标。
响应于第一输入,在显示文本中显示光标,其中,可以根据第一输入的位置,确定光标在显示文本中的位置。
S103,根据所述光标的显示位置,在界面中显示目标控件。
本实施例中,文本显示界面包括第一显示界面和第二显示界面,其中,第一显示界面用于显示文本,第二显示界面用于显示虚拟键盘。根据光标在显示文本中的位置,在第二显示界面显示不同显示参数的目标控件,其中,显示参数包括目标控件的显示亮度、显示图标以及显示颜色等参数。
需要说明的是,上述目标控件用于删除显示文本中的字符,上述虚拟键盘可以是虚拟的9键键盘、26键键盘或其他输入形式的虚拟键盘。
一种可选的实施方式为,在使用电子设备进行文本处理的过程中,用户通过第一输入,将光标的显示位置设置在待删除的文本内容最后一个字符后,然后用户通过对目标控件的第二输入对待删除的文本内容进行删除。
这种实施方式下,需要将光标的显示位置设置在特定的位置,即待删除的文本内容最后一个字符后,而受限于电子设备显示屏的大小等其他因素,用户容易出现误操作,可能需要多次操作才能准确的将光标设置在特定的位置。
基于上述可能存在的情况,本申请实施例中,用户在文本处理的过程中,根据用户对显示文本的第一输入,在显示文本中显示光标,根据光标的显示位置,在界面中显示目标控件,由于目标控件的显示参数与光标的显示位置相关联,因此本实施例中的光标的显示位置可以灵活设定,用户通过对目标控件进行相关操作,即可删除显示文本中的字符。相比于现有技术中只能将光标的显示位置设置在待删除字符的后方,本实施例中光标的显示位置可以灵活设定,以此丰富了用户的操作方式,使得用户删除文本的方式更为便捷,从而提高了文本编辑的效率。
进一步的,所述在界面中显示目标控件之后,所述方法还包括:
接收用户对所述目标控件的第二输入;响应于所述第二输入,删除目标 文本内容。
接收用户针对目标控件的第二输入,其中,上述第二输入可以是用户针对显示屏的触控操作,也可以是用户在显示屏上的滑动操作,本实施例不作具体限制。
响应于第二输入,删除目标文本内容,上述目标文本内容可以是显示文本中位于光标之前的N个字符;也可以是显示文本中位于光标之后的M个字符,M和N均为正整数。
进一步的,所述根据所述光标的显示位置,在界面中显示目标控件包括:
在所述光标的显示位置为所述显示文本的起始位置的情况下,在界面中显示目标控件,所述目标控件以第一方式显示;或者,在所述光标的显示位置为所述显示文本的终止位置的情况下,在界面中显示目标控件,所述目标控件以第二方式显示;或者,在所述光标的显示位置为所述显示文本的中间位置的情况下,在界面中显示目标控件,所述目标控件以第三方式显示。
在光标位于显示文本的不同位置的情况下,目标控件的显示方式不同,可能存在以下三种情况:
第一种可能存在的情况为,光标的显示位置为显示文本的起始位置,目标控件以第一方式显示,这种情况下,以第一方式显示的目标控件包括第一箭头,其中,第一箭头的指向方向朝右。
可以理解的,现在的文本输入顺序是从左向右进行输入,因此,在光标的系那是位置为显示文本的起始位置的时候,其后的文本在整个文本中的顺序是处于光标的右边的,在这种情况下,用户只有需求删除右边的文本的内容。
需要说明的是,在光标的显示位置为显示文本的起始位置的情况下,光标的显示位置之前不存在字符,光标的显示位置之后为显示文本的第一个字符。请参阅图2,显示文本中的第一个字符为“根”字符,如图所示,光标位于“根”字符前,在这种情况下,目标控件以第一方式显示。
第二种可能存在的情况为,光标的显示位置为显示文本的终止位置,目标控件以第二方式显示,这种情况下,以第二方式显示的目标控件包括第二箭头,其中,第二箭头的指向方向朝左。
可以理解的,现在的文本输入顺序是从左向右进行输入,因此,在光标的系那是位置为显示文本的终止位置的时候,其前的文本在整个文本中的顺序是处于光标的左边的,在这种情况下,用户只有需求删除左边的文本的内容。
需要说明的是,在光标的显示位置为显示文本的终止位置的情况下,光标的显示位置之前为显示文本的最后一个字符,光标的显示位置之后不存在字符。请参阅图3,显示文本中的最后一个字符为“。”字符,如图所示,光标位于“。”字符后,在这种情况下,目标控件以第二方式显示。
第三种可能存在的情况为,光标的显示位置为显示文本的中间位置,目标控件以第三方式显示,这种情况下,以第三方式显示的目标控件包括第一箭头和第二箭头。
可以理解的,现在的文本输入顺序是从左向右进行输入,因此,在光标的系那是位置为显示文本的中间位置的时候,其前后都存在文本,在这种情况下,用户有需求删除左右两边的任意的文本内容,因此,第一箭头和第二箭头可以分别为指向方向朝右的箭头和指向方向朝左的箭头。
需要说明的是,在光标的显示位置为显示文本的中间位置的情况下,光标的显示位置设置在显示文本的相邻字符之间。请参阅图4,如图所示,光标位于字符“,”和字符“由”之间,在这种情况下,目标控件以第三方式显示。
进一步的,所述目标控件上包括第一目标箭头,所述接收用户对所述目标控件的第二输入包括:
接收用户对第一目标箭头的第二输入;所述响应于所述第二输入,删除目标文本内容包括:根据所述光标的显示位置和所述第一目标箭头的指向方向,确定对应的目标文本内容;将所述目标文本内容删除。
本实施例中,目标控件上包括第一目标箭头,上述第一目标箭头为第一箭头或第二箭头。如上所述,第一箭头的指向方向朝右,第二箭头的指向方向朝左。
以下具体说明,如何根据光标的显示位置和第一目标箭头的指向方向,确定对应的目标文本内容:
一种可能存在的情况为,请参阅图2,如图所示,光标位于显示文本的起始位置,这种情况下,目标控件以第一方式显示,即目标控件包括第一箭头,那么,上述第一箭头即目标箭头。
可以将用户点击或滑动第一箭头的操作作为第二输入,根据用户的第二输入确定目标文本内容。如图2所示,第一箭头的指向方向朝右,将光标所处文本行中位于光标右侧的所有字符确定为目标文本内容,即“根据当前移动终端和输入法控件的设”。
另一种可能存在的情况为,请参阅图3,如图所示,光标位于显示文本的终止位置,这种情况下,目标控件以第二方式显示,即目标控件包括第二箭头,那么,上述第二箭头即目标箭头。
可以将用户点击或滑动第二箭头的操作作为第二输入,根据用户的第二输入确定目标文本内容。如图3所示,第一箭头的指向方向朝左,将光标所处文本行中位于光标左侧的所有字符确定为目标文本内容,即“便快捷。”。
另一种可能存在的情况为,请参阅图4,如图所示,光标位于显示文本的中间位置,这种情况下,目标控件以第三方式显示,即目标控件包括第一箭头和第二箭头,那么,可以将用户点击或滑动的箭头作为目标箭头。
这种情况下,若用户点击或滑动第一箭头(向右的箭头),则将光标所处文本行中位于光标右侧的所有字符确定为目标文本内容,即“由于移动”。若用户点击或滑动第二箭头(向左的箭头),则将光标所处文本行中位于光标左侧的所有字符确定为目标文本内容,即“过键盘中的删除按钮开始删除,”。
在确定目标文本内容后,将目标文本内容删除。
可以理解的,在将光标所在文本行的字符全部删除后,与现有删除操作规则类似,能够对上一行或者下一行的内容按顺序进行删除。例如,在将光标右侧的“由于移动”删除之后,用户继续点击或滑动第一箭头(向右的箭头),可以对下一行的“终端上编辑区域……”按照顺序进行删除。
这样,用户通过对目标箭头执行一次操作即可删除位于光标不同位置的多个字符,丰富了用户编辑文本的方式,从而提高了文本编辑的效率。
进一步的,所述目标控件上包括第二目标箭头,所述接收用户对所述目标控件的第二输入包括:
接收用户对第二目标箭头的第二输入;所述响应于所述第二输入,删除目标文本内容包括:根据所述第二输入的输入参数,确定目标文本行,其中,所述目标文本行与所述光标所在的文本行不同;根据所述光标的显示位置和所述第二目标箭头的指向方向,确定所述目标文本行中的目标文本内容;删除所述目标文本内容。
本实施例中,还可能存在这样一种情况,请参阅图5a至图5c,无论光标的显示位置为显示文本的何处,目标控件上可以包括第二目标箭头,其中,第二目标箭头可以包括指向方向朝右的第一箭头,以及指向方向朝左的第二箭头,指向方向朝上的第三箭头,以及指向方向朝下的第四箭头。
可以理解的,第二目标箭头也可以包括第一箭头、第二箭头、第三箭头和第四箭头的任一或组合。
一种可能存在的情况为,请参阅图5a,如图所示,显示文本共包括有9行,光标位于显示文本中的最后一行。
在这种情况下,用户可以点击或滑动指向方向朝上的第三箭头,删除显示文本中第9行之前的一行,即第8行包括的所有字符,即删除显示文本中的“光标移动到正确的位置,导致操作不够方”。
或者,用户可以点击或滑动指向方向朝左的第二箭头,删除第9行中位于光标之前的所有字符,即删除显示文本中的“便快捷。”。
可以理解的,在用户点击或滑动指向方向朝上的第三箭头,对第8行中的字符进行删除的情况下,处理将第8行所有字符都删除之外,还可以根据光标在第9行所处的位置,对第9行中的字符进行有选择的删除。例如,如图5a所示,用户点击指向方向朝上的第三箭头,确定处于第9行的光标在第8行中的对应位置是“动”之后,则将“光标移动”字确定为可删除的文字,用户可以通过多次点击,将字符删除。
另一种可能存在的情况为,请参阅图5b,如图所示,显示文本共包括有9行,光标位于显示文本中的第一行。
在这种情况下,用户可以点击或滑动指向方向朝下的第四箭头,删除显示文本中第1行后一行,即第2行包括的所有字符,即删除显示文本中的“计,当用户需要删除已输入的内容时,需”。
或者,用户可以点击或滑动指向方向朝右的第一箭头,删除目标文本行中位于光标之后的所有字符,即删除显示文本中的“根据当前移动终端和输入法空间的设”。
另一种可能存在的情况为,请参阅图5c,如图所示,显示文本共包括有9行,光标位于显示文本中的第5行。
在这种情况下,用户可以点击或滑动指向方向朝上的第三箭头,删除显示文本中第5行前一行,即第4行包括的所有字符,即删除显示文本中的“把光标移动到要删除内容的后面才可以通”。
或者,用户可以点击或滑动指向方向朝下的第四箭头,删除显示文本中第5行后一行,即第6行包括的所有字符,即删除显示文本中的“终端上编辑区域和字体大小限制,用户经”。
或者,用户可以点击或滑动指向方向朝左的第二箭头,删除目标文本行中位于光标之前的所有字符,即删除显示文本中的“过键盘中的删除按钮开始删除。”。
或者,用户可以点击或滑动指向方向朝右的第一箭头,删除目标文本行中位于光标之后的所有字符,即删除显示文本中的“由于移动”。
上述情况下,可以根据用户对第二目标箭头的第二输入的输入参数,确定显示文本中的目标文本行,其中,上述输入参数可以是用户按压第二目标箭头的时长。
请参阅图5c,如图所示,显示文本中包括有9个文本行,其中,光标位于显示文本的第5行。一种可选的实施方式为,可以预先设置输入时长为2秒,根据输入参数与预设的输入时长的关系,确定目标文本行。
例如,用户按压第三箭头的时长为4秒,即输入参数为4秒,则在光标处于第5行的情况下,由于第三箭头的指向方向为朝上,则将与第5行差两行的第3行确定为目标文本行。
再例如,用户按压第四箭头的时长为4秒,即输入参数为4秒,则在光标处于第5行的情况下,由于第四箭头的指向方向为朝下,则将与第5行差两行的第7行确定为目标文本行。
然后,根据光标的显示位置和目标箭头的指向方向,确定目标文本行中 的目标文本内容,并删除目标文本内容。
如上举例,请参阅图5c,在光标位于显示文本的第5行,且目标文本行为显示文本的第3行的情况下,如图所示,由于光标位于第5行从左至右第14个字符后,因此可以将第3行从左至右的第1个字符至第14个字符确定为目标文本内容,从显示文本中删除这14个字符。
一种可选的实施方式为,可以设置第三箭头的长度为多段,例如,将第三箭头设置为2段,当用户按压第三箭头的第一段时,删除光标所处文本行前一行包括的字符;当用户按压第三箭头的第二段时,删除光标所处文本行前第二行包括的字符。
例如,显示文本共包括有9行,光标位于显示文本中的第5行,即目标文本行为第5行。在这种情况下,第三箭头设置为2段,用户可以按压第三箭头的第一段,删除显示文本中第5行之前一行,即第4行包括的所有字符;用户也可以按压第三箭头的第二段,删除显示文本中第5行之前两行,即第3行包括的所有字符。
另一种可选的实施方式为,可以设置第四箭头的长度为多段,例如,将第四箭头设置为2段,当用户按压第四箭头的第一段时,删除光标所处文本行后一行包括的字符;当用户按压第四箭头的第二段时,删除光标所处文本行后第二行包括的字符。
例如,显示文本共包括有9行,光标位于显示文本中的第5行。在这种情况下,第四箭头设置为2段,用户可以按压第四箭头的第一段,删除显示文本中第5行之后一行,即第6行包括的所有字符;用户也可以按压第四箭头的第二段,删除显示文本中第5行之后的第2行,即第7行包括的所有字符。
可选的,所述响应于所述第一输入,在所述显示文本中显示光标之后,所述方法还包括:
接收用户针对目标控件的第三输入;响应于所述第三输入,显示目标控件界面,所述目标控件界面包括H个移动控件和第一目标控件,H为正整数;接收用户针对所述移动控件的第四输入;响应于所述第四输入,移动所述光标在所述显示文本中的位置;接收用户针对第一目标控件的第五输入;响应 于所述第五输入,删除显示文本中的字符。
本实施例中,用户可以针对目标控件进行触控操作,使得显示屏显示目标控件界面。请参阅图6,如图所示,在目标控件界面中包括有4个移动控件和第一目标控件,其中,第一目标控件包括指向方向朝右的第一箭头和指向方向朝左的第二箭头,4个移动控件分别为指向方向朝上的第一移动控件、指向方向朝下的第二移动控件、指向方向朝左的第三移动控件和指向方向朝右的第四移动控件。移动控件用于移动光标在显示文本中的位置。用户可以点击或滑动移动控件的方式,移动光标。
在将光标移动至相应的位置后,用户可以点击或滑动第一箭头或第二箭头,删除显示文本中的字符。
本实施例中,用户可以通过移动控件准确的将光标移动至相应的位置,不需要多次点击屏幕来移动光标,减少了用户的多余操作,提高了文本编辑的效率。
如图7所示,控件显示装置200包括:
第一接收模块201,用于接收对显示文本的第一输入;
第一显示模块202,用于响应于所述第一输入,在所述显示文本中显示光标;
第二显示模块203,用于根据所述光标的显示位置,在界面中显示目标控件。
可选地,所述显示装置200还包括:
第二接收模块,用于接收用户对所述目标控件的第二输入;
删除模块,用于响应于所述第二输入,删除目标文本内容。
可选地,所述第二显示模块203还用于:
在所述光标的显示位置为所述显示文本的起始位置的情况下,在界面中显示目标控件,所述目标控件以第一方式显示;或者,
在所述光标的显示位置为所述显示文本的终止位置的情况下,在界面中显示目标控件,所述目标控件以第二方式显示;或者,
在所述光标的显示位置为所述显示文本的中间位置的情况下,在界面中显示目标控件,所述目标控件以第三方式显示。
可选地,所述第二接收模块还用于:
接收用户对第一目标箭头的第二输入;
所述删除模块还用于:
根据所述光标的显示位置和所述第一目标箭头的指向方向,确定对应的目标文本内容;
将所述目标文本内容删除。
可选地,所述第二接收模块还用于:
接收用户对第二目标箭头的第二输入;
所述删除模块还用于:
根据所述第二输入的输入参数,确定目标文本行;
根据所述光标的显示位置和所述第二目标箭头的指向方向,确定所述目标文本行中的目标文本内容;
删除所述目标文本内容。
本申请实施例中的控件显示装置可以是移动终端,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例中的控件显示装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。
本申请实施例提供的控件显示装置能够实现图1的方法实施例中控件显示方法实现的各个过程,为避免重复,这里不再赘述。
本申请实施例中,用户在文本处理的过程中,根据用户对显示文本的第一输入,在显示文本中显示光标,根据光标的显示位置,在界面中显示目标控件。由于目标控件的显示参数与光标的显示位置相关联,因此本实施例中 的光标的显示位置可以灵活设定,用户通过对目标控件进行相关操作,即可删除显示文本中的字符。相比于现有技术中只能将光标的显示位置设置在待删除字符的后方,本实施例中光标的显示位置可以灵活设定,以此丰富了用户的操作方式,使得用户删除文本的方式更为便捷,从而提高了文本编辑的效率。
可选地,本申请实施例还提供一种电子设备,包括处理器310,存储器309,存储在存储器309上并可在所述处理器310上运行的程序或指令,该程序或指令被处理器310执行时实现上述控件显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要注意的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。
图8为实现本申请实施例的一种电子设备的硬件结构示意图。
该电子设备300包括但不限于:射频单元301、网络模块302、音频输出单元303、输入单元304、传感器305、显示单元306、用户输入单元307、接口单元308、存储器309、以及处理器310等部件。
本领域技术人员可以理解,电子设备300还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器310逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图8中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
其中,处理器310,用于接收对显示文本的第一输入;
响应于所述第一输入,在所述显示文本中显示光标;
根据所述光标的显示位置,在界面中显示目标控件。
可选地,所述处理器310,还用于接收用户对所述目标控件的第二输入;
响应于所述第二输入,删除目标文本内容。
可选地,所述处理器310,还用于在所述光标的显示位置为所述显示文本的起始位置的情况下,在界面中显示目标控件,所述目标控件以第一方式显示;或者,
在所述光标的显示位置为所述显示文本的终止位置的情况下,在界面中 显示目标控件,所述目标控件以第二方式显示;或者,
在所述光标的显示位置为所述显示文本的中间位置的情况下,在界面中显示目标控件,所述目标控件以第三方式显示。
可选地,所述处理器310,还用于接收用户对第一目标箭头的第二输入;
根据所述光标的显示位置和所述第一目标箭头的指向方向,确定对应的目标文本内容;
将所述目标文本内容删除。
可选地,所述处理器310,还用于接收用户对第二目标箭头的第二输入;
根据所述第二输入的输入参数,确定目标文本行;
根据所述光标的显示位置和所述第二目标箭头的指向方向,确定所述目标文本行中的目标文本内容;
删除所述目标文本内容。
本申请实施例中,用户在文本处理的过程中,根据用户对显示文本的第一输入,在显示文本中显示光标,根据光标的显示位置,在界面中显示目标控件。由于目标控件的显示参数与光标的显示位置相关联,因此本实施例中的光标的显示位置可以灵活设定,用户通过对目标控件进行相关操作,即可删除显示文本中的字符。相比于现有技术中只能将光标的显示位置设置在待删除字符的后方,本实施例中光标的显示位置可以灵活设定,以此丰富了用户的操作方式,使得用户删除文本的方式更为便捷,从而提高了文本编辑的效率。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述控件显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述 控件显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。
本申请实施例另提供了一种计算机程序产品,其中,所述计算机程序产品被存储在非瞬态的可读存储介质中,所述计算机程序产品被至少一个处理执行以实现上述图1所示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求 所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。

Claims (19)

  1. 一种控件显示方法,所述方法包括:
    接收对显示文本的第一输入;
    响应于所述第一输入,在所述显示文本中显示光标;
    根据所述光标的显示位置,在界面中显示目标控件;
    其中,所述目标控件用于删除所述显示文本中的字符,所述目标控件的显示参数与所述光标的显示位置相关联。
  2. 根据权利要求1所述的方法,其中,所述在界面中显示目标控件之后,所述方法还包括:
    接收用户对所述目标控件的第二输入;
    响应于所述第二输入,删除目标文本内容;
    其中,所述目标文本内容包括以下至少一项:位于所述光标之前的N个字符,位于所述光标之后的M个字符,M和N均为正整数。
  3. 根据权利要求1所述的方法,其中,所述根据所述光标的显示位置,在界面中显示目标控件包括:
    在所述光标的显示位置为所述显示文本的起始位置的情况下,在界面中显示目标控件,所述目标控件以第一方式显示;或者,
    在所述光标的显示位置为所述显示文本的终止位置的情况下,在界面中显示目标控件,所述目标控件以第二方式显示;或者,
    在所述光标的显示位置为所述显示文本的中间位置的情况下,在界面中显示目标控件,所述目标控件以第三方式显示。
  4. 根据权利要求3所述的方法,其中,所述目标控件以所述第一方式显示时,目标控件包括第一箭头;
    所述目标控件以所述第二方式显示时,目标控件包括第二箭头;
    所述目标控件以所述第三方式显示时,所述目标控件包括所述第一箭头和所述第二箭头;
    其中,所述第一箭头的指向方向朝右,所述第二箭头的指向方向朝左。
  5. 根据权利要求1所述的方法,其中,所述界面中还包括移动控件,所 述移动控件用于移动所述光标在所述显示文本中的位置。
  6. 根据权利要求2所述的方法,其中,所述目标控件上包括第一目标箭头,
    所述接收用户对所述目标控件的第二输入包括:
    接收用户对第一目标箭头的第二输入;
    所述响应于所述第二输入,删除目标文本内容包括:
    根据所述光标的显示位置和所述第一目标箭头的指向方向,确定对应的目标文本内容;
    将所述目标文本内容删除。
  7. 根据权利要求2所述的方法,其中,所述目标控件上包括第二目标箭头,
    所述接收用户对所述目标控件的第二输入包括:
    接收用户对第二目标箭头的第二输入;
    所述响应于所述第二输入,删除目标文本内容包括:
    根据所述第二输入的输入参数,确定目标文本行,其中,所述目标文本行与所述光标所在的文本行不同;
    根据所述光标的显示位置和所述第二目标箭头的指向方向,确定所述目标文本行中的目标文本内容;
    删除所述目标文本内容。
  8. 一种控件显示装置,包括:
    第一接收模块,用于接收对显示文本的第一输入;
    第一显示模块,用于响应于所述第一输入,在所述显示文本中显示光标;
    第二显示模块,用于根据所述光标的显示位置,在界面中显示目标控件;
    其中,所述目标控件用于删除所述显示文本中的字符,所述目标控件的显示参数与所述光标的显示位置相关联。
  9. 根据权利要求8所述的装置,其中,所述装置还包括:
    第二接收模块,用于接收用户对所述目标控件的第二输入;
    删除模块,用于响应于所述第二输入,删除目标文本内容;
    其中,所述目标文本内容包括以下至少一项:位于所述光标之前的N个 字符,位于所述光标之后的M个字符,M和N均为正整数。
  10. 根据权利要求8所述的装置,其中,所述第二显示模块还用于:
    在所述光标的显示位置为所述显示文本的起始位置的情况下,在界面中显示目标控件,所述目标控件以第一方式显示;或者,
    在所述光标的显示位置为所述显示文本的终止位置的情况下,在界面中显示目标控件,所述目标控件以第二方式显示;或者,
    在所述光标的显示位置为所述显示文本的中间位置的情况下,在界面中显示目标控件,所述目标控件以第三方式显示。
  11. 根据权利要求10所述的装置,其中,所述目标控件以所述第一方式显示时,目标控件包括第一箭头;
    所述目标控件以所述第二方式显示时,目标控件包括第二箭头;
    所述目标控件以所述第三方式显示时,所述目标控件包括所述第一箭头和所述第二箭头;
    其中,所述第一箭头的指向方向朝右,所述第二箭头的指向方向朝左。
  12. 根据权利要求8所述的装置,其中,所述界面中还包括移动控件,所述移动控件用于移动所述光标在所述显示文本中的位置。
  13. 根据权利要求9所述的装置,其中,所述第二接收模块还用于:
    接收用户对第一目标箭头的第二输入;
    所述删除模块还用于:
    根据所述光标的显示位置和所述第一目标箭头的指向方向,确定对应的目标文本内容;
    将所述目标文本内容删除。
  14. 根据权利要求9所述的装置,其中,所述第二接收模块还用于:
    接收用户对第二目标箭头的第二输入;
    所述删除模块还用于:
    根据所述第二输入的输入参数,确定目标文本行,其中,所述目标文本行与所述光标所在的文本行不同;
    根据所述光标的显示位置和所述第二目标箭头的指向方向,确定所述目标文本行中的目标文本内容;
    删除所述目标文本内容。
  15. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,其中,所述程序或指令被所述处理器执行时实现如权利要求1-7中任一项所述的方法的步骤。
  16. 一种可读存储介质,所述可读存储介质上存储程序或指令,其中,所述程序或指令被处理器执行时实现如权利要求1-7中任一项所述的方法的步骤。
  17. 一种芯片,包括处理器和通信接口,其中,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-7中任一项所述的控件显示方法的步骤。
  18. 一种计算机程序产品,其中,所述计算机程序产品被存储在非瞬态的存储介质中,所述计算机程序产品被至少一个处理器执行以实现如权利要求1-7中任一项所述的控件显示方法的步骤。
  19. 一种电子设备,其特征在于,被配置成用于执行如权利要求1-7中任一项所述的控件显示方法的步骤。
PCT/CN2021/132058 2020-11-27 2021-11-22 控件显示方法、装置和电子设备 WO2022111406A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011353969.9A CN112486366A (zh) 2020-11-27 2020-11-27 控件显示方法、装置和电子设备
CN202011353969.9 2020-11-27

Publications (1)

Publication Number Publication Date
WO2022111406A1 true WO2022111406A1 (zh) 2022-06-02

Family

ID=74935738

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/132058 WO2022111406A1 (zh) 2020-11-27 2021-11-22 控件显示方法、装置和电子设备

Country Status (2)

Country Link
CN (1) CN112486366A (zh)
WO (1) WO2022111406A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486366A (zh) * 2020-11-27 2021-03-12 维沃移动通信有限公司 控件显示方法、装置和电子设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090044139A1 (en) * 2007-08-08 2009-02-12 Samsung Electronics Co., Ltd. Apparatus and method for providing character deletion function
CN101426050A (zh) * 2007-10-31 2009-05-06 乐金电子(中国)研究开发中心有限公司 一种具双向删除功能的手机
CN103645829A (zh) * 2013-12-18 2014-03-19 天津三星通信技术研究有限公司 字符删除方法及应用此的便携式终端
CN103941957A (zh) * 2013-01-22 2014-07-23 华为技术有限公司 用户设备内容删除方法、装置以及用户设备
CN104424303A (zh) * 2013-09-04 2015-03-18 联想(北京)有限公司 一种输入装置及电子设备和信息处理方法
CN106681605A (zh) * 2016-12-01 2017-05-17 深圳市金立通信设备有限公司 一种文字选中方法及终端
CN112486366A (zh) * 2020-11-27 2021-03-12 维沃移动通信有限公司 控件显示方法、装置和电子设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103324271B (zh) * 2012-03-19 2017-07-25 联想(北京)有限公司 一种基于手势的输入方法和电子设备
CN104375740A (zh) * 2013-08-15 2015-02-25 联想(北京)有限公司 一种光标定位方法、装置及终端
CN106598386A (zh) * 2016-12-05 2017-04-26 北京小米移动软件有限公司 文字删除方法和装置
CN106980438B (zh) * 2017-03-20 2020-04-24 联想(北京)有限公司 光标控制方法、装置及系统
CN107943388A (zh) * 2017-11-14 2018-04-20 口碑(上海)信息技术有限公司 信息删除方法及装置
CN108334267A (zh) * 2018-02-05 2018-07-27 广东欧珀移动通信有限公司 一种光标移动方法、系统及终端设备
CN109298790A (zh) * 2018-10-11 2019-02-01 科大讯飞股份有限公司 字符删除方法及装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090044139A1 (en) * 2007-08-08 2009-02-12 Samsung Electronics Co., Ltd. Apparatus and method for providing character deletion function
CN101426050A (zh) * 2007-10-31 2009-05-06 乐金电子(中国)研究开发中心有限公司 一种具双向删除功能的手机
CN103941957A (zh) * 2013-01-22 2014-07-23 华为技术有限公司 用户设备内容删除方法、装置以及用户设备
CN104424303A (zh) * 2013-09-04 2015-03-18 联想(北京)有限公司 一种输入装置及电子设备和信息处理方法
CN103645829A (zh) * 2013-12-18 2014-03-19 天津三星通信技术研究有限公司 字符删除方法及应用此的便携式终端
CN106681605A (zh) * 2016-12-01 2017-05-17 深圳市金立通信设备有限公司 一种文字选中方法及终端
CN112486366A (zh) * 2020-11-27 2021-03-12 维沃移动通信有限公司 控件显示方法、装置和电子设备

Also Published As

Publication number Publication date
CN112486366A (zh) 2021-03-12

Similar Documents

Publication Publication Date Title
WO2022063022A1 (zh) 视频预览方法、装置及电子设备
WO2022012657A1 (zh) 图像编辑方法、装置和电子设备
WO2022121790A1 (zh) 分屏显示方法、装置、电子设备和可读存储介质
CN111984115A (zh) 消息发送方法、装置和电子设备
WO2022089568A1 (zh) 文件分享的方法、装置和电子设备
WO2022121877A1 (zh) 消息处理方法、装置和电子设备
WO2023005920A1 (zh) 分屏方法、装置及电子设备
CN113282424B (zh) 信息引用方法、装置和电子设备
WO2022143971A1 (zh) 一种视频处理方法、装置和电子设备
WO2018010316A1 (zh) 桌面页面管理的方法及装置
WO2023072061A1 (zh) 图标显示控制方法、装置、电子设备及存储介质
WO2023030306A1 (zh) 视频编辑方法、装置及电子设备
WO2022111406A1 (zh) 控件显示方法、装置和电子设备
CN113179205A (zh) 图像分享方法、装置及电子设备
CN114116098B (zh) 应用图标管理方法、装置、电子设备及存储介质
WO2022143660A1 (zh) 图标显示方法、装置及电子设备
WO2022089481A1 (zh) 信息处理方法、装置及电子设备
CN112099714B (zh) 截图方法、装置、电子设备及可读存储介质
WO2023025305A1 (zh) 应用图标管理方法、装置及电子设备
WO2022247814A1 (zh) 目标字符的选择方法、装置、电子设备及存储介质
WO2023045923A1 (zh) 文字编辑方法、装置和电子设备
WO2022089480A1 (zh) 信息处理方法、装置及电子设备
WO2022247718A1 (zh) 信息选取方法及装置
WO2022247787A1 (zh) 应用归类方法、装置及电子设备
WO2022143337A1 (zh) 显示控制方法、装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21896907

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21896907

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 06.12.2023)