Movatterモバイル変換


[0]ホーム

URL:


CN109669751A - Input box drawing method and device, terminal and computer storage medium - Google Patents

Input box drawing method and device, terminal and computer storage medium
Download PDF

Info

Publication number
CN109669751A
CN109669751ACN201811536885.1ACN201811536885ACN109669751ACN 109669751 ACN109669751 ACN 109669751ACN 201811536885 ACN201811536885 ACN 201811536885ACN 109669751 ACN109669751 ACN 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 LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811536885.1ApriorityCriticalpatent/CN109669751A/en
Publication of CN109669751ApublicationCriticalpatent/CN109669751A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请实施例公开了一种输入框的绘制方法,该方法包括:监控包括有提示文字的输入框中的焦点,当输入框获取到焦点时,为提示文字确定第一动画参数,根据第一动画参数绘制输入框,当输入框失去焦点时,为提示文字确定第二动画参数,根据第二动画参数绘制输入框,其中,第一动画参数和第二动画参数均用于移动提示文字。本申请实施例还同时提供了一种输入框的绘制装置、终端及计算机存储介质。

The embodiment of the present application discloses a method for drawing an input box, the method comprising: monitoring the focus of an input box including a prompt text, when the input box acquires the focus, determining a first animation parameter for the prompt text, drawing the input box according to the first animation parameter, when the input box loses the focus, determining a second animation parameter for the prompt text, drawing the input box according to the second animation parameter, wherein the first animation parameter and the second animation parameter are both used to move the prompt text. The embodiment of the present application also provides a device for drawing an input box, a terminal and a computer storage medium.

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 computersStorage 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 combingAt 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 controlPart 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 toFind 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, energyEnough 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 firstAnimation 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 secondIt 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 drawnInclude 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 drawnShape.
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 defeatedEnter frame, by the prompt text according to the track of first animation curve, is moved to institute in first animation timeState 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, packetIt includes:
It is drawn according to second animation time, the second animation shift length and second animation curve described defeatedEnter frame, by the prompt text according to the track of second animation curve, is moved to institute in second animation timeState 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 focusParameter 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 focusNumber 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 draftingInput 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 drawnShape.
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 defeatedEnter frame, by the prompt text according to the track of first animation curve, is moved to institute in first animation timeState 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 defeatedEnter frame, by the prompt text according to the track of second animation curve, is moved to institute in second animation timeState 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 embodimentsInput frame drawing apparatus.
The embodiment of the present application provides a kind of computer storage medium, is stored with executable instruction, when the executable fingerWhen order is executed by one or more processors, the processor executes input frame described in said one or multiple embodimentsMethod 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 partyMethod includes: firstly, monitoring includes the focus in the input frame of prompt text, then, when input frame gets focus, to mentionShow that text determines the first animation parameters, draw input frame according to the first animation parameters, when input frame loses focus, for prompt textWord determines the second animation parameters, draws input frame according to the second animation parameters, wherein the first animation parameters and the second animation parametersIt 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 textMonitoring, when, from no focus to when getting focus, determining the first animation parameters in input frame for prompt text, so that according toFirst animation parameters draw input frame, in this way, move compared with making input frame of the input frame drawn when no focusThe position of prompt text, when, from there are focuses to when losing focus, determining the second animation parameters in input frame for prompt text, intoAnd to draw input frame according to the second animation parameters, in this way, make the input frame drawn with there are inputs when focusFrame 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 inputThe drafting of frame avoids the existing tedious steps that input frame drafting is carried out by least two layers of control, to simplify inputThe 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, completeSite 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 terminalIn 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 instituteShow, 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 terminalThe drafting of frame, specifically, Fig. 2 are the flow diagram that control combing draws input frame, as shown in Fig. 2, the control combing packetInclude internal layer input frame control and outer layer control TextInputLayout, wherein outer layer control includes 7 child control views, interiorLayer control includes: internal layer input frame control TextInputEditText, frame layout control FrameLayout, space controlSpace and line style layout control LinearLayout etc., in practical applications, internal layer control generate the drafting ginseng of input frameNumber, 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 LayoutWith drawing parameter Draw.
That is, complete the drafting to input frame above by control combing, internal layer input frame control and outer is neededLayer 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 independentComplete input frame drafting, when drawing input frame, firstly, to include prompt text input frame in focus superviseControl.
So, firstly, input frame control needs first to draw out input frame, so that showing input on the display interface of terminalFrame.In order to draw out input frame, in an alternative embodiment, Fig. 3 is provided by the embodiments of the present application another optionalThe 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 drawnThe 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 frameWhen, 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 frameFor inputting user name, then the prompt text of input frame can be with for " user name ", when input frame is close for inputting user nameCode, 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 drawnThe 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 includesThe 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 styleInput 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 straightLine, 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 frameLocation 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 drawnAccording 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 shownIn 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 squareShape, user can input in rectangle.The rectangle can be orthogonal rectangle, or round rectangle, here, with filletFor 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 circleThe 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 rectangleColor 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 drawnShape, and according in rectangle input frame round rectangle and prompt text draw input frame so that include the square of prompt textShape 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 textEnter 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 parametersDraw input frame;
In practical applications, when user needs to input in input frame, input frame is first clicked by mouse or fingerIn 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 obtainedGet focus.
When the focus that input frame is got, illustrate that user will be in input area input data, due in input areaPrompt 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 promptThe 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 firstAnimation 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 parametersInput frame processed;
For example, when user needs in input frame after input completion, after operation is completed in sending input, so thatCursor 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 pairThe 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 defeatedEnter region, next user is inputted according to prompt text, determine the second animation parameters at this time for prompt text, withTwo animation parameters draw input frame, since the second animation parameters are for moving prompt text, so that in the input frame drawn outPrompt 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-mentionedFirst animation shift length includes the first object position of mobile prompt text, and the second animation shift length includes mobile prompt textSecond 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 parametersFrame 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 textWord 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 timeIt sets.
Here, input is drawn using the first animation time determined, the first animation shift length and the first animation curveFrame, since the first animation parameters are for moving prompt text, so the input frame drawn out mentions compared with the input frame before draftingShow 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 curveCursor position.
E.g., including have in the input frame of prompt text, prompt text is located at input area, when input frame gets focusWhen, 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 mobileText 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 textWord 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 timeIt sets.
Here, input is drawn using the second animation time determined, the second animation shift length and the second animation curveFrame, since the second animation parameters are for moving prompt text, so the input frame drawn out mentions compared with the input frame before draftingShow 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 curveCursor position.
For example, repainting input frame after the focus got in input frame, will be mentioned in the input frame repaintedShow that character motion repaints input frame when losing focus in input frame to first object position, in the input frame repaintedCharacter 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 inputReasonable paddingTop (the upper inset spacing of control) is arranged in frame, reserved to the text (the rectangle input frame in Fig. 4) in back gaugeThen 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 " userName " 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 ControlThe 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 defeatedEnter 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. 4Than being moved on prompt text at the head position of the coboundary of rectangle, the affiliated rectangle for coboundary where prompting user is defeatedEnter the attribute of frame.
In addition, input frame control loses the focus in input frame when cursor removes input frame, and similarly, input frame controlDetermine that the second animation parameters, the second animation parameters may include the second animation time, the second animation shift length for prompt textWith 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) alwaysChanging 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 parametersIt 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 inputThe 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 frameStay enough display controls, then, remove the default background of input frame, the background for drawing oneself (is equivalent to the shape of input frameShape), 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 lineReserve 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 " userName " 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 ControlThe 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 defeatedEnter 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. 6Than 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 frameControl 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 animationDistance 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 DrawTextThe 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 asShown 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 singleThe input frame control CorlorEditText of layer, which includes a child control views, as in itself, defeated in Fig. 8Entering frame control includes the component TextView for showing character string;In practical applications, input frame control generates input frameRendering 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 parameterDraw;As seen from Figure 8, compared with the control combing in Fig. 2 draws input frame, input frame control using more convenient andSuccinctly, 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 promptThen focus in the input frame of text when input frame gets focus, determines the first animation parameters, root for prompt textInput frame is drawn according to the first animation parameters, when input frame loses focus, determines the second animation parameters for prompt text, according to theTwo animation parameters draw input frame, wherein the first animation parameters and the second animation parameters are used to mobile prompt text;NamelySay, 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 toWhen 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 focusFrom there are focuses to when losing focus, determine the second animation parameters for prompt text so that according to the second animation parameters comeInput 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 focusIt sets, in this way, the drawing apparatus of input frame can complete the drafting to input frame by the above method, avoids existing pass throughAt 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 mentionsThe 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, thisApplication 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 focusThe 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 toSecond 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 outWhat 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 textWord 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 timeIt 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 textWord 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 timeIt sets.
In practical applications, above-mentioned monitoring unit 91, the first drawing unit 92, the second drawing unit 93, third are drawn singleMember 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 applicationProvide 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 fingerWhen 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 randomAccess memory, FRAM), read-only memory (Read Only Memory, ROM), programmable read only memory(Programmable Read-Only Memory, PROM), Erasable Programmable Read Only Memory EPROM (ErasableProgrammable Read-Only Memory, EPROM), electrically erasable programmable read-only memory (ElectricallyErasable Programmable Read-Only Memory, EEPROM), flash memory (Flash Memory), magnetic tableThe 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 programProduct.Therefore, the shape of hardware embodiment, software implementation or embodiment combining software and hardware aspects can be used in the applicationFormula.Moreover, the application, which can be used, can use storage in the computer that one or more wherein includes computer usable program codeThe 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 applicationFigure 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 instructionsThe combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programsInstruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produceA raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for realThe 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 spyDetermine 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 orThe 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 countingSeries of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer orThe instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram oneThe 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)

