技术领域technical field
本发明实施例涉及通信领域,尤其涉及一种切换导航栏的方法及移动终端。The embodiments of the present invention relate to the communication field, and in particular, to a method for switching a navigation bar and a mobile terminal.
背景技术Background technique
随着终端技术的不断发展,触摸屏手机凭借屏幕大、体积小等优点,被越来越多的用户使用。目前,on-cell技术和in-cell技术被广泛应用于手机屏幕中,以实现手机屏幕的触控操作,其中,on-cell技术是在液晶面板上配置触摸面板;in-cell技术是将触摸面板功能集成在液晶面板上。With the continuous development of terminal technology, touch-screen mobile phones are used by more and more users due to their advantages such as large screen and small size. At present, on-cell technology and in-cell technology are widely used in mobile phone screens to realize the touch operation of mobile phone screens. Among them, on-cell technology is to configure a touch panel on a liquid crystal panel; Panel functions are integrated on the LCD panel.
大部分使用on-cell技术和in-cell技术的手机,会在手机屏幕的显示区域虚拟导航栏,常常通过以下两种方法显示虚拟导航栏:第一种,在手机屏幕的固定显示区域显示虚拟导航栏;第二种,预先在导航栏设置菜单中开启导航栏隐藏功能,相应地手机屏幕显示区域内会新增一针对导航栏隐藏功能配置的功能按钮,用户可以通过在功能按钮所在的显示区域执行下拉或上拉操作,调出或隐藏虚拟导航栏。Most mobile phones using on-cell technology and in-cell technology will display a virtual navigation bar in the display area of the mobile phone screen, and usually display the virtual navigation bar in the following two ways: first, display the virtual navigation bar in the fixed display area of the mobile phone screen. Navigation bar; the second is to turn on the navigation bar hidden function in the navigation bar setting menu in advance, and accordingly a function button for the navigation bar hidden function configuration will be added in the display area of the mobile phone screen. The area performs a pull-down or pull-up operation, calling out or hiding the virtual navigation bar.
但是,针对第一种方法,长期占用手机屏幕显示区域的虚拟导航栏会长期影响手机屏幕对其他内容的显示,并且虚拟导航栏容易被误碰,从而影响当前功能的正常使用;针对第二种方法,虚拟导航栏的调出和隐藏操作均需要用户执行相应操作、需要耗费一定的操作时间,特别是在需要双手操作的应用中虚拟导航栏的切换操作显得非常不方便。However, for the first method, the virtual navigation bar that occupies the display area of the mobile phone screen for a long time will affect the display of other content on the mobile phone screen for a long time, and the virtual navigation bar is easy to be touched by mistake, thereby affecting the normal use of the current function; for the second method method, calling out and hiding the virtual navigation bar requires the user to perform corresponding operations, and takes a certain amount of time for the operation, especially in applications that require two-handed operation, the switching operation of the virtual navigation bar is very inconvenient.
发明内容Contents of the invention
本发明提供了一种切换导航栏的方法,以解决长期占用手机屏幕显示区域的虚拟导航栏会长期影响手机屏幕对其他内容的显示,并且虚拟导航栏容易被误碰,从而影响当前功能的正常使用,以及虚拟导航栏的调出和隐藏操作均需要用户执行相应操作、需要耗费一定的操作时间,特别是在需要双手操作的应用中虚拟导航栏的切换操作显得非常不方便的问题。The invention provides a method for switching the navigation bar to solve the problem that the virtual navigation bar occupying the display area of the mobile phone screen for a long time will affect the display of other content on the mobile phone screen for a long time, and the virtual navigation bar is easy to be touched by mistake, thus affecting the normality of the current function Use, as well as call out and hide the virtual navigation bar, require the user to perform corresponding operations and take a certain amount of operating time, especially in applications that require two-handed operations to switch the virtual navigation bar is very inconvenient.
第一方面,提供了一种切换导航栏的方法,所述方法应用于移动终端,所述方法包括:In a first aspect, a method for switching a navigation bar is provided, the method is applied to a mobile terminal, and the method includes:
当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,获取所述移动终端相对于水平面的倾斜角度;When the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold, acquire the inclination angle of the mobile terminal relative to the horizontal plane;
将所述移动终端的导航栏切换至与所述倾斜角度对应的状态。Switching the navigation bar of the mobile terminal to a state corresponding to the tilt angle.
第二方面,提供了一种移动终端,包括:In a second aspect, a mobile terminal is provided, including:
倾斜角度获取模块,用于当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,获取所述移动终端相对于水平面的倾斜角度;An inclination angle acquisition module, configured to acquire the inclination angle of the mobile terminal relative to the horizontal plane when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold;
导航栏切换模块,用于将所述移动终端的导航栏切换至与所述倾斜角度对应的状态。A navigation bar switching module, configured to switch the navigation bar of the mobile terminal to a state corresponding to the tilt angle.
这样,本发明实施例中,当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,判定移动终端发生晃动,这时获取移动终端相对于水平面的倾斜角度,并将移动终端的导航栏切换至与倾斜角度对应的状态。因此,本发明实施例中,用户只需按照预设要求晃动移动终端即可实现导航栏的切换,而无需执行任何划屏操作,用户体验较好。同时,导航栏不会固定显示在移动终端屏幕的某一显示区域内,不会影响移动终端屏幕对其他内容的显示或影响较小。In this way, in the embodiment of the present invention, when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold, it is determined that the mobile terminal is shaken. At this time, the tilt angle of the mobile terminal relative to the horizontal plane is acquired, and the The navigation bar switches to the state corresponding to the tilt angle. Therefore, in the embodiment of the present invention, the user only needs to shake the mobile terminal according to the preset requirements to switch the navigation bar without performing any screen swiping operation, and the user experience is better. At the same time, the navigation bar will not be fixedly displayed in a certain display area of the mobile terminal screen, and will not affect the display of other content on the mobile terminal screen or have little influence.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments of the present invention. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention , for those skilled in the art, other drawings can also be obtained according to these drawings without paying creative labor.
图1是本发明一个实施例的切换导航栏的方法的流程图;FIG. 1 is a flowchart of a method for switching a navigation bar according to an embodiment of the present invention;
图2是本发明另一个实施例的切换导航栏的方法的流程图;FIG. 2 is a flowchart of a method for switching a navigation bar according to another embodiment of the present invention;
图3是本发明另一个实施例的切换导航栏的方法的框图;Fig. 3 is a block diagram of a method for switching a navigation bar according to another embodiment of the present invention;
图4是本发明一个实施例的移动终端的框图;Fig. 4 is a block diagram of a mobile terminal according to an embodiment of the present invention;
图5是本发明另一个实施例的移动终端的框图;Fig. 5 is a block diagram of a mobile terminal according to another embodiment of the present invention;
图6是本发明另一个实施例的移动终端的框图;Fig. 6 is a block diagram of a mobile terminal according to another embodiment of the present invention;
图7是本发明另一个实施例的移动终端的框图。FIG. 7 is a block diagram of a mobile terminal according to another embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
实施例一Embodiment one
图1是本发明一个实施例的切换导航栏的方法的流程图。图1所示的切换导航栏的方法包括:Fig. 1 is a flowchart of a method for switching a navigation bar according to an embodiment of the present invention. The method for switching the navigation bar shown in Figure 1 includes:
步骤101、当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,获取移动终端相对于水平面的倾斜角度。Step 101, when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold, acquire the tilt angle of the mobile terminal relative to the horizontal plane.
本发明实施例中,移动终端包括手机、平板、笔记本等。移动终端内置有重力传感器。In the embodiment of the present invention, the mobile terminal includes a mobile phone, a tablet, a notebook, and the like. The mobile terminal has a built-in gravity sensor.
重力传感器是根据电压效应的原理工作的,加速度使某个介质产生形变,通过测量介质的形变量以及使用相关电路将运动或重力转化成电压输出。例如,当移动终端发生晃动、掉落等运动时,重力传感器会输出相应的电压信号。相应地,移动终端会检测到重力传感器输出的电压信号。通常,物体运动剧烈程度与加速度大小成正比,加速度大小与介质形变量成正比,介质形变量与输出的电压值成正比。The gravity sensor works according to the principle of voltage effect. Acceleration causes a certain medium to deform. By measuring the deformation of the medium and using related circuits, the motion or gravity is converted into a voltage output. For example, when the mobile terminal is shaken, dropped, etc., the gravity sensor will output a corresponding voltage signal. Correspondingly, the mobile terminal will detect the voltage signal output by the gravity sensor. Usually, the intensity of the object's movement is proportional to the magnitude of the acceleration, the magnitude of the acceleration is proportional to the deformation of the medium, and the deformation of the medium is proportional to the output voltage value.
本发明可以预先设置重力传感器输出的电压信号的电压阈值,如果重力传感器输出的电压信号的电压值大于预设的电压阈值,则判定移动终端内部的加速度大于预设的加速度阈值,判定移动终端发生了预设剧烈程度的运动,随即判定接收到了切换导航栏的触发事件,之后获取移动终端相对于水平面的倾斜角度。The present invention can preset the voltage threshold of the voltage signal output by the gravity sensor. If the voltage value of the voltage signal output by the gravity sensor is greater than the preset voltage threshold, it is determined that the acceleration inside the mobile terminal is greater than the preset acceleration threshold, and it is determined that the mobile terminal has After the movement of the preset degree of intensity, it is determined that a trigger event of switching the navigation bar has been received, and then the tilt angle of the mobile terminal relative to the horizontal plane is obtained.
具体地,可以在电压信号的输出结束时刻获取移动终端的倾斜角度,可以在电压信号输出过程中的某一时刻获取移动终端的倾斜角度,可以获取电压信号输出过程中移动终端的倾斜角度的平均值,本发明在此仅进行举例,并不做限定。实际中可以通过多种方式获取移动终端的倾斜角度,例如使用角度传感器获取倾斜角度等。Specifically, the inclination angle of the mobile terminal can be obtained at the end of the output of the voltage signal, the inclination angle of the mobile terminal can be obtained at a certain point in the voltage signal output process, and the average value of the inclination angle of the mobile terminal in the voltage signal output process can be obtained , the present invention is only used as an example and not limited. In practice, the inclination angle of the mobile terminal can be obtained in various ways, for example, an angle sensor is used to obtain the inclination angle.
如果重力传感器输出的电压值小于或等于预设的电压阈值,则判定未接收到切换导航栏的触发事件,会继续对重力传感器输出的电压信号的电压值进行检测和判断。If the voltage value output by the gravity sensor is less than or equal to the preset voltage threshold, it is determined that the trigger event of switching the navigation bar has not been received, and the voltage value of the voltage signal output by the gravity sensor will continue to be detected and judged.
步骤102、将移动终端的导航栏切换至与倾斜角度对应的状态。Step 102, switching the navigation bar of the mobile terminal to a state corresponding to the tilt angle.
本发明预先设定了移动终端相对于水平面的倾斜角度与导航栏状态的对应关系。可以预先设定当移动终端相对于水平面的倾斜角度落在第一角度范围内时,导航栏状态为显示状态;当移动终端相对于水平面的倾斜角度落在第二角度范围内时,导航栏状态为隐藏状态。The present invention presets the corresponding relationship between the tilt angle of the mobile terminal relative to the horizontal plane and the state of the navigation bar. It can be pre-set that when the inclination angle of the mobile terminal relative to the horizontal plane falls within the first angle range, the state of the navigation bar is displayed; when the inclination angle of the mobile terminal relative to the horizontal plane falls within the second angle range, the state of the navigation bar is is hidden.
例如,预先设定当移动终端相对于水平面的倾斜角度落在(-90°,90°]时,导航栏状态为显示状态;当移动终端相对于水平面的倾斜角度落在(90°,270°]时,导航栏状态为隐藏状态。For example, it is pre-set that when the tilt angle of the mobile terminal relative to the horizontal plane falls within (-90°, 90°], the navigation bar status is displayed; when the tilt angle of the mobile terminal relative to the horizontal plane falls within (90°, 270° ], the navigation bar is hidden.
在获取移动终端相对于水平面的倾斜角度后,可以基于预设的倾斜角度与导航栏状态的对应关系,对移动终端导航栏的状态进行调整,将导航栏切换至与获取的倾斜角度对应的状态。After obtaining the inclination angle of the mobile terminal relative to the horizontal plane, the state of the navigation bar of the mobile terminal can be adjusted based on the preset correspondence between the inclination angle and the state of the navigation bar, and the navigation bar can be switched to a state corresponding to the acquired inclination angle .
例如,确定与倾斜角度对应的状态为显示状态后,如果导航栏正处于隐藏状态,则将导航栏显示于显示屏中;如果导航栏正处于显示状态,则导航栏状态保持不变。确定与倾斜角度对应的状态为隐藏状态后,如果导航栏正处于显示状态,则将导航栏从显示屏中隐藏;如果导航栏正处于隐藏状态,则导航栏状态保持不变。For example, after it is determined that the state corresponding to the tilt angle is the display state, if the navigation bar is in the hidden state, the navigation bar is displayed on the display; if the navigation bar is in the display state, the state of the navigation bar remains unchanged. After determining that the state corresponding to the tilt angle is the hidden state, if the navigation bar is in the display state, hide the navigation bar from the display; if the navigation bar is in the hidden state, the state of the navigation bar remains unchanged.
实际中,还可以预先设定移动终端的倾斜方向与导航栏状态的对应关系。移动终端的倾斜方向可以包括多种,例如向上倾斜、向下倾斜、向左倾斜、向右倾斜、向东南方向倾斜、向西北方向倾斜等。在获取到移动终端相对于水平面的倾斜角度后,先确定倾斜角度所属的目标倾斜方向,之后依据预设的倾斜方向与导航栏状态的对应关系,确定目标倾斜方向所对应的导航栏状态,进而对导航栏状态做相应调整。In practice, the corresponding relationship between the tilt direction of the mobile terminal and the state of the navigation bar may also be preset. The tilting directions of the mobile terminal may include various types, such as tilting up, tilting down, tilting to the left, tilting to the right, tilting to the southeast, tilting to the northwest, and the like. After obtaining the tilt angle of the mobile terminal relative to the horizontal plane, first determine the target tilt direction to which the tilt angle belongs, and then determine the navigation bar state corresponding to the target tilt direction according to the preset corresponding relationship between the tilt direction and the navigation bar state, and then Adjust the state of the navigation bar accordingly.
依据本发明实施例所述方法,移动终端用户预切换导航栏状态时,只需晃动移动终端,当晃动操作的加速度达到加速度阈值时,移动终端会对导航栏的状态进行切换,将导航栏切换至与移动终端相对于水平面的倾斜角度对应的状态,从而省去了用户划屏、点击等操作,提高了用户体验。According to the method described in the embodiment of the present invention, when the user of the mobile terminal pre-switches the state of the navigation bar, he only needs to shake the mobile terminal. When the acceleration of the shaking operation reaches the acceleration threshold, the mobile terminal will switch the state of the navigation bar, and switch the navigation bar to a state corresponding to the inclination angle of the mobile terminal relative to the horizontal plane, thereby eliminating operations such as swiping and clicking by the user, and improving user experience.
依据本发明的实施例,当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,判定移动终端发生晃动,这时获取移动终端相对于水平面的倾斜角度,并将移动终端的导航栏切换至与倾斜角度对应的状态。因此,本发明实施例中,用户只需按照预设要求晃动移动终端即可实现导航栏的切换,而无需执行任何划屏操作,用户体验较好。同时,导航栏不会固定显示在移动终端屏幕的某一显示区域内,不会影响移动终端屏幕对其他内容的显示或影响较小。According to the embodiment of the present invention, when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold, it is determined that the mobile terminal is shaken, and at this time the tilt angle of the mobile terminal relative to the horizontal plane is obtained, and the navigation of the mobile terminal The bar switches to the state corresponding to the tilt angle. Therefore, in the embodiment of the present invention, the user only needs to shake the mobile terminal according to the preset requirements to switch the navigation bar without performing any screen swiping operation, and the user experience is better. At the same time, the navigation bar will not be fixedly displayed in a certain display area of the mobile terminal screen, and will not affect the display of other content on the mobile terminal screen or have little influence.
实施例二Embodiment two
图2是本发明另一个实施例的切换导航栏的方法的流程图。图2所示的切换导航栏的方法包括:Fig. 2 is a flowchart of a method for switching a navigation bar according to another embodiment of the present invention. The method for switching the navigation bar shown in Figure 2 includes:
步骤201、使用重力传感器检测移动终端内部的加速度,以使重力传感器根据检测到的加速度输出对应的电压信号。Step 201, use the gravity sensor to detect the acceleration inside the mobile terminal, so that the gravity sensor outputs a corresponding voltage signal according to the detected acceleration.
移动终端内部安装有重力传感器。移动终端内部的重力传感器对移动终端内部的加速度进行检测,重力传感器在检测到加速度后会将其转换成电压信号并输出。相应地,移动终端检测到重力传感器输出的电压信号。通常移动终端内部的加速度越大,重力传感器输出的电压信号越大。A gravity sensor is installed inside the mobile terminal. The gravity sensor inside the mobile terminal detects the acceleration inside the mobile terminal, and after detecting the acceleration, the gravity sensor converts it into a voltage signal and outputs it. Correspondingly, the mobile terminal detects the voltage signal output by the gravity sensor. Generally, the greater the acceleration inside the mobile terminal, the greater the voltage signal output by the gravity sensor.
步骤202、当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,获取移动终端相对于水平面的倾斜角度。Step 202, when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold, acquire the tilt angle of the mobile terminal relative to the horizontal plane.
本发明预先设定了重力传感器输出的电压信号的电压阈值,并且限定如果检测到的电压信号的电压值大于预设的电压阈值,则判定需要对移动终端的导航栏进行状态切换,将导航栏切换至与移动终端相对于水平面的倾斜角度对应的状态。The present invention presets the voltage threshold of the voltage signal output by the gravity sensor, and limits that if the voltage value of the detected voltage signal is greater than the preset voltage threshold, it is determined that the navigation bar of the mobile terminal needs to be switched, and the navigation bar Switch to a state corresponding to the tilt angle of the mobile terminal relative to the horizontal plane.
具体地,在检测到移动终端的重力传感器输出的电压信号的电压值后,对检测到的电压值与预设的电压阈值进行大小判断,在判定检测到的电压值大于电压阈值后,确定需要将导航栏切换至与移动终端相对于水平面的倾斜角度对应的状态,之后进行下一步操作,获取移动终端相对于水平面的倾斜角度。可以通过多种方式获取倾斜角度,例如利用移动终端内的角度传感器检测移动终端相对于水平面的倾斜角度。Specifically, after detecting the voltage value of the voltage signal output by the gravity sensor of the mobile terminal, the magnitude of the detected voltage value and the preset voltage threshold value is judged, and after the detected voltage value is determined to be greater than the voltage threshold value, it is determined that it is necessary to Switch the navigation bar to a state corresponding to the tilt angle of the mobile terminal relative to the horizontal plane, and then proceed to the next step to acquire the tilt angle of the mobile terminal relative to the horizontal plane. The inclination angle can be obtained in various ways, for example, using an angle sensor in the mobile terminal to detect the inclination angle of the mobile terminal relative to the horizontal plane.
步骤203、将移动终端的导航栏切换至与倾斜角度对应的状态。Step 203, switching the navigation bar of the mobile terminal to a state corresponding to the tilt angle.
预先在移动终端内部设定移动终端相对于水平面的倾斜角度与导航栏状态的对应关系。例如,设定当移动终端相对于水平面的倾斜角度在第一预设角度范围内时,导航栏处于显示状态;设定当移动终端相对于水平面的倾斜角度在第二预设角度范围内时,导航栏处于隐藏状态。其中,第一预设角度范围与第二预设角度范围不同,两者没有重合。The corresponding relationship between the tilt angle of the mobile terminal relative to the horizontal plane and the state of the navigation bar is set in advance in the mobile terminal. For example, it is set that when the inclination angle of the mobile terminal relative to the horizontal plane is within the first preset angle range, the navigation bar is in the displayed state; when the inclination angle of the mobile terminal relative to the horizontal plane is within the second preset angle range, The navigation bar is hidden. Wherein, the first preset angle range is different from the second preset angle range, and the two do not overlap.
将移动终端的导航栏切换至与倾斜角度对应的状态具体可以包括:当移动终端相对于水平面的倾斜角度在第一预设角度范围内时,将导航栏从隐藏状态切换至显示状态,如果此时导航栏正处于显示状态,则导航栏状态保持不变;当移动终端相对于水平面的倾斜角度在第二预设角度范围内时,将导航栏从显示状态切换至隐藏状态,如果此时导航栏正处于隐藏状态,则导航栏状态保持不变。Switching the navigation bar of the mobile terminal to a state corresponding to the inclination angle may specifically include: when the inclination angle of the mobile terminal relative to the horizontal plane is within a first preset angle range, switching the navigation bar from the hidden state to the display state, if this When the navigation bar is in the display state, the state of the navigation bar remains unchanged; when the tilt angle of the mobile terminal relative to the horizontal plane is within the second preset angle range, the navigation bar is switched from the display state to the hidden state, if the navigation bar at this time bar is being hidden, the navbar state remains unchanged.
步骤204、继续使用重力传感器检测移动终端内部的加速度。Step 204, continue to use the gravity sensor to detect the acceleration inside the mobile terminal.
在完成对移动终端的导航栏的调整后,继续使用重力传感器对移动终端内部的加速度进行检测,继续执行步骤201,从而实现对导航栏状态的实时监测和切换。After completing the adjustment of the navigation bar of the mobile terminal, continue to use the gravity sensor to detect the acceleration inside the mobile terminal, and continue to execute step 201, so as to realize real-time monitoring and switching of the status of the navigation bar.
为使本领域技术人员更加清楚地理解本发明,现通过以下示例对本发明实施例所述方法进行详细解释。In order to make those skilled in the art understand the present invention more clearly, the methods described in the embodiments of the present invention are now explained in detail through the following examples.
图3是本发明另一个实施例的切换导航栏的方法的框图。图3种切换导航栏的方法包括:Fig. 3 is a block diagram of a method for switching a navigation bar according to another embodiment of the present invention. The methods of switching the navigation bar in Figure 3 include:
使用重力传感器检测移动终端内部的加速度,之后判断检测到的电压值是否大于预设的电压阈值。Use the gravity sensor to detect the acceleration inside the mobile terminal, and then judge whether the detected voltage value is greater than the preset voltage threshold.
如果检测到的电压值小于或等于电压阈值,则继续使用重力传感器检测移动终端内部的加速度;如果检测到的电压值大于电压阈值,则获取移动终端相对于水平面的倾斜角度。If the detected voltage value is less than or equal to the voltage threshold, continue to use the gravity sensor to detect the acceleration inside the mobile terminal; if the detected voltage value is greater than the voltage threshold, obtain the tilt angle of the mobile terminal relative to the horizontal plane.
判断获取的倾斜角度是在角度范围1内还是在角度范围2内,如果倾斜角度在角度范围1内,则在移动终端屏幕中显示导航栏;如果倾斜角度在范围2内,则在移动终端屏幕中隐藏导航栏。Determine whether the acquired tilt angle is within angle range 1 or angle range 2, if the tilt angle is within angle range 1, display the navigation bar on the screen of the mobile terminal; if the tilt angle is within range 2, display the navigation bar on the screen of the mobile terminal to hide the navigation bar.
完成对导航栏状态的切换后,继续使用重力传感器检测移动终端内部的加速度。After switching the state of the navigation bar, continue to use the gravity sensor to detect the acceleration inside the mobile terminal.
依据本发明的实施例,当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,判定移动终端发生晃动,这时获取移动终端相对于水平面的倾斜角度,并将移动终端的导航栏切换至与倾斜角度对应的状态。因此,本发明实施例中,用户只需按照预设要求晃动移动终端即可实现导航栏的切换,而无需执行任何划屏操作,用户体验较好。同时,导航栏不会固定显示在移动终端屏幕的某一显示区域内,不会影响移动终端屏幕对其他内容的显示或影响较小。According to the embodiment of the present invention, when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold, it is determined that the mobile terminal is shaken, and at this time the tilt angle of the mobile terminal relative to the horizontal plane is obtained, and the navigation of the mobile terminal The bar switches to the state corresponding to the tilt angle. Therefore, in the embodiment of the present invention, the user only needs to shake the mobile terminal according to the preset requirements to switch the navigation bar without performing any screen swiping operation, and the user experience is better. At the same time, the navigation bar will not be fixedly displayed in a certain display area of the mobile terminal screen, and will not affect the display of other content on the mobile terminal screen or have little influence.
实施例三Embodiment three
图4是本发明一个实施例的移动终端的框图。图4所示的移动终端包括:FIG. 4 is a block diagram of a mobile terminal according to one embodiment of the present invention. The mobile terminal shown in Figure 4 includes:
倾斜角度获取模块301,用于当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,获取所述移动终端相对于水平面的倾斜角度。The tilt angle acquisition module 301 is configured to acquire the tilt angle of the mobile terminal relative to the horizontal plane when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than a voltage threshold.
导航栏切换模块302,用于将所述移动终端的导航栏切换至与所述倾斜角度对应的状态。A navigation bar switching module 302, configured to switch the navigation bar of the mobile terminal to a state corresponding to the tilt angle.
本发明实施例中,优选地,所述倾斜角度获取模块301,具体用于利用移动终端内的角度传感器检测所述移动终端相对于水平面的倾斜角度。In the embodiment of the present invention, preferably, the inclination angle acquisition module 301 is specifically configured to use an angle sensor in the mobile terminal to detect the inclination angle of the mobile terminal relative to the horizontal plane.
本发明实施例中,优选地,所述导航栏切换模块3s02包括:In the embodiment of the present invention, preferably, the navigation bar switching module 3s02 includes:
第一切换子模块,用于当所述移动终端相对于水平面的倾斜角度在第一预设角度范围内时,将所述导航栏从隐藏状态切换至显示状态;A first switching submodule, configured to switch the navigation bar from a hidden state to a displayed state when the tilt angle of the mobile terminal relative to the horizontal plane is within a first preset angle range;
第二切换子模块,用于当所述移动终端相对于水平面的倾斜角度在第二预设角度范围内时,将所述导航栏从所述显示状态切换至所述隐藏状态。The second switching submodule is configured to switch the navigation bar from the display state to the hidden state when the tilt angle of the mobile terminal relative to the horizontal plane is within a second preset angle range.
本发明实施例中,优选地,所述移动终端还包括:In the embodiment of the present invention, preferably, the mobile terminal further includes:
加速度检测模块,用于在所述当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,获取所述移动终端相对于水平面的倾斜角度之前,使用所述重力传感器检测所述移动终端内部的加速度,以使所述重力传感器根据检测到的加速度输出对应的电压信号。An acceleration detection module, configured to use the gravity sensor to detect the movement before acquiring the tilt angle of the mobile terminal relative to the horizontal plane when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold Acceleration inside the terminal, so that the gravity sensor outputs a corresponding voltage signal according to the detected acceleration.
本发明实施例中,优选地,所述移动终端还包括:In the embodiment of the present invention, preferably, the mobile terminal further includes:
加速度继续检测模块,用于在所述将所述移动终端的导航栏切换至与所述倾斜角度对应的状态之后,继续使用所述重力传感器检测所述移动终端内部的加速度。The acceleration continuation detection module is configured to continue to use the gravity sensor to detect the acceleration inside the mobile terminal after the navigation bar of the mobile terminal is switched to a state corresponding to the tilt angle.
依据本发明的实施例,当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,判定移动终端发生晃动,这时获取移动终端相对于水平面的倾斜角度,并将移动终端的导航栏切换至与倾斜角度对应的状态。因此,本发明实施例中,用户只需按照预设要求晃动移动终端即可实现导航栏的切换,而无需执行任何划屏操作,用户体验较好。同时,导航栏不会固定显示在移动终端屏幕的某一显示区域内,不会影响移动终端屏幕对其他内容的显示或影响较小。According to the embodiment of the present invention, when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold, it is determined that the mobile terminal is shaken, and at this time the tilt angle of the mobile terminal relative to the horizontal plane is obtained, and the navigation of the mobile terminal The bar switches to the state corresponding to the tilt angle. Therefore, in the embodiment of the present invention, the user only needs to shake the mobile terminal according to the preset requirements to switch the navigation bar without performing any screen swiping operation, and the user experience is better. At the same time, the navigation bar will not be fixedly displayed in a certain display area of the mobile terminal screen, and will not affect the display of other content on the mobile terminal screen or have little influence.
实施例四Embodiment four
图5是本发明一个实施例的移动终端的框图。图5所示的移动终端包括:FIG. 5 is a block diagram of a mobile terminal according to one embodiment of the present invention. The mobile terminal shown in Figure 5 includes:
加速度检测模块401,用于使用重力传感器检测移动终端内部的加速度,以使所述重力传感器根据检测到的加速度输出对应的电压信号。The acceleration detection module 401 is configured to use the gravity sensor to detect the acceleration inside the mobile terminal, so that the gravity sensor outputs a corresponding voltage signal according to the detected acceleration.
倾斜角度获取模块402,用于当所述移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,获取所述移动终端相对于水平面的倾斜角度。The tilt angle acquisition module 402 is configured to acquire the tilt angle of the mobile terminal relative to the horizontal plane when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than a voltage threshold.
导航栏切换模块403,用于将所述移动终端的导航栏切换至与所述倾斜角度对应的状态。A navigation bar switching module 403, configured to switch the navigation bar of the mobile terminal to a state corresponding to the tilt angle.
加速度继续检测模块404,用于继续使用所述重力传感器检测所述移动终端内部的加速度。The acceleration continuing detection module 404 is configured to continue to use the gravity sensor to detect the acceleration inside the mobile terminal.
本发明实施例中,优选地,所述倾斜角度获取模块402,具体用于利用移动终端内的角度传感器检测所述移动终端相对于水平面的倾斜角度。In the embodiment of the present invention, preferably, the inclination angle acquisition module 402 is specifically configured to use an angle sensor in the mobile terminal to detect the inclination angle of the mobile terminal relative to the horizontal plane.
本发明实施例中,优选地,所述导航栏切换模块403包括:In the embodiment of the present invention, preferably, the navigation bar switching module 403 includes:
第一切换子模块,用于当所述移动终端相对于水平面的倾斜角度在第一预设角度范围内时,将所述导航栏从隐藏状态切换至显示状态;A first switching submodule, configured to switch the navigation bar from a hidden state to a displayed state when the tilt angle of the mobile terminal relative to the horizontal plane is within a first preset angle range;
第二切换子模块,用于当所述移动终端相对于水平面的倾斜角度在第二预设角度范围内时,将所述导航栏从所述显示状态切换至所述隐藏状态。The second switching submodule is configured to switch the navigation bar from the display state to the hidden state when the tilt angle of the mobile terminal relative to the horizontal plane is within a second preset angle range.
依据本发明的实施例,当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,判定移动终端发生晃动,这时获取移动终端相对于水平面的倾斜角度,并将移动终端的导航栏切换至与倾斜角度对应的状态。因此,本发明实施例中,用户只需按照预设要求晃动移动终端即可实现导航栏的切换,而无需执行任何划屏操作,用户体验较好。同时,导航栏不会固定显示在移动终端屏幕的某一显示区域内,不会影响移动终端屏幕对其他内容的显示或影响较小。According to the embodiment of the present invention, when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold, it is determined that the mobile terminal is shaken, and at this time the tilt angle of the mobile terminal relative to the horizontal plane is obtained, and the navigation of the mobile terminal The bar switches to the state corresponding to the tilt angle. Therefore, in the embodiment of the present invention, the user only needs to shake the mobile terminal according to the preset requirements to switch the navigation bar without performing any screen swiping operation, and the user experience is better. At the same time, the navigation bar will not be fixedly displayed in a certain display area of the mobile terminal screen, and will not affect the display of other content on the mobile terminal screen or have little influence.
由于所述移动终端实施例基本相应于前述图1-图3所示的方法实施例,故本实施例的描述中未详尽之处,可以参见前述实施例中的相关说明,在此就不赘述了。Since the embodiment of the mobile terminal basically corresponds to the method embodiment shown in the above-mentioned Figures 1-3, the details in the description of this embodiment can be referred to the relevant descriptions in the above-mentioned embodiments, and will not be repeated here. up.
实施例五Embodiment five
图6是本发明另一个实施例的移动终端的框图。图6所示的移动终端500包括:至少一个处理器501、存储器502、至少一个网络接口504和用户接口503。移动终端500中的各个组件通过总线系统505耦合在一起。可理解,总线系统505用于实现这些组件之间的连接通信。总线系统505除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图6中将各种总线都标为总线系统505。FIG. 6 is a block diagram of a mobile terminal according to another embodiment of the present invention. The mobile terminal 500 shown in FIG. 6 includes: at least one processor 501 , a memory 502 , at least one network interface 504 and a user interface 503 . Various components in the mobile terminal 500 are coupled together through the bus system 505 . It can be understood that the bus system 505 is used to realize connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, the various buses are labeled as bus system 505 in FIG. 6 for clarity of illustration.
其中,用户接口503可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(trackball)、触感板或者触摸屏等。Wherein, the user interface 503 may include a display, a keyboard, or a pointing device (for example, a mouse, a trackball (trackball), a touch panel, or a touch screen, and the like.
可以理解,本发明实施例中的存储器502可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data RateSDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(DirectRambus RAM,DRRAM)。本发明实施例描述的系统和方法的存储器502旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 502 in the embodiment of the present invention may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Wherein, the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electronically programmable Erase Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash. The volatile memory can be Random Access Memory (RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data RateSDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (Synchlink DRAM, SLDRAM) and Direct memory bus random access memory (DirectRambus RAM, DRRAM). The memory 502 of the systems and methods described in embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.
在一些实施方式中,存储器502存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:操作系统5021和应用程序5022。In some implementations, the memory 502 stores the following elements, executable modules or data structures, or their subsets, or their extended sets: an operating system 5021 and an application program 5022 .
其中,操作系统5021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序5022,包含各种应用程序,例如媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序5022中。Among them, the operating system 5021 includes various system programs, such as framework layer, core library layer, driver layer, etc., for realizing various basic services and processing tasks based on hardware. The application program 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., and is used to implement various application services. The program for realizing the method of the embodiment of the present invention may be included in the application program 5022 .
在本发明实施例中,通过调用存储器502存储的程序或指令,具体的,可以是应用程序5022中存储的程序或指令,处理器501用于当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,获取所述移动终端相对于水平面的倾斜角度,将所述移动终端的导航栏切换至与所述倾斜角度对应的状态。In the embodiment of the present invention, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application program 5022, the processor 501 is used to determine the voltage of the voltage signal output by the gravity sensor inside the mobile terminal. When the value is greater than the voltage threshold, acquire the tilt angle of the mobile terminal relative to the horizontal plane, and switch the navigation bar of the mobile terminal to a state corresponding to the tilt angle.
上述本发明实施例揭示的方法可以应用于处理器501中,或者由处理器501实现。处理器501可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器501中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器501可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(FieldProgrammable GateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器502,处理器501读取存储器502中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the foregoing embodiments of the present invention may be applied to the processor 501 or implemented by the processor 501 . The processor 501 may be an integrated circuit chip and has signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 501 or instructions in the form of software. The above-mentioned processor 501 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable Logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502, and completes the steps of the above method in combination with its hardware.
可以理解的是,本发明实施例描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital SignalProcessing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(ProgrammableLogic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。It can be understood that the embodiments described in the embodiments of the present invention may be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing device (DSP Device, DSPD), programmable logic Device (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing the functions described in this application or a combination thereof.
对于软件实现,可通过执行本发明实施例所述功能的模块(例如过程、函数等)来实现本发明实施例所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For software implementation, the techniques described in the embodiments of the present invention may be implemented through modules (such as procedures, functions, etc.) that execute the functions described in the embodiments of the present invention. Software codes can be stored in memory and executed by a processor. Memory can be implemented within the processor or external to the processor.
可选地,处理器501还用于:利用移动终端内的角度传感器检测所述移动终端相对于水平面的倾斜角度。Optionally, the processor 501 is further configured to: use an angle sensor in the mobile terminal to detect an inclination angle of the mobile terminal relative to the horizontal plane.
可选地,处理器501还用于:当所述移动终端相对于水平面的倾斜角度在第一预设角度范围内时,将所述导航栏从隐藏状态切换至显示状态;Optionally, the processor 501 is further configured to: switch the navigation bar from a hidden state to a displayed state when the tilt angle of the mobile terminal relative to the horizontal plane is within a first preset angle range;
当所述移动终端相对于水平面的倾斜角度在第二预设角度范围内时,将所述导航栏从所述显示状态切换至所述隐藏状态。When the tilt angle of the mobile terminal relative to the horizontal plane is within a second preset angle range, switching the navigation bar from the display state to the hidden state.
可选地,处理器501还用于:在所述当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,获取所述移动终端相对于水平面的倾斜角度之前,使用所述重力传感器检测所述移动终端内部的加速度,以使所述重力传感器根据检测到的加速度输出对应的电压信号。Optionally, the processor 501 is further configured to: use the gravity before acquiring the tilt angle of the mobile terminal relative to the horizontal plane when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than a voltage threshold. The sensor detects the acceleration inside the mobile terminal, so that the gravity sensor outputs a corresponding voltage signal according to the detected acceleration.
可选地,处理器501还用于:在所述将所述移动终端的导航栏切换至与所述倾斜角度对应的状态之后,继续使用所述重力传感器检测所述移动终端内部的加速度。Optionally, the processor 501 is further configured to: after switching the navigation bar of the mobile terminal to a state corresponding to the tilt angle, continue to use the gravity sensor to detect the acceleration inside the mobile terminal.
移动终端500能够实现前述实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。The mobile terminal 500 can implement various processes implemented by the mobile terminal in the foregoing embodiments, and to avoid repetition, details are not repeated here.
依据本发明的实施例,当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,判定移动终端发生晃动,这时获取移动终端相对于水平面的倾斜角度,并将移动终端的导航栏切换至与倾斜角度对应的状态。因此,本发明实施例中,用户只需按照预设要求晃动移动终端即可实现导航栏的切换,而无需执行任何划屏操作,用户体验较好。同时,导航栏不会固定显示在移动终端屏幕的某一显示区域内,不会影响移动终端屏幕对其他内容的显示或影响较小。According to the embodiment of the present invention, when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold, it is determined that the mobile terminal is shaken, and at this time the tilt angle of the mobile terminal relative to the horizontal plane is obtained, and the navigation of the mobile terminal The bar switches to the state corresponding to the tilt angle. Therefore, in the embodiment of the present invention, the user only needs to shake the mobile terminal according to the preset requirements to switch the navigation bar without performing any screen swiping operation, and the user experience is better. At the same time, the navigation bar will not be fixedly displayed in a certain display area of the mobile terminal screen, and will not affect the display of other content on the mobile terminal screen or have little influence.
实施例六Embodiment six
图7是本发明另一个实施例的移动终端的框图。具体地,图7中的移动终端600可以为手机、平板电脑、个人数字助理(Personal Digital Assistant,PDA)、或车载电脑等。FIG. 7 is a block diagram of a mobile terminal according to another embodiment of the present invention. Specifically, the mobile terminal 600 in FIG. 7 may be a mobile phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), or a vehicle-mounted computer.
图7中的移动终端600包括射频(Radio Frequency,RF)电路610、存储器620、输入单元630、显示单元640、处理器660、音频电路670、WiFi(Wireless Fidelity)模块680和电源690。Mobile terminal 600 in FIG.
其中,输入单元630可用于接收用户输入的数字或字符信息,以及产生与移动终端600的用户设置以及功能控制有关的信号输入。具体地,本发明实施例中,该输入单元630可以包括触控面板631。触控面板631,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板631上的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板631可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给该处理器660,并能接收处理器660发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板631。除了触控面板631,输入单元630还可以包括其他输入设备632,其他输入设备632可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。Wherein, the input unit 630 can be used to receive number or character information input by the user, and generate signal input related to the user setting and function control of the mobile terminal 600 . Specifically, in the embodiment of the present invention, the input unit 630 may include a touch panel 631 . The touch panel 631, also referred to as a touch screen, can collect user's touch operations on or near it (such as the user's operation on the touch panel 631 using any suitable object or accessory such as a finger, a stylus), and The specified program drives the corresponding connected device. Optionally, the touch panel 631 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 660, and can receive and execute commands sent by the processor 660. In addition, the touch panel 631 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 631, the input unit 630 may also include other input devices 632, which may include but not limited to physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, etc. one or more of.
其中,显示单元640可用于显示由用户输入的信息或提供给用户的信息以及移动终端600的各种菜单界面。显示单元640可包括显示面板641,可选的,可以采用LCD或有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板641。Wherein, the display unit 640 can be used to display information input by the user or information provided to the user and various menu interfaces of the mobile terminal 600 . The display unit 640 may include a display panel 641. Optionally, the display panel 641 may be configured in the form of an LCD or an organic light-emitting diode (Organic Light-Emitting Diode, OLED).
应注意,触控面板631可以覆盖显示面板641,形成触摸显示屏,当该触摸显示屏检测到在其上或附近的触摸操作后,传送给处理器660以确定触摸事件的类型,随后处理器660根据触摸事件的类型在触摸显示屏上提供相应的视觉输出。It should be noted that the touch panel 631 can cover the display panel 641 to form a touch display screen. When the touch display screen detects a touch operation on or near it, it is sent to the processor 660 to determine the type of the touch event, and then the processor 660 provides corresponding visual output on the touch display screen according to the type of the touch event.
触摸显示屏包括应用程序界面显示区及常用控件显示区。该应用程序界面显示区及该常用控件显示区的排列方式并不限定,可以为上下排列、左右排列等可以区分两个显示区的排列方式。该应用程序界面显示区可以用于显示应用程序的界面。每一个界面可以包含至少一个应用程序的图标和/或widget桌面控件等界面元素。该应用程序界面显示区也可以为不包含任何内容的空界面。该常用控件显示区用于显示使用率较高的控件,例如,设置按钮、界面编号、滚动条、电话本图标等应用程序图标等。The touch display screen includes an application program interface display area and a common control display area. The arrangement of the display area of the application program interface and the display area of the commonly used controls is not limited, and may be an arrangement in which the two display areas can be distinguished, such as vertical arrangement, left-right arrangement, and the like. The application program interface display area can be used to display the interface of the application program. Each interface may include at least one interface element such as an icon of an application program and/or a widget desktop control. The application program interface display area can also be an empty interface without any content. The commonly used control display area is used to display controls with a high usage rate, for example, application icons such as setting buttons, interface numbers, scroll bars, and phonebook icons.
其中处理器660是移动终端600的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在第一存储器621内的软件程序和/或模块,以及调用存储在第二存储器622内的数据,执行移动终端600的各种功能和处理数据,从而对移动终端600进行整体监控。可选的,处理器660可包括一个或多个处理单元。Wherein the processor 660 is the control center of the mobile terminal 600, utilizes various interfaces and lines to connect the various parts of the whole mobile phone, by running or executing the software programs and/or modules stored in the first memory 621, and calling the software programs and/or modules stored in the second memory 621. The data in the memory 622 executes various functions of the mobile terminal 600 and processes data, so as to monitor the mobile terminal 600 as a whole. Optionally, the processor 660 may include one or more processing units.
在本发明实施例中,通过调用存储该第一存储器621内的软件程序和/或模块和/或该第二存储器622内的数据,处理器660用于当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,获取所述移动终端相对于水平面的倾斜角度,将所述移动终端的导航栏切换至与所述倾斜角度对应的状态。In the embodiment of the present invention, by calling the software programs and/or modules stored in the first memory 621 and/or the data in the second memory 622, the processor 660 is used for when the voltage output by the gravity sensor inside the mobile terminal When the voltage value of the signal is greater than the voltage threshold, the tilt angle of the mobile terminal relative to the horizontal plane is obtained, and the navigation bar of the mobile terminal is switched to a state corresponding to the tilt angle.
可选地,处理器660还用于:利用移动终端内的角度传感器检测所述移动终端相对于水平面的倾斜角度。Optionally, the processor 660 is further configured to: use an angle sensor in the mobile terminal to detect an inclination angle of the mobile terminal relative to the horizontal plane.
可选地,处理器660还用于:当所述移动终端相对于水平面的倾斜角度在第一预设角度范围内时,将所述导航栏从隐藏状态切换至显示状态;Optionally, the processor 660 is further configured to: switch the navigation bar from a hidden state to a displayed state when the tilt angle of the mobile terminal relative to the horizontal plane is within a first preset angle range;
当所述移动终端相对于水平面的倾斜角度在第二预设角度范围内时,将所述导航栏从所述显示状态切换至所述隐藏状态。When the tilt angle of the mobile terminal relative to the horizontal plane is within a second preset angle range, switching the navigation bar from the display state to the hidden state.
可选地,处理器660还用于:在所述当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,获取所述移动终端相对于水平面的倾斜角度之前,使用所述重力传感器检测所述移动终端内部的加速度,以使所述重力传感器根据检测到的加速度输出对应的电压信号。Optionally, the processor 660 is further configured to: use the gravity before acquiring the tilt angle of the mobile terminal relative to the horizontal plane when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold. The sensor detects the acceleration inside the mobile terminal, so that the gravity sensor outputs a corresponding voltage signal according to the detected acceleration.
可选地,处理器660还用于:在所述将所述移动终端的导航栏切换至与所述倾斜角度对应的状态之后,继续使用所述重力传感器检测所述移动终端内部的加速度。Optionally, the processor 660 is further configured to: after switching the navigation bar of the mobile terminal to a state corresponding to the tilt angle, continue to use the gravity sensor to detect the acceleration inside the mobile terminal.
可见,依据本发明的实施例,当移动终端内部的重力传感器输出的电压信号的电压值大于电压阈值时,判定移动终端发生晃动,这时获取移动终端相对于水平面的倾斜角度,并将移动终端的导航栏切换至与倾斜角度对应的状态。因此,本发明实施例中,用户只需按照预设要求晃动移动终端即可实现导航栏的切换,而无需执行任何划屏操作,用户体验较好。同时,导航栏不会固定显示在移动终端屏幕的某一显示区域内,不会影响移动终端屏幕对其他内容的显示或影响较小。It can be seen that according to the embodiment of the present invention, when the voltage value of the voltage signal output by the gravity sensor inside the mobile terminal is greater than the voltage threshold, it is determined that the mobile terminal is shaken, and at this time the tilt angle of the mobile terminal relative to the horizontal plane is obtained, and the mobile terminal The navigation bar of the screen switches to the state corresponding to the tilt angle. Therefore, in the embodiment of the present invention, the user only needs to shake the mobile terminal according to the preset requirements to switch the navigation bar without performing any screen swiping operation, and the user experience is better. At the same time, the navigation bar will not be fixedly displayed in a certain display area of the mobile terminal screen, and will not affect the display of other content on the mobile terminal screen or have little influence.
本领域普通技术人员可以意识到,结合本发明实施例中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201611075738.XACN106598408A (en) | 2016-11-25 | 2016-11-25 | Method for switching navigation bar and mobile terminal |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201611075738.XACN106598408A (en) | 2016-11-25 | 2016-11-25 | Method for switching navigation bar and mobile terminal |
| Publication Number | Publication Date |
|---|---|
| CN106598408Atrue CN106598408A (en) | 2017-04-26 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201611075738.XAPendingCN106598408A (en) | 2016-11-25 | 2016-11-25 | Method for switching navigation bar and mobile terminal |
| Country | Link |
|---|---|
| CN (1) | CN106598408A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107621967A (en)* | 2017-09-27 | 2018-01-23 | 深圳市道通科技股份有限公司 | The implementation method and device of a kind of system user interface |
| CN107861663A (en)* | 2017-09-29 | 2018-03-30 | 努比亚技术有限公司 | Dock display methods and device under a kind of screen comprehensively |
| CN108256128A (en)* | 2018-04-13 | 2018-07-06 | Oppo广东移动通信有限公司 | Method, device, storage medium and electronic device for processing page links |
| CN112579927A (en)* | 2019-09-30 | 2021-03-30 | 北京国双科技有限公司 | Method and device for displaying navigation bar |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101382862A (en)* | 2007-09-06 | 2009-03-11 | 诚研科技股份有限公司 | Image browsing method and related image browsing device |
| CN102012774A (en)* | 2009-09-08 | 2011-04-13 | 中兴通讯股份有限公司 | Page turning method, device and terminal for terminal reading contents |
| CN103049172A (en)* | 2012-12-20 | 2013-04-17 | 北京小米科技有限责任公司 | Method, device and terminal of sidebar display |
| CN103593138A (en)* | 2013-11-15 | 2014-02-19 | 深圳市中兴移动通信有限公司 | Method for operating mobile terminal with one hand and mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101382862A (en)* | 2007-09-06 | 2009-03-11 | 诚研科技股份有限公司 | Image browsing method and related image browsing device |
| CN102012774A (en)* | 2009-09-08 | 2011-04-13 | 中兴通讯股份有限公司 | Page turning method, device and terminal for terminal reading contents |
| CN103049172A (en)* | 2012-12-20 | 2013-04-17 | 北京小米科技有限责任公司 | Method, device and terminal of sidebar display |
| CN103593138A (en)* | 2013-11-15 | 2014-02-19 | 深圳市中兴移动通信有限公司 | Method for operating mobile terminal with one hand and mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107621967A (en)* | 2017-09-27 | 2018-01-23 | 深圳市道通科技股份有限公司 | The implementation method and device of a kind of system user interface |
| WO2019062766A1 (en)* | 2017-09-27 | 2019-04-04 | 深圳市道通科技股份有限公司 | Method and device for implementing system user interface |
| CN107621967B (en)* | 2017-09-27 | 2021-06-18 | 深圳市道通科技股份有限公司 | Method and device for realizing system user interface |
| CN107861663A (en)* | 2017-09-29 | 2018-03-30 | 努比亚技术有限公司 | Dock display methods and device under a kind of screen comprehensively |
| CN107861663B (en)* | 2017-09-29 | 2020-10-16 | 努比亚技术有限公司 | Method and device for displaying dockbar under comprehensive screen |
| CN108256128A (en)* | 2018-04-13 | 2018-07-06 | Oppo广东移动通信有限公司 | Method, device, storage medium and electronic device for processing page links |
| CN112579927A (en)* | 2019-09-30 | 2021-03-30 | 北京国双科技有限公司 | Method and device for displaying navigation bar |
| Publication | Publication Date | Title |
|---|---|---|
| CN106843739B (en) | A kind of display control method and mobile terminal of mobile terminal | |
| CN106909289B (en) | Operation method and mobile terminal of application control | |
| CN106126077A (en) | A kind of application program image target display control method and mobile terminal | |
| CN105243345B (en) | The method and electronic equipment of a kind of electronic equipment false-touch prevention | |
| CN107103304A (en) | The display methods and mobile terminal in a kind of fingerprint recognition region | |
| CN106445116B (en) | A method for calling out a message notification bar and a mobile terminal | |
| CN106527904A (en) | Method for adjusting display interface and mobile terminal | |
| CN106447324A (en) | Presentation method of payment methods and mobile terminal | |
| CN107506109A (en) | A kind of method and mobile terminal for starting application program | |
| CN106406741B (en) | Operation and processing method of mobile terminal and mobile terminal | |
| CN106648242B (en) | A kind of control method and mobile terminal of touch control operation | |
| CN107678667B (en) | A virtual keyboard display method and mobile terminal | |
| CN106970752B (en) | Screen capture method and mobile terminal | |
| CN107193482A (en) | The operating method and mobile terminal of a kind of mobile terminal screen | |
| CN106354411B (en) | A method for starting interface and mobile terminal | |
| CN106371745B (en) | A kind of interface switching method and mobile terminal | |
| CN106445235A (en) | Touch starting position identification method and mobile terminal | |
| CN107643867A (en) | A kind of display methods and mobile terminal | |
| CN106445357A (en) | Control method of slider widget, and mobile terminal | |
| CN106354374A (en) | Icon moving method and mobile terminal | |
| CN106940597A (en) | A kind of camera starts control method and mobile terminal | |
| CN106528034B (en) | A kind of method of adjustment and mobile terminal of contents displayed on interface | |
| CN106598408A (en) | Method for switching navigation bar and mobile terminal | |
| CN106201309B (en) | A status bar processing method and mobile terminal | |
| CN106445299A (en) | A control method and mobile terminal |
| 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 | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20170426 |