CN109669751A - A kind of method for drafting of input frame, device, terminal and computer storage medium - Google Patents

A kind of method for drafting of input frame, device, terminal and computer storage medium Download PDF

Info

Publication number
CN109669751A
CN109669751A CN201811536885.1A CN201811536885A CN109669751A CN 109669751 A CN109669751 A CN 109669751A CN 201811536885 A CN201811536885 A CN 201811536885A CN 109669751 A CN109669751 A CN 109669751A
Authority
CN
China
Prior art keywords
input frame
animation
drawn
prompt text
input
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.)
Pending
Application number
CN201811536885.1A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811536885.1A priority Critical patent/CN109669751A/en
Publication of CN109669751A publication Critical patent/CN109669751A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the present application discloses a kind of method for drafting of input frame, this method comprises: monitoring includes the focus in the input frame of prompt text, when input frame gets focus, the first animation parameters are determined for prompt text, input frame are drawn according to the first animation parameters, when input frame loses focus, the second animation parameters are determined for prompt text, input frame is drawn according to the second animation parameters, wherein the first animation parameters and the second animation parameters are used to mobile prompt text.The embodiment of the present application also provides drawing apparatus, terminal and the computer storage medium of a kind of input frame simultaneously.

Description

A kind of method for drafting of input frame, device, terminal and computer storage medium
Technical field
This application involves the rendering technique of input frame control more particularly to a kind of display methods, device, terminal and computers Storage medium.
Background technique
Currently, with the continuous development of terminal technology, people are higher and higher to the performance requirement of terminal various aspects, for example, When user needs to carry out text input on the interface of terminal, terminal needs to draw interface according to the input operation received.
When user carries out text input on the interface of terminal, using the implementation of control combing, control combing At least two layers of structure, include internal layer input frame control and outer layer control in control combing, specifically, first by internal layer input frame control Part generates rendering parameter, and rendering parameter is sent to outer layer control, and the display of input frame is carried out by outer layer control.
However, the drafting efficiency due to interface has very big relationship with the complexity and number of levels of control, number of levels is more, Drafting efficiency is slower, and the existing drafting for exactly being assisted mutually to complete input frame by control combing using above-mentioned, it is possible thereby to Find out, inefficiency is drawn at the interface of existing control combing.
Summary of the invention
The embodiment of the present application is intended to provide method for drafting, device, terminal and the computer storage medium of a kind of input frame, energy Enough effectively improve the drafting efficiency at interface.
The technical solution of the application is achieved in that
The embodiment of the present application provides a kind of method for drafting of input frame, which comprises
Monitoring includes the focus in the input frame of prompt text;
When the input frame gets focus, the first animation parameters are determined for the prompt text, according to described first Animation parameters draw the input frame;
When the input frame loses focus, the second animation parameters are determined for the prompt text, it is dynamic according to described second It draws parameter and draws the input frame;
Wherein, first animation parameters and second animation parameters are used to move the prompt text.
Optionally, before the focus in the input frame that monitoring includes prompt text, the method also includes:
Obtain the type of input frame to be drawn and the prompt text of the input frame to be drawn;
According to the type of the input frame to be drawn, the shape of the input frame is drawn;
According to the shape for the input frame drawn out and the prompt text, the input frame is drawn, will be drawn Include that the input frame of prompt text is shown.
Optionally, the type of the input frame includes: line style input frame;
Accordingly, the type of the input frame to be drawn according to, draws the shape of the input frame, comprising:
Determine the location parameter of the straight line in the line style input frame;
According to the location parameter of the straight line in the line style input frame, the straight line in the line style input frame is drawn.
Optionally, the type of the input frame includes: rectangle input frame;
Accordingly, the type of the input frame to be drawn according to, draws the input frame, comprising:
Determine the location parameter of the round rectangle in the rectangle input frame;
According to the location parameter of the round rectangle in the rectangle input frame, the fillet square in the rectangle input frame is drawn Shape.
Optionally, first animation parameters include:
First animation time, the first animation shift length and the first animation curve;
Second animation parameters include:
Second animation time, the second animation shift length and the second animation curve.
It is optionally, described to draw the input frame according to first animation parameters, comprising:
It is drawn according to first animation time, the first animation shift length and first animation curve described defeated Enter frame, by the prompt text according to the track of first animation curve, is moved to institute in first animation time State the first object position of the first animation shift length.
Optionally, described according to the mobile prompt text of second animation parameters, to draw the input frame, packet It includes:
It is drawn according to second animation time, the second animation shift length and second animation curve described defeated Enter frame, by the prompt text according to the track of second animation curve, is moved to institute in second animation time State the second target position of the second animation shift length.
The embodiment of the present application provides a kind of drawing apparatus of input frame, and described device includes:
Monitoring unit includes focus in the input frame of prompt text for monitoring;
First drawing unit, for determining the first animation for the prompt text when the input frame gets focus Parameter draws the input frame according to first animation parameters;
Second drawing unit, for determining that the second animation is joined for the prompt text when the input frame loses focus Number draws the input frame according to second animation parameters;
Wherein, first animation parameters and second animation parameters are used to move the prompt text.
Optionally, described device further include:
Acquiring unit, for obtaining the type of input frame to be drawn and the prompt text of the input frame to be drawn;
Third drawing unit draws the shape of the input frame for the type according to the input frame to be drawn;
4th drawing unit, for according to the shape of the input frame and the prompt text drawn out, described in drafting Input frame includes that the input frame of prompt text is shown by what is drawn.
Optionally, the type of the input frame includes: line style input frame;
Accordingly, the third drawing unit is specifically used for:
Determine the location parameter of the straight line in the line style input frame;
According to the location parameter of the straight line in the line style input frame, the straight line in the line style input frame is drawn.
Optionally, the type of the input frame includes: rectangle input frame;
Accordingly, the third drawing unit is specifically used for:
Determine the location parameter of the round rectangle in the rectangle input frame;
According to the location parameter of the round rectangle in the rectangle input frame, the fillet square in the rectangle input frame is drawn Shape.
Optionally, first animation parameters include:
First animation time, the first animation shift length and the first animation curve;
Second animation parameters include:
Second animation time, the second animation shift length and the second animation curve.
Optionally, first drawing unit, is specifically used for:
It is drawn according to first animation time, the first animation shift length and first animation curve described defeated Enter frame, by the prompt text according to the track of first animation curve, is moved to institute in first animation time State the first object position of the first animation shift length.
Optionally, second drawing unit, is specifically used for:
It is drawn according to second animation time, the second animation shift length and second animation curve described defeated Enter frame, by the prompt text according to the track of second animation curve, is moved to institute in second animation time State the second target position of the second animation shift length.
The embodiment of the present application also provides a kind of terminal, the terminal includes: as described in above-mentioned one or more embodiments Input frame drawing apparatus.
The embodiment of the present application provides a kind of computer storage medium, is stored with executable instruction, when the executable finger When order is executed by one or more processors, the processor executes input frame described in said one or multiple embodiments Method for drafting.
The embodiment of the present application provides method for drafting, device, terminal and the computer storage medium of a kind of input frame, the party Method includes: firstly, monitoring includes the focus in the input frame of prompt text, then, when input frame gets focus, to mention Show that text determines the first animation parameters, draw input frame according to the first animation parameters, when input frame loses focus, for prompt text Word determines the second animation parameters, draws input frame according to the second animation parameters, wherein the first animation parameters and the second animation parameters It is used to mobile prompt text;That is, in the embodiment of the present application, by being carried out to the input frame for including prompt text Monitoring, when, from no focus to when getting focus, determining the first animation parameters in input frame for prompt text, so that according to First animation parameters draw input frame, in this way, move compared with making input frame of the input frame drawn when no focus The position of prompt text, when, from there are focuses to when losing focus, determining the second animation parameters in input frame for prompt text, into And to draw input frame according to the second animation parameters, in this way, make the input frame drawn with there are inputs when focus Frame is compared, and the position of prompt text is moved, in this way, the drawing apparatus of input frame can be completed by the above method to input The drafting of frame avoids the existing tedious steps that input frame drafting is carried out by least two layers of control, to simplify input The step of frame is drawn, and then effectively improve the drafting efficiency at interface.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of the method for drafting of optional input frame provided by the embodiments of the present application;
Fig. 2 is the flow diagram that control combing draws input frame;
Fig. 3 is the flow diagram of the method for drafting of another optional input frame provided by the embodiments of the present application;
Fig. 4 is a kind of arrangement schematic diagram of optional rectangle input frame provided by the embodiments of the present application;
Fig. 5 is the arrangement schematic diagram of another optional rectangle input frame provided by the embodiments of the present application;
Fig. 6 is a kind of arrangement schematic diagram of optional line style input frame provided by the embodiments of the present application;
Fig. 7 is the arrangement schematic diagram of another optional line style input frame provided by the embodiments of the present application;
Fig. 8 is the flow diagram of the embodiment of the present application input frame ActiveX drafting input frame;
Fig. 9 is a kind of structural schematic diagram of the drawing apparatus of input frame provided by the embodiments of the present application;
Figure 10 is a kind of structural schematic diagram of terminal provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description.
Embodiment one
The embodiment of the present application provides a kind of method for drafting of input frame, and this method is applied to the input frame control in a terminal In part, Fig. 1 is a kind of flow diagram of the method for drafting of optional input frame provided by the embodiments of the present application, with reference to Fig. 1 institute Show, the method for drafting of the input frame may include:
S101: monitoring includes the focus in the input frame of prompt text;
Currently, being all to be completed by the control combing of terminal to input for for the input frame on the interface of terminal The drafting of frame, specifically, Fig. 2 are the flow diagram that control combing draws input frame, as shown in Fig. 2, the control combing packet Include internal layer input frame control and outer layer control TextInputLayout, wherein outer layer control includes 7 child control views, interior Layer control includes: internal layer input frame control TextInputEditText, frame layout control FrameLayout, space control Space and line style layout control LinearLayout etc., in practical applications, internal layer control generate the drafting ginseng of input frame Number, and the rendering parameter of input frame is sent to outer layer control, outer layer control draws input frame according to the rendering parameter of input frame, So that drawing out input frame on the interface of terminal;
Wherein, the rendering parameter of input frame may include: the measurement parameter Measure of input frame, layout parameter Layout With drawing parameter Draw.
That is, complete the drafting to input frame above by control combing, internal layer input frame control and outer is needed Layer control assists to complete jointly, indispensable, however the control needed is more, and the efficiency of drafting is lower.
In order to improve drafting efficiency, the embodiment of the present application provides a kind of input frame control, which can be independent Complete input frame drafting, when drawing input frame, firstly, to include prompt text input frame in focus supervise Control.
So, firstly, input frame control needs first to draw out input frame, so that showing input on the display interface of terminal Frame.In order to draw out input frame, in an alternative embodiment, Fig. 3 is provided by the embodiments of the present application another optional The flow diagram of the method for drafting of input frame, refering to what is shown in Fig. 3, before S101, the above method may include:
S301: the type of input frame to be drawn and the prompt text of input frame to be drawn are obtained;
Specifically, in order to draw input frame, the type for obtaining input frame to be drawn is first had to, that is, to be drawn The shape of input frame, in practical applications, the shape number of different types of input frame, for example, line style input frame and rectangle input frame, Here, the embodiment of the present application is without being limited thereto.
In practical applications, the contents attribute inputted in input frame in order to facilitate user, so, drawing input frame When, it generally will be prompted to text and take into account, which is used to prompt the attribute of user's input frame, for example, working as input frame For inputting user name, then the prompt text of input frame can be with for " user name ", when input frame is close for inputting user name Code, then the prompt text of input frame can be for " user name password ".
S302: according to the type of input frame to be drawn, the shape of input frame is drawn;
After the type for getting input frame to be drawn in S301, the shape of input frame, specifically, root are first drawn The form parameter that input frame is first determined according to the type of input frame, the shape of input frame is drawn according to form parameter.
S303: according to the shape and prompt text of the input frame drawn out, input frame is drawn, what will be drawn includes The input frame of prompt text is shown.
After drawing out the shape of input frame, input frame is drawn with the shape and prompt text of the input frame drawn out, That is, in the input frame drawn out, in addition to the shape of input frame, including prompt text related with the attribute of input frame, In this way, the input frame drawn out is enabled to be convenient for the user to use.
In order to draw out the shape of input frame, in an alternative embodiment, the type of above-mentioned input frame includes: line style Input frame;
Accordingly, S202 may include:
Determine the location parameter of the straight line in line style input frame;
According to the location parameter of the straight line in line style input frame, the straight line in line style input frame is drawn.
Here, if the type of the input frame got is line style input frame, the shape of line style input frame is mainly one straight Line, user can input on straight line.In order to draw outgoing-line type input frame, need first to determine the straight line in line style input frame Location parameter, the location parameter of the straight line include the length of straight line, straight line two endpoints coordinate and the color of straight line etc. Deng here, the embodiment of the present application is not especially limited.
After the location parameter for getting the straight line in line style input frame, the straight line in line style input frame, and root are drawn According in line style input frame straight line and prompt text draw input frame so that including that the line style input frame of prompt text is shown In the display interface, user is facilitated to input.
In an alternative embodiment, the type of above-mentioned input frame includes: rectangle input frame;
Accordingly, S202 may include:
Determine the location parameter of the round rectangle in rectangle input frame;
According to the location parameter of the round rectangle in rectangle input frame, the round rectangle in rectangle input frame is drawn.
Here, if the type of the input frame got is rectangle input frame, the shape of rectangle input frame is mainly a square Shape, user can input in rectangle.The rectangle can be orthogonal rectangle, or round rectangle, here, with fillet For rectangle, in order to draw out rectangle input frame, need first to determine the location parameter of the round rectangle in rectangle input frame, the circle The location parameter of angular moment shape includes the length and wide, fillet radian, the coordinate of four fillets and the face of round rectangle of round rectangle Color etc., here, the embodiment of the present application are not especially limited.
After the location parameter for getting the round rectangle in rectangle input frame, the fillet square in rectangle input frame is drawn Shape, and according in rectangle input frame round rectangle and prompt text draw input frame so that include the square of prompt text Shape input frame is displayed on the display interface, and user is facilitated to input.
Can draw out through the above way include prompt text input frame so that including the defeated of prompt text Enter frame to be displayed on the display interface, so that it includes coke in the input frame of prompt text that input frame control, which can monitor in real time, Point.
S102: when input frame gets focus, the first animation parameters are determined for prompt text, according to the first animation parameters Draw input frame;
In practical applications, when user needs to input in input frame, input frame is first clicked by mouse or finger In input area so that cursor is moved to the input area in input frame, at this point, input frame control is monitored in input frame and obtained Get focus.
When the focus that input frame is got, illustrate that user will be in input area input data, due in input area Prompt text is shown, is covered in order to avoid the input data of user will be prompted to text, and guarantees that prompt text plays prompt The effect of user determines the first animation parameters at this time for prompt text, input frame is drawn with the first animation parameters, due to first Animation parameters are for moving prompt text, so that prompt text is removed from input area in the input frame drawn out.
S103: when input frame loses focus, the second animation parameters is determined for prompt text, are drawn according to the second animation parameters Input frame processed;
For example, when user needs in input frame after input completion, after operation is completed in sending input, so that Cursor is moved to the region other than input frame, at this point, input frame control monitors and loses focus in input frame.
When the focus that input frame loses, illustrates that user will input in input area and complete or user will finish pair The operation of input frame, in order to enable input frame restores to original display state, i.e., prompt text needs to move back to original defeated Enter region, next user is inputted according to prompt text, determine the second animation parameters at this time for prompt text, with Two animation parameters draw input frame, since the second animation parameters are for moving prompt text, so that in the input frame drawn out Prompt text moves back in input area, and subsequent user is facilitated to input.
Wherein, the first animation parameters and the second animation parameters are used to mobile prompt text.
That is, can be used for mobile prompt text by determining the first animation parameters and the second animation parameters, In a kind of optional embodiment, above-mentioned first animation parameters may include:
First animation time, the first animation shift length and the first animation curve;
Above-mentioned second animation parameters may include:
Second animation time, the second animation shift length and the second animation curve.
Wherein, above-mentioned first animation time and the second animation time, are respectively moved the time used in prompt text, above-mentioned First animation shift length includes the first object position of mobile prompt text, and the second animation shift length includes mobile prompt text Second target position of word, the first animation curve and the second animation curve, respectively move the motion track of prompt text.
In order to realize the drafting to input frame, in an alternative embodiment, is drawn and inputted according to the first animation parameters Frame may include:
Input frame is drawn according to the first animation time, the first animation shift length and the first animation curve, will be prompted to text Word is moved to the first object position of the first animation shift length according to the track of the first animation curve in the first animation time It sets.
Here, input is drawn using the first animation time determined, the first animation shift length and the first animation curve Frame, since the first animation parameters are for moving prompt text, so the input frame drawn out mentions compared with the input frame before drafting Show that text is that the first mesh of the first animation shift length is moved in the first animation time according to the track of the first animation curve Cursor position.
E.g., including have in the input frame of prompt text, prompt text is located at input area, when input frame gets focus When, input frame is repainted, will be prompted to character motion in the input frame repainted to first object position.
In order to realize the drafting to input frame, in an alternative embodiment, prompted according to the second animation parameters are mobile Text may include: to draw input frame
Input frame is drawn according to the second animation time, the second animation shift length and the second animation curve, will be prompted to text Word is moved to the second target position of the second animation shift length according to the track of the second animation curve in the second animation time It sets.
Here, input is drawn using the second animation time determined, the second animation shift length and the second animation curve Frame, since the second animation parameters are for moving prompt text, so the input frame drawn out mentions compared with the input frame before drafting Show that text is that the second mesh of the second animation shift length is moved in the second animation time according to the track of the second animation curve Cursor position.
For example, repainting input frame after the focus got in input frame, will be mentioned in the input frame repainted Show that character motion repaints input frame when losing focus in input frame to first object position, in the input frame repainted Character motion be will be prompted to the second target position.
Wherein, the second target position can be the input area of input frame.
It is given an actual example below to be illustrated to the method for drafting of the input frame in said one or multiple embodiments.
Fig. 4 is a kind of arrangement schematic diagram of optional rectangle input frame provided by the embodiments of the present application, refering to what is shown in Fig. 4, For the arrangement schematic diagram of rectangle input frame, wherein when drawing the rectangle input frame in Fig. 4, firstly, input frame control is to input Reasonable paddingTop (the upper inset spacing of control) is arranged in frame, reserved to the text (the rectangle input frame in Fig. 4) in back gauge Then enough display controls remove the default background of input frame, draw the background (shape for being equivalent to input frame) of oneself, Fig. 4 is rectangle input frame, then input frame ActiveX drafting round rectangle is as Background, wherein the top margin of round rectangle is pre- Stay half of font size.
In this way, just drawing out the rectangle input frame in Fig. 4.
When shown on display interface in Fig. 4 include prompt text input frame, wherein prompt text be " user Name " and " password ", and be respectively positioned in the input area of input frame.
When cursor falls within the input area of top rectangle input frame, input frame control gets the focus in input frame, Determine that the first animation parameters, the first animation parameters may include the first animation time, the first animation for prompt text " user name " Shift length and the first animation curve, wherein the changing coordinates of prompt text can be calculated by the first animation shift length (x1, y1), final display position (x2, y2), in animation process, control the prompt text in input frame draw position from (x1, Y1) change always and arrive (x2, y2), the core of drafting is the canvas object provided in acquisition system, calls Graphics Control The drafting position of DrawText (x, y) control text.
Input frame is drawn according to the first animation parameters, Fig. 5 is that another optional rectangle provided by the embodiments of the present application is defeated Enter the arrangement schematic diagram of frame, Fig. 5 is the input frame repainted out based on Fig. 4, as shown in figure 5, with the input frame phase in Fig. 4 Than being moved on prompt text at the head position of the coboundary of rectangle, the affiliated rectangle for coboundary where prompting user is defeated Enter the attribute of frame.
In addition, input frame control loses the focus in input frame when cursor removes input frame, and similarly, input frame control Determine that the second animation parameters, the second animation parameters may include the second animation time, the second animation shift length for prompt text With the second animation curve, wherein the changing coordinates (x2, y2) of prompt text can be calculated by the second animation shift length, Final display position (x1, y1) in animation process, controls the prompt text in input frame and draws position from (x2, y2) always Changing to (x1, y1), the core of drafting is the canvas object provided in acquisition system, calling Graphics Control DrawText (x, Y) the drafting position of text is controlled;Input frame control draws input frame, the input frame drawn out such as Fig. 4 according to the second animation parameters It is shown.
Fig. 6 is a kind of arrangement schematic diagram of optional line style input frame provided by the embodiments of the present application, refering to what is shown in Fig. 6, For the arrangement schematic diagram of line style input frame, wherein when drawing the line style input frame in Fig. 6, firstly, input frame control is to input The upper space of reasonable input area is arranged in frame, pre- to the top (the line style input frame in Fig. 4) of the input area of input frame Stay enough display controls, then, remove the default background of input frame, the background for drawing oneself (is equivalent to the shape of input frame Shape), Fig. 4 is line style input frame, then input frame ActiveX drafting straight line is as Background, wherein the top of the input area of straight line Reserve half of font size.
In this way, just drawing out the line style input frame in Fig. 6.
When shown on display interface in Fig. 6 include prompt text input frame, wherein prompt text be " user Name " and " password ", and be respectively positioned in the input area of input frame.
When cursor falls within the input area of top line style input frame, input frame control gets the focus in input frame, Determine that the first animation parameters, the first animation parameters may include the first animation time, the first animation for prompt text " user name " Shift length and the first animation curve, wherein the changing coordinates of prompt text can be calculated by the first animation shift length (x1, y1), final display position (x2, y2), in animation process, control the prompt text in input frame draw position from (x1, Y1) change always and arrive (x2, y2), the core of drafting is the canvas object provided in acquisition system, calls Graphics Control The drafting position of DrawText (x, y) control text.
Input frame is drawn according to the first animation parameters, Fig. 7 is that another optional line style provided by the embodiments of the present application is defeated Enter the arrangement schematic diagram of frame, Fig. 7 is the input frame repainted out based on Fig. 6, as shown in fig. 7, with the input frame phase in Fig. 6 Than being moved on prompt text at the top position of straight line, for prompting the attribute of line style input frame below user.
In addition, input frame control loses the focus in input frame, similarly, input frame when cursor removes line style input frame Control is that prompt text determines that the second animation parameters, the second animation parameters may include the second animation time, the displacement of the second animation Distance and the second animation curve, wherein by the second animation shift length can calculate prompt text changing coordinates (x2, Y2), final display position (x1, y1) in animation process, controls the prompt text in input frame and draws position from (x2, y2) Change always and arrive (x1, y1), the core of drafting is the canvas object provided in acquisition system, calls Graphics Control DrawText The drafting position of (x, y) control text;Input frame control draws input frame according to the second animation parameters, and the input frame drawn out is such as Shown in Fig. 6.
Fig. 8 is the flow diagram of the embodiment of the present application input frame ActiveX drafting input frame, refering to what is shown in Fig. 8, only single The input frame control CorlorEditText of layer, which includes a child control views, as in itself, defeated in Fig. 8 Entering frame control includes the component TextView for showing character string;In practical applications, input frame control generates input frame Rendering parameter draws input frame according to the rendering parameter of input frame, so that drawing out input frame on the interface of terminal;Wherein, The rendering parameter of input frame may include: the measurement parameter Measure of input frame, layout parameter Layout and drawing parameter Draw;As seen from Figure 8, compared with the control combing in Fig. 2 draws input frame, input frame control using more convenient and Succinctly, it is highly efficient to draw effect for the display of input frame control.
The embodiment of the present application provides a kind of method for drafting of input frame, this method comprises: firstly, monitoring includes prompt Then focus in the input frame of text when input frame gets focus, determines the first animation parameters, root for prompt text Input frame is drawn according to the first animation parameters, when input frame loses focus, determines the second animation parameters for prompt text, according to the Two animation parameters draw input frame, wherein the first animation parameters and the second animation parameters are used to mobile prompt text;Namely Say, in the embodiment of the present application, by being monitored to the input frame for including prompt text, when in input frame from no focus to When getting focus, the first animation parameters are determined for prompt text, so that input frame is drawn according to the first animation parameters, In this way, the position of prompt text is moved, when in input frame compared with making input frame of the input frame drawn when no focus From there are focuses to when losing focus, determine the second animation parameters for prompt text so that according to the second animation parameters come Input frame is drawn, in this way, moving the position of prompt text compared with making input frame of the input frame drawn when there are focus It sets, in this way, the drawing apparatus of input frame can complete the drafting to input frame by the above method, avoids existing pass through At least two layers of control carries out the tedious steps of input frame drafting, to simplify the step of input frame is drawn, and then effectively mentions The high drafting efficiency at interface.
Embodiment two
Fig. 9 is a kind of structural schematic diagram of the drawing apparatus of input frame provided by the embodiments of the present application, as shown in figure 9, this Application embodiment provides a kind of drawing apparatus of input frame, and the drawing apparatus of the input frame can also include:
Monitoring unit 91 includes focus in the input frame of prompt text for monitoring;
First drawing unit 92, for determining the first animation parameters, root for prompt text when input frame gets focus The input frame is drawn according to the first animation parameters;
Second drawing unit 93, for determining the second animation parameters for prompt text when input frame loses focus, according to Second animation parameters draw input frame;
Wherein, the first animation parameters and the second animation parameters are used to mobile prompt text.
Optionally, above-mentioned apparatus further include:
Acquiring unit, for obtaining the type of input frame to be drawn and the prompt text of input frame to be drawn;
Third drawing unit draws the shape of input frame for the type according to input frame to be drawn;
4th drawing unit is drawn input frame, will be drawn for the shape and prompt text according to the input frame drawn out What is made includes that the input frame of prompt text is shown.
Optionally, the type of above-mentioned input frame includes: line style input frame;
Accordingly, above-mentioned third drawing unit is specifically used for:
Determine the location parameter of the straight line in line style input frame;
According to the location parameter of the straight line in line style input frame, the straight line in line style input frame is drawn.
Optionally, the type of above-mentioned input frame includes: rectangle input frame;
Accordingly, above-mentioned third drawing unit is specifically used for:
Determine the location parameter of the round rectangle in rectangle input frame;
According to the location parameter of the round rectangle in rectangle input frame, the round rectangle in rectangle input frame is drawn.
Optionally, above-mentioned first animation parameters include:
First animation time, the first animation shift length and the first animation curve;
Above-mentioned second animation parameters include:
Second animation time, the second animation shift length and the second animation curve.
Optionally, above-mentioned first drawing unit 92, is specifically used for:
Input frame is drawn according to the first animation time, the first animation shift length and the first animation curve, will be prompted to text Word is moved to the first object position of the first animation shift length according to the track of the first animation curve in the first animation time It sets.
Optionally, above-mentioned second drawing unit 93, is specifically used for:
Input frame is drawn according to the second animation time, the second animation shift length and the second animation curve, will be prompted to text Word is moved to the second target position of the second animation shift length according to the track of the second animation curve in the second animation time It sets.
In practical applications, above-mentioned monitoring unit 91, the first drawing unit 92, the second drawing unit 93, third are drawn single Member and the 4th draw can by be located at input frame drawing apparatus on processor realize, specially central processing unit (CPU, Central Processing Unit), microprocessor (MPU, MicroprocessorUnit), digital signal processor (DSP, Digital Signal Processing) or field programmable gate array (FPGA, Field Programmable Gate ) etc. Array realize.
Figure 10 is a kind of structural schematic diagram of terminal provided by the embodiments of the present application, as shown in Figure 10, the embodiment of the present application Provide a kind of terminal 100, comprising: the drawing apparatus of the input frame as described in above-mentioned one or more embodiments.
The embodiment of the present application provides a kind of computer storage medium, is stored with executable instruction, when the executable finger When order is executed by one or more processors, the processor executes the method for drafting of input frame described in embodiment one.
Wherein, computer readable storage medium can be magnetic RAM (ferromagnetic random Access memory, FRAM), read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), Erasable Programmable Read Only Memory EPROM (Erasable Programmable Read-Only Memory, EPROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), flash memory (Flash Memory), magnetic table The memories such as face memory, CD or CD-ROM (Compact Disc Read-Only Memory, CD-ROM).
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, the shape of hardware embodiment, software implementation or embodiment combining software and hardware aspects can be used in the application Formula.Moreover, the application, which can be used, can use storage in the computer that one or more wherein includes computer usable program code The form for the computer program product implemented on medium (including but not limited to magnetic disk storage and optical memory etc.).
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
The above, the only preferred embodiment of the application, are not intended to limit the protection scope of the application.