CN201811536885.1A2018-12-142018-12-14Input box drawing method and device, terminal and computer storage mediumPendingCN109669751A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201811536885.1ACN109669751A (en)2018-12-142018-12-14Input box drawing method and device, terminal and computer storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201811536885.1ACN109669751A (en)2018-12-142018-12-14Input box drawing method and device, terminal and computer storage medium

Publications (1)

Publication NumberPublication Date
CN109669751Atrue CN109669751A (en)2019-04-23

Family

ID=66144404

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201811536885.1APendingCN109669751A (en)2018-12-142018-12-14Input box drawing method and device, terminal and computer storage medium

Country Status (1)

CountryLink
CN (1)CN109669751A (en)

Cited By (4)

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

Citations (16)

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

Patent Citations (16)

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

Cited By (4)

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

Similar Documents

PublicationPublication DateTitle
CN109669751A (en)Input box drawing method and device, terminal and computer storage medium
JP6048898B2 (en) Information display device, information display method, and information display program
CN103157281B (en)Display method and display equipment of two-dimension game scene
WO2020186935A1 (en)Virtual object displaying method and device, electronic apparatus, and computer-readable storage medium
US20140325418A1 (en)Automatically manipulating visualized data based on interactivity
US8947429B2 (en)Gestures and tools for creating and editing solid models
CN103970518A (en)3D rendering method and device for logic window
CN110737944A (en)floor slab generation method and generation device based on Revit
WO2017092430A1 (en)Method and device for realizing user interface control based on virtual reality application
CN110909439A (en)AR-based assembly method and device and terminal
CN109388461A (en)Display methods, device and the display terminal of object are identified in screen-picture screenshot
KR20220110493A (en) Method and apparatus for displaying objects in video, electronic devices and computer readable storage media
Perhac et al.Urban fusion: visualizing urban data fused with social feeds via a game engine
CN107817935A (en)Application interface display method and device, terminal and computer readable storage medium
CN107615229B (en) User interface device and screen display method of user interface device
JP2020523668A (en) System and method for configuring virtual camera
CN106445337A (en) Method and device for realizing spotlight effect
JP2010072808A (en)Drawing device
CN111782866A (en) Drawing method, device, terminal device and computer storage medium
KR20090092153A (en)Method and apparatus for processing image
KR101748637B1 (en)Apparatus and method for generating depth map
CN102591646B (en)Method for simultaneously scaling multiple WPF (Windows presentation foundation) windows and device
RU2637903C2 (en)Method and computer device for creating simplified borders of graphic objects
CN108287842B (en)Method and device for preventing cover of navigation map and navigation equipment
CN109388299A (en)Display methods, device and the electronic equipment of interface object

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20190423

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp