Summary of the invention
Cannot complete sidebar and switch to display state by hidden state by one hand to solve user, and existing program can shorten the problem in the serviceable life of physical button or touch-screen, embodiments provides a kind of sidebar display packing, device and terminal.Described technical scheme is as follows:
According to an aspect of the present invention, provide a kind of sidebar display packing, described method comprises:
Obtain the angle of inclination of terminal on preset direction;
Whether the angle of inclination detected on described preset direction is greater than first threshold;
If detect, the angle of inclination on described preset direction is greater than first threshold, then whether the angle of inclination detected on described preset direction is greater than Second Threshold, and described Second Threshold is greater than described first threshold;
If detect, the angle of inclination on described preset direction is not more than Second Threshold, be then presented in the respective side of current interface by the sidebar corresponding with described preset direction;
If detect, the angle of inclination on described preset direction is greater than Second Threshold, then at least two sidebar be presented at respectively in the respective side of current interface.
Preferably, the described angle of inclination of acquisition terminal on preset direction, comprising:
Obtain the angle of inclination of described terminal on preset direction that the sensor in terminal gathers, described sensor comprises one in Gravity accelerometer and three-axis gyroscope or two kinds; The current interface of described terminal comprises along clockwise end to end first side, second side, the 3rd side and four side; Described preset direction comprise by the center of described current interface point to the first side of described current interface first direction, pointed to by the center of described current interface the second side of described current interface second direction, pointed to by the center of described current interface the 3rd side of described current interface third direction and pointed to by the center of described current interface described current interface four side fourth direction in any one.
Preferably, described the sidebar corresponding with described preset direction is presented in the respective side of current interface, comprises:
If described preset direction is the first direction of the first side being pointed to described current interface by the center of described current interface, then the sidebar corresponding with described first direction is presented on the 3rd side of current interface;
If described preset direction is the second direction of the second side being pointed to described current interface by the center of described current interface, then the sidebar corresponding with described second direction is presented on the four side of current interface;
If described preset direction is the third direction of the 3rd side being pointed to described current interface by the center of described current interface, then the sidebar corresponding with described third direction is presented on the first side of current interface;
If described preset direction is the fourth direction of the four side being pointed to described current interface by the center of described current interface, then the sidebar corresponding with described fourth direction is presented on the first side of current interface.
Preferably, described sidebar is any one in menu bar, shortcut hurdle, plug-in unit display field and application information hurdle.
According to a further aspect in the invention, provide a kind of sidebar display device, described device, comprising:
Angle acquisition module, for obtaining the angle of inclination of terminal on preset direction;
Angle detection module, whether the angle of inclination on the preset direction detecting the acquisition of described angle acquisition module is greater than first threshold;
Second detection module, after the angle of inclination for detecting on described preset direction at described angle detection module is greater than first threshold, whether the angle of inclination detected on described preset direction is greater than Second Threshold, and described Second Threshold is greater than described first threshold;
Side display module, if detect that the angle of inclination on described preset direction is not more than Second Threshold specifically for described second detection module, is then presented in the respective side of current interface by the sidebar corresponding with described preset direction;
At least two sidebar if detect that the angle of inclination on described preset direction is greater than Second Threshold for described second detection module, are then presented in the respective side of current interface by full limit display module respectively.
Preferably, described angle acquisition module, the angle of inclination of described terminal on preset direction that the sensor specifically for obtaining in terminal gathers, described sensor comprises one in Gravity accelerometer and three-axis gyroscope or two kinds; The current interface of described terminal comprises along clockwise end to end first side, second side, the 3rd side and four side; Described preset direction comprise by the center of described current interface point to the first side of described current interface first direction, pointed to by the center of described current interface the second side of described current interface second direction, pointed to by the center of described current interface the 3rd side of described current interface third direction and pointed to by the center of described current interface described current interface four side fourth direction in any one.
Preferably, described side display module, comprising: the first display unit, the second display unit, the 3rd display unit and the 4th display unit;
Described first display unit, if the first direction for described preset direction being the first side being pointed to described current interface by the center of described current interface, is then presented at the sidebar corresponding with described first direction on the 3rd side of current interface;
Described second display unit, if the second direction for described preset direction being the second side being pointed to described current interface by the center of described current interface, is then presented on the four side of current interface by the sidebar corresponding with described second direction;
Described 3rd display unit, if the third direction for described preset direction being the 3rd side being pointed to described current interface by the center of described current interface, is then presented on the first side of current interface by the sidebar corresponding with described third direction;
Described 4th display unit, if the fourth direction for described preset direction being the four side being pointed to described current interface by the center of described current interface, is then presented at the sidebar corresponding with described fourth direction on the first side of current interface.
Preferably, described sidebar is any one in menu bar, shortcut hurdle, plug-in unit display field and application information hurdle.
Another aspect, provides a kind of terminal, comprises sidebar display device described above.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
By when detecting that the angle of inclination of terminal on preset direction is greater than threshold value, the sidebar corresponding with preset direction is presented in the respective side of current interface; Solve user to complete sidebar and switch to display state by hidden state by one hand, and existing program can shorten the problem in the serviceable life of physical button or touch-screen; Reach user's one hand just can complete sidebar and switch to display state by hidden state, and extend the serviceable life of physical button or touch-screen.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
The embodiment of the present invention can be applied in the mobile terminal including such as Gravity accelerometer, three-axis gyroscope and so on sensor, this mobile terminal can be mobile phone, panel computer, electronic reader, PDA (PersonalDigitalAssistant, personal digital assistant), the terminal device such as POS (PointofSales, point-of-sale terminal), vehicle-mounted computer.
In the mobile terminal including the sensor, the mode of setting up of end coordinates system can be: the display interface of setting mobile terminal is xy plane, wherein, the center of gravity of mobile terminal is true origin, what point to mobile terminal right is the positive axis of x-axis, mobile terminal plane is y-axis perpendicular to the coordinate axis of x-axis, point to above mobile terminal is the positive axis of y-axis, coordinate axis perpendicular to the display interface of mobile terminal is z-axis, what point to mobile terminal front is the positive axis of z-axis, details please refer to Fig. 1, wherein Fig. 1 is the reading direction of such as mobile phone and so on is that the end coordinates system that vertical mobile terminal adopts usually sets up mode, similarly, Fig. 2 is the reading direction of such as panel computer and so on is that the end coordinates system that horizontal mobile terminal adopts usually sets up mode.
In the mobile terminal including the sensor, the data gathered by sensor, can get mobile terminal angle of inclination in all directions.Take sensor as Gravity accelerometer be example, the tri-vector that application program gathers according to Gravity accelerometer calculates the angle of inclination of mobile terminal in each coordinate axis.Specifically, application program can get a tri-vector (x, y, z) every predetermined time interval, and wherein, all x, the span of y, z value is [-1,1].The size of z value is for characterizing facing up or downwards of mobile terminal, in the embodiment of the present invention, only with consider the value of x and y come example illustrate the value size of x and y characterize respectively mobile terminal to the left and right with angle of inclination during tilted upward, the numerical value of x and y is larger, represent that angle of inclination is larger, the positive negative indication angle of inclination of x and y towards, such as:
X>0, characterizes mobile terminal and is tilted to the right; X<0, characterizes mobile terminal and is tilted to the left;
Y>0, characterizes mobile terminal and is inclined upwardly; Y<0, characterizes mobile terminal downward-sloping.
Please refer to Fig. 3, it illustrates the method flow diagram of the sidebar display packing that one embodiment of the invention provides.The present embodiment is mainly applied in mobile terminal with this sidebar display packing and is illustrated.This sidebar display packing, comprising:
Step 302, obtains the angle of inclination of terminal on preset direction;
Mobile terminal can be obtained from preset direction inclination angle by built-in sensor.If the current interface of terminal comprises along clockwise end to end first side, second side, the 3rd side and four side.So, preset direction comprises by any one in the fourth direction of the four side of the first direction of the first side of the center sensing current interface of current interface, the second direction being pointed to the second side of current interface by the center of current interface, the third direction by the 3rd side of the center sensing current interface of current interface and the center sensing current interface by current interface.
Step 304, whether the angle of inclination detected on preset direction is greater than first threshold;
Mobile terminal detects the angle of inclination on preset direction got in previous step and whether is greater than first threshold.
Step 306, if detect, the angle of inclination on preset direction is greater than first threshold, then the sidebar corresponding with preset direction be presented in the respective side of current interface.
If mobile terminal detects that the angle of inclination on preset direction is greater than first threshold, then the sidebar corresponding with preset direction is presented in the respective side of current interface.Such as, mobile terminal detects that the angle of inclination on first direction is greater than first threshold, then the sidebar corresponding with first direction be presented on the second side of current interface.
In sum, the sidebar display packing that the present embodiment provides, by when detecting that the angle of inclination of terminal on preset direction is greater than threshold value, is presented in the respective side of current interface by the sidebar corresponding with preset direction; Solve user to complete sidebar and switch to display state by hidden state by one hand, and existing program can shorten the problem in the serviceable life of physical button or touch-screen; Reach user's one hand just can complete sidebar and switch to display state by hidden state, and extend the serviceable life of physical button or touch-screen.
Please refer to Fig. 4, it illustrates the method flow diagram of the sidebar display packing that another embodiment of the present invention provides.The present embodiment is mainly applied in mobile terminal with this sidebar display packing and is illustrated.This sidebar display packing, comprising:
Step 402, obtains the angle of inclination of terminal on preset direction;
Mobile terminal can be obtained from preset direction inclination angle by built-in sensor.If the current interface of terminal comprises along clockwise end to end first side, second side, the 3rd side and four side.So, preset direction comprises by any one in the fourth direction of the four side of the first direction of the first side of the center sensing current interface of current interface, the second direction being pointed to the second side of current interface by the center of current interface, the third direction by the 3rd side of the center sensing current interface of current interface and the center sensing current interface by current interface.If following 56 and four side that the right 54 that the top 52 that first side is current interface shown in Fig. 5, second side are current interface shown in Fig. 5, the 3rd side are current interface shown in Fig. 5 are the left sides 58 of current interface shown in Fig. 5, then first direction is y-axis forward, second direction is x-axis forward, third direction be y-axis negative sense and fourth direction is x-axis negative sense.
Sensor comprises one in Gravity accelerometer and three-axis gyroscope or two kinds.The present embodiment mainly comprises Gravity accelerometer to illustrate for sensor.Gravity accelerometer can gather the angle of inclination of mobile terminal in x-axis and y-axis direction according to fixing frequency acquisition, thus receive the tri-vector (x at the angle of inclination characterizing mobile terminal one by one, y, z) report the driving layer of mobile terminal.Then the application program in mobile terminal can obtain this tri-vector from driving layer.For the operating system of running of mobile terminal for WindowsPhone, API (the ApplicationProgrammingInterface of WindowsPhone operating system, application programming interface) an Accelerometer class is provided, application program in mobile terminal directly uses this Accelerometer class, and data class AccelerometerReadingEventArgs can be obtained by this type of an event ReadingChanged, in data class AccelerometerReadingEventArgs, contain the value of this tri-vector.
Three-axis gyroscope and Gravity accelerometer have similar function, and detail repeats no more.Although three-axis gyroscope has larger cumulative errors and temperature drift in a long time, measure at short notice accurately, especially for the spinning movement of terminal.And Gravity accelerometer is comparatively accurate at the measured value of long period, but within a short period of time is due to the existence of signal noise, and error is larger.Preferably, the data of Gravity accelerometer and three-axis gyroscope collection can also be merged in this step, thus obtain mobile terminal more accurate inclination angle value when attitudes vibration.Such as, the data that Gravity accelerometer and three-axis gyroscope collect respectively are weighted on average, thus get more accurate inclination angle value.
Step 404, whether the angle of inclination detected on preset direction is greater than first threshold;
Whether the angle of inclination that first mobile terminal detects on preset direction is greater than first threshold.Be 0.3 for first threshold, mobile terminal can detect at third direction, and also namely whether the current tilt angle of y-axis negative sense is greater than 0.3.
It should be noted that, normally identical with the first threshold of fourth direction corresponding to first direction, second direction, third direction, but also different first thresholds can be set respectively for first direction, second direction, third direction and fourth direction.
Need to illustrate on the other hand, in this step the angle of inclination of sense terminals on preset direction whether be greater than first threshold can more than once, also namely can detect once every predetermined time interval.
Step 406, if detect, the angle of inclination on preset direction is greater than first threshold, then whether the angle of inclination detected on preset direction is greater than Second Threshold, and Second Threshold is greater than first threshold;
If mobile terminal detects that the angle of inclination on preset direction is greater than first threshold, then whether the angle of inclination that mobile terminal also continues on detection preset direction is greater than Second Threshold, and Second Threshold is greater than first threshold.For Second Threshold for 0.4, if when mobile terminal detects that the angle of inclination of third direction is greater than 0.3, whether the angle of inclination can also continuing to detect third direction is greater than 0.4.
It should be noted that, normally identical with the Second Threshold of fourth direction corresponding to first direction, second direction, third direction, but also different Second Thresholds can be set respectively for first direction, second direction, third direction and fourth direction.
Step 408, if detect, the angle of inclination on preset direction is not more than Second Threshold, be then presented in the respective side of current interface by the sidebar corresponding with preset direction;
If mobile terminal detects that the angle of inclination on preset direction is greater than first threshold, but is not more than Second Threshold, then the sidebar corresponding with preset direction is presented in the respective side of current interface.Specifically:
If preset direction is the first direction of the first side being pointed to current interface by the center of current interface, then the sidebar corresponding with first direction is presented on the 3rd side of current interface, as shown in Figure 6A.
If preset direction is the second direction of the second side being pointed to current interface by the center of current interface, then the sidebar corresponding with described second direction is presented on the four side of current interface, as shown in Figure 6B.
If preset direction is the third direction of the 3rd side being pointed to current interface by the center of current interface, then the sidebar corresponding with third direction is presented on the first side of current interface, as shown in Figure 6 C.
If preset direction is the fourth direction of the four side being pointed to described current interface by the center of current interface, then the sidebar corresponding with fourth direction is presented on the first side of current interface, as shown in Figure 6 D.
Step 410, if detect, the angle of inclination on preset direction is greater than Second Threshold, then at least two sidebar be presented at respectively in the respective side of current interface.
If mobile terminal detects that the angle of inclination on preset direction is not only greater than first threshold, be also greater than Second Threshold, then at least two sidebar be presented in the respective side of current interface respectively.Normally whole sidebar is all presented in the respective side of current interface, as illustrated in fig. 6e.
Sidebar described in above-mentioned steps can be any one in menu bar, shortcut hurdle, plug-in unit display field and application information hurdle.
In sum, the sidebar display packing that the present embodiment provides, by when detecting that the angle of inclination of terminal on preset direction is greater than first threshold, is presented in the respective side of current interface by the sidebar corresponding with preset direction; Solve user to complete sidebar and switch to display state by hidden state by one hand, and existing program can shorten the problem in the serviceable life of physical button or touch-screen; Reach user's one hand just can complete sidebar and switch to display state by hidden state, and add the serviceable life of physical button or touch-screen.Also by detecting that the angle of inclination of terminal on preset direction is not only greater than first threshold, when being also greater than Second Threshold, at least two sidebar are presented in the respective side of current interface respectively, reach user's one hand just can complete whole sidebar and switch to display state by hidden state, and extend the serviceable life of physical button or touch-screen.
Please refer to Fig. 7, it illustrates the block diagram of the sidebar display device that one embodiment of the invention provides.The part that the present embodiment mainly realizes becoming mobile terminal with this sidebar display device illustrates.This sidebar display device, comprising: angle acquisition module 720, angle detection module 740 and side display module 760.
Angle acquisition module 720, for obtaining the angle of inclination of terminal on preset direction;
Angle detection module 740, whether the angle of inclination on the preset direction detecting the acquisition of described angle acquisition module 720 is greater than first threshold;
Side display module 760, if detect that the angle of inclination on described preset direction is greater than first threshold for described angle detection module 740, is then presented at the sidebar corresponding with described preset direction in the respective side of current interface.
In sum, the sidebar display device that the present embodiment provides, by when detecting that the angle of inclination of terminal on preset direction is greater than first threshold, is presented in the respective side of current interface by the sidebar corresponding with preset direction; Solve user to complete sidebar and switch to display state by hidden state by one hand, and existing program can shorten the problem in the serviceable life of physical button or touch-screen; Reach user's one hand just can complete sidebar and switch to display state by hidden state, and add the serviceable life of physical button or touch-screen.
Please refer to Fig. 8, it illustrates the block diagram of the sidebar display device that one embodiment of the invention provides.The part that the present embodiment mainly realizes becoming mobile terminal with this sidebar display device illustrates.As based on the more preferred embodiment provided embodiment illustrated in fig. 7.This sidebar display device, comprising: angle acquisition module 720, angle detection module 740, second detection module 750, side display module 760 and full limit display module 770.
Angle acquisition module 720, for obtaining the angle of inclination of terminal on preset direction;
Angle detection module 740, whether the angle of inclination on the preset direction detecting the acquisition of described angle acquisition module 720 is greater than first threshold;
Second detection module 750, after angle of inclination for detecting on described preset direction at described angle detection module 720 is greater than first threshold, whether the angle of inclination detected on described preset direction is greater than Second Threshold, and described Second Threshold is greater than described first threshold;
Side display module 760, if detect that the angle of inclination on described preset direction is not more than Second Threshold for described second detection module 750, is then presented at the sidebar corresponding with described preset direction in the respective side of current interface.
At least two sidebar if detect that the angle of inclination on described preset direction is greater than Second Threshold for described second detection module 750, are then presented in the respective side of current interface by full limit display module 770 respectively.
Specifically, described angle acquisition module 740, the angle of inclination of described terminal on preset direction that the sensor specifically for obtaining in terminal gathers, described sensor comprises one in Gravity accelerometer and three-axis gyroscope or two kinds; The current interface of described terminal comprises along clockwise end to end first side, second side, the 3rd side and four side; Described preset direction comprise by the center of described current interface point to the first side of described current interface first direction, pointed to by the center of described current interface the second side of described current interface second direction, pointed to by the center of described current interface the 3rd side of described current interface third direction and pointed to by the center of described current interface described current interface four side fourth direction in any one.
Described side display module 760, comprising: the first display unit 762, second display unit 764, the 3rd display unit 766 and the 4th display unit 768;
Described first display unit 762, if the first direction for described preset direction being the first side being pointed to described current interface by the center of described current interface, is then presented at the sidebar corresponding with described first direction on the 3rd side of current interface;
Described second display unit 764, if the second direction for described preset direction being the second side being pointed to described current interface by the center of described current interface, is then presented on the four side of current interface by the sidebar corresponding with described second direction;
Described 3rd display unit 766, if the third direction for described preset direction being the 3rd side being pointed to described current interface by the center of described current interface, is then presented on the first side of current interface by the sidebar corresponding with described third direction;
Described 4th display unit 768, if the fourth direction for described preset direction being the four side being pointed to described current interface by the center of described current interface, is then presented at the sidebar corresponding with described fourth direction on the first side of current interface.
Described sidebar is any one in menu bar, shortcut hurdle, plug-in unit display field and application information hurdle.
In sum, the sidebar display device that the present embodiment provides, by when detecting that the angle of inclination of terminal on preset direction is greater than first threshold, is presented in the respective side of current interface by the sidebar corresponding with preset direction; Solve user to complete sidebar and switch to display state by hidden state by one hand, and existing program can shorten the problem in the serviceable life of physical button or touch-screen; Reach user's one hand just can complete sidebar and switch to display state by hidden state, and add the serviceable life of physical button or touch-screen.Also by detecting that the angle of inclination of terminal on preset direction is not only greater than first threshold, when being also greater than Second Threshold, at least two sidebar are presented in the respective side of current interface respectively, reach user's one hand just can complete whole sidebar and switch to display state by hidden state, and extend the serviceable life of physical button or touch-screen.
It should be noted that: the sidebar display device that above-described embodiment provides is when showing sidebar, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, inner structure by equipment is divided into different functional modules, to complete all or part of function described above.In addition, the sidebar display device that above-described embodiment provides and sidebar display packing embodiment belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.