Claims (10)

1. a kind of method for drafting of input frame, which is characterized in that the described method includes:
Monitoring includes the focus in the input frame of prompt text;
When the input frame gets focus, the first animation parameters are determined for the prompt text, according to first animation Parameter draws the input frame;
When the input frame loses focus, the second animation parameters are determined for the prompt text, are joined according to second animation Number draws the input frame;
Wherein, first animation parameters and second animation parameters are used to move the prompt text.
2. the method according to claim 1, wherein in the input frame that monitoring includes prompt text Before focus, the method also includes:
Obtain the type of input frame to be drawn and the prompt text of the input frame to be drawn;
According to the type of the input frame to be drawn, the shape of the input frame is drawn;
According to the shape for the input frame drawn out and the prompt text, the input frame, the packet that will be drawn are drawn The input frame for including prompt text is shown.
3. according to the method described in claim 2, it is characterized in that, the type of the input frame includes: line style input frame;
Accordingly, the type of the input frame to be drawn according to, draws the shape of the input frame, comprising:
Determine the location parameter of the straight line in the line style input frame;
According to the location parameter of the straight line in the line style input frame, the straight line in the line style input frame is drawn.
4. according to the method described in claim 2, it is characterized in that, the type of the input frame includes: rectangle input frame;
Accordingly, the type of the input frame to be drawn according to, draws the input frame, comprising:
Determine the location parameter of the round rectangle in the rectangle input frame;
According to the location parameter of the round rectangle in the rectangle input frame, the round rectangle in the rectangle input frame is drawn.
5. the method according to claim 1, wherein
First animation parameters include:
First animation time, the first animation shift length and the first animation curve;
Second animation parameters include:
Second animation time, the second animation shift length and the second animation curve.
6. according to the method described in claim 5, it is characterized in that, described draw the input according to first animation parameters Frame, comprising:
The input is drawn according to first animation time, the first animation shift length and first animation curve Frame is moved to described by the prompt text according to the track of first animation curve in first animation time The first object position of first animation shift length.
7. according to the method described in claim 5, it is characterized in that, described according to the mobile prompt of second animation parameters Text, to draw the input frame, comprising:
The input is drawn according to second animation time, the second animation shift length and second animation curve Frame is moved to described by the prompt text according to the track of second animation curve in second animation time Second target position of the second animation shift length.
8. a kind of drawing apparatus of input frame, which is characterized in that described device includes:
Monitoring unit includes focus in the input frame of prompt text for monitoring;
First drawing unit, for determining the first animation parameters for the prompt text when the input frame gets focus, The input frame is drawn according to first animation parameters;
Second drawing unit, for determining the second animation parameters, root for the prompt text when the input frame loses focus The input frame is drawn according to second animation parameters;
Wherein, first animation parameters and second animation parameters are used to move the prompt text.
9. a kind of terminal, which is characterized in that the terminal includes the drawing apparatus such as above-mentioned input frame according to any one of claims 8.
10. a kind of computer storage medium, which is characterized in that executable instruction is stored with, when the executable instruction is by one Or multiple processors, when execute, the processor executes drawing for the described in any item input frames of claim 1 to 7 Method processed.
CN201811536885.1A 2018-12-14 2018-12-14 A kind of method for drafting of input frame, device, terminal and computer storage medium Pending CN109669751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811536885.1A CN109669751A (en) 2018-12-14 2018-12-14 A kind of method for drafting of input frame, device, terminal and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811536885.1A CN109669751A (en) 2018-12-14 2018-12-14 A kind of method for drafting of input frame, device, terminal and computer storage medium

