Cursor mobile display method and device thereof on terminal unit
Technical field
The present invention relates to interface display field, particularly to cursor mobile display technology.
Background technology
In prior art, the cursor on some interfaces on intelligent television moves the mode adopting smooth movement, but this moves and is based on light and puts on and do not show that content realizes.There is light and put on substantial situation in some search panels of intelligent television, but does not accomplish the smooth mobile operation of light target.The existing cursor situation of movement putting on content displaying for light, cursor is generally adopted first directly to disappear, then in the emergent implementation in next position, in actual mechanical process, obvious mobile route is not presented owing to cursor moves, easily allow user produce to lose sense, thus the cursor position that can not find in telescreen, reduce user experience quality.
The premise that current existing cursor smooths movement is the superiors or the orlop that light is marked on full page, the drafting operation of such cursor can be placed in the dispatchDraw of the superiors' control (view) and carry out, if namely cursor is at the bottom, then the expression in Android is exactly:
drawFocus(canvas);// draw cursor
super.dispatchDraw(canvas);// draw the superiors' control
Whereas if cursor is in the superiors, then
super.dispatchDraw(canvas);
drawFocus(canvas);
This realization is relatively easy to, and concrete reason is:
1) there is clear and definite control (view) (controls (view) of the superiors) that focus can be responsible for;
2) control (view) of the superiors can listen to all of KeyEvent and touchscreen events, and the impact that case distribution focusing is drawn also is easier to process;
3) prior, the general layout of whole Layout (layout) will not be changed.
It was found by the inventors of the present invention that prior art exists following technical problem urgently to be resolved hurrily:
1., in television interfaces, when light has put on content displaying, how better to express light target mobile route:
From the angle of Consumer's Experience, user is when operating cursor and moving, it is necessary to clear and definite knows the path that cursor moves, and therefore, how when light has put on content displaying, clearly informs that user's cursor carrys out whole moving process where wherefrom.
2. how to ensure that cursor can smooth movement, it is ensured that the smooth sense of operating experience.
Summary of the invention
It is an object of the invention to provide cursor mobile display method and device thereof on a kind of terminal unit, cursor can be made to move and to present obvious mobile route, simultaneously in cursor moving process, do not affect the content displaying that light is put on, user can be felt clearly and increases the smooth sense and integrity degree experienced by light target moving process.
For solving above-mentioned technical problem, embodiments of the present invention disclose a kind of cursor mobile display method on terminal unit, comprise the following steps:
The window of terminal unit generates foreground layer, background layer and the focus mobile layer between foreground layer and background layer, wherein foreground layer includes the display content that needs Overlapping display above cursor, background layer includes the display content needing Overlapping display side under the cursor, and focus mobile layer is used for display highlighting;
By in this window, each needs the display content assignment in the control of display focus at foreground layer or background layer;
When light is marked on and moves between two focal positions, drawing cursor at focus mobile layer, at least a part of which is drawn a frame cursor and is in the picture between two focal positions and is shown on the screen of terminal unit.
Embodiments of the present invention also disclose cursor mobile display device on a kind of terminal unit, including:
Delaminating units, for generating foreground layer, background layer and the focus mobile layer between foreground layer and background layer on the window of terminal unit, wherein foreground layer includes the display content that needs Overlapping display above cursor, background layer includes the display content needing Overlapping display side under the cursor, and focus mobile layer is used for display highlighting;
Allocation units, for by this window, each needs the display content assignment in the control of display focus at foreground layer or background layer;
Cursor drawing unit, for when light is marked on and moves between two focal positions, drawing cursor at focus mobile layer, at least a part of which is drawn a frame cursor and is in the picture between two focal positions and is shown on the screen of terminal unit.
Compared with prior art, the main distinction and effect thereof are in that embodiment of the present invention:
Generate foreground layer, focus mobile layer and background layer in each window, by in window, each needs the display content assignment in the control of display focus at foreground layer or background layer, when cursor moves, at least draw a frame cursor and be in the picture between two focal positions, cursor can be made to move and to present obvious mobile route, simultaneously in cursor moving process, do not affect the content displaying that light is put on, user can be felt clearly and increases the smooth sense and integrity degree experienced by light target moving process.
Further, realize light target by two-wheeled drafting to draw, it is possible to adapt to many operating systems can only drawn at present from bottom to top layer.
Further, by introducing supplementary module, it is possible to what make foreground layer and focus mobile layer couples minimizing.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of cursor mobile display method on a kind of terminal unit in first embodiment of the invention;
Fig. 2 is the software flow schematic diagram of cursor mobile display method on a kind of terminal unit in first embodiment of the invention;
Fig. 3 to Fig. 6 is that in first embodiment of the invention, on a kind of terminal unit, cursor smooths the process schematic of movement;
Fig. 7 is the structural representation of cursor mobile display device on a kind of terminal unit in second embodiment of the invention.
Detailed description of the invention
In the following description, many ins and outs are proposed in order to make reader be more fully understood that the application.But, it will be understood by those skilled in the art that even without these ins and outs with based on the many variations of following embodiment and amendment, it is also possible to realize the application each claim technical scheme required for protection.
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiments of the present invention are described in further detail.
First embodiment of the invention relates to a kind of cursor mobile display method on terminal unit.Fig. 1 is the schematic flow sheet of cursor mobile display method on this terminal unit.
In the present embodiment, it is preferable that terminal unit is intelligent television or Set Top Box, moved by remote controller or Keyboard Control light target.
Furthermore, it is to be understood that of course, it is possible to the terminal unit of application the present invention program can have a lot of type, it is possible to it is intelligent television, Set Top Box, video monitoring equipment, DVD player, videocorder, scialyscope, computer, mobile phone etc..Light target controls device can also a lot of type, for instance remote controller, keyboard, speech input device (being moved by Voice command light target), body-sensing input equipment, the input equipment moved according to oculomotor control cursor, control input equipment that cursor moves etc. according to gesture.
Specifically, as it is shown in figure 1, on this terminal unit cursor mobile display method comprise the following steps:
In a step 101, the window of terminal unit generates foreground layer, background layer and the focus mobile layer between foreground layer and background layer, wherein foreground layer includes the display content that needs Overlapping display above cursor, background layer includes the display content needing Overlapping display side under the cursor, and focus mobile layer is used for display highlighting.
Then into step 102, by this window, each needs the display content assignment in the control of display focus at foreground layer or background layer.
Furthermore, it is to be understood that each window includes at least one control (view), some of which control needs display focus, and some control need not show focus.
In prior art, each control of window is independent display, and is absent from foreground layer and the background layer of window level, without by the foreground layer of the content assignment in each control to window level and background layer.
Then into step 103, when light is marked on and moves between two focal positions, drawing cursor at focus mobile layer, at least a part of which is drawn a frame cursor and is in the picture between two focal positions and is shown on the screen of terminal unit.
Further, specifically, step 103 includes following sub-step:
Rendering context layer, the drafting of jumping focal point mobile layer, draw foreground layer, skip the drafting of background layer, draw focus mobile layer, skip the drafting of foreground layer.
Drawn by two-wheeled and realize the drafting of light target, it is possible to adapt to many operating systems can only drawn from bottom to top layer at present.
If furthermore, it is to be understood that operating system is not required for draw from bottom to top layer, it is also possible to do not adopt this drawing order.
It should be noted that in the present embodiment, step 101 and general of step 102 perform once when window creation, and the step 103 generation according to event repeatedly performs.
Hereafter process ends.
Generate foreground layer, focus mobile layer and background layer in each window, by in window, each needs the display content assignment in the control of display focus at foreground layer or background layer, when cursor moves, at least draw a frame cursor and be in the picture between two focal positions, cursor can be made to move and to present obvious mobile route, simultaneously in cursor moving process, do not affect the content displaying that light is put on, user can be felt clearly and increases the smooth sense and integrity degree experienced by light target moving process.
Additionally, in the present embodiment, it is preferable that on this terminal unit, cursor mobile display method is further comprising the steps of:
The window of terminal unit generates supplementary module;
When foreground layer receives KeyEvent or touchscreen events, this event being notified supplementary module, this supplementary module moves according to event control focus mobile layer light target.
By introducing supplementary module, it is possible to what make foreground layer and focus mobile layer couples minimizing.
Furthermore, it is to be understood that in some other embodiment of the present invention, supplementary module neither be required, directly between foreground layer and focus mobile layer alternative events information it is also possible that.
Similarly, in above-mentioned steps, step " on the window of terminal unit generation supplementary module " is typically also and only performs once when window creation;And step " when foreground layer receives KeyEvent or touchscreen events, this event notifying supplementary module, this supplementary module moves according to event control focus mobile layer light target " is also the generation according to event, repeatedly perform.
Further, specifically, the step that supplementary module moves according to event control focus mobile layer light target includes following sub-step:
Supplementary module, when receiving KeyEvent or touchscreen events, obtains current state to focus mobile layer, if it find that focus mobile layer is in drawing the process that focus moves, notes that focus mobile layer stops drawing.
Furthermore, it is to be understood that supplementary module also has other function more mutual with focus mobile layer, it is not limited thereto.
Owing to needs focus moves in intermediate layer, present applicant proposes the concept of " focus mobile layer (focus_layer) ", first point of application " Ali's TV input method " below based on the application is described in detail:
Intermediate layer discounting for focus is moved, so the background frame (i.e. form line below) of input method and button above are in (i.e. the background of a view and the prospect) of same control (view), this also complies with normal development scheme, but the intermediate layer in order to introduce focus is moved, it is accomplished by forcing to force to assign in two view by the content that should belong to same view, and focus mobile layer is inserted in centre, with the xml language expression of Android android it is exactly:
< FrameLayoutxmlns:android=" http://schemas.android.com/apk/res/android "
Android:layout_width=" match_parent "
Android:layout_height=" dimen/ime_height "
Android:background=" color/main_bg " >
<includelayout=" layout/ime_focus_layer_below "/>
<includelayout=" layout/ime_focus_layer "/>
<includelayout=" layout/ime_focus_layer_above "/>
</FrameLayout>
So, the work inserting a focus_layer is just completed by the FrameLayout (frame layout) of Android android, but being also required to be split on focus_layer_below (background layer) and focus_layer_above (foreground layer) by the background and prospect that partly originally should belong to a view, this is accomplished by Developmental Engineer and controls behavior and the response of same control on two view simultaneously simultaneously.
nullAdditionally need to solve a problem,Owing to this " focus mobile layer " is not located at the top layer of whole Layout,Keyboard at android、In the distribution system of touchscreen events,It does not possess the condition receiving KeyEvent and touchscreen events,But it is need these events (such as to smooth in focus in the process of movement when drawing focus,User is by directionkeys or touches touch screen,So smooth movement of focus just should be immediately finished),So top layer view also needs to undertake the function of a supplementary module (i.e. " focus mobile layer helper "),Namely it needs to coordinate with " focus mobile layer ",Current state is obtained to focus mobile layer when receiving KeyEvent or touchscreen events,If it find that it is in drawing the process that focus moves,Will notify that focus mobile layer stops drawing.Concrete software flow is as shown in Figure 2.
The present invention adopts cursor to smooth the mode of movement to solve the problem that existing scheme does not present cursor mobile route to user, simultaneously in cursor moving process, do not affect the content displaying that light is put on, user can be felt clearly and increases the smooth sense and integrity degree experienced by light target moving process.Simultaneously as focus is not limited to top layer or bottom, the design of user-interaction experience designer (ued) will not be caused constraint, in that context it may be convenient to increase background and prospect to various controls.
Fig. 3 to Fig. 6 shows in the present embodiment, and on terminal unit, cursor smooths the whole process of movement.
Specifically, Fig. 3 shows that light is marked on and initially spends position, and light has been put on content information and shown;Pressing the upper key of remote controller, cursor starts as the upper smooth selection key moving to top, and mobile have an obvious path, and does not affect light and put on presenting of content, as shown in Figure 4 and Figure 5;Finally, cursor moves on target button, as shown in Figure 6.
In another embodiment of the presently claimed invention, assume 1 as shown in Figure 3,2,5 three buttons, if moving to 2 from 1 to move again to 5, assume the speed speed that the speed of user key-press moves very slowly that focus moves higher than focus, so arise that such situation: user has first pressed right direction key, at this moment focus moves from 1 to 2, when focus has not moved into 2, if user has pressed again time directionkeys, at this moment focus needs to move to 5, to this, we have two kinds of preferred moving methods.
The first moving method is: press the moment of directionkeys user, allows the moving process of 1 to 2 complete immediately, and namely focus is immediately moved to 2, then starts the movement to 5 again.This process is no problem, but has " pause " sense to the moving process feeling focus of user.
The second moving method is: press the moment of directionkeys user, no longer allows focus wink move on to 2, but directly changes direction from current point and move on to 5, and so seem just not pause sense.Concrete implementation mode is: can not only preserve initial focus and goal-focus, also need to preserve " current focus ", when focus shifts, can not first start mobile from the position of initial focus, and to judge currently whether have focus moving, if it has, that using the position at current focus place as " current location ", then will calculate the mobile route of goal-focus.
In other words, if be detected that during directionkeys event, cursor has not moved into first object focus, then immediately cursor is arranged first object focus, cursor is moved to the second goal-focus again from first object focus, wherein, first object focus is the goal-focus before direction key events occurs, and the second goal-focus is the goal-focus after direction key events occurs.
Another preferred embodiment, if be detected that during directionkeys event, cursor has not moved into first object focus, then recording light target current location, and calculate this current location mobile route to the second goal-focus, then move cursor by the mobile route calculating gained, wherein, first object focus is the goal-focus before direction key events occurs, and the second goal-focus is the goal-focus after direction key events occurs.
It should be noted that in the development of one embodiment of the invention, use java language and the system of minimum android2.3, on this basis, use cost is minimum, but is not limited to some operating system.
Additionally, the method that this intermediate layer focus moves is equally applicable to other platform except android.
Each method embodiment of the present invention all can realize in modes such as software, hardware, firmwares.No matter the present invention realizes with software, hardware or firmware mode, instruction code may be stored in the addressable memorizer of any kind of computer (such as permanent or revisable, volatibility or non-volatile, solid-state or non-solid, fixing or removable medium etc.).nullEqually,Memorizer can be such as programmable logic array (ProgrammableArrayLogic,It is called for short " PAL ")、Random access memory (RandomAccessMemory,It is called for short " RAM ")、Programmable read only memory (ProgrammableReadOnlyMemory,It is called for short " PROM ")、Read only memory (Read-OnlyMemory,It is called for short " ROM ")、Electrically Erasable Read Only Memory (ElectricallyErasableProgrammableROM,It is called for short " EEPROM ")、Disk、CD、Digital versatile disc (DigitalVersatileDisc,It is called for short " DVD ") etc..
Second embodiment of the invention relates to cursor mobile display device on a kind of terminal unit.Fig. 7 is the structural representation of cursor mobile display device on this terminal unit.
In the present embodiment, it is preferable that terminal unit is intelligent television or Set Top Box, moved by remote controller or Keyboard Control light target.
Of course, it is possible to the terminal unit of application the present invention program can have a lot of type, it is possible to be intelligent television, Set Top Box, video monitoring equipment, DVD player, videocorder, scialyscope, computer etc..Light target controls device can also a lot of type, for instance remote controller, keyboard, speech input device (being moved by Voice command light target), body-sensing input equipment, the input equipment moved according to oculomotor control cursor, control input equipment that cursor moves etc. according to gesture.
Specifically, as it is shown in fig. 7, on this terminal unit cursor mobile display device include:
Delaminating units, for generating foreground layer, background layer and the focus mobile layer between foreground layer and background layer on the window of terminal unit, wherein foreground layer includes the display content that needs Overlapping display above cursor, background layer includes the display content needing Overlapping display side under the cursor, and focus mobile layer is used for display highlighting.
Allocation units, for by this window, each needs the display content assignment in the control of display focus at foreground layer or background layer.
Furthermore, it is to be understood that each window includes at least one control (view), some of which control needs display focus, and some control need not show focus.
In prior art, each control of window is independent display, and is absent from foreground layer and the background layer of window level, without by the foreground layer of the content assignment in each control to window level and background layer.
Cursor drawing unit, for when light is marked on and moves between two focal positions, drawing cursor at focus mobile layer, at least a part of which is drawn a frame cursor and is in the picture between two focal positions and is shown on the screen of terminal unit.
Further, specifically:
Cursor drawing unit comprises the following steps at drafting light timestamp:
Rendering context layer, the drafting of jumping focal point mobile layer, draw foreground layer, skip the drafting of background layer, draw focus mobile layer, skip the drafting of foreground layer.
Drawn by two-wheeled and realize the drafting of light target, it is possible to adapt to many operating systems can only drawn from bottom to top layer at present.
If furthermore, it is to be understood that operating system is not required for draw from bottom to top layer, it is also possible to do not adopt this drawing order.
Also include:
Supplementary module generates unit, for generating supplementary module on the window of terminal unit.
By introducing supplementary module, it is possible to what make foreground layer and focus mobile layer couples minimizing.
Furthermore, it is to be understood that in some other embodiment of the present invention, supplementary module neither be required, directly between foreground layer and focus mobile layer alternative events information it is also possible that.
Notification unit, when receiving KeyEvent or touchscreen events for foreground layer, notifies supplementary module by this event, and this supplementary module moves according to event control focus mobile layer light target.
Supplementary module is additionally operable to, and when receiving KeyEvent or touchscreen events, obtains current state to focus mobile layer, if it find that focus mobile layer is in drawing the process that focus moves, notes that focus mobile layer stops drawing.
Supplementary module is additionally operable to, if be detected that during directionkeys event, cursor has not moved into first object focus, then immediately cursor is arranged first object focus, cursor is moved to the second goal-focus again from first object focus, wherein, first object focus is the goal-focus before direction key events occurs, and the second goal-focus is the goal-focus after direction key events occurs.
Another preferred embodiment in, supplementary module is additionally operable to, if be detected that during directionkeys event, cursor has not moved into first object focus, then recording light target current location, and calculates this current location mobile route to the second goal-focus, cursor is moved again by the mobile route calculating gained, wherein, first object focus is the goal-focus before direction key events occurs, and the second goal-focus is the goal-focus after direction key events occurs.
Generate foreground layer, focus mobile layer and background layer in each window, by in window, each needs the display content assignment in the control of display focus at foreground layer or background layer, when cursor moves, at least draw a frame cursor and be in the picture between two focal positions, cursor can be made to move and to present obvious mobile route, simultaneously in cursor moving process, do not affect the content displaying that light is put on, user can be felt clearly and increases the smooth sense and integrity degree experienced by light target moving process.
First embodiment is the method embodiment corresponding with present embodiment, and present embodiment can be worked in coordination enforcement with the first embodiment.The relevant technical details mentioned in first embodiment is still effective in the present embodiment, in order to reduce repetition, repeats no more here.Correspondingly, the relevant technical details mentioned in present embodiment is also applicable in the first embodiment.
It should be noted that, each module or the unit mentioned in the present invention each equipment embodiment are all logical blocks, physically, one logical block can be a physical location, it can also be a part for a physical location, can also realizing with the combination of multiple physical locations, the Physical realization of these logical blocks itself is not most important, and the combination of the function that these logical blocks realize is only the key solving technical problem proposed by the invention.Additionally, for the innovative part highlighting the present invention, the unit less close with solving technical problem relation proposed by the invention is not introduced by the above-mentioned each equipment embodiment of the present invention, and this is not intended that the said equipment embodiment and is absent from other unit.
It should be noted that, in the claim and description of this patent, the relational terms of such as first and second or the like is used merely to separate an entity or operation with another entity or operating space, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " includes ", " comprising " or its any other variant are intended to comprising of nonexcludability, so that include the process of a series of key element, method, article or equipment not only include those key elements, but also include other key elements being not expressly set out, or also include the key element intrinsic for this process, method, article or equipment.When there is no more restriction, statement " including " key element limited, it is not excluded that there is also other identical element in including the process of described key element, method, article or equipment.
Although by referring to some of the preferred embodiment of the invention, the present invention being shown and described, but it will be understood by those skilled in the art that and in the form and details it can be done various change, without departing from the spirit and scope of the present invention.