Interface control method and device, terminal, controller and medium
Technical field
The present invention relates to technical field of mobile terminals more particularly to a kind of interface control methods and device, terminal, controller
And medium.
Background technique
With the rapid development of mobile terminal, the mobile terminal device with touch screen such as smart phone, tablet computer is
Essential equipment in being lived at people.These equipment, which are often used in, plays the multimedias such as music, video, may also set up
Dynamic and the screen protection of static state etc..
Using mobile terminal durings navigation of driving, parking or seeing video etc., relevant operation button touches user in user
It is hidden automatically after touching screen several seconds, when user need to operate screen, screen need to be again tapped on, the just meeting of these operation buttons
Occur again, poor user experience.
Summary of the invention
Technical problem to be solved by the present invention lies in, provide a kind of interface control method and device, terminal, controller and
Medium, user show operation button without clicking screen, are toward or away from hand by the way that range sensor detection is arranged in terminal
Gesture to carry out show or hide relevant operation button automatically or realizes the operations such as the dynamic effect of corresponding screen, and the user experience is improved.
In order to solve the above-mentioned technical problem, according to a first embodiment of the present invention, a kind of interface control method is provided, is wrapped
It includes:
It detects and whether there is object within the scope of terminal current display interface pre-determined distance;
If so, executing the first predetermined registration operation;
Otherwise, then second predetermined registration operation is executed.
It further, include following step with the presence or absence of object within the scope of the detection terminal current display interface pre-determined distance
It is rapid:
The mounting distance sensor in the terminal;
Distance by the range sensor detecting object apart from the terminal current interface, is denoted as detection range;
If the detection range is no more than pre-determined distance, there are objects within the scope of pre-determined distance, otherwise, it is default away from
From in range, there is no objects.
Further, when the terminal current display interface is multimedia play interface,
Described execution the first predetermined registration operation includes: automatic display operation button;
The execution second predetermined registration operation includes: the hiding operation button automatically.
Further, the multimedia play interface includes video playing interface, audio broadcast interface, navigation broadcast interface
One of or it is a variety of;
The operation button includes progress bar button, pause button, broadcast button, plays upper multimedia button, plays
One of upper multimedia button, vision switching push button are a variety of.
Further, when the terminal current display interface is dynamic screen saver interface,
Described execution the first predetermined registration operation includes:
Dynamically Announce gathers state;
The execution second predetermined registration operation includes:
Dynamically Announce is scattered state.
Further, if detecting that the state of object is 1 within the scope of pre-determined distance, object is not detected within the scope of pre-determined distance
The state of body is 0, the method also includes:
If detecting, the state of object becomes 1 from 0, executes the first predetermined registration operation;
Preset time is set, the state of object becomes 0 from 1 if detecting, detects in the preset time, detects object
Whether the state of body becomes 1 again, if being always 0, executes second predetermined registration operation;
If the state of object becomes 1 in the preset time phase again, maintain the first predetermined registration operation constant.
According to a second embodiment of the present invention, a kind of interface control device, including detection module, the first execution module are provided
With the second execution module, wherein
The detection module is for detecting with the presence or absence of object within the scope of terminal current display interface pre-determined distance, if depositing
First execution module is then being triggered, otherwise, is triggering second execution module;
First execution module is for executing the first predetermined registration operation;
Second execution module is for executing second predetermined registration operation.
Further, the detection module includes range sensor and judging unit, wherein
The range sensor is mounted in the terminal, for detecting object apart from the terminal current interface away from
From being denoted as detection range;
The judging unit is for comparing the detection range with pre-determined distance, if the detection range is no more than in advance
If distance, then judging that there are objects within the scope of pre-determined distance, otherwise, is judging that there is no objects within the scope of pre-determined distance.
Further, when the terminal current display interface is multimedia play interface,
First execution module is used for automatic display operation button;
Second execution module for hiding the operation button automatically.
Further, the multimedia play interface includes video playing interface, audio broadcast interface, navigation broadcast interface
One of or it is a variety of;
The operation button includes progress bar button, pause button, broadcast button, plays upper multimedia button, plays
One of upper multimedia button, vision switching push button are a variety of.
Further, when the terminal current display interface is dynamic screen saver interface,
First execution module gathers state for Dynamically Announce;
Second execution module is scattered state for Dynamically Announce.
Further, if detecting that the state of object is 1 within the scope of pre-determined distance, object is not detected within the scope of pre-determined distance
The state of body is 0, and described device further includes delay trigger module:
First execution module is used to become 1 from 0 when the state for detecting object, executes the first predetermined registration operation;
The delay trigger module is for setting preset time, when the state for detecting object becomes 0 from 1, then detects institute
It states in preset time, detects whether the state of object becomes 1 again, if being always 0, trigger second execution module and execute
It is pre- to trigger the first execution module maintenance first if the state of object becomes 1 in the preset time phase again for second predetermined registration operation
If operating constant.
According to a third embodiment of the present invention, a kind of terminal, including the interface control device are provided.
According to a fourth embodiment of the present invention, a kind of controller is provided comprising memory and processor, the memory
It is stored with computer program, the step of described program can be realized the method when being executed by the processor.
According to a fifth embodiment of the present invention, a kind of computer readable storage medium is provided, for storing computer instruction,
The step of described instruction realizes the method when by a computer or processor execution.
The present invention has obvious advantages and beneficial effects compared with the existing technology.By above-mentioned technical proposal, the present invention
A kind of interface control method and device, terminal, controller and medium can reach comparable technical progress and practicability, and have
Extensive utility value in industry, at least has the advantage that
The present invention by executing accordingly within the scope of detection terminal current display interface pre-determined distance with the presence or absence of object automatically
Operation, it can be achieved that user shows operation button without clicking screen, by terminal be arranged range sensor detect it is close
Or leave gesture, to carry out show or hide relevant operation button automatically or realize the operations such as the dynamic effect of corresponding screen, it improves
User experience.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,
And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects, features and advantages of the invention can
It is clearer and more comprehensible, it is special below to lift preferred embodiment, and cooperate attached drawing, detailed description are as follows.
Detailed description of the invention
Fig. 1 provides interface control method schematic diagram for one embodiment of the invention;
Fig. 2 is the interface control method schematic diagram that further embodiment of this invention provides;
Fig. 3 is the interface control device schematic diagram that one embodiment of the invention provides;
Fig. 4 is the interface control device schematic diagram that further embodiment of this invention provides.
[symbol description]
1: 2: the first execution module of detection module
3: the second execution modules 4: delay trigger module
Specific embodiment
It is of the invention to reach the technical means and efficacy that predetermined goal of the invention is taken further to illustrate, below in conjunction with
Attached drawing and preferred embodiment, to a kind of interface control method proposed according to the present invention and device, terminal, controller and medium
Specific embodiment and its effect, detailed description is as follows.
The embodiment of the present invention provides a kind of interface control method, as shown in Figure 1, comprising:
Step S1, detecting whether there is object within the scope of terminal current display interface pre-determined distance;
It should be noted that the terminal includes the intelligent terminal that mobile phone, tablet computer, wrist-watch etc. include touch screen.In advance
If operational requirements, the factors such as user operation habits are specifically set apart from specifically can be according to intelligent terminal type.It the object and leans on
The object of nearly intelligent terminal, hand, screen touch pen including user etc..
As an example, the step S1 the following steps are included:
Step S11, the mounting distance sensor in the terminal;
Step S12, the distance by the range sensor detecting object apart from the terminal current interface, is denoted as detecting
Distance;
If step S13, the described detection range is no more than pre-determined distance, there are objects within the scope of pre-determined distance, otherwise,
Object is not present within the scope of pre-determined distance.
For example, just being detected pre- when the hand of user is less than pre-determined distance at a distance from terminal interface, with terminal interface
If there are objects in distance range.
Step S2, if so, executing the first predetermined registration operation;
Step S3, second predetermined registration operation otherwise, is then executed.
In practical application, user can operate continuously terminal interface, and during being somebody's turn to do, the hand of user touches discontinuity
Or display screen is left, if user hand leaves terminal interface more than pre-determined distance, operation button is hidden automatically at once, then will affect use
The continuity of family continuous operation, so that user experience is influenced, therefore, if detecting that the state of object is 1 within the scope of pre-determined distance,
The state that object is not detected within the scope of pre-determined distance is 0, and after step S1, the method can also include the steps of, such as
Shown in Fig. 2:
If step S4, detecting, the state of object becomes 1 from 0, executes the first predetermined registration operation;
Step S5, preset time is set, if detecting, the state of object becomes 0 from 1, it detects in the preset time,
It detects whether the state of object becomes 1 again, if being always 0, executes second predetermined registration operation;
If step S6, the state of object becomes 1 in the preset time phase again, maintain the first predetermined registration operation constant.
It should be noted that preset time can specifically be set according to parameters such as user operation habits and historical operating datas
It is fixed, it can guarantee the operation button of terminal interface when user operates continuously terminal interface by executing step S4- step S6
Always it is in display state, guarantees the continuity of user's operation, further the user experience is improved.
Different predetermined registration operations can be performed under different type scene in the terminal current display interface:
Scene one, when the terminal current display interface be multimedia play interface when,
The step S2 includes: automatic display operation button;
The step S3 includes: the hiding operation button automatically.
Wherein, the multimedia play interface include video playing interface, audio broadcast interface, navigation broadcast interface in
It is one or more;
The operation button includes progress bar button, pause button, broadcast button, plays upper multimedia button, plays
One of upper multimedia button, vision switching push button are a variety of.
It is illustrated below in conjunction with specific embodiment:
Embodiment one,
During the navigation process, when range sensor detects that the state of object becomes 1 by 0, map interface is shown automatically
Hide the operation buttons such as setting and road conditions.Assuming that preset time is 5s, when range sensor detects that the state of object is become by 1
When 0, a countdown in 5 seconds is opened, if range sensor detects that the state of object does not become before countdown terminates
1 is returned to, then map interface is hidden the operation buttons such as setting and road conditions and hidden automatically, if changing back to 1 again in 5s, position is shown
Map interface hides the setting operation buttons such as button and road conditions and maintains display state constant.
Embodiment two,
During automatic parking, when range sensor detects that the state of object becomes 1 by 0, automatically displaying visual
The operation buttons such as switching.Assuming that preset time is 5s, when range sensor detects that the state of object becomes 0 by 1, one is opened
A countdown in 5 seconds then regards if range sensor detects that the state of object does not change back to 1 before countdown terminates
Feel that the operation buttons such as switching are hidden automatically, if changing back to 1 in 5s again, the operation buttons such as vision switching maintain display state not
Become.
Embodiment three,
During playing video, when range sensor detects that the state of object becomes 1 by 0, automatic display halt
Button, broadcast button play upper multimedia button, play the operation buttons such as upper multimedia button.When range sensor away from
When becoming 0 by 1 from the state that sensor detects object, a countdown in 5 seconds is opened, if before countdown terminates,
Range sensor detects that the state of object does not change back to 1, then pause button, broadcast button, play upper multimedia button,
It plays the operation buttons such as upper multimedia button to hide automatically, if changing back to 1 again in 5s, pause button, is broadcast broadcast button
Putting the operation buttons such as the operation buttons such as a multimedia button, the upper multimedia button of broadcasting maintains display state constant.
When scene two, the terminal current display interface are dynamic screen saver interface,
The step S2 includes: that Dynamically Announce gathers state;
The step S3 includes: that Dynamically Announce is scattered state.
It is illustrated below by way of a specific embodiment:
Example IV,
It is illustrated by taking bubble dynamic screen saver as an example, current display interface is dynamic screen saver interface, when range sensor is examined
When measuring the state of object and becoming 1 by 0, bubble is gathered automatically in the display interface, when range sensor detects object
State when becoming 0 by 1, bubble scatters automatically in the display interface.Concrete application of the embodiment of the present invention in dynamic screen saver,
The function of terminal display interface is enriched, further the user experience is improved.It should be noted that the present embodiment can also set it is pre-
If time state to determine whether display immediately is scattered, details are not described herein.
On the basis of above-mentioned example, also further it can be toward or away from the speed of terminal interface by judgment object, and according to speed
The speed that degree setting bubble scatters and gathers, further enriches the application scenarios of dynamic screen saver.Such as: assuming that object with apart from biography
The relative distance of sensor is Ycm, and pre-determined distance is X cm, and as Y < X, object can be detected by range sensor in pre-determined distance
In range, with the changing value of 0.01 second frequency record Y, take absolute value | △ Y | under dynamic screen saver mode, when the hand of user
When close to and far from screen, screen protection can show corresponding dynamic effect.The bubble to float such as current screen protection display dynamic: as Y < X, and Y
When value reduces, bubble can be gathered;As Y < X, and when Y value increase, bubble can scatter again.The movement velocity of bubble again and | △ Y | at
Direct ratio: | △ Y | bigger, bubble motion is faster.
The embodiment of the invention also provides a kind of interface control device as shown in Fig. 2, including that detection module 1, first executes
Module 2 and the second execution module 3, wherein detection module 1 for detect within the scope of terminal current display interface pre-determined distance whether
There are objects, and if it exists, then triggers first execution module 2, otherwise, triggers second execution module 3;First executes mould
Block 2 is for executing the first predetermined registration operation;Second execution module 3 is for executing second predetermined registration operation.It should be noted that the end
End includes the intelligent terminal that mobile phone, tablet computer, wrist-watch etc. include touch screen.Pre-determined distance specifically can be according to intelligent terminal kind
Class, operational requirements, the factors such as user operation habits are specifically set.The object of the object and close intelligent terminal, including user
Hand, screen touch pen etc..
As an example, the detection module 1 includes range sensor and judging unit, wherein range sensor peace
In the terminal, distance for detecting object apart from the terminal current interface is denoted as detection range;Judging unit is used
In the detection range is compared with pre-determined distance, if the detection range is no more than pre-determined distance, judgement it is default away from
From in range, there are objects, otherwise, judge that there is no objects within the scope of pre-determined distance.For example, when the hand of user is close to terminal
When being less than pre-determined distance at a distance from interface, with terminal interface, just detect within the scope of pre-determined distance that there are objects.
In practical application, user can operate continuously terminal interface, and during being somebody's turn to do, the hand of user touches discontinuity
Or display screen is left, if user hand leaves terminal interface more than pre-determined distance, operation button is hidden automatically at once, then will affect use
The continuity of family continuous operation, so that user experience is influenced, therefore, if detecting that the state of object is 1 within the scope of pre-determined distance,
The state that object is not detected within the scope of pre-determined distance is 0, and described device further includes delay trigger module 4, as shown in Figure 4.
First execution module 2 is used to become 1 from 0 when the state for detecting object, executes the first predetermined registration operation;Delay triggering
Module 4 is for setting preset time, when the state for detecting object becomes 0 from 1, then detects in the preset time, detects
Whether the state of object becomes 1 again, if being always 0, triggers second execution module 3 and executes second predetermined registration operation, if in advance
If when interphase in the state of object become 1 again, then trigger first execution module 2 and maintain the first predetermined registration operation constant.
It should be noted that preset time can specifically be set according to parameters such as user operation habits and historical operating datas
It is fixed, the operation button of terminal interface can be guaranteed always when user operates continuously terminal interface by delay trigger module 4
In display state, guarantee the continuity of user's operation, further the user experience is improved.
For the terminal current display interface under different type scene, the first execution module 2 and the second execution module 3 can be right
Different predetermined registration operations should be executed:
Scene one, when the terminal current display interface be multimedia play interface when,
First execution module 2 is used for automatic display operation button;
Second execution module 3 for hiding the operation button automatically.
Wherein, the multimedia play interface include video playing interface, audio broadcast interface, navigation broadcast interface in
It is one or more;
The operation button includes progress bar button, pause button, broadcast button, plays upper multimedia button, plays
One of upper multimedia button, vision switching push button are a variety of.
It is illustrated below in conjunction with specific embodiment:
Embodiment five,
During the navigation process, when range sensor detects that the state of object becomes 1 by 0, the first execution module 2 is automatic
Show that map interface hides the operation buttons such as setting and road conditions.Assuming that preset time is 5s, when range sensor detects object
State when becoming 0 by 1, delay trigger module 4 opens a countdown in 5 seconds, if distance passes before countdown terminates
Sensor detects that the state of object does not change back to 1, and second execution module of the delay triggering of trigger module 43 hides map circle automatically
Face hides the operation buttons such as setting and road conditions, if changing back to 1 again in 5s, postpones trigger module 4 and triggers the first execution module 2
It maintains display map interface to hide the setting operation buttons such as button and road conditions and is in display state.
Embodiment six,
During automatic parking, when range sensor detects that the state of object becomes 1 by 0, the first execution module 2
The operation buttons such as automatically displaying visual switching.Assuming that preset time is 5s, when range sensor detects that the state of object is become by 1
When at 0, delay trigger module 4 opens a countdown in 5 seconds, if range sensor detects before countdown terminates
The state of object does not change back to 1, then postpones the operation such as hiding vision switching automatically of second execution module of the triggering of trigger module 43
Button postpones trigger module 4 and triggers the operation buttons such as the first execution module 2 maintenance vision switching if changing back to 1 again in 5s
In display state.
Embodiment seven,
During playing video, when range sensor detects that the state of object becomes 1 by 0, the first execution module 2
Automatic display halt button, plays upper multimedia button, plays the operation buttons such as a upper multimedia button broadcast button.When
When range sensor range sensor detects that the state of object becomes 0 by 1, delay trigger module 4 opens 5 seconds meter
When, if range sensor detects that the state of object does not change back to 1 before countdown terminates, then postpone trigger module 4
Trigger the second execution module 3 hiding pause button, broadcast button, the upper multimedia button of broadcasting, the upper multimedia of broadcasting automatically
The operation buttons such as button, if changing back to 1 in 5s again, trigger module 4 triggers the first execution module 2 and maintains pause button, broadcasts
It puts the operation buttons such as the operation buttons such as button, the upper multimedia button of broadcasting, the upper multimedia button of broadcasting and is maintained in display
State.
When scene two, the terminal current display interface are dynamic screen saver interface,
First execution module 2 gathers state for Dynamically Announce;
Second execution module 3 is scattered state for Dynamically Announce.
It is illustrated below by way of a specific embodiment:
Embodiment eight,
It is illustrated by taking bubble dynamic screen saver as an example, current display interface is dynamic screen saver interface, when range sensor is examined
When measuring the state of object and becoming 1 by 0, the first execution module 2 executes bubble and carries out gathering operation in the display interface automatically, when
When range sensor detects that the state of object becomes 0 by 1, the second execution module 3 executes bubble and dissipates automatically in the display interface
Open operation.Concrete application of the embodiment of the present invention in dynamic screen saver, enriches the function of terminal display interface, is further promoted
User experience.It should be noted that the present embodiment can also set preset time to determine whether display is scattered state immediately,
This is repeated no more.
On the basis of above-mentioned example, also further it can be toward or away from the speed of terminal interface by judgment object, and according to speed
The speed that degree setting bubble scatters and gathers, further enriches the application scenarios of dynamic screen saver.Such as: assuming that object with apart from biography
The relative distance of sensor is Ycm, and pre-determined distance is X cm, and as Y < X, object can be detected by range sensor in pre-determined distance
In range, with the changing value of 0.01 second frequency record Y, take absolute value | △ Y | under dynamic screen saver mode, when the hand of user
When close to and far from screen, screen protection can show corresponding dynamic effect.The bubble to float such as current screen protection display dynamic: as Y < X, and Y
When value reduces, bubble can be gathered;As Y < X, and when Y value increase, bubble can scatter again.The movement velocity of bubble again and | △ Y | at
Direct ratio: | △ Y | bigger, bubble motion is faster.
The embodiment of the invention also provides a kind of terminals, including this law to buy interface control device described in that embodiment.
The embodiment of the present invention also provides a kind of controller comprising memory and processor, the memory are stored with meter
The step of calculation machine program, described program can be realized the interface control method when being executed by the processor.
The embodiment of the present invention also provides a kind of computer readable storage medium, for storing computer instruction, described instruction
The step of realizing the interface control method when by a computer or processor execution.
The embodiment of the present invention by holding within the scope of detection terminal current display interface pre-determined distance with the presence or absence of object automatically
Row corresponding operation is, it can be achieved that user shows operation button without clicking screen, by the way that range sensor inspection is arranged in terminal
Survey is toward or away from gesture, to carry out show or hide relevant operation button automatically or realizes the operations such as the dynamic effect of corresponding screen,
The user experience is improved.
The above described is only a preferred embodiment of the present invention, be not intended to limit the present invention in any form, though
So the present invention has been disclosed as a preferred embodiment, and however, it is not intended to limit the invention, any technology people for being familiar with this profession
Member, without departing from the scope of the present invention, when the technology contents using the disclosure above make a little change or modification
For the equivalent embodiment of equivalent variations, but anything that does not depart from the technical scheme of the invention content, according to the technical essence of the invention
Any simple modification, equivalent change and modification to the above embodiments, all of which are still within the scope of the technical scheme of the invention.