CN111381765B - Text box display method and device, computer equipment and storage medium - Google Patents

Text box display method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111381765B
CN111381765B CN202010164746.1A CN202010164746A CN111381765B CN 111381765 B CN111381765 B CN 111381765B CN 202010164746 A CN202010164746 A CN 202010164746A CN 111381765 B CN111381765 B CN 111381765B
Authority
CN
China
Prior art keywords
range
text box
coordinate range
screen
coordinate
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
CN202010164746.1A
Other languages
Chinese (zh)
Other versions
CN111381765A (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.)
Hanhai Information Technology Shanghai Co Ltd
Original Assignee
Hanhai Information Technology Shanghai 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 Hanhai Information Technology Shanghai Co Ltd filed Critical Hanhai Information Technology Shanghai Co Ltd
Priority to CN202010164746.1A priority Critical patent/CN111381765B/en
Publication of CN111381765A publication Critical patent/CN111381765A/en
Application granted granted Critical
Publication of CN111381765B publication Critical patent/CN111381765B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a text box display method, a text box display device, computer equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: acquiring a coordinate range of a screen of computer equipment; acquiring a coordinate range of a virtual keyboard running in computer equipment; determining the display range of the target text box based on the coordinate range of the screen and the coordinate range of the virtual keyboard, wherein computer equipment with different screen sizes correspond to the display ranges of different target text boxes; and displaying the target text box according to the display range of the target text box. According to the method, the display range of the target text box can be adaptively adjusted according to the size of the screen of the computer equipment, so that the display range of the target text box is adaptive to the coordinate range of the screen, and when a user inputs characters in the text box, the user can check the characters which are being input at any time, and therefore the input efficiency of the user in the text box can be improved, and the experience of the user can be improved to a certain extent.

Description

Text box display method and device, computer equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a text box display method, a text box display device, computer equipment and a storage medium.
Background
With the continuous development of the field of computer technology, more and more computer devices using touch screens are used. Because of the use of touch screens, users are required to enter text content in text boxes using virtual keyboards on the screen of a computer device.
In the related art, the heights of virtual keyboards developed by various virtual keyboard developers are fixed, i.e., the heights of virtual keyboards on different computer devices are the same. Since the heights of the text boxes are uniform among different computer devices, the heights of the virtual keyboards are uniform, and the screen sizes of the computer devices are varied, the sizes of the visual areas of the text boxes are changed differently on the computer devices with different screen sizes. Therefore, there is a need for a text box display method that can adaptively display the size of the visual area of the text box according to the size of the screen of the computer device, so as to improve the input efficiency of the user in the text box and improve the experience of the user to a certain extent.
Disclosure of Invention
The embodiment of the application provides a text box display method, a text box display device, computer equipment and a storage medium, which can be used for solving the problems in the related art. The technical scheme is as follows:
In one aspect, an embodiment of the present application provides a method for displaying a text box, where the method includes:
acquiring a coordinate range of a screen of computer equipment;
acquiring a coordinate range of a virtual keyboard running in the computer equipment;
determining the display range of the target text box based on the coordinate range of the screen and the coordinate range of the virtual keyboard, wherein computer equipment with different screen sizes correspond to different display ranges of the target text box;
and displaying the target text box according to the display range of the target text box.
In one possible implementation, the determining the display range of the target text box based on the coordinate range of the screen and the coordinate range of the virtual keyboard includes:
acquiring a coordinate range of an original text box;
and adjusting the coordinate range of the original text box based on the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain the display range of the target text box.
In one possible implementation manner, the adjusting the coordinate range of the original text box based on the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain the display range of the target text box includes:
calculating a difference value between the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain a first difference value;
And adjusting the coordinate range of the original text box based on the first difference value to obtain the display range of the target text box.
In one possible implementation manner, the adjusting the coordinate range of the original text box based on the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain the display range of the target text box includes:
acquiring a first coordinate range corresponding to a virtual navigation bar in computer equipment;
acquiring a second coordinate range corresponding to a status bar in the computer equipment;
and adjusting the coordinate range of the original text box based on the first coordinate range, the second coordinate range, the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain the display range of the target text box.
In one possible implementation manner, the adjusting the coordinate range of the original text box based on the first coordinate range, the second coordinate range, the coordinate range of the screen, and the coordinate range of the virtual keyboard, to obtain the display range of the target text box includes:
calculating a difference value between the coordinate range of the screen and the first coordinate range to obtain a first coordinate range difference value;
calculating the difference between the first coordinate range difference and the second coordinate range to obtain a second coordinate range difference;
Calculating the difference between the second coordinate range difference and the coordinate range of the virtual keyboard to obtain a target coordinate range;
and adjusting the coordinate range of the original text box to the target coordinate range to obtain the display range of the target text box.
In one possible implementation, the coordinate range includes a coordinate range in pixels or a coordinate range in height distances.
In another aspect, an embodiment of the present application provides a display device for a text box, including:
the first acquisition module is used for acquiring the coordinate range of the screen of the computer equipment;
the second acquisition module is used for acquiring the coordinate range of the virtual keyboard running in the computer equipment;
the determining module is used for determining the display range of the target text box based on the coordinate range of the screen and the coordinate range of the virtual keyboard, and the computer equipment with different screen sizes corresponds to the display ranges of different target text boxes;
and the display module is used for displaying the target text box according to the display range of the target text box.
In one possible implementation manner, the determining module is configured to obtain a coordinate range of the original text box;
and adjusting the coordinate range of the original text box based on the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain the display range of the target text box.
In one possible implementation manner, the determining module is configured to calculate a difference between the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain a first difference;
and adjusting the coordinate range of the original text box based on the first difference value to obtain the display range of the target text box.
In one possible implementation manner, the determining module is configured to obtain a first coordinate range corresponding to a virtual navigation bar in the computer device;
acquiring a second coordinate range corresponding to a status bar in the computer equipment;
and adjusting the coordinate range of the original text box based on the first coordinate range, the second coordinate range, the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain the display range of the target text box.
In a possible implementation manner, the determining module is configured to calculate a difference between the coordinate range of the screen and the first coordinate range, to obtain a first coordinate range difference;
calculating the difference between the first coordinate range difference and the second coordinate range to obtain a second coordinate range difference;
calculating the difference between the second coordinate range difference and the coordinate range of the virtual keyboard to obtain a target coordinate range;
And adjusting the coordinate range of the original text box to the target coordinate range to obtain the display range of the target text box.
In one possible implementation, the coordinate range includes a coordinate range in pixels or a coordinate range in height distances.
In another aspect, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one program code, the at least one program code loaded and executed by the processor to implement a method of displaying any of the text boxes described above.
In another aspect, there is also provided a computer readable storage medium having stored therein at least one program code loaded and executed by a processor to implement a method of displaying any of the text boxes described above.
The technical scheme provided by the embodiment of the application at least brings the following beneficial effects:
according to the technical scheme, the display range of the target text box can be obtained based on the coordinate range of the screen of the computer equipment and the coordinate range of the virtual keyboard running in the computer equipment, so that the display range of the target text box is adapted to the coordinate range of the screen of the computer equipment, when a user inputs characters in the text box, the user can check the characters at any time, the input efficiency of the user in the target text box can be improved, and the experience of the user can be improved to a certain extent.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an implementation environment of a text box display method according to an embodiment of the present application;
fig. 2 is a flowchart of a method for displaying a text box according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a display interface of a computer device according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a display interface of a computer device according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a display interface of a computer device according to an embodiment of the present application;
fig. 6 is a flowchart of a method for displaying a text box according to an embodiment of the present application;
fig. 7 is a flowchart of a method for displaying a text box according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a display device with a text box according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an implementation environment of a text box display method according to an embodiment of the present application, where, as shown in fig. 1, the implementation environment includes: a computer device 101.
The computer device 101 may be at least one of a smart phone, a game console, a desktop computer, a tablet computer, an MP3 (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, and a laptop portable computer. The computer device 101 is provided with a virtual keyboard in a running mode, and the computer device 101 obtains the display range of the target text box according to the coordinate range of the screen of the computer device and the coordinate range of the virtual keyboard in the running mode. The computer device 101 may also display in accordance with the display range of the target text box.
Based on the above implementation environment, the embodiments of the present application provide a method for displaying a text box, taking a flowchart of the method for displaying a text box provided in the embodiment of the present application as shown in fig. 2 as an example, where the method may be executed by the computer device 101 in fig. 1. As shown in fig. 2, the method comprises the steps of:
In step 201, a coordinate range of a screen of a computer device is acquired.
In the embodiment of the application, because the brands and the models of the computer devices are various, the coordinate ranges of the screens of the computer devices with different brands and different models are also various. Accordingly, model information of the computer device can be acquired, and based on the model information of the computer device, the coordinate range of the screen of the computer device can be acquired.
In one possible implementation, the coordinate range of the screen of the computer device may be a coordinate range in pixels or a coordinate range in height distances. For example, when the coordinate range of the screen of the computer device is a coordinate range in units of pixels, the coordinate range of the screen of the computer device may be a range represented by pixel points of the screen of the computer device. For example, the coordinate range of the screen of the computer device may be a range consisting of 500 pixels×1080 pixels. When the coordinate range of the screen of the computer device is a coordinate range in units of height distances, the coordinate range of the screen of the computer device may be a range represented by the height distance size of the screen of the computer device. For example, the coordinate range of the screen of the computer device may be a range consisting of 12 cm high and 8 cm wide.
In step 202, a coordinate range of a virtual keyboard running in a computer device is obtained.
In the embodiment of the application, since the screen of the computer device is a touch screen, a virtual keyboard is required to input text content on the computer device. The height of the virtual keyboard developed by each virtual keyboard developer is fixed at present, that is, the coordinate ranges occupied by the virtual keyboard on different computer devices are consistent.
In one possible implementation, when the computer device receives an operation of clicking on the computer screen by a user, a virtual keyboard running in the computer device is automatically popped up on the screen of the computer device. The computer equipment obtains attribute information of the virtual keyboard based on the virtual keyboard, wherein the attribute information comprises a coordinate range of the virtual keyboard. And acquiring the coordinate range of the virtual keyboard based on the attribute information of the virtual keyboard.
In one possible implementation, the coordinate range of the virtual keyboard may be a coordinate range in units of pixels, or may be a coordinate range in units of height distances. In either representation, the coordinate range of the virtual keyboard may be represented in terms of a screen coordinate system. For example, when the coordinate range of the virtual keyboard is a coordinate range in units of pixels, the coordinate range of the virtual keyboard is a range composed of the number of pixel points occupied by the virtual keyboard on the screen. For example, taking a screen coordinate system in which the range of the abscissa is (0, 500) pixels and the range of the ordinate is (0, 1080) pixels as an example, the coordinate range of the virtual keyboard may be a range composed of pixels between the abscissas (0, 500) and between the abscissas (0, 540). When the coordinate range of the virtual keyboard is a coordinate range in units of height distances, the coordinate range of the virtual keyboard may be a range composed of height distances occupied on the screen by the virtual keyboard. For example, taking the screen coordinate system in which the range of the abscissa is (0, 10) unit height distances and the range of the ordinate is (0, 12) unit height distances as an example, the coordinate range of the virtual keyboard may be a range consisting of the unit height distances between the abscissas (0, 10) and (0, 6). The unit height distance is 1 cm, that is, the coordinate range of the virtual keyboard is a range consisting of transverse (0, 10) cm and longitudinal (0, 6) cm.
In order to determine the display range of the target text box later, the coordinate range of the screen and the coordinate range of the virtual keyboard are expressed in the same unit, for example, the coordinate range of the screen and the coordinate range of the virtual keyboard are both coordinate ranges in units of pixels or coordinate ranges in units of height distances.
In step 203, a display range of the target text box is determined based on the coordinate range of the screen and the coordinate range of the virtual keyboard, and the computer devices with different screen sizes correspond to different display ranges of the target text box.
In an exemplary embodiment, determining the display range of the target text box based on the coordinate range of the screen and the coordinate range of the virtual keyboard may have the steps of:
step 2031, obtaining a coordinate range of the original text box.
Because the top of the text box does not necessarily fit exactly against the bottom of the status bar before the virtual keyboard is sprung, the page on which the text box is positioned needs to be scrolled first to bring the text box to the top when the keyboard is sprung, even though its top is in close proximity to the bottom of the status bar. Thereafter, the following operations are continued:
in one possible implementation, the coordinate ranges of the original text boxes are consistent for different computer devices, in which the coordinate ranges of the original text boxes may be stored. The computer device obtains the coordinate range of the original text box in the computer device from the storage space of the computer device. The coordinate range of the original text box may be a coordinate range in units of pixels or a coordinate range in units of height distances. For example, the coordinate range of the original text box may be a range formed by the pixel point with the abscissa (0, 500) and the pixel point with the ordinate (500, 1000), or may be a range formed by the unit height distance between the abscissa (0, 10) and the ordinate (5, 10), and the size of the coordinate range of the original text box is not limited in the embodiment of the present application.
Step 2032, adjusting the coordinate range of the original text box based on the coordinate range of the screen and the coordinate range of the virtual keyboard, to obtain the display range of the target text box.
In one possible implementation, some computer devices do not include status bars and virtual navigation bars on the screen. For a computer device that does not include a status bar and a virtual navigation bar, adjusting a coordinate range of an original text box based on a coordinate range of a screen and a coordinate range of a virtual keyboard to obtain a display range of a target text box may have the following steps:
step one, calculating a difference value between the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain a first difference value.
In one possible implementation, since the status bar and the virtual navigation bar are not included in the computer device, the screen of the computer device may include only the original text box and the virtual keyboard, and the computer device may calculate a difference between the coordinate range of the screen and the coordinate range of the virtual keyboard based on the coordinate range of the screen acquired in step 201 and the coordinate range of the virtual keyboard acquired in step 202, thereby obtaining the first difference.
And step two, adjusting the coordinate range of the original text box based on the first difference value to obtain the display range of the target text box.
In one possible implementation, the computer device may adjust the coordinate range of the original text box to the first difference value obtained in the step two, so as to obtain the display range of the target text box. The initial height of the text box is adjusted to a first difference value in the direction of the virtual keyboard under the condition that the width of the text box is unchanged and the top position is unchanged, and the adjusted height is obtained. It should be noted that the first difference may be a negative value.
For example, when the coordinates of the screen of the computer device are sequentially increased from bottom to top, the height coordinate range of the original text box is (8, 10) cm, and the initial height coordinate of the coordinate range of the original text box is 8. The height coordinate range of the virtual keyboard is (0, 5) cm, and the target height coordinate of the coordinate range of the virtual keyboard is 5. And calculating the difference value between the initial height coordinate of the height coordinate range of the original text box and the target height coordinate of the height coordinate range of the virtual keyboard, wherein 8-5=3, and obtaining a first difference value of 3. The initial height coordinate of the height coordinate range of the original text box is adjusted to the direction of the virtual keyboard by the first difference, namely, the height coordinate range of the target text box is adjusted to 5 from 8, and the height coordinate range of the target text box is (5, 10) cm.
In this embodiment, as shown in fig. 3 (E), a schematic diagram of a display interface of a computer device including a virtual keyboard and a target text box is shown, and fig. 3 (G), a schematic diagram of a display interface of a computer device including a target text box is shown. Fig. 3 is a process schematic diagram of a method for displaying a text box according to an embodiment of the present application, where, as shown in fig. 3, a display flow of the text box includes: when the virtual keyboard is not popped up, the original text box and other modules are displayed on the screen of the computer device, as shown in fig. 3 (a). When the computer device receives an operation in which the user clicks on the screen of the computer device, a virtual keyboard is popped up, as shown in fig. 3 (B). When a user enters text in a text box of the computer device, the line being entered remains within the viewable area of the text box, as shown in fig. 3 (C). When the user scrolls through the text field to view text content, the line being entered scrolls out of the viewable area of the text box, as shown in FIG. 3 (D). When the user scrolls the text again, the entering line may revert back to the viewable area of the text box, as shown in FIG. 3 (E). When the computer device receives the sliding operation of the user on the screen, the virtual keyboard of the computer device can be folded when the user slides down to a certain extent, as shown in fig. 3 (F) for the sliding operation, and as shown in fig. 3 (G) for folding up the virtual keyboard.
In one possible implementation, some computer devices include a status bar and a virtual navigation bar on a screen, and fig. 4 is a schematic diagram of a display interface of a computer device according to an embodiment of the present application. The status bar is located at the top of the screen of the computer device and contains information such as power, time, signal grid, etc., as shown at 401 in fig. 4. The virtual navigation bar is located at the lowest of the screen of the computer device and contains a return key, HOME key, task key, etc., as shown at 402 in fig. 4.
For a computer device including a status bar and a virtual navigation bar, adjusting a coordinate range of an original text box based on a coordinate range of a screen and a coordinate range of a virtual keyboard to obtain a display range of a target text box, the method may include the following steps:
step 1, acquiring a first coordinate range corresponding to a virtual navigation bar in computer equipment.
In one possible implementation, the first coordinate ranges corresponding to the virtual navigation bars in different computer devices are inconsistent, and the coordinate ranges of the virtual navigation bars of the computer devices are stored in the storage space of the computer devices. Based on the computer device, the process of obtaining the first coordinate range corresponding to the virtual navigation bar of the computer device may be: the computer equipment extracts the coordinate range of the virtual navigation bar from the storage space of the computer equipment, so that a first coordinate range corresponding to the virtual navigation bar is obtained. The first coordinate range corresponding to the virtual navigation bar may be a coordinate range in units of pixels or a coordinate range in units of height distances.
In order to determine the display range of the target text box later, the first coordinate range corresponding to the virtual navigation bar and the coordinate range of the screen are expressed in the same unit, for example, the first coordinate range corresponding to the virtual navigation bar and the coordinate range of the screen are both coordinate ranges in units of pixels, or both coordinate ranges in units of height distances.
And step 2, acquiring a second coordinate range corresponding to the status bar in the computer equipment.
In one possible implementation, the second coordinate ranges corresponding to status bars in different computer devices are also inconsistent. The coordinate range corresponding to the status bar of the computer device is stored in the memory space of the computer device. Based on the computer device, the process of obtaining the second coordinate range corresponding to the status bar of the computer device may be: the computer equipment extracts the coordinate range corresponding to the status bar from the storage space of the computer equipment, so that a second coordinate range corresponding to the status bar is obtained. The second coordinate range corresponding to the status bar may be a coordinate range in units of pixels or a coordinate range in units of height distances.
In order to determine the display range of the target text box later, the second coordinate range corresponding to the status bar and the coordinate range of the screen are expressed in the same unit, for example, the second coordinate range corresponding to the status bar and the coordinate range of the screen are both coordinate ranges in units of pixels, or both coordinate ranges in units of height distances.
And 3, adjusting the coordinate range of the original text box based on the first coordinate range, the second coordinate range, the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain the display range of the target text box.
In one possible implementation manner, based on the first coordinate range, the second coordinate range, the coordinate range of the screen, and the coordinate range of the virtual keyboard, the process of adjusting the coordinate range of the original text box to obtain the display range of the target text box is as follows:
calculating a difference value between the coordinate range of the screen and the first coordinate range to obtain a first coordinate range difference value; calculating a difference value between the first coordinate range difference value and the second coordinate range to obtain a second coordinate range difference value; calculating a difference value between the second coordinate range difference value and the coordinate range of the virtual keyboard to obtain a target coordinate range; and adjusting the coordinate range of the original text box to be a target coordinate range, so as to obtain the display range of the target text box. FIG. 4 is a schematic diagram of a display interface of a computer device having a shorter screen including a status bar and a virtual navigation bar. FIG. 5 is a schematic diagram of a display interface of a computer device having a longer screen, the screen of the computer device including a status bar and a virtual navigation bar. In the display interface, as shown in fig. 5, the text area of the prompt word is the bottom of the text box, so that the position of the prompt text is connected with the top of the virtual keyboard, thereby achieving the effect that the input box occupies the remaining area of the screen.
In step 204, the target text box is displayed in accordance with the display range of the target text box.
In the embodiment of the present application, based on the display range of the target text box obtained in step 203, after receiving the operation of clicking the screen of the computer device by the user, the target text box is displayed on the screen of the computer device according to the display range of the target text box.
The method can obtain the display range of the target text box based on the coordinate range of the screen of the computer equipment and the coordinate range of the virtual keyboard running in the computer equipment, so that the display range of the target text box is adapted to the coordinate range of the screen of the computer equipment, and when a user inputs characters in the text box, the user can check the characters at any time, thereby improving the input efficiency of the user in the target text box and improving the experience of the user to a certain extent.
Taking the coordinate range as an example, the display method of the text box provided in the embodiment of the present application will be described. For example, as shown in fig. 6, the method for displaying the text box includes the following steps:
in step 601, a pixel range of a screen of a computer device is acquired.
In the embodiment of the application, the pixel range of the screen of the computer device is stored in the setting function of the computer device, and the computer device can access the setting function of the computer device to acquire the pixel range of the screen of the computer device. For example, the number of horizontal pixels of the screen of the computer device is 800 pixels, the number of vertical pixels is 1080 pixels, and then the pixel range of the screen of the computer device is 800×1080, and the number of vertical pixels of the screen of the computer device may be sequentially increased from top to bottom, for example, the vertical pixel of the top layer of the screen is 1, and the vertical pixel of the bottom layer is 1080. Or sequentially increasing from bottom to top, for example, the vertical pixel at the lowest layer of the screen is 1, and the vertical pixel at the uppermost layer is 1080. The embodiments of the present application are not limited in this regard. Of course, the number of longitudinal pixels of the screen of the computer device may be more or less, and the embodiment of the present application does not limit the number of longitudinal pixels of the screen of the computer device.
In step 602, a range of pixels of a virtual keyboard running in a computer device is obtained.
In the embodiment of the application, the virtual keyboard is operated in the computer device, and the coordinate range of the virtual keyboard developed by the virtual keyboard developer is fixed, that is, the number of pixels occupied by the virtual keyboard on the computer device is fixed. The computer device may store a pixel range of a virtual keyboard developed by a virtual keyboard developer, for example, the number of horizontal pixels of the virtual keyboard may be 800 pixels, and the number of vertical pixels may be 500 pixels, so that the pixel range of the virtual keyboard is 800×500.
In step 603, a pixel range of the target text box is determined based on the pixel range of the screen and the pixel range of the virtual keyboard, and computer devices with different screen sizes correspond to different pixel ranges of the target text box.
In the embodiment of the present application, determining the pixel range of the target text box based on the pixel range of the screen and the pixel range of the virtual keyboard may include the following steps:
step 6031, obtaining the pixel range of the original text box.
In one possible implementation, the pixel ranges of the original text boxes are uniform for different computer devices. The pixel range of the original text box may be stored in a memory space of the computer device, which obtains the pixel range of the original text box by accessing its memory space. The number of horizontal pixels of the original text box is 800 pixels, and the number of vertical pixels is 100 pixels, so that the pixel range of the original text box may be 800×100, and the embodiment of the application does not limit the pixel range of the original text box.
Step 6032, adjusting the pixel range of the original text box based on the pixel range of the screen and the pixel range of the virtual keyboard to obtain the pixel range of the target text box.
In one possible implementation, for a computer device that does not include a status bar and a virtual navigation bar, adjusting the pixel range of the original text box based on the pixel range of the screen and the pixel range of the virtual keyboard to obtain the pixel range of the target text box may have the following steps:
step one, calculating a difference value between a pixel range of a screen and a pixel range of a virtual keyboard to obtain a first difference value.
For example, the vertical pixels of the screen of the computer device are sequentially increased from bottom to top. The number of longitudinal pixels of the screen is 1080 pixels, the number of longitudinal pixels of the virtual keyboard running in the computer equipment is 500 pixels, and then the difference between the number of longitudinal pixels of the screen and the number of longitudinal pixels of the virtual keyboard, namely 1080-500=580 pixels, can be calculated, so that the first difference is 580 pixels. That is, the computer device has 580 pixels except for the pixels occupied by the virtual keyboard.
And step two, adjusting the pixel range of the original text box based on the first difference value to obtain the pixel range of the target text box.
In the embodiment of the present application, the number of the vertical pixels of the original text box is adjusted to the first difference value obtained in the step one, so that the pixel range of the target text box can be obtained.
For example, the number of vertical pixels of the original text box is adjusted to 580 pixels, so as to obtain the pixel range of the target text box. That is, the number of pixels occupied by the target text box in the computer device is 580 pixels, so that the longitudinal pixel range of the target text box on the screen of the computer device is (500, 1080).
In one possible implementation, for a computer device including a status bar and a virtual navigation bar, adjusting a pixel range of an original text box based on a pixel range of a screen and a pixel range of a virtual keyboard to obtain a pixel range of a target text box may have the following steps:
step 1, acquiring a first pixel range corresponding to a virtual navigation bar in computer equipment.
In one possible implementation manner, in different computer devices, the first pixel range corresponding to the virtual navigation bar is different, and the pixel range corresponding to the virtual navigation bar of the computer device is stored in the storage space of the computer device. Based on the computer device, the process of obtaining the first pixel range corresponding to the virtual navigation bar in the computer device may be as follows: the computer equipment extracts the pixel range of the virtual navigation bar from the storage space of the computer equipment, so that a first pixel range corresponding to the virtual navigation bar is obtained.
For example, the number of vertical pixels of the virtual navigation bar is 100 pixels, and since the virtual navigation bar is at the lowest part of the screen of the computer device, when the vertical pixels of the screen of the computer device are sequentially increased from bottom to top, the vertical pixel range of the virtual navigation bar of the computer device on the screen of the computer device is (0, 100).
And step 2, acquiring a second pixel range corresponding to the status bar in the computer equipment.
In one possible implementation, the second pixel ranges corresponding to status bars in different computer devices are also inconsistent. The second pixel range corresponding to the status bar of the computer device is stored in the storage space of the computer device. Based on the computer device, the process of obtaining the second pixel range corresponding to the status bar of the computer device may be as follows: the computer equipment extracts the pixel range corresponding to the status bar from the storage space of the computer equipment to obtain a second pixel range corresponding to the status bar.
For example, the number of vertical pixels of the status bar is 100 pixels, and since the status bar is at the uppermost part of the screen of the computer device, when the vertical pixels of the screen of the computer device are sequentially increased from bottom to top, the vertical pixel range of the status bar of the computer device on the screen of the computer device is (980, 1080).
And 3, adjusting the pixel range of the original text box based on the first pixel range, the second pixel range, the pixel range of the screen and the pixel range of the virtual keyboard to obtain the pixel range of the target text box.
In this embodiment of the present application, based on the first pixel range, the second pixel range, the pixel range of the screen, and the pixel range of the virtual keyboard, the process of adjusting the pixel range of the original text box to obtain the pixel range of the target text box is as follows:
calculating the difference between the pixel range of the screen and the first pixel range to obtain a first pixel range difference; calculating a difference value between the first pixel range difference value and the second pixel range to obtain a second pixel range difference value; calculating a difference value between the second pixel range difference value and the pixel range of the virtual keyboard to obtain a target pixel range; and adjusting the pixel range of the original text box to be a target pixel range, so as to obtain the pixel range of the target text box. It should be noted that, the lateral pixel range of the target text box may be consistent with or inconsistent with the lateral pixel range of the screen, which is not limited in the embodiment of the present application.
For example, the vertical pixel range of the screen of the computer device (0, 1080), the vertical pixel range of the virtual keyboard running in the computer device (100, 600), the vertical pixel range corresponding to the virtual navigation bar acquired by the computer device (0, 100), and the vertical pixel range corresponding to the status bar acquired by the computer device (980, 1080). The difference between the longitudinal pixel range of the screen and the corresponding longitudinal pixel range of the virtual navigation bar may be calculated to obtain a first pixel range difference, i.e., (100, 1080). And calculating the difference between the first pixel range difference and the longitudinal pixel range corresponding to the status bar to obtain a second pixel range difference, namely (100, 980). And calculating the difference between the second pixel range difference and the longitudinal pixel range of the virtual keyboard to obtain a target pixel range, namely (600, 980), so as to obtain the longitudinal pixel range of the target text box as (600, 980).
In one possible implementation manner, a difference value between a starting pixel of the pixel range of the original text box and a target pixel of the pixel range of the virtual keyboard may be calculated, so as to obtain a first difference value, and subtracting the first difference value from the starting pixel of the pixel range of the original text box to obtain the pixel range of the target text box. Under the condition that the width of the text box is unchanged and the top position is unchanged, the initial pixel coordinate of the text box is adjusted to a first difference value in the virtual keyboard direction, and the adjusted pixel coordinate is obtained. The first difference may be positive or negative.
For example, when the pixel coordinates of the screen of the computer device are sequentially incremented from bottom to top, in the height direction, the pixel range of the original text box is (880, 1080), and then the starting pixel of the pixel range of the original text box is 880. The pixel range of the virtual keyboard is (0, 500), and the target pixel of the pixel range of the virtual keyboard is 500. The difference between the starting pixel of the pixel range of the original text box and the target pixel of the pixel range of the virtual keyboard is calculated to be 500, and the first difference is obtained to be 380. Then the first difference value is subtracted from the starting pixel of the pixel range of the original text box to obtain a starting pixel of the pixel range of the target text box of 500, i.e. the pixel range of the target text box of (500, 1080).
In step 604, the target text box is displayed in terms of its pixel range.
In the embodiment of the present application, based on the pixel range of the target text box obtained in step 603, after receiving the operation of clicking the screen of the computer device by the user, the target text box is displayed at the corresponding position on the screen of the computer device according to the pixel range of the target text box.
The method can obtain the pixel range of the target text box based on the pixel range of the screen of the computer equipment and the pixel range of the virtual keyboard running in the computer equipment, so that the pixel range of the target text box is adapted to the pixel range of the screen of the computer equipment, and when a user inputs characters in the text box, the user can check the characters at any time, thereby improving the input efficiency of the user in the target text box and improving the experience of the user to a certain extent.
Taking the coordinate range as an example of the coordinate range taking the height distance as a unit, the display method of the text box provided in the embodiment of the application is described, for example, as shown in fig. 7, and includes the following steps:
in step 701, a height distance range of a screen of a computer device is acquired.
In the embodiment of the application, the height distance of the screen of the computer device is determined in the production process of the computer device, and the height distance of the screen of the computer device can be obtained based on the computer device. For example, the height distance of the screen of the computer device is 10 cm, i.e. the height distance of the screen of the computer device is in the range of (0, 10) cm. The ordinate of the screen of the computer device may be sequentially increased from top to bottom, for example, the ordinate of the uppermost layer of the screen is 0 cm and the ordinate of the lowermost layer of the screen is 10 cm. The screen may also be sequentially increased from bottom to top, for example, the ordinate of the lowermost layer of the screen is 0 cm, and the ordinate of the uppermost layer is 10 cm, which is not limited in this embodiment of the present application. Of course, the height distance of the screen of the computer device may be longer or shorter, and the height distance of the screen of the computer device is not limited in the embodiments of the present application.
In step 702, a height distance range of a virtual keyboard running in a computer device is obtained.
In the embodiment of the application, the virtual keyboard is operated in the computer equipment, and the coordinate range of the virtual keyboard developed by the virtual keyboard developer is fixed, namely, the height distance occupied by the virtual keyboard on the screen is fixed. The computer device may obtain a height distance of the virtual keyboard, for example, the height distance of the virtual keyboard is 5 cm, and the height distance of the virtual keyboard on the screen of the computer device is (1, 5) cm.
In step 703, a height distance range of the target text box is determined based on the height distance range of the screen and the height distance range of the virtual keyboard, and computer devices with different screen sizes correspond to different height distance ranges of the target text box.
In the embodiment of the present application, determining the height distance range of the target text box based on the height distance range of the screen and the height distance range of the virtual keyboard may include the following steps:
step 7031, obtaining the height distance range of the original text box.
In one possible implementation, the height distance of the original text box is consistent for different computer devices, and the height distance range of the original text box can be stored in the storage space of the computer device. The computer device obtains the height distance range of the original text box by accessing the storage space. The height distance of the original text box may be 1 cm, and then the height distance range of the original text box on the screen of the computer device may be (9, 10) cm.
Step 7032, adjusting the height distance range of the original text box based on the height distance range of the screen and the height distance range of the virtual keyboard, so as to obtain the height distance range of the target text box.
In one possible implementation, for a computer device that does not include a status bar and a virtual navigation bar, adjusting the height distance range of the original text box based on the height distance range of the screen and the height distance range of the virtual keyboard to obtain the height distance range of the target text box may have the following steps:
step one, calculating a difference value between a height distance range of a screen and a height distance range of a virtual keyboard to obtain a first difference value.
For example, if the height distance range of the screen is (0, 10) cm and the height distance of the virtual keyboard is (0, 5) cm, the difference between the height distance range of the screen and the height distance range of the virtual keyboard may be calculated, thereby obtaining a first difference, that is, (5, 10) cm.
And step two, adjusting the height distance range of the original text box based on the first difference value to obtain the height distance range of the target text box.
In this embodiment of the present application, the height distance range of the original text box is adjusted to the first difference value obtained in the first step, so that the height distance range of the target text box can be obtained. For example, the height distance range of the original text box is adjusted to be (5, 10) cm, that is, the height distance range of the target text box of the computer device on the screen of the computer device is (5, 10) cm.
In one possible implementation manner, for a computer device including a status bar and a virtual navigation bar, adjusting a height distance range of an original text box based on a height distance range of a screen and a height distance range of a virtual keyboard to obtain a height distance range of a target text box may have the following steps:
step 1, acquiring a first height distance range corresponding to a virtual navigation bar in computer equipment.
In one possible implementation, the first height distance corresponding to the virtual navigation bar is different in different computer devices, and the height distance corresponding to the virtual navigation bar of the computer device is stored in the storage space of the computer device. Based on the computer device, the process of obtaining the first height distance corresponding to the virtual navigation bar in the computer device may be as follows: the computer equipment extracts the height distance range of the virtual navigation bar from the storage space of the computer equipment, so that a first height distance range corresponding to the virtual navigation bar is obtained. For example, the first height distance is 1 cm, and since the virtual navigation bar is at the lowest position of the screen of the computer device, when the ordinate of the screen of the computer device increases from bottom to top, the height distance range of the virtual navigation bar of the computer device on the screen of the computer device is (0, 1) cm.
And step 2, acquiring a second height distance range corresponding to the status bar in the computer equipment.
In one possible implementation, the second height distances corresponding to status bars in different computer devices are also inconsistent. The second height distance corresponding to the status bar of the computer device is stored in the storage space of the computer device. Based on the computer device, the process of obtaining the second height distance range corresponding to the status bar of the computer device may be as follows: the computer equipment extracts the height distance range corresponding to the status bar from the storage space of the computer equipment, and obtains the second height distance range corresponding to the status bar. For example, the second height distance may be 1 centimeter, and since the status bar is at the top of the screen of the computer device, when the ordinate of the screen of the computer device increases sequentially from bottom to top, the status bar of the computer device corresponds to a height distance range of (9, 10) centimeters on the screen of the computer device.
And 3, adjusting the height distance range of the original text box based on the first height distance range, the second height distance range, the height distance range of the screen and the height distance range of the virtual keyboard to obtain the height distance range of the target text box.
In this embodiment of the present application, based on the first height distance range, the second height distance range, the height distance range of the screen, and the height distance range of the virtual keyboard, the process of adjusting the height distance range of the original text box to obtain the height distance range of the target text box is as follows:
calculating the difference between the height distance range of the screen and the first height distance range to obtain a first height distance range difference; calculating a difference value between the first height distance range difference value and the second height distance range to obtain a second height distance range difference value; calculating a difference value between the second height distance range difference value and the height distance range of the virtual keyboard to obtain a target height distance range; and adjusting the height distance range of the original text box to be the target height distance range, so as to obtain the height distance range of the target text box. It should be noted that, the lateral height distance range of the target text box may be identical to or inconsistent with the lateral height distance range of the screen, which is not limited in the embodiment of the present application.
For example, the height distance range of the screen of the computer device is (0, 10) cm, the height distance range of the virtual keyboard running in the computer device is (1, 6) cm, the first height distance range corresponding to the virtual navigation bar acquired by the computer device is (0, 1) cm, and the second height distance range corresponding to the status bar acquired by the computer device is (9, 10) cm. The difference between the height distance range of the screen and the first height distance range may be calculated to obtain a first height distance range difference, i.e., (1, 10) cm. And calculating the difference between the first height distance range difference and the second height distance range to obtain a second height distance range difference, namely (1, 9) cm. And calculating the difference between the second height distance range difference and the height distance range of the virtual keyboard to obtain a target height distance range, namely (6, 9) cm, so as to obtain the height distance range of the target text box as (6, 9) cm.
In one possible implementation manner, a difference value between the initial coordinate of the coordinate range of the original text box and the target coordinate of the coordinate range of the virtual keyboard may be calculated, so as to obtain a second difference value, and subtracting the second difference value from the initial coordinate of the coordinate range of the original text box to obtain the coordinate range of the target text box. The initial height of the text box is adjusted to a second difference value in the direction of the virtual keyboard under the condition that the width of the text box is unchanged and the top position is unchanged, and the adjusted height is obtained. The second difference may be positive or negative.
For example, when the coordinates of the screen of the computer device are sequentially increased from bottom to top, in the height direction, the coordinate range of the original text box is (8, 10) cm, and then the start coordinate of the coordinate range of the original text box is 8. The coordinate range of the virtual keyboard is (0, 5) cm, and then the target coordinate of the coordinate range of the virtual keyboard is 5. And calculating a difference value between the initial coordinate of the coordinate range of the original text box and the target coordinate of the coordinate range of the virtual keyboard, wherein 8-5=3, and obtaining a second difference value of 3. And subtracting the initial coordinate of the coordinate range of the original text box from the second difference to obtain the initial coordinate of the coordinate range of the target text box, namely 8-3=5, namely the initial coordinate of the coordinate range of the target text box is 5, and the coordinate range of the target text box is (5, 10) cm.
In step 704, the target text box is displayed in terms of its height distance range.
In the embodiment of the present application, based on the height distance range of the target text box obtained in step 703, after receiving the operation of clicking the screen of the computer device by the user, the target text box is displayed at the corresponding position on the screen of the computer device according to the height distance range of the target text box.
The method can obtain the height distance range of the target text box based on the height distance range of the screen of the computer equipment and the height distance range of the virtual keyboard running in the computer equipment, so that the height distance range of the target text box is adapted to the height distance range of the screen of the computer equipment, and when a user inputs characters in the text box, the user can check the characters at any time, thereby improving the input efficiency of the user in the target text box and improving the experience of the user to a certain extent.
Fig. 8 is a schematic structural diagram of a display device of a text box according to an embodiment of the present application, where, as shown in fig. 8, the device includes:
a first obtaining module 801, configured to obtain a coordinate range of a screen of a computer device;
A second obtaining module 802, configured to obtain a coordinate range of a virtual keyboard running in the computer device;
a determining module 803, configured to determine a display range of the target text box based on the coordinate range of the screen and the coordinate range of the virtual keyboard, where computer devices with different screen sizes correspond to different display ranges of the target text box;
and the display module 804 is configured to display the target text box according to the display range of the target text box.
In one possible implementation, the determining module 803 is configured to obtain a coordinate range of the original text box;
and adjusting the coordinate range of the original text box based on the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain the display range of the target text box.
In a possible implementation manner, the determining module 803 is configured to calculate a difference between the coordinate range of the screen and the coordinate range of the virtual keyboard, to obtain a first difference;
and adjusting the coordinate range of the original text box based on the first difference value to obtain the display range of the target text box.
In a possible implementation manner, the determining module 803 is configured to obtain a first coordinate range corresponding to a virtual navigation bar in the computer device;
Acquiring a second coordinate range corresponding to a status bar in the computer equipment;
and adjusting the coordinate range of the original text box based on the first coordinate range, the second coordinate range, the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain the display range of the target text box.
In a possible implementation manner, the determining module 803 is configured to calculate a difference between the coordinate range of the screen and the first coordinate range, to obtain a first coordinate range difference;
calculating the difference between the first coordinate range difference and the second coordinate range to obtain a second coordinate range difference;
calculating the difference between the second coordinate range difference and the coordinate range of the virtual keyboard to obtain a target coordinate range;
and adjusting the coordinate range of the original text box to the target coordinate range to obtain the display range of the target text box.
In one possible implementation, the coordinate range includes a coordinate range in pixels or a coordinate range in height distances.
The device can obtain the display range of the target text box based on the coordinate range of the screen of the computer equipment and the coordinate range of the virtual keyboard running in the computer equipment, so that the display range of the target text box is adapted to the coordinate range of the screen of the computer equipment, and when a user inputs characters in the text box, the user can check the characters at any time, thereby improving the input efficiency of the user in the target text box and improving the experience of the user to a certain extent.
It should be noted that: in the display device for a text box provided in the above embodiment, when the text box is displayed, only the division of the above functional modules is used for illustration, in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the display device for a text box is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the display device of the text box provided in the above embodiment and the display method embodiment of the text box belong to the same concept, and the detailed implementation process of the display device of the text box is detailed in the method embodiment, and is not repeated here.
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device 900 may be: a smart phone, a tablet, an MP3 (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook or a desktop. Computer device 900 may also be referred to by other names as user device, portable computer device, laptop computer device, desktop computer device, etc.
In general, the computer device 900 includes: one or more processors 901 and one or more memories 902.
Processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 901 may also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 901 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 902 is used to store at least one instruction for execution by processor 901 to implement a method of displaying text boxes provided by method embodiments in the present application.
In some embodiments, the computer device 900 may also optionally include: a peripheral interface 903, and at least one peripheral. The processor 901, memory 902, and peripheral interface 903 may be connected by a bus or signal line. The individual peripheral devices may be connected to the peripheral device interface 903 via buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 904, a display 905, a camera assembly 906, audio circuitry 907, a positioning assembly 908, and a power source 909.
The peripheral interface 903 may be used to connect at least one peripheral device associated with an I/O (Input/Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, memory 902, and peripheral interface 903 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 901, the memory 902, and the peripheral interface 903 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 904 is configured to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 904 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 904 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 904 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuitry 904 may communicate with other computer devices via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuit 904 may also include NFC (Near Field Communication ) related circuits, which are not limited in this application.
The display 905 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 905 is a touch display, the display 905 also has the ability to capture touch signals at or above the surface of the display 905. The touch signal may be input as a control signal to the processor 901 for processing. At this time, the display 905 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 905 may be one, providing a front panel of the computer device 900; in other embodiments, the display 905 may be at least two, respectively disposed on different surfaces of the computer device 900 or in a folded design; in some embodiments, the display 905 may be a flexible display disposed on a curved surface or a folded surface of the computer device 900. Even more, the display 905 may be arranged in an irregular pattern other than rectangular, i.e., a shaped screen. The display 905 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 906 is used to capture images or video. Optionally, the camera assembly 906 includes a front camera and a rear camera. Typically, the front camera is disposed on a front panel of the computer device and the rear camera is disposed on a rear surface of the computer device. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 906 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 907 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 901 for processing, or inputting the electric signals to the radio frequency circuit 904 for voice communication. For purposes of stereo acquisition or noise reduction, the microphone may be multiple, each disposed at a different location of the computer device 900. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 901 or the radio frequency circuit 904 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit 907 may also include a headphone jack.
The location component 908 is used to locate the current geographic location of the computer device 900 to enable navigation or LBS (Location Based Service, location-based services). The positioning component 908 may be a positioning component based on the United states GPS (Global Positioning System ), the Beidou system of China, the Granati system of Russia, or the Galileo system of the European Union.
The power supply 909 is used to power the various components in the computer device 900. The power supply 909 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 909 includes a rechargeable battery, the rechargeable battery can support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, computer device 900 also includes one or more sensors 190. The one or more sensors 190 include, but are not limited to: acceleration sensor 911, gyroscope sensor 912, pressure sensor 911, fingerprint sensor 914, optical sensor 915, and proximity sensor 916.
The acceleration sensor 911 can detect the magnitudes of accelerations on three coordinate axes of the coordinate system established by the computer device 900. For example, the acceleration sensor 911 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 901 may control the display 905 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal acquired by the acceleration sensor 911. The acceleration sensor 911 may also be used for the acquisition of motion data of a game or a user.
The gyro sensor 912 may detect a body direction and a rotation angle of the computer device 900, and the gyro sensor 912 may collect a 3D motion of the user on the computer device 900 in cooperation with the acceleration sensor 911. The processor 901 may implement the following functions according to the data collected by the gyro sensor 912: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 911 may be disposed on a side frame of the computer device 900 and/or on an underside of the display 905. When the pressure sensor 911 is provided at a side frame of the computer device 900, a user's grip signal to the computer device 900 may be detected, and the processor 901 performs a left-right hand recognition or a quick operation according to the grip signal collected by the pressure sensor 911. When the pressure sensor 911 is disposed at the lower layer of the display 905, the processor 901 performs control of an operability control on the UI interface according to the pressure operation of the display 905 by the user. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 914 is used for collecting the fingerprint of the user, and the processor 901 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 914, or the fingerprint sensor 914 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 901 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 914 may be provided on the front, back, or side of the computer device 900. When a physical key or vendor Logo is provided on the computer device 900, the fingerprint sensor 914 may be integrated with the physical key or vendor Logo.
The optical sensor 915 is used to collect the intensity of ambient light. In one embodiment, the processor 901 may control the display brightness of the display panel 905 based on the intensity of ambient light collected by the optical sensor 915. Specifically, when the ambient light intensity is high, the display luminance of the display screen 905 is turned up; when the ambient light intensity is low, the display luminance of the display panel 905 is turned down. In another embodiment, the processor 901 may also dynamically adjust the shooting parameters of the camera assembly 906 based on the ambient light intensity collected by the optical sensor 915.
A proximity sensor 916, also referred to as a distance sensor, is typically provided on the front panel of the computer device 900. Proximity sensor 916 is used to capture the distance between the user and the front of computer device 900. In one embodiment, when the proximity sensor 916 detects that the distance between the user and the front of the computer device 900 gradually decreases, the processor 901 controls the display 905 to switch from the bright screen state to the off screen state; when the proximity sensor 916 detects that the distance between the user and the front surface of the computer device 900 gradually increases, the display 905 is controlled by the processor 901 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is not limiting of the computer device 900, and may include more or fewer components than shown, or may combine certain components, or employ a different arrangement of components.
In an exemplary embodiment, there is also provided a computer-readable storage medium having stored therein at least one program code loaded and executed by a processor of a computer apparatus to implement a method of displaying any of the text boxes described above.
Alternatively, the above-mentioned computer readable storage medium may be a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Read-Only optical disk (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It should be understood that references herein to "a plurality" are to two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
The foregoing is illustrative of the present application and is not to be construed as limiting thereof, but rather as providing for the use of various modifications, equivalents, improvements or alternatives falling within the spirit and principles of the present application.

Claims (7)

1. A method of displaying text boxes, the method comprising:
acquiring a coordinate range of a screen of computer equipment;
acquiring a coordinate range of a virtual keyboard running in the computer equipment;
acquiring a coordinate range of an original text box;
calculating a difference value between a target coordinate of a longitudinal coordinate range of the screen and a target coordinate of a longitudinal coordinate range of the virtual keyboard based on the computer equipment not including a status bar and a virtual navigation bar, so as to obtain a first difference value;
adjusting the initial coordinates of the longitudinal coordinate range of the original text box to the first difference value to obtain the initial coordinates of the longitudinal coordinate range of the target text box;
determining the display range of the target text box based on the initial coordinates of the longitudinal coordinate range of the target text box, wherein computer equipment with different screen sizes correspond to different display ranges of the target text box;
and displaying the target text box according to the display range of the target text box.
2. The method according to claim 1, wherein the method further comprises:
acquiring a first coordinate range corresponding to a virtual navigation bar in the computer equipment based on the fact that the computer equipment comprises the status bar and the virtual navigation bar;
Acquiring a second coordinate range corresponding to a status bar in the computer equipment;
and adjusting the coordinate range of the original text box based on the first coordinate range, the second coordinate range, the coordinate range of the screen and the coordinate range of the virtual keyboard to obtain the display range of the target text box.
3. The method of claim 2, wherein adjusting the coordinate range of the original text box based on the first coordinate range, the second coordinate range, the coordinate range of the screen, and the coordinate range of the virtual keyboard, results in the display range of the target text box, comprises:
calculating a difference value between the coordinate range of the screen and the first coordinate range to obtain a first coordinate range difference value;
calculating the difference between the first coordinate range difference and the second coordinate range to obtain a second coordinate range difference;
calculating the difference value between the second coordinate range difference value and the coordinate range of the virtual keyboard to obtain a target coordinate range;
and adjusting the coordinate range of the original text box to the target coordinate range to obtain the display range of the target text box.
4. A method according to any one of claims 1-3, characterized in that the coordinate range comprises a coordinate range in pixels or a coordinate range in height distances.
5. A display device for a text box, the device comprising:
the first acquisition module is used for acquiring the coordinate range of the screen of the computer equipment;
the second acquisition module is used for acquiring the coordinate range of the virtual keyboard running in the computer equipment;
the determining module is used for acquiring the coordinate range of the original text box; calculating a difference value between a target coordinate of a longitudinal coordinate range of the screen and a target coordinate of a longitudinal coordinate range of the virtual keyboard based on the computer equipment not including a status bar and a virtual navigation bar, so as to obtain a first difference value; adjusting the initial coordinates of the longitudinal coordinate range of the original text box to the first difference value to obtain the initial coordinates of the longitudinal coordinate range of the target text box; determining the display range of the target text box based on the initial coordinates of the longitudinal coordinate range of the target text box, wherein computer equipment with different screen sizes correspond to different display ranges of the target text box;
And the display module is used for displaying the target text box according to the display range of the target text box.
6. A computer device comprising a processor and a memory, wherein the memory has stored therein at least one program code that is loaded and executed by the processor to implement a method of displaying text boxes according to any of claims 1 to 4.
7. A computer readable storage medium having stored therein at least one program code, the at least one program code being loaded and executed by a processor to implement a method of displaying text boxes according to any of claims 1 to 4.
CN202010164746.1A 2020-03-11 2020-03-11 Text box display method and device, computer equipment and storage medium Active CN111381765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010164746.1A CN111381765B (en) 2020-03-11 2020-03-11 Text box display method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010164746.1A CN111381765B (en) 2020-03-11 2020-03-11 Text box display method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111381765A CN111381765A (en) 2020-07-07
CN111381765B true CN111381765B (en) 2023-06-27

Family

ID=71218695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010164746.1A Active CN111381765B (en) 2020-03-11 2020-03-11 Text box display method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111381765B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108460003A (en) * 2018-02-02 2018-08-28 广州视源电子科技股份有限公司 The treating method and apparatus of text data

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2414378A1 (en) * 2002-12-09 2004-06-09 Corel Corporation System and method for controlling user interface features of a web application
JP2005251074A (en) * 2004-03-08 2005-09-15 Sii Nanotechnology Inc Numeric input device
EP2717139B1 (en) * 2011-05-30 2017-11-15 Huawei Device (Dongguan) Co., Ltd. Method, device and terminal for adjusting display region of page
CN102279708A (en) * 2011-08-15 2011-12-14 广州市动景计算机科技有限公司 Method and device for processing data input
CN104793923A (en) * 2014-01-20 2015-07-22 中兴通讯股份有限公司 Suspension input implementing method and device
CN106033349A (en) * 2015-03-20 2016-10-19 广州金山移动科技有限公司 Object position adjusting method and device
CN106484382B (en) * 2015-08-31 2019-06-21 阿里巴巴集团控股有限公司 A kind of method and apparatus for playing frame and showing
CN106354369A (en) * 2016-08-30 2017-01-25 乐视控股(北京)有限公司 Character input interface display handling method and device
CN108132716B (en) * 2017-12-05 2021-09-14 五八有限公司 Adjustment method and device of browsing page and computer readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108460003A (en) * 2018-02-02 2018-08-28 广州视源电子科技股份有限公司 The treating method and apparatus of text data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CAD坐标程序的开发与应用;何人强;《机械》;第41卷;105-109 *
Visualization methods for personal photo collections: browsing and searching in the PhotoFinder;Hyunmo Kang et al.;《2000 IEEE International Conference on Multimedia and Expo. ICME2000. Proceedings. Latest Advances in the Fast Changing World of Multimedia (Cat. No.00TH8532)》;1539-1542 *

Also Published As

Publication number Publication date
CN111381765A (en) 2020-07-07

Similar Documents

Publication Publication Date Title
CN109712224B (en) Virtual scene rendering method and device and intelligent device
CN111464749B (en) Method, device, equipment and storage medium for image synthesis
CN110321126B (en) Method and device for generating page code
CN112581358B (en) Training method of image processing model, image processing method and device
WO2022134632A1 (en) Work processing method and apparatus
CN112565806B (en) Virtual gift giving method, device, computer equipment and medium
CN111105474B (en) Font drawing method, font drawing device, computer device and computer readable storage medium
CN111368114B (en) Information display method, device, equipment and storage medium
CN111353946A (en) Image restoration method, device, equipment and storage medium
CN110992268B (en) Background setting method, device, terminal and storage medium
CN110853124B (en) Method, device, electronic equipment and medium for generating GIF dynamic diagram
CN115798417A (en) Backlight brightness determination method, device, equipment and computer readable storage medium
WO2021218926A1 (en) Image display method and apparatus, and computer device
CN111381765B (en) Text box display method and device, computer equipment and storage medium
CN114594885A (en) Application icon management method, device and equipment and computer readable storage medium
CN109388732B (en) Music map generating and displaying method, device and storage medium
CN112132472A (en) Resource management method and device, electronic equipment and computer readable storage medium
CN112560903A (en) Method, device and equipment for determining image aesthetic information and storage medium
CN115379274B (en) Picture-based interaction method and device, electronic equipment and storage medium
CN116681755B (en) Pose prediction method and device
CN111526221B (en) Domain name quality determining method, device and storage medium
CN113409235B (en) Vanishing point estimation method and apparatus
CN114566064B (en) Method, device, equipment and storage medium for determining position of parking space
CN113763486B (en) Dominant hue extraction method, device, electronic equipment and storage medium
CN111125571B (en) Picture display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant