CN108153455B - Interface switching method and device - Google Patents

Interface switching method and device Download PDF

Info

Publication number
CN108153455B
CN108153455B CN201611102412.1A CN201611102412A CN108153455B CN 108153455 B CN108153455 B CN 108153455B CN 201611102412 A CN201611102412 A CN 201611102412A CN 108153455 B CN108153455 B CN 108153455B
Authority
CN
China
Prior art keywords
interface
height
current
switching
page
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.)
Active
Application number
CN201611102412.1A
Other languages
Chinese (zh)
Other versions
CN108153455A (en
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.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co 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 Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd, Guangzhou Kingsoft Mobile Technology Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201611102412.1A priority Critical patent/CN108153455B/en
Publication of CN108153455A publication Critical patent/CN108153455A/en
Application granted granted Critical
Publication of CN108153455B publication Critical patent/CN108153455B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention provides an interface switching method and device, which are applied to the technical field of mobile terminals, wherein the method comprises the following steps: acquiring the overall height of a page visual area and the height of the page visual area not occupied by a first current interface; obtaining the current height of the display layout of the first current interface according to the overall height of the page visual area and the height of the page visual area not occupied by the first current interface, and taking the current height as the interface height for interface switching; acquiring a first current interface to be switched; and switching the first current interface according to the interface height, and displaying the first target interface. The interface height of the first target interface is equal to the interface height of the first current interface, so that interface switching is smoothly performed.

Description

Interface switching method and device
Technical Field
The invention relates to the technical field of mobile terminals, in particular to an interface switching method and device.
Background
With the development and popularization of mobile terminals, the mobile terminals generally employ a touch screen to provide a touch input function for a user, and the user completes an operation on the mobile terminal by clicking a corresponding position of the touch screen.
The mobile terminal can provide the user with an information editing function through interface operation. Specifically, when the user touches an operation button corresponding to the information editing on the touch screen, the mobile terminal may set the lower half of the current interface as the first interface of the virtual keyboard. In addition, the mobile terminal may provide the user with an information acquisition function through an application program. Specifically, when the user touches an operation button corresponding to the application program on the touch screen, the mobile terminal may further set the display area as the second interface of the application program. For a mobile terminal with a virtual keyboard and an application program, how to switch a first interface and a second interface is a problem to be solved. The existing interface switching method adopts a direct switching mode to switch interfaces. Specifically, when the first interface is switched to the second interface, the mobile terminal may hide the first interface first; the second interface is then displayed. When the second interface is switched to the first interface, the mobile terminal can display the first interface firstly; the second interface is then hidden.
In the conventional interface switching method, the height of a second interface corresponding to an application program is not equal to the height of a first interface corresponding to a virtual keyboard, fig. 1 is a comparison graph of an interface schematic diagram of a virtual keyboard and an interface schematic diagram corresponding to an application program in the prior art, as can be seen from fig. 1, the interface height corresponding to the virtual keyboard is different from the interface height corresponding to the application program, and in the switching process of the first interface and the second interface, when switching is performed by the conventional interface switching method, the part where the interface height corresponding to the virtual keyboard is different from the interface height corresponding to the application program disappears suddenly, and the switching process is hard and not smooth.
Disclosure of Invention
An object of the embodiments of the present invention is to provide an interface switching method and apparatus, so that the heights of a first interface and a second interface are the same, thereby smoothly performing interface switching. The specific technical scheme is as follows:
in one aspect, an embodiment of the present invention provides an interface switching method, including:
acquiring the overall height of a page visual area and the height of the page visual area not occupied by a first current interface;
obtaining the current height of the display layout of the first current interface according to the overall height of the page visual area and the height of the page visual area not occupied by the first current interface, and taking the current height as the interface height of interface switching;
acquiring the first current interface to be switched;
and switching the first current interface according to the interface height, and displaying the first target interface.
Optionally, before obtaining the overall height of the page visual area and the height of the page visual area not occupied by the first current interface, the method further includes:
detecting a first interface switching request sent by a user;
when the first interface switching request requests that the first current interface is a display interface of a virtual keyboard and the first target interface is a display interface of an application program, judging that the first current interface is the display interface of the virtual keyboard;
the switching the first current interface by the interface height and displaying the first target interface comprises:
and switching the display interface of the virtual keyboard according to the interface height, and displaying the display interface of the application program.
Optionally, after the switching the first current interface by the interface height and displaying the first target interface, the method further includes:
detecting a second interface switching request sent by a user;
and when the second interface switching request is to request a display interface of an application program and is switched to a display interface of a virtual keyboard, switching the display interface of the application program to the display interface of the virtual keyboard, wherein the height of the display interface of the application program is the interface height.
Optionally, the obtaining the overall height of the page visual area and the height of the page visual area not occupied by the first current interface includes:
when the first current interface is a hidden first current interface, acquiring the overall height of a page visual area and the current height of the page visual area not occupied by the first current interface.
Optionally, the obtaining the overall height of the page visual area and the height of the page visual area not occupied by the first current interface includes:
when the first current interface is an open first current interface, acquiring the overall height of a page visual area and the current height of the page visual area not occupied by the first current interface.
Optionally, the obtaining a current height of a display layout of the first current interface according to the overall height of the page visual area and the height of the page visual area not occupied by the first current interface includes:
and obtaining the current height of the display layout of the first current interface according to the absolute value of the difference between the current height of the page visual area not occupied by the first current interface and the overall height of the page visual area.
Optionally, the obtaining the overall height of the page visual area and the height of the page visual area not occupied by the first current interface includes:
when the mobile terminal is in a first screen state in the screen turning state and the screen turning state is not changed, acquiring the overall height of a page visual area and the height of a first current interface not occupying the page visual area, wherein the first screen state comprises: a landscape screen state or a portrait screen state.
In addition, an embodiment of the present invention further provides an interface switching apparatus, including: the device comprises a first acquisition module, a calculation module, a second acquisition module and a first switching module;
the first obtaining module is used for obtaining the overall height of the page visual area and the height of the page visual area not occupied by the first current interface;
the calculation module is used for obtaining the current height of the display layout of the first current interface according to the overall height of the page visual area and the height of the page visual area not occupied by the first current interface, and taking the current height as the interface height for interface switching;
the second obtaining module is used for obtaining the first current interface to be switched;
the first switching module is configured to switch the first current interface according to the interface height, and display the first target interface.
Optionally, the interface switching apparatus according to the embodiment of the present invention further includes:
the first detection module is used for detecting a first interface switching request sent by a user;
the judging module is used for judging that the first current interface is the display interface of the virtual keyboard when the first interface switching request requests that the first current interface is the display interface of the virtual keyboard and the first target interface is the display interface of the application program;
the first switching module is further configured to switch the display interface of the virtual keyboard by the interface height, and display the display interface of the application program.
Optionally, the interface switching apparatus according to the embodiment of the present invention further includes:
the second detection module is used for detecting a second interface switching request sent by a user;
and the second switching module is used for switching the display interface of the application program to the display interface of the virtual keyboard when the second interface switching request is to request the display interface of the application program and to switch to the display interface of the virtual keyboard, wherein the height of the display interface of the application program is the interface height.
Optionally, the first obtaining module is further configured to obtain, when the first current interface is a hidden first current interface, an overall height of a page visual area and a height of the page visual area not occupied by the first current interface.
Optionally, the first obtaining module is further configured to obtain, when the first current interface is an open first current interface, an overall height of a page visual area and a height of the page visual area not occupied by the first current interface.
Optionally, the calculating module is further configured to obtain a current height of the display layout of the first current interface according to an absolute value of a difference between a height of the page visible area, which is not occupied by the first current interface, and an overall height of the page visible area.
Optionally, the first obtaining module is further configured to obtain, when the mobile terminal is in a first screen state in the screen turning state and the screen turning state is not changed, an overall height of a page visual area and a height at which a first current interface does not occupy the page visual area, where the first screen state includes: a landscape screen state or a portrait screen state.
According to the interface switching method and device provided by the embodiment of the invention, the interface height of the first current interface can be obtained through calculation, and the interface height of the first current interface is used as the interface height of the first target interface, namely, the interface height of the first target interface is set to be the same as the interface height of the first current interface, so that the visual effect that the virtual keyboard covers the interface corresponding to the application program is generated in the switching process of the first target interface and the first current interface, and the interface switching is smoothly carried out. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a comparison of an interface schematic of a prior art virtual keyboard with an interface schematic corresponding to an application;
FIG. 2 is a flowchart of an interface switching method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an interface switching device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The mobile terminal can provide an information editing function for a user through interface operation, in a client of the mobile terminal device, some specific operations are provided for the user through an interface corresponding to an application program, for example, a single-hand mode is set, expressions are added, video calls and the like, and in an actual application process, the interface corresponding to the application program can be called a half-screen panel. Because the interface corresponding to the application program and the virtual keyboard occupy the same space, for the client side with the half-screen panel and the virtual keyboard, how to smoothly switch the two is a problem to be solved.
In order to achieve the above object, an embodiment of the present invention provides an interface switching method, fig. 2 is a flowchart of the interface switching method according to the embodiment of the present invention, and a detailed description is given to the interface switching method according to the embodiment of the present invention with reference to fig. 2, where the method includes:
step 201, obtaining the overall height of the page visual area and the height of the page visual area not occupied by the first current interface.
When the mobile terminal operates through the interface and the virtual keyboard corresponding to the application program, the existing interface switching methods are all directed at the interface and the virtual keyboard corresponding to the application program which are independent from each other, and the height between the interface and the virtual keyboard corresponding to the application program is designed independently and has no relation with each other. According to the embodiment of the invention, the interface corresponding to the application program and the virtual keyboard are linked, and the heights of the interface and the virtual keyboard are set to be the same. However, the operating system of the mobile terminal does not directly obtain the interface of the virtual keyboard height, so the embodiment of the invention obtains the height of the virtual keyboard through calculation, and further sets the height of the interface corresponding to the application program to be the same as the height of the virtual keyboard, so that in the process of switching the interface corresponding to the application program and the virtual keyboard, the visual effect that the virtual keyboard covers the interface corresponding to the application program is generated, namely the virtual keyboard covers the interface corresponding to the application program like a tablecloth, and in the actual application process, the interface corresponding to the application program generally refers to a half-screen panel, so that smooth switching between the interfaces is realized.
The first current interface can be a virtual keyboard, and when the virtual keyboard is displayed or the virtual keyboard is not displayed, the interface layout is different, so when the virtual keyboard is displayed, the height of the page visible area which is not occupied by the first current interface and the overall height of the page visible area when the virtual keyboard is not displayed are different, namely, when the virtual keyboard is not displayed, the height of the whole screen is different, and when the virtual keyboard is displayed, the height of the page visible area which is not occupied by the virtual keyboard except the virtual keyboard height of the whole screen can be obtained.
In the actual application process, the height of the interface layout is set through different controls, for example, in an android system, the class android.
Step 202, obtaining the current height of the display layout of the first current interface according to the overall height of the page visual area and the height of the page visual area not occupied by the first current interface, and taking the current height as the interface height for interface switching.
Because the height of the first current interface, in order to obtain the height of the virtual keyboard in the embodiment of the present invention, it is only necessary to obtain the height of the page visible area not occupied by the first current interface when the virtual keyboard is displayed and the overall height of the page visible area when the virtual keyboard is not displayed, so that there is no limitation on whether the virtual keyboard is first opened and then hidden, or whether the virtual keyboard is first hidden and then opened.
After the overall height of the page visual area and the height of the page visual area not occupied by the first current interface are obtained, the interface height of the first current interface is obtained according to the overall height of the obtained page visual area and the height of the page visual area not occupied by the first current interface, wherein the overall height of the page visual area is the corresponding screen height when the virtual keyboard is not displayed; the height of the page visual area not occupied by the first current interface is the height of the whole screen except the height of the first current interface, namely the virtual keyboard after the virtual keyboard is opened. And taking the interface height of the first current interface as the interface height of the display layout of the first target interface, namely setting the interface height of the display layout of the first target interface to be equal to the interface height of the first current interface, wherein the first target interface is the interface to be switched to corresponding to the first current interface.
Step 203, acquiring a first current interface to be switched.
And 204, switching the first current interface according to the interface height, and displaying the first target interface.
And switching the first current interface according to the obtained interface height of the first target interface, displaying the first target interface, and switching the first current interface to the first target interface to complete switching. In the actual application process, the displaying of the first target interface is to dynamically control the layout interface in the application program code, and dynamically add the layout of the first target interface into the interface layout of the application program, or optionally, set the layout of the first target interface to be in a visible state by a view.
In the embodiment of the invention, the half-screen panel or the virtual keyboard is hidden and displayed, so that the visual effect that the virtual keyboard covers the half-screen panel is generated in the switching process of the half-screen panel and the virtual keyboard, namely the virtual keyboard covers the half-screen panel like tablecloth, and the switching process is prevented from being harsh, so that the interface switching process is very smooth, and adverse effects such as interface jitter and the like can not be caused.
The interface switching method of the embodiment of the invention ensures that the interface heights of the virtual keyboard and the interface corresponding to the application program are the same, and the visual effect that the virtual keyboard covers the interface corresponding to the application program is generated in the switching process of the interface corresponding to the virtual keyboard and the application program, namely, the virtual keyboard covers the interface corresponding to the application program like tablecloth, and in the actual application process, the interface corresponding to the application program generally refers to a half-screen panel, so that the interface switching is smoothly performed.
In an implementation manner of the interface switching method according to the embodiment of the present invention, before obtaining the current height of the display layout of the current interface, the method further includes:
first, a first interface switching request sent by a user is detected.
Then, when the first interface switching request requests that the first current interface is the display interface of the virtual keyboard and the first target interface is the display interface of the application program, it is judged that the first current interface is the display interface of the virtual keyboard.
Finally, switching the first current interface according to the interface height, and displaying a first target interface, including:
and switching the display interface of the virtual keyboard according to the interface height, and displaying the display interface of the application program.
The interface switching needs to be performed according to a specific instruction, generally, the instruction may be obtained by pressing a button by a user, the mobile terminal receives an instruction sent by the user through the button, or the user sends a request to the mobile terminal, and the mobile terminal performs the interface switching process when receiving the request sent by the user. In the embodiment of the invention, whether a user sends a request is selected and detected, and whether interface switching is carried out is determined.
It should be noted that, in the interface switching method according to the embodiment of the present invention, when a first interface switching request sent by a user is detected, where the first interface switching request is a display interface requesting that a first current interface is a virtual keyboard, and the first target interface is a display interface of an application program, an interface height of the first current interface being the virtual keyboard needs to be calculated first, and the interface height of the virtual keyboard is used as the interface height of the first target interface corresponding to the first interface switching request; in the actual application process, the interface height of the half-screen panel corresponding to the application program is used. And then, the interface height obtained by calculation is used for switching the virtual keyboard through interface drawing, and displaying the interface of the application program, so that the process of switching the first current interface into the virtual keyboard and the first target interface into the interface corresponding to the application program is completed.
In another implementation manner of the interface switching method according to the embodiment of the present invention, switching the first current interface by using the interface height, and displaying the first target interface, further includes:
first, a second interface switching request sent by a user is detected.
And then, when the second interface switching request is to request the display interface of the application program and is switched to the display interface of the virtual keyboard, switching the display interface of the application program to the display interface of the virtual keyboard, wherein the height of the display interface of the application program is the interface height.
And when a second interface switching request sent by a user is received, wherein the second interface switching request requests that a second current interface is a display interface of the application program, switching to a display interface of which a second target interface is a virtual keyboard, and after the first interface switching request is executed, the interface height corresponding to the application program is the calculated interface height. At this time, the interface height corresponding to the application program is the same as the height of the virtual keyboard, and at this time, the interface height of the second target interface does not need to be calculated according to the steps, and the second current interface is directly switched to the second target interface corresponding to the second interface switching request according to the second interface switching request, that is, the interface corresponding to the application program is switched to the virtual keyboard.
The above embodiment has described that the interface height of the first current interface can be calculated only by obtaining the overall height of the page visible area and the height of the page visible area not occupied by the first current interface. There is no limitation that the first current interface is first open and then hidden, or that the first current interface is first hidden and then open. Here, the first current interface is first open and then hidden; and the first current interface is firstly hidden and then opened, and the two conditions are explained in detail by calculating the interface height of the first current interface.
In an implementation manner of the embodiment of the present invention, obtaining the current height of the display layout of the first current interface includes:
when the first current interface is a hidden first current interface, the overall height of the page visual area and the current height of the page visual area not occupied by the first current interface are obtained.
When the first current interface is the hidden first current interface, that is, corresponding to the virtual keyboard being just hidden, the virtual keyboard is opened, and then the overall height of the page and the current height of the visible area of the page not occupied by the first current interface are obtained.
In another implementation manner of the present invention, obtaining the current height of the display layout of the first current interface includes:
when the first current interface is the opened first current interface, the overall height of the page visual area and the current height of the page visual area not occupied by the first current interface are obtained.
When the first current interface is the opened first current interface, that is, the virtual keyboard is displayed at the beginning, and then the virtual keyboard is hidden, so as to obtain the overall height of the page visible area and the current height of the page visible area not occupied by the first current interface.
Because the client of the terminal device cannot directly obtain the interface height of the virtual keyboard through the interface, when the height of the virtual keyboard needs to be used, certain calculation is needed, and the height of the virtual keyboard can be obtained through the two methods. The interface height corresponding to the application program of the client is set to be the same as the interface height of the virtual keyboard, namely the interface height of the half-screen panel corresponding to the application program and the interface height of the virtual keyboard are set to be the same in the embodiment of the invention. Under the condition that half screen panel and virtual keyboard are the same height, when virtual keyboard switches to half screen panel, call and pack up the keyboard, carry out the display half screen panel simultaneously, thereby the visual effect who produces just like removing virtual keyboard and showing the half screen panel that originally was covered. When the half-screen panel switches the virtual keyboard, the virtual keyboard is unfolded, meanwhile, the half-screen panel is hidden, and the generated visual effect is that the half-screen panel is covered after the virtual keyboard is unfolded.
According to the interface switching method provided by the embodiment of the invention, although the height of the virtual keyboard needs to be calculated for the mobile terminal, and then the interface height of the interface corresponding to the application program is set to be equal to the height of the virtual keyboard, for a user, the display and the hiding of the virtual keyboard or the interface corresponding to the application program are not sensed in the interface switching process, and the user senses the visual effect that the virtual keyboard covers the interface corresponding to the application program, so that the interface switching can be smoothly carried out.
On the other hand, in the interface switching process of the embodiment of the invention, the codes drawn by the interface can be executed at a proper time, so that the virtual keyboard is displayed or hidden, and the half-screen panel is displayed or hidden.
In an optional embodiment of the interface switching method of the present invention, the first current interface may be a virtual keyboard, and the interface height of the virtual keyboard may be obtained by calculating the height of the virtual keyboard when the virtual keyboard is opened and when the virtual keyboard is hidden. Specifically, obtaining the current height of the display layout of the first current interface according to the overall height of the page visual area and the height of the page visual area not occupied by the first current interface includes:
and obtaining the current height of the display layout of the first current interface according to the absolute value of the difference between the current height of the page visible area not occupied by the first current interface and the overall height of the page visible area.
And obtaining the interface height of the first current interface according to the overall height of the page visual area and the height of the page visual area not occupied by the first current interface. And taking the interface height of the first current interface, namely the interface height of the virtual keyboard, as the interface height of the first target interface display layout. That is, the interface height of the display layout of the first target interface is set to be equal to the interface height of the first current interface, and the first target interface is a switched interface corresponding to the first current interface according to the first interface switching request.
In an implementation manner of the present invention, the client of the mobile terminal having the virtual keyboard and the virtual keyboard may be set to be in an extrusion relationship, that is, when the virtual keyboard is displayed, the window of the client is extruded, so that the window height of the client changes; when the virtual keyboard is not displayed, the client side cannot be extruded, so that the interface height of the virtual keyboard is obtained through different heights of the client side window when the virtual keyboard is displayed and the virtual keyboard is not displayed. A simple method is used for calculating the absolute value of the difference value of the height of the client window when the virtual keyboard is displayed and the height of the client window when the virtual keyboard is not displayed, and then the interface height of the virtual keyboard can be obtained.
The method for avoiding the influence of screen change on the interface height calculation includes the following steps:
when the mobile terminal is in a first screen state in the screen turning state and the screen turning state is not changed, acquiring the overall height of the page visual area and the height of the page visual area not occupied by a first current interface, wherein the first screen state comprises: a landscape screen state or a portrait screen state.
It can be understood that when the mobile terminal is turned, the interface layout may also be changed, that is, the current interface starts to be in the horizontal screen state and is changed into the vertical screen state after being changed, or the current interface starts to be in the vertical screen state and is changed into the horizontal screen state after being changed, and the interface layout may be changed accordingly. However, the interface height of the current interface cannot be calculated through the changed height after the interface height is changed under the condition, so that in the actual application process, in order to avoid the influence of screen turning on the calculation of the interface height of the current interface in the embodiment of the present invention, when the mobile terminal is in the first screen state in the screen turning state and the screen turning state is not changed, the overall height of the page visual area and the height of the page visual area not occupied by the first current interface are obtained. By recording the screen states before and after the current interface is changed, namely the current interface is in a horizontal screen state or a vertical screen state, when the screen states before and after the change are changed, the change height generated by the change at the moment is ignored. In an actual application process, the screen state of the current interface can be obtained through the interface width of the current interface, that is, when the interface width of the current interface changes, the screen state of the current interface changes.
Corresponding to the interface switching method in the embodiment of the present invention, an embodiment of the present invention further provides an interface switching device, fig. 3 is a schematic structural diagram of the interface switching device in the embodiment of the present invention, and a detailed description of the interface switching device in the embodiment of the present invention is provided with reference to fig. 3, where the interface switching device includes: a first acquisition module 301, a calculation module 302, a second acquisition module 303 and a first switching module 304.
The first obtaining module 301 is configured to obtain an overall height of the page visible area and a height of the page visible area not occupied by the first current interface.
The calculating module 302 is configured to obtain a current height of the display layout of the first current interface according to the overall height of the page visible area and the height of the page visible area not occupied by the first current interface, and use the current height as an interface height for interface switching.
A second obtaining module 303, configured to obtain the first current interface to be switched.
And the first switching module 304 is configured to switch the first current interface by the interface height and display the first target interface.
The interface switching device of the embodiment of the invention ensures that the interface heights of the virtual keyboard and the interface corresponding to the application program are the same, and the visual effect that the virtual keyboard covers the interface corresponding to the application program is generated in the switching process of the interface corresponding to the virtual keyboard and the application program, namely the virtual keyboard covers the interface corresponding to the application program like tablecloth, and in the actual application process, the interface corresponding to the application program generally refers to a half-screen panel, so that the interface switching is smoothly carried out.
Optionally, the interface switching apparatus according to the embodiment of the present invention further includes:
the first detection module is used for detecting a first interface switching request sent by a user.
The judging module is used for judging that the first current interface is the display interface of the virtual keyboard when the first interface switching request requests that the first current interface is the display interface of the virtual keyboard and the first target interface is the display interface of the application program.
The first switching module 304 is further configured to switch the display interface of the virtual keyboard by the interface height, and display the display interface of the application program.
Optionally, the interface switching apparatus according to the embodiment of the present invention further includes:
and the second detection module is used for detecting a second interface switching request sent by the user.
And the second switching module is used for switching the display interface of the application program to the display interface of the virtual keyboard when the second interface switching request is the display interface of the application program, and the display interface of the application program is switched to the display interface of the virtual keyboard, wherein the height of the display interface of the application program is the interface height.
Optionally, in the interface switching apparatus according to the embodiment of the present invention, the first obtaining module 301 is further configured to obtain, when the first current interface is a hidden first current interface, an overall height of the page visible area and a height of the page visible area not occupied by the first current interface.
Optionally, in the interface switching apparatus according to the embodiment of the present invention, the first obtaining module 301 is further configured to obtain, when the first current interface is the opened first current interface, an overall height of the page visible area and a height of the page visible area not occupied by the first current interface.
Optionally, in the interface switching apparatus according to the embodiment of the present invention, the calculating module 302 is further configured to obtain the current height of the display layout of the first current interface according to an absolute value of a difference between the height of the page visible area not occupied by the first current interface and the overall height of the page visible area.
Optionally, in the interface switching apparatus according to the embodiment of the present invention, the first obtaining module 301 and the first obtaining module are further configured to obtain, when the mobile terminal is in a first screen state in the screen turning state and the screen turning state is not changed, an overall height of a page visual area and a height of a page visual area not occupied by a first current interface, where the first screen state includes: a landscape screen state or a portrait screen state.
It should be noted that, the apparatus according to the embodiment of the present invention is an apparatus applying the interface switching method, and all embodiments of the interface switching method are applicable to the apparatus and can achieve the same or similar beneficial effects.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (14)

1. An interface switching method is characterized by comprising the following steps:
acquiring the overall height of a page visual area and the height of the page visual area not occupied by a first current interface;
obtaining the current height of the display layout of the first current interface according to the difference value of the overall height of the page visual area and the height of the page visual area not occupied by the first current interface, and taking the current height as the interface height for interface switching;
acquiring the first current interface to be switched;
and switching the first current interface according to the interface height, and displaying a first target interface.
2. The interface switching method according to claim 1, wherein before the obtaining of the overall height of the page visible area and the height of the page visible area not occupied by the first current interface, the method further comprises:
detecting a first interface switching request sent by a user;
when the first interface switching request requests that the first current interface is a display interface of a virtual keyboard and the first target interface is a display interface of an application program, judging that the first current interface is the display interface of the virtual keyboard;
the switching the first current interface by the interface height and displaying the first target interface comprises:
and switching the display interface of the virtual keyboard according to the interface height, and displaying the display interface of the application program.
3. The interface switching method according to claim 2, wherein after the switching the first current interface by the interface height and displaying the first target interface, the method further comprises:
detecting a second interface switching request sent by a user;
and when the second interface switching request is to request a display interface of an application program and is switched to a display interface of a virtual keyboard, switching the display interface of the application program to the display interface of the virtual keyboard, wherein the height of the display interface of the application program is the interface height.
4. The interface switching method according to claim 1 or 2, wherein the acquiring the overall height of the page visual area and the height of the page visual area not occupied by the first current interface includes:
when the first current interface is a hidden first current interface, acquiring the overall height of a page visual area and the current height of the page visual area not occupied by the first current interface.
5. The interface switching method according to claim 1 or 2, wherein the acquiring the overall height of the page visual area and the height of the page visual area not occupied by the first current interface includes:
when the first current interface is an open first current interface, acquiring the overall height of a page visual area and the current height of the page visual area not occupied by the first current interface.
6. The interface switching method according to claim 1 or 2, wherein the obtaining of the current height of the display layout of the first current interface according to the difference between the overall height of the page visual area and the height of the page visual area not occupied by the first current interface includes:
and obtaining the current height of the display layout of the first current interface according to the absolute value of the difference between the current height of the page visual area not occupied by the first current interface and the overall height of the page visual area.
7. The interface switching method according to claim 1, wherein the acquiring the overall height of the page visual area and the height of the page visual area not occupied by the first current interface includes:
when the mobile terminal is in a first screen state in the screen turning state and the screen turning state is not changed, acquiring the overall height of a page visual area and the height of a first current interface not occupying the page visual area, wherein the first screen state comprises: a landscape screen state or a portrait screen state.
8. An interface switching device, comprising: the device comprises a first acquisition module, a calculation module, a second acquisition module and a first switching module;
the first obtaining module is used for obtaining the overall height of the page visual area and the height of the page visual area not occupied by the first current interface;
the calculation module is used for obtaining the current height of the display layout of the first current interface according to the difference value between the overall height of the page visual area and the height of the page visual area not occupied by the first current interface, and taking the current height as the interface height for interface switching;
the second obtaining module is used for obtaining the first current interface to be switched;
the first switching module is used for switching the first current interface according to the interface height and displaying a first target interface.
9. The interface switching device of claim 8, further comprising:
the first detection module is used for detecting a first interface switching request sent by a user;
the judging module is used for judging that the first current interface is the display interface of the virtual keyboard when the first interface switching request requests that the first current interface is the display interface of the virtual keyboard and the first target interface is the display interface of the application program;
the first switching module is further configured to switch the display interface of the virtual keyboard by the interface height, and display the display interface of the application program.
10. The interface switching device of claim 9, further comprising:
the second detection module is used for detecting a second interface switching request sent by a user;
and the second switching module is used for switching the display interface of the application program to the display interface of the virtual keyboard when the second interface switching request is to request the display interface of the application program and to switch to the display interface of the virtual keyboard, wherein the height of the display interface of the application program is the interface height.
11. The interface switching device according to claim 8 or 9, wherein the first obtaining module is further configured to obtain, when the first current interface is a hidden first current interface, an overall height of a page visible area and a height of the page visible area not occupied by the first current interface.
12. The interface switching device according to claim 8 or 9, wherein the first obtaining module is further configured to obtain, when the first current interface is an open first current interface, an overall height of a page visible area and a height of the page visible area not occupied by the first current interface.
13. The interface switching device according to claim 8 or 9, wherein the calculating module is further configured to obtain the current height of the display layout of the first current interface according to an absolute value of a difference between a height of the page visible area not occupied by the first current interface and an overall height of the page visible area.
14. The interface switching apparatus according to claim 8 or 9, wherein the first obtaining module is further configured to obtain, when the mobile terminal is in a first screen state of the screen turning states and the screen turning state is not changed, an overall height of a page visible area and a height of the page visible area not occupied by a first current interface, where the first screen state includes: a landscape screen state or a portrait screen state.
CN201611102412.1A 2016-12-05 2016-12-05 Interface switching method and device Active CN108153455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611102412.1A CN108153455B (en) 2016-12-05 2016-12-05 Interface switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611102412.1A CN108153455B (en) 2016-12-05 2016-12-05 Interface switching method and device

Publications (2)

Publication Number Publication Date
CN108153455A CN108153455A (en) 2018-06-12
CN108153455B true CN108153455B (en) 2021-02-05

Family

ID=62470837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611102412.1A Active CN108153455B (en) 2016-12-05 2016-12-05 Interface switching method and device

Country Status (1)

Country Link
CN (1) CN108153455B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102893250A (en) * 2012-07-13 2013-01-23 华为技术有限公司 Method and terminal of determining operation object
CN103390053A (en) * 2013-07-26 2013-11-13 贝壳网际(北京)安全技术有限公司 Page switching control method and device of browser and client
CN103885692A (en) * 2012-12-19 2014-06-25 华为技术有限公司 Page changing method, device and terminal
CN105578294A (en) * 2014-10-15 2016-05-11 优视科技有限公司 Browsing switching processing method, apparatus, and system
CN105867795A (en) * 2015-11-18 2016-08-17 乐视致新电子科技(天津)有限公司 Display method and device of virtual keyboard, and electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9035883B2 (en) * 2012-03-07 2015-05-19 Google Technology Holdings LLC Systems and methods for modifying virtual keyboards on a user interface
CN102999294B (en) * 2012-11-16 2016-04-06 广东欧珀移动通信有限公司 A kind of terminal device operation keyboard changing method, device and terminal device
CN103577104B (en) * 2013-09-27 2017-05-24 苏州佳世达电通有限公司 Display method of virtual keyboard, control device and touch equipment
CN103616979A (en) * 2013-11-26 2014-03-05 深圳钱盒信息技术有限公司 Input interactive method, device and payment terminal
US20160062636A1 (en) * 2014-09-02 2016-03-03 Lg Electronics Inc. Mobile terminal and control method thereof
CN105183420B (en) * 2015-09-11 2018-10-12 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN105278910B (en) * 2015-11-24 2019-07-30 努比亚技术有限公司 A kind of display methods and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102893250A (en) * 2012-07-13 2013-01-23 华为技术有限公司 Method and terminal of determining operation object
CN103885692A (en) * 2012-12-19 2014-06-25 华为技术有限公司 Page changing method, device and terminal
CN103390053A (en) * 2013-07-26 2013-11-13 贝壳网际(北京)安全技术有限公司 Page switching control method and device of browser and client
CN105578294A (en) * 2014-10-15 2016-05-11 优视科技有限公司 Browsing switching processing method, apparatus, and system
CN105867795A (en) * 2015-11-18 2016-08-17 乐视致新电子科技(天津)有限公司 Display method and device of virtual keyboard, and electronic equipment

Also Published As

Publication number Publication date
CN108153455A (en) 2018-06-12

Similar Documents

Publication Publication Date Title
US11966558B2 (en) Application association processing method and apparatus
CN106648434B (en) Method and device for controlling application interface through dragging gesture
CN104834436B (en) Method for realizing function keys of touch screen terminal
US20150143285A1 (en) Method for Controlling Position of Floating Window and Terminal
US10204079B2 (en) Method and apparatus for displaying an extended function information area
CN102279720B (en) Method and system for updating screen display contents
CN104331246A (en) Device and method for split screen display in terminal
CN106681616B (en) Method, device and equipment for displaying function bar of browser
CN102890607A (en) Screen display control method for terminal and terminal
CN102609191A (en) Browsing interaction method for incoming messages of touchscreen cellphones
CN111831205B (en) Device control method, device, storage medium and electronic device
CN105159582A (en) Video region adjusting method and terminal
CN109547623B (en) Interface switching method and device
CN113655929A (en) Interface display adaptation processing method and device and electronic equipment
US11455071B2 (en) Layout method, device and equipment for window control bars
CN103197868B (en) A kind of display processing method of display object and device
CN113420350B (en) Object, commodity and clothes trial display processing method and device and electronic equipment
CN107817927B (en) Application icon management method and device
US20160170596A1 (en) Image display apparatus, image display method, and image-display program product
CN108153455B (en) Interface switching method and device
CN107463328B (en) Terminal device, virtual key control method and device and storage medium
CN105068734A (en) Sliding control method and device for terminal
CN105549837A (en) Method and device for displaying contact items of contact list based on touch-screen apparatus
CN106325692A (en) A display mode switching method and device and a mobile terminal with the device
CN108124064A (en) The key response method and mobile terminal of a kind of mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant