Summary of the invention
The technical matters that the present invention mainly solves provides the method for operating of virtual menu bar in a kind of mobile phone interface, can show flexibly and closes virtual menu bar, takies the mobile phone display screen curtain when avoiding the program operation.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: the method for operating that virtual menu bar in a kind of mobile phone interface is provided.It comprises: detect the generation of double-clicking the secondary or physical bond event; Calling system function when double-clicking the generation of secondary or physical bond event; Show or close virtual menu bar according to system function.
Wherein, before detecting the generation of double-clicking the secondary or physical bond event, also comprise: system sets up a variable list for each program, the state of the virtual menu bar when variable list records each program operation.
Wherein, variable list is realized by two-dimensional array, the program name of first each program of record of two-dimensional array, the state value of the virtual menu bar during each the program operation of second record of two-dimensional array.
Wherein, the state value of virtual menu bar is 1 o'clock, and expression shows virtual menu bar; The state value of virtual menu bar is 0 o'clock, and virtual menu bar is closed in expression; The state value of virtual menu bar is binary mode.
Wherein, when program start, the method for operating of virtual menu bar comprises: check variable list, search the state value of the virtual menu bar corresponding with program in variable list; State value according to virtual menu bar calls corresponding system function, produces the display screen parameter; Receive the display screen parameter, call the display interface of drawing function drawing program.
Wherein, the state value of virtual menu bar is 1, calls the bottom and draws function, draws virtual menu bar at the bottommost of screen; The invokes application screen arranges function, and application screen arranges function and comprises the first parameter and the second parameter, and the first parameter and the second parameter that application screen is arranged in the function are sent to program; The first parameter is the width of display screen, and the second parameter is the height of display screen.
Wherein, the state value of virtual menu bar is 0, and the invokes application screen arranges function, and application screen arranges function and comprises the 3rd parameter and the 4th parameter, and the 3rd parameter and the 4th parameter that application screen is arranged in the function are sent to program; The 3rd parameter is complete display screen width, and the 4th parameter is complete display screen height.
Wherein, when program was moved, the method for operating of virtual menu bar comprised: detect the generation of double-clicking the secondary or physical bond event; Check variable list, in variable list, search the state value of the virtual menu bar corresponding with program; To the state value negate of virtual menu bar, and the state value of the virtual menu bar of record negate; State value according to the virtual menu bar of negate calls corresponding system function, produces the display screen parameter; Receive the display screen parameter, call the display interface of drawing function drawing program.
Wherein, the state value of the virtual menu bar of negate is 1, calls the bottom and draws function, draws virtual menu bar at the bottommost of screen; The invokes application screen arranges function, and application screen arranges function and comprises the 5th parameter and the 6th parameter, and the 5th parameter and the 6th parameter that application screen is arranged in the function are sent to program; The 5th parameter is the width of display screen, and the 6th parameter is the height of display screen.
Wherein, the state value of the virtual menu bar of negate is 0, and the invokes application screen arranges function, and application screen arranges function and comprises the 7th parameter and the 8th parameter, and the 7th parameter and the 8th parameter that application screen is arranged in the function are sent to program; The 7th parameter is complete display screen width, and the 8th parameter is complete display screen height.
The invention has the beneficial effects as follows: the situation that is different from prior art, the present invention is by detecting the generation of double-clicking the secondary or physical bond event, the calling system function shows virtual menu bar and closes, and can show flexibly and closes virtual menu bar, takies the mobile phone display screen curtain when avoiding the program operation.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is a part of embodiment of the present invention, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Please in conjunction with consulting Fig. 1 and Fig. 2, Fig. 1 is the schematic flow sheet of method of operating one embodiment of the virtual menu bar of the present invention, and Fig. 2 is the structural representation of the virtual menu bar of the method for operating embodiment of the virtual menu bar of the present invention when closing.
The method of operating of virtual menu bar may further comprise the steps in the mobile phone interface disclosed by the invention:
Step S101: detect the generation of double-clicking the secondary or physical bond event.
As shown in Figure 2, Android 4.0 operating systems have three secondary orphysical bonds 10, in the present embodiment, can double-click any one in three secondary orphysical bonds 10, and the present invention is not construed as limiting this.
Step S102: calling system function when double-clicking the generation of secondary or physical bond event.
Modern operating system is controlled at all of program of its intrasystem operation, can Intervention from the start-up routine to the working procedure.Such as operating system can designated program the viewing area, operating system comes advising process to finish corresponding order by the control system event, system event can be by the API(Application Programming Interface of system call system, application programming interface) function is finished, operating system is by using the new event of various API calls notice present procedures, and present procedure in time responds this system event and makes corresponding reaction.
When double-clicking the generation of secondary or physical bond event, the present embodiment is according to system event calling system api function, so that present procedure in time responds this double-click secondary or physical bond event and makes corresponding reaction.
Step S103: show or close virtual menu bar according to system function.
After virtual menu bar was in show state, double-clicks the generation of secondary or physical bond event, the calling system function made it to close; When virtual menu bar is in closed condition, after double-clicking the generation of secondary or physical bond event, the calling system function makes it to show, it is worth mentioning that, when double-click secondary or physical bond event occurs again, virtual menu bar can show or close virtual menu bar again according to system function, and namely the embodiment of the invention can repetitive operation.
The below introduces the course of work of closing this virtual menu bar:
As shown in Figure 2, currentvirtual menu bar 20 is in show state, and by double-clicking any one in three secondary orphysical bonds 10, operating system is the calling system function, so thatvirtual menu bar 20 is closed, program is carried out full screen display.
By the way, the method for operating of virtual menu bar can show flexibly and closes virtual menu bar in a kind of mobile phone interface of the present invention, takies the mobile phone display screen curtain when avoiding the program operation.
See also Fig. 3, Fig. 3 is the schematic flow sheet of another embodiment of method of operating of the virtual menu bar of the present invention.In the present embodiment, the method for operating of virtual menu bar comprises:
Step S201: system sets up a variable list for each program, the state of the virtual menu bar when variable list records each program operation.
When certain program operation, if the user has closed virtual menu bar, system can record the show state of the virtual menu bar of present procedure.When again moving this program next time, system determines whether the virtual menu bar of this program display according to the state of last registration, and this is so that the user need not show or close virtual menu bar at every turn.
In order to finish above-mentioned functions, system can be each working procedure and safeguards a variable list, the virtual menu bar state when this variable list has recorded each program operation.This variable list was just set up at the initial stage that operating system is moved, and can use general two-dimensional array to realize such tabulation.First of two-dimensional array records the program name of each program, the state of second virtual menu bar of record.Whenever a program is mounted in operating system, will be the newly-increased project of this program in this variable list, record the virtual menu bar state of this program, state value is that 1 expression shows virtual menu bar, if state value becomes 0, then virtual menu bar is hidden in expression.The situation of this list records can be as follows:
| Program name | Virtual menu state value |
| Notepad | 1 |
| Alarm clock | 1 |
| Browser | 1 |
| Counter | 1 |
Above virtual menu bar state value is the binary expression form.
Step S202: detect the generation of double-clicking the secondary or physical bond event.
Step S203: calling system function when double-clicking the generation of secondary or physical bond event.
Step S204: show or close virtual menu bar according to system function.
By the way, virtual menu bar state when the method for operating of the virtual menu bar of the present invention can be each program logging program operation, the user needn't show at every turn or close virtual menu bar when treating next operation by the double-click secondary or physical bond, the user also can independently select to change the state of virtual menu bar, therefore can show flexibly and close virtual menu bar, take the mobile phone display screen curtain when avoiding the program operation.
See also Fig. 4, Fig. 4 is the schematic flow sheet of method of operating embodiment when program start of the virtual menu bar of the present invention.Comprise:
Step S301: program start.
Step S302: check variable list, in variable list, search the state value of the virtual menu bar corresponding with program.
Step S303: the state value of judging virtual menu bar.
If the state value of virtual menu bar is 1, then carry out step S304; If the state value of virtual menu bar is 0, then carry out step S307.
Step S304: call the bottom and draw function.
Call bottom drafting function and draw virtual menu bar in the bottom of mobile phone interface.
Step S305: the invokes application screen arranges function.
Wherein, application screen arranges function and comprises display screen parameter (the first parameter, the second parameter).
Step S306: transmit screen display parameter (the first parameter, the second parameter).
Wherein, the first parameter is the width of display screen, and the second parameter is the height of display screen.
Step S307: the invokes application screen arranges function.
Wherein, application screen arranges function and comprises display screen parameter (the 3rd parameter, the 4th parameter).
Step S308: transmit screen display parameter (the 3rd parameter, the 4th parameter).
Wherein, the 3rd parameter is complete display screen width, and the 4th parameter is complete display screen height.
Step S309: receive the screen display parameter, call drawing function drawing program screen display interface.
When the state value of virtual menu bar is 1, receives screen display parameter (the first parameter, the second parameter), and call drawing function drawing program screen display interface according to screen display parameter (the first parameter, the second parameter); When the state value of virtual menu bar is 0, receives screen display parameter (the 3rd parameter, the 4th parameter), and call drawing function drawing program screen display interface according to screen display parameter (the 3rd parameter, the 4th parameter).
It should be noted that; in the present embodiment; the name that bottom drafting function, application screen is arranged the system functions such as function, drawing function is not restricted; in other examples; as long as play identical with it effect; use the function of different names to reach the purpose identical with the present invention, should be within protection scope of the present invention.
See also Fig. 5, Fig. 5 is the schematic flow sheet of method of operating embodiment when program is moved of the virtual menu bar of the present invention.Comprise:
Step S401: program operation.
Step S402: detect and double-click the generation of secondary or physical bond event.
Step S403: check variable list, in variable list, search the state value of the virtual menu bar corresponding with program.
Step 404: to the state value negate of virtual menu bar.
If the state value of virtual menu bar is 1, then negate is 0; If the state value of virtual menu bar is 0, then negate is 1.
Step S405: the value after the judgement negate.
If the value after the negate is 1, then carry out step S406; If the value after the negate is 0, then carry out step S409.
Step S406; Call the bottom and draw function.
Step S407: the invokes application screen arranges function.
Wherein, application screen arranges function and comprises display screen parameter (the 5th parameter, the 6th parameter).
Step S408: transmit screen display parameter (the 5th parameter, the 6th parameter).
Wherein, the 5th parameter is the width of display screen, and the 6th parameter is the height of display screen.
Step S409: the invokes application screen arranges function.
Wherein, application screen arranges function and comprises display screen parameter (the 7th parameter, the 8th parameter)
Step S410: transmit screen display parameter (the 7th parameter, the 8th parameter).
Wherein, the 7th parameter is complete display screen width, and the 8th parameter is complete display screen height.
Step S411: receive the screen display parameter, call drawing function drawing program screen display interface.
When the state value of virtual menu bar is 1, receives screen display parameter (the 5th parameter, the 6th parameter), and call drawing function drawing program screen display interface according to screen display parameter (the 5th parameter, the 6th parameter); When the state value of virtual menu bar is 0, receives screen display parameter (the 7th parameter, the 8th parameter), and call drawing function drawing program screen display interface according to screen display parameter (the 7th parameter, the 8th parameter).
It should be noted that; in the present embodiment; the name that bottom drafting function, application screen is arranged the system functions such as function, drawing function is not restricted; in other examples; as long as play identical with it effect; use the function of different names to reach the purpose identical with the present invention, should be within protection scope of the present invention.
In sum, the method of operating of the virtual menu bar of the present invention is by double-clicking secondary or physical bond, the calling system function shows virtual menu bar and closes, and record the virtual menu bar state of each program, can show flexibly and close virtual menu bar, farthest utilize the mobile phone screen viewing area.
The above only is embodiments of the present invention; be not so limit claim of the present invention; every equivalent structure or equivalent flow process conversion that utilizes instructions of the present invention and accompanying drawing content to do; or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.