Publications (1)

Publication Number Publication Date
CN109669751A true CN109669751A (en) 2019-04-23

Family

ID=66144404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811536885.1A Pending CN109669751A (en) 2018-12-14 2018-12-14 A kind of method for drafting of input frame, device, terminal and computer storage medium

Country Status (1)

Country Link
CN (1) CN109669751A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035025A (en) * 2020-08-27 2020-12-04 浪潮云信息技术股份公司 Angular-based multifunctional configuration type input method and system
CN112749529A (en) * 2019-10-29 2021-05-04 西安诺瓦星云科技股份有限公司 Method and device for character self-adaption special-shaped edit box
CN112835666A (en) * 2021-02-03 2021-05-25 广东中兴新支点技术有限公司 Method, system, device and storage medium for realizing interaction dynamic of desktop control
CN116719459A (en) * 2022-09-26 2023-09-08 荣耀终端有限公司 Annotation frame display method, electronic device and readable storage medium

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541554A (en) * 2011-12-27 2012-07-04 重庆新媒农信科技有限公司 Method for realizing dynamic transparent specially good display effect of input box
CN102982826A (en) * 2012-11-27 2013-03-20 广东欧珀移动通信有限公司 Method and device for searching and selecting blue-ray player
CN103020025A (en) * 2011-11-16 2013-04-03 微软公司 Techniques for the automatic animation of document content
CN103353824A (en) * 2013-06-17 2013-10-16 百度在线网络技术(北京)有限公司 Method for inputting character strings through voice, device and terminal equipment
CN103383629A (en) * 2013-06-27 2013-11-06 广州市动景计算机科技有限公司 Input method and device based on HTML5
CN103605454A (en) * 2013-11-14 2014-02-26 小米科技有限责任公司 Error prompting method, error prompting device and terminal equipment
CN104462064A (en) * 2014-12-15 2015-03-25 陈包容 Method and system for prompting content input in information communication of mobile terminals
CN105426033A (en) * 2014-09-19 2016-03-23 阿里巴巴集团控股有限公司 Method and apparatus for displaying prompt information
CN105824487A (en) * 2015-01-08 2016-08-03 阿里巴巴集团控股有限公司 Prompt information display method and device
CN106648380A (en) * 2017-01-17 2017-05-10 网易(杭州)网络有限公司 Method and system for displaying prompt information and readable storage medium
CN106780684A (en) * 2017-01-09 2017-05-31 腾讯科技(深圳)有限公司 A kind of animation effect implementation method and device
CN106997290A (en) * 2016-01-25 2017-08-01 滴滴(中国)科技有限公司 Input the display methods and device of prompt message
CN107025103A (en) * 2016-02-02 2017-08-08 阿里巴巴集团控股有限公司 Point out text display method and device
CN107329649A (en) * 2017-06-14 2017-11-07 努比亚技术有限公司 Cartoon display method, terminal and computer-readable recording medium
CN108090176A (en) * 2017-12-15 2018-05-29 上海器魂智能科技有限公司 Web-based cartoon display method, device, equipment and storage medium
CN108646957A (en) * 2018-03-20 2018-10-12 上海车音智能科技有限公司 A kind of dynamic input method and device

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020025A (en) * 2011-11-16 2013-04-03 微软公司 Techniques for the automatic animation of document content
CN102541554A (en) * 2011-12-27 2012-07-04 重庆新媒农信科技有限公司 Method for realizing dynamic transparent specially good display effect of input box
CN102982826A (en) * 2012-11-27 2013-03-20 广东欧珀移动通信有限公司 Method and device for searching and selecting blue-ray player
CN103353824A (en) * 2013-06-17 2013-10-16 百度在线网络技术(北京)有限公司 Method for inputting character strings through voice, device and terminal equipment
CN103383629A (en) * 2013-06-27 2013-11-06 广州市动景计算机科技有限公司 Input method and device based on HTML5
CN103605454A (en) * 2013-11-14 2014-02-26 小米科技有限责任公司 Error prompting method, error prompting device and terminal equipment
CN105426033A (en) * 2014-09-19 2016-03-23 阿里巴巴集团控股有限公司 Method and apparatus for displaying prompt information
CN104462064A (en) * 2014-12-15 2015-03-25 陈包容 Method and system for prompting content input in information communication of mobile terminals
CN105824487A (en) * 2015-01-08 2016-08-03 阿里巴巴集团控股有限公司 Prompt information display method and device
CN106997290A (en) * 2016-01-25 2017-08-01 滴滴(中国)科技有限公司 Input the display methods and device of prompt message
CN107025103A (en) * 2016-02-02 2017-08-08 阿里巴巴集团控股有限公司 Point out text display method and device
CN106780684A (en) * 2017-01-09 2017-05-31 腾讯科技(深圳)有限公司 A kind of animation effect implementation method and device
CN106648380A (en) * 2017-01-17 2017-05-10 网易(杭州)网络有限公司 Method and system for displaying prompt information and readable storage medium
CN107329649A (en) * 2017-06-14 2017-11-07 努比亚技术有限公司 Cartoon display method, terminal and computer-readable recording medium
CN108090176A (en) * 2017-12-15 2018-05-29 上海器魂智能科技有限公司 Web-based cartoon display method, device, equipment and storage medium
CN108646957A (en) * 2018-03-20 2018-10-12 上海车音智能科技有限公司 A kind of dynamic input method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749529A (en) * 2019-10-29 2021-05-04 西安诺瓦星云科技股份有限公司 Method and device for character self-adaption special-shaped edit box
CN112035025A (en) * 2020-08-27 2020-12-04 浪潮云信息技术股份公司 Angular-based multifunctional configuration type input method and system
CN112835666A (en) * 2021-02-03 2021-05-25 广东中兴新支点技术有限公司 Method, system, device and storage medium for realizing interaction dynamic of desktop control
CN116719459A (en) * 2022-09-26 2023-09-08 荣耀终端有限公司 Annotation frame display method, electronic device and readable storage medium

Similar Documents

Publication Publication Date Title
CN109669751A (en) A kind of method for drafting of input frame, device, terminal and computer storage medium
WO2020186935A1 (en) Virtual object displaying method and device, electronic apparatus, and computer-readable storage medium
CN109901894B (en) Progress bar image generation method and device and storage medium
WO2017099981A1 (en) Voxel-based, real-time acoustic adjustment
US20140325418A1 (en) Automatically manipulating visualized data based on interactivity
WO2017092430A1 (en) Method and device for realizing user interface control based on virtual reality application
KR102369865B1 (en) Systems and methods for accessing visually blocked elements of a three-dimensional model
CN109388461A (en) Display methods, device and the display terminal of object are identified in screen-picture screenshot
Perhac et al. Urban fusion: visualizing urban data fused with social feeds via a game engine
CN110619683B (en) Three-dimensional model adjustment method, device, terminal equipment and storage medium
JP2020523668A (en) System and method for configuring virtual camera
CN103761094A (en) Method for polygon combination in planar drawing
CN105867798A (en) Touch screen recording method and device
CN108846901A (en) Model introduction method and device
CN115423919B (en) Image rendering method, device, equipment and storage medium
CN106919260A (en) Web page operation method and apparatus
CN107168961A (en) The method for exhibiting data and device of chart
CN111782866A (en) Drawing method, drawing device, terminal equipment and computer storage medium
CN102591646B (en) Method for simultaneously scaling multiple WPF (Windows presentation foundation) windows and device
CN115063560A (en) Method and system for tracking three-dimensional target in motion state in real time
CN109388299A (en) Display methods, device and the electronic equipment of interface object
CN114820968A (en) Three-dimensional visualization method and device, robot, electronic device and storage medium
CN108427815A (en) A kind of collision detection method and device in engineering project
JP5919111B2 (en) Outline data generation apparatus, outline data generation method and program
JP5290138B2 (en) Mesh changing device, mesh changing method, and program

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190423

RJ01 Rejection of invention patent application after publication