Disclosure of Invention
The invention mainly aims to provide a method, a device, a terminal and a storage medium for adjusting the position of a suspension button, and aims to solve the technical problem that in the prior art, a user is often required to manually drag and change the position of the suspension button, so that the user is inconvenient to operate the terminal.
In order to achieve the above object, an embodiment of the present invention provides a method for adjusting a position of a hover button, where the method for adjusting a position of a hover button is applied to a terminal, and the method for adjusting a position of a hover button includes:
when the updated display page of the terminal interface is detected, the display position of the suspension button on the updated new display page is obtained;
and judging whether a control capable of responding to the user operation exists on the display position, and selecting different adjustment modes to adjust the position of the suspension button according to whether the control capable of responding to the user operation exists.
Optionally, the step of adjusting the position of the hover button according to whether a control capable of responding to the operation of the user selects different adjustment modes includes:
and if the control which can respond to the operation of the user does not exist in the display position, keeping the floating button displayed in the display position.
Optionally, the step of adjusting the position of the hover button according to whether a control capable of responding to the operation of the user selects different adjustment modes further includes:
if a control capable of responding to the operation of the user exists on the display position, acquiring an alternative position of the suspension button prestored in the terminal;
and adjusting the position of the suspension button according to the alternative position.
Optionally, the adjusting the position of the suspension button according to the alternative position includes:
acquiring the number of the alternative positions prestored in the terminal, and if the number of the alternative positions is a plurality of, sequencing the priority of the plurality of alternative positions;
acquiring the position with highest priority and sequencing the position with highest priority
Optionally, the step of obtaining the position with the highest priority and taking the position with the highest priority as the adjustment position includes:
judging whether a control capable of responding to the operation of a user exists at the adjustment position;
and if the control capable of responding to the operation of the user exists in the adjustment position, acquiring other adjustment positions of the suspension button again based on the priority ranking, so as to carry out position adjustment processing on the suspension button again until the suspension button completes position adjustment.
Optionally, the alternative positions include a drag position where the hover button is dragged by a user and determined;
the step of adjusting the position of the suspension button according to the alternative position comprises the following steps:
collecting a dragging position with highest utilization rate of the suspension button in a preset time period in the past, and determining whether a control capable of responding to user operation exists at the dragging position with the highest utilization rate;
and if the dragging position with the highest utilization rate does not have the control which can respond to the operation of the user, displaying the suspension button at the dragging position with the highest utilization rate.
Optionally, the step of adjusting the position of the hover button according to whether a control capable of responding to the operation of the user selects different adjustment modes includes:
and if the terminal detects that the page is updated again, carrying out reduction processing on the position of the suspension button after the position is adjusted.
The invention also provides a device for adjusting the position of the suspension button, which is applied to a terminal, and comprises:
the acquisition module is used for acquiring the display position of the suspension button on the updated new display page when the terminal interface is detected to update the display page;
And the adjusting module is used for judging whether a control which can respond to the operation of the user exists on the display position, and selecting different adjusting modes to adjust the position of the suspension button according to whether the control which can respond to the operation of the user exists.
Optionally, the adjusting module includes:
and the holding unit is used for holding the floating button to be displayed at the display position if the control which can respond to the operation of the user does not exist at the display position.
Optionally, the adjustment module further includes:
the acquisition unit is used for acquiring the alternative position of the suspension button prestored in the terminal if the control which can respond to the operation of the user exists on the display position;
and the adjusting unit is used for adjusting the position of the suspension button according to the alternative position.
Optionally, the adjusting unit includes:
the first acquisition subunit is used for acquiring the number of the alternative positions prestored in the terminal, and if the number of the alternative positions is a plurality of the alternative positions, the priority ordering is carried out on the plurality of the alternative positions;
a second acquisition subunit for acquiring the highest-priority position and ordering the highest-priority position
Optionally, the adjusting unit further includes:
The judging subunit is used for judging whether the control which can respond to the user operation exists in the adjustment position;
and the detection subunit is used for acquiring other adjustment positions of the suspension button again based on the priority ranking if the control which can respond to the operation of the user exists in the adjustment positions, so as to carry out position adjustment processing on the suspension button again until the suspension button completes position adjustment.
Optionally, the alternative positions include a drag position where the hover button is dragged by a user and determined;
the adjustment unit further includes:
the acquisition subunit is used for acquiring the dragging position with the highest utilization rate of the suspension button in the past preset time period and determining whether a control capable of responding to the user operation exists at the dragging position with the highest utilization rate;
and the display subunit is used for displaying the suspension button at the dragging position with the highest utilization rate if the dragging position with the highest utilization rate does not have the control which can respond to the operation of the user.
Optionally, the adjusting device for the position of the suspension button further includes:
and the restoring module is used for restoring the position of the suspension button after the position is adjusted if the terminal is detected to update the page again.
The application also provides a terminal, which comprises: the device comprises a memory, a processor and a floating button position adjusting program which is stored in the memory and can run on the processor, wherein the floating button position adjusting program realizes the steps of the floating button position adjusting method when being executed by the processor.
The present application also provides a storage medium, on which a suspension button position adjustment program is stored, which when executed by a processor, implements the steps of the suspension button position adjustment method described above.
When the method detects that the terminal interface updates the display page, the display position of the suspension button on the updated new display page is obtained; and judging whether a control capable of responding to the user operation exists on the display position, and selecting different adjustment modes to adjust the position of the suspension button according to whether the control capable of responding to the user operation exists. In the application, the position of the suspension button of the terminal is not fixed any more, but whether a control which can respond to the operation of a user exists on the display position of the suspension button is judged every time the display page is updated by the terminal, and the position of the suspension button is adjusted according to whether different adjustment modes which can respond to the operation of the user exist or not.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The terminal may be implemented in various forms. For example, terminals described in the present invention may include terminals such as cell phones, tablet computers, notebook computers, palm computers, personal digital assistants (Personal Digital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, wearable devices, smart bracelets, pedometers, and the like, as well as stationary terminals such as digital TVs, desktop computers, and the like.
The following description will be given by taking a terminal as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to an element particularly used for a moving purpose.
Referring to fig. 1, which is a schematic hardware structure of a terminal implementing various embodiments of the present invention, the terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. It will be appreciated by those skilled in the art that the terminal structure shown in fig. 1 is not limiting of the terminal and that the terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (General Packet Radio Service ), CDMA2000 (Code Division Multiple Access, CDMA 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and a terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the essential constitution of the terminal, and can be omitted entirely as required within the scope of not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
The terminal 100 further comprises at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the terminal. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the terminal, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal 100 or may be used to transmit data between the terminal 100 and an external device.
The memory 109 may be used to store software programs and various data, and the memory 109 may be a computer storage medium, and the memory 109 stores the interface display program of the present invention. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the terminal, and connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the terminal. Such as processor 110, executes interface display programs in memory 109 to perform the steps of the various embodiments of the interface display method of the present invention.
Processor 110 may include one or more processing units; alternatively, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The terminal 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and optionally, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the terminal 100 may further include a bluetooth module or the like, which is not described herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the terminal of the present invention is based will be described below.
Referring to fig. 2, fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention, where the communication network system is an LTE system of a general mobile communication technology, and the LTE system includes a UE (User Equipment) 201, an e-UTRAN (Evolved UMTS Terrestrial Radio Access Network ) 202, an epc (Evolved Packet Core, evolved packet core) 203, and an IP service 204 of an operator that are sequentially connected in communication.
Specifically, the UE201 may be the terminal 100 described above, and will not be described herein.
The E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. The eNodeB2021 may be connected with other eNodeB2022 by a backhaul (e.g., an X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide access from the UE201 to the EPC 203.
EPC203 may include MME (Mobility Management Entity ) 2031, hss (Home Subscriber Server, home subscriber server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, pgw (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function, policy and tariff function entity) 2036, and so on. The MME2031 is a control node that handles signaling between the UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and to hold user specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034 and PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flows and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem ), or other IP services, etc.
Although the LTE system is described above as an example, it should be understood by those skilled in the art that the present invention is not limited to LTE systems, but may be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above terminal hardware structure and the communication network system, various embodiments of the method of the present invention are provided.
The invention provides a method for adjusting the position of a suspension button, which is mainly applied to a terminal, and in an embodiment of the method for adjusting the position of the suspension button, referring to fig. 3, the method for adjusting the position of the suspension button comprises the following steps:
step S10, when the updated display page of the terminal interface is detected, the display position of the suspension button on the updated new display page is obtained;
and step S20, judging whether a control which can respond to the operation of a user exists on the display position, and selecting different adjustment modes to adjust the position of the suspension button according to whether the control which can respond to the operation of the user exists.
The method comprises the following specific steps:
step S10, when the updated display page of the terminal interface is detected, the display position of the suspension button on the updated new display page is obtained;
in this embodiment, the terminal includes a full-screen terminal, a double-sided screen terminal, and other types of terminals, where a hover button is generally set for the terminal, and by clicking or touching the hover button, a terminal display interface may be switched, for example, by clicking the hover button and then switching from the current display interface to a home page interface to avoid multiple exit operations, and in addition, the hover button corresponds to a path button of a commonly used application of a user, as shown in fig. 4, that is, by clicking the hover button, an application with a highest frequency of 6 to 8 users may be displayed, or by clicking the hover button, a commonly used application preset by the user may be displayed, and it is required to be stated that a display position of the hover button of the terminal is generally fixed, for example, the fixed position is generally in an edge area in an upper right corner or an upper left corner of the terminal screen, as shown in fig. 5, so as to avoid frequent overlapping of the hover button and a terminal control, and it is required to be stated that the hover button may be displayed in a hidden manner, that when the user clicks the hover button is triggered or touches the hover button.
In this embodiment, when the updated display page of the terminal interface is detected, the display position of the hover button on the updated new display page is obtained, where the updated display page of the terminal interface includes various types of new display pages, for example, when the terminal enters a homepage from a certain application interface or when the terminal enters another page of the application from one page of the application, it is required to be explained that, when the updated display page of the terminal interface is detected, the display position of the hover button on the updated new display page is obtained, and because the hover button may be displayed in a hidden manner, the display position may be a hidden display position or a non-hidden display position, where when the display position of the hover button on the updated new display page is the hidden display position, the terminal obtains the hidden display position of the hover button by obtaining the preset setting information corresponding to the hover button.
And step S20, judging whether a control which can respond to the operation of a user exists on the display position, and selecting different adjustment modes to adjust the position of the suspension button according to whether the control which can respond to the operation of the user exists.
Specifically, determining whether a control capable of responding to the user operation exists on the display position, and selecting different adjustment modes to adjust the position of the suspension button according to whether the control capable of responding to the user operation exists comprises: judging whether a control capable of responding to user operation exists in the hidden display position, adjusting the position of the suspension button according to whether different adjustment modes are selected for the control capable of responding to user operation exist, judging whether the control capable of responding to user operation exists in the display position, and adjusting the position of the suspension button according to whether the control capable of responding to user operation exists or not, wherein the method further comprises the following steps: and judging whether a control which can respond to the operation of the user exists in the non-hidden display position, and selecting different adjustment modes to adjust the position of the suspension button according to whether the control which can respond to the operation of the user exists.
It should be noted that, for the terminal, each time the page is updated, the terminal pre-stores each control on the updated page, where each control mainly refers to a program section capable of performing operations based on touching or clicking by a user and performing response, in the prior art, the position of the hover button is often easy to coincide with the position of the control, so, in order to implement operations on the control, it is often necessary to perform a position removal process on the hover button, in this embodiment, in order to avoid a need of manual removal operation, a manner that the terminal automatically removes the position of the hover button is adopted, and in order to avoid an excessive removal operation that may exist, in this embodiment, a different adjustment manner is selected according to whether there is a control that can respond to the user operation, where the different adjustment manners at least include a position maintaining adjustment manner and a position changing adjustment manner.
Specifically, the step of adjusting the position of the suspension button according to whether there are different adjustment modes selected by the control that can respond to the user operation includes:
and S21, if no control capable of responding to the operation of a user exists at the display position, keeping the floating button displayed at the display position.
If the control which can respond to the operation of the user does not exist at the display position, the suspension button is kept to be displayed at the display position, namely in the embodiment, if the suspension button and the control of the terminal do not overlap, the position of the suspension button at the display position can be ensured to be unchanged, so that energy consumption caused by removing the position of the suspension button is avoided.
Specifically, the step of adjusting the position of the suspension button according to whether there are different adjustment modes selected by the control that can respond to the user operation further includes:
step S21, if a control capable of responding to the operation of a user exists on the display position, acquiring an alternative position of the suspension button prestored in the terminal;
in this embodiment, if a control capable of responding to a user operation exists at the display position, a hover button of the terminal coincides with the control, and at this time, an alternative position of the hover button pre-stored by the terminal is obtained, where the alternative position is pre-stored, and it should be noted that the alternative position may be determined, for example, the alternative position may be a determined a position or a determined B position, and in addition, the alternative position may also be uncertain, for example, the alternative position may be a dragging position after the hover button is dragged by the user, and due to a change of a user dragging habit, when the dragging position after the hover button is dragged by the user is the alternative position, the alternative position is uncertain.
And S22, adjusting the position of the suspension button according to the alternative position.
And adjusting the position of the suspension button according to the alternative position, namely adjusting the position of the suspension button to a position which is not overlapped with the control. Here, the alternative position may be overlapped with the control position, so that when the position of the suspension button is adjusted according to the alternative position, the judgment process needs to be performed again, and in addition, the alternative position may be one or more.
Specifically, the step of adjusting the position of the suspension button according to the alternative position includes:
step S221, obtaining the number of the alternative positions pre-stored by the terminal, and if the number of the alternative positions is a plurality of, sequencing the priority of the plurality of alternative positions;
and if the number of the candidate positions is a plurality of, the plurality of candidate positions are prioritized, and the purpose of the prioritized is to acquire the adjustment positions from the plurality of candidate positions, wherein the prioritized mode comprises the steps of sorting according to the number of times of taking the past preset time period candidate positions as the adjustment positions, and the more the number of times of taking the past preset time period candidate positions as the adjustment positions, the higher the priority.
Step S222, acquiring the position with the highest priority, and using the position with the highest priority as an adjustment position, so as to display the suspension button at the adjustment position.
And after the priority ranking is carried out, acquiring the position with the highest priority ranking, and taking the position with the highest priority ranking as an adjustment position so as to display the suspension button at the adjustment position. For example, the alternative positions are A, B, C, D four positions, and the priority of C is highest, and then a hover button is displayed at the C position, that is, the hover button is displayed at the adjustment position.
When the method detects that the terminal interface updates the display page, the display position of the suspension button on the updated new display page is obtained; and judging whether a control capable of responding to the user operation exists on the display position, and selecting different adjustment modes to adjust the position of the suspension button according to whether the control capable of responding to the user operation exists. In the application, the position of the suspension button of the terminal is not fixed any more, but whether a control which can respond to the operation of a user exists on the display position of the suspension button is judged every time the display page is updated by the terminal, and the position of the suspension button is adjusted according to whether different adjustment modes which can respond to the operation of the user exist or not.
Further, in another embodiment of the method for adjusting a position of a hover button according to the present invention, the step of obtaining the position with the highest priority and using the position with the highest priority as the adjustment position includes:
step S223, judging whether the control which can respond to the operation of the user exists in the adjustment position;
in this embodiment, the adjustment position may also overlap with the position of the control, so after the position with the highest priority is used as the adjustment position, it is necessary to determine whether the adjustment position has a control that can respond to the user operation.
Step S224, if it is detected that the adjustment position has a control that can respond to the user operation, acquiring other adjustment positions of the hover button again based on the priority ranking, so as to perform the position adjustment processing on the hover button again, until the hover button completes the position adjustment.
And if the control capable of responding to the operation of the user exists in the adjustment position, acquiring other adjustment positions of the suspension button again based on the priority ordering, if the second alternative position of the suspension button is acquired based on the priority ordering, carrying out position readjustment processing on the second alternative position of the suspension button based on the ordering, and if the second alternative position of the suspension button is overlapped with the control, acquiring the third alternative position based on the priority ordering, carrying out position readjustment processing on the third alternative position of the suspension button based on the third alternative position of the suspension button, and finally, carrying out position adjustment on the suspension button according to the rule.
It should be noted that, for the terminal, the number of alternative positions may be determined, and when the number of alternative positions is determined, the alternative positions may all overlap with the controls, so in this embodiment, if the number of alternative positions overlapping with the controls reaches the preset number, all the control positions on the current page are acquired, after all the control positions on the current page are obtained, the positions of the suspension buttons are adjusted, and it should be noted that, because the whole terminal display screen needs to be calculated for acquiring all the control positions on the current page, the calculated amount is too large, and therefore, the preset number is greater than or equal to 5, so as to avoid excessive consumption of computing resources of the terminal.
In addition, it should be noted that, as an alternative, before the priority ranking is performed, in order to avoid a risk that the alternative position and the control position overlap again, whether the alternative position overlaps with the control position may be determined first, and then the alternative position is ranked. When all the alternative positions coincide with the control positions, all the control positions on the current page are obtained, and after all the control positions on the current page are obtained, the positions of the suspension buttons are adjusted.
In this embodiment, whether the control capable of responding to the user operation exists in the adjustment position is judged; and if the control capable of responding to the operation of the user exists in the adjustment position, acquiring other adjustment positions of the suspension button again based on the priority ranking, so as to carry out position adjustment processing on the suspension button again until the suspension button completes position adjustment. In this embodiment, the position of the suspension button can be adjusted multiple times, so that inconvenience to the user due to the need of manually dragging and changing the position of the suspension button multiple times is avoided.
Further, in another embodiment of the method for adjusting the position of the hover button provided by the present invention, in this embodiment, the alternative position includes a drag position where the hover button is dragged and determined by the user;
the step of adjusting the position of the suspension button according to the alternative position comprises the following steps:
step A1, collecting a dragging position with highest utilization rate of the suspension button in a preset time period in the past, and determining whether a control capable of responding to user operation exists at the dragging position with the highest utilization rate;
in this embodiment, the alternative position may be variable, that is, the alternative position is a drag position where the hover button is dragged and determined by the user, where the drag position is generally a position where the user is used to touch or click, and the drag position may be multiple.
And acquiring a dragging position with the highest use rate of the suspension button in a preset time period in the past, wherein the dragging position with the highest use rate is the position most used or commonly used by a user, so that in the embodiment, whether a control which can respond to the operation of the user exists in the dragging position with the highest use rate is determined.
And step A2, if the dragging position with the highest utilization rate does not have a control which can respond to the operation of the user, displaying a suspension button at the dragging position with the highest utilization rate.
And if the dragging position with the highest utilization rate does not have the control capable of responding to the user operation, displaying a suspension button at the dragging position with the highest utilization rate, and if the dragging position with the highest utilization rate has the control capable of responding to the user operation, determining whether the dragging position with the second highest utilization rate has the control capable of responding to the user operation or not until the suspension button completes position adjustment. In this embodiment, it should be noted that, if the dragging positions overlapped with the controls reach the preset number, all the control positions on the current page are obtained, and after all the control positions on the current page are obtained, the positions of the suspension buttons are adjusted.
In this embodiment, by collecting the drag position with the highest usage rate of the suspension button in the past preset time period, and determining whether a control capable of responding to the user operation exists at the drag position with the highest usage rate; and if the dragging position with the highest utilization rate does not have the control which can respond to the operation of the user, displaying the suspension button at the dragging position with the highest utilization rate. In this embodiment, the use rate can be used to adjust the position of the suspension button multiple times, so that inconvenience to the user due to the need of manually dragging multiple times and changing the position of the suspension button is avoided.
Further, in another embodiment of the present invention, after the step of adjusting the position of the hover button according to whether there is a control that can respond to the user operation to select a different adjustment mode, the method includes:
and B1, if the terminal is detected to update the page again, performing reduction processing on the position of the suspension button after the position is adjusted.
In this embodiment, if it is detected that the terminal updates the page again, the position of the hover button after the position adjustment is restored. That is, the suspension button is generally arranged in the area with few terminal screen controls, so that the position of the suspension button is adjusted for a specific page, and when the page is updated, the position of the suspension button after the position is adjusted is restored, so that repeated adjustment of the suspension button of the terminal is avoided.
In this embodiment, if it is detected that the terminal updates the page again, the position of the hover button after the position adjustment is restored, that is, the hover button is generally disposed in the area with few screen controls of the terminal, so that this embodiment avoids repeated adjustment of the terminal multiple times.
In addition, the embodiment of the invention also provides a device for adjusting the position of the suspension button, which is applied to a terminal, and comprises:
the acquisition module is used for acquiring the display position of the suspension button on the updated new display page when the terminal interface is detected to update the display page;
and the adjusting module is used for judging whether a control which can respond to the operation of the user exists on the display position, and selecting different adjusting modes to adjust the position of the suspension button according to whether the control which can respond to the operation of the user exists.
Optionally, the adjusting module includes:
and the holding unit is used for holding the floating button to be displayed at the display position if the control which can respond to the operation of the user does not exist at the display position.
Optionally, the adjustment module further includes:
The acquisition unit is used for acquiring the alternative position of the suspension button prestored in the terminal if the control which can respond to the operation of the user exists on the display position;
and the adjusting unit is used for adjusting the position of the suspension button according to the alternative position.
Optionally, the adjusting unit includes:
the first acquisition subunit is used for acquiring the number of the alternative positions prestored in the terminal, and if the number of the alternative positions is a plurality of the alternative positions, the priority ordering is carried out on the plurality of the alternative positions;
a second acquisition subunit for acquiring the highest-priority position and ordering the highest-priority position
Optionally, the adjusting unit further includes:
the judging subunit is used for judging whether the control which can respond to the user operation exists in the adjustment position;
and the detection subunit is used for acquiring other adjustment positions of the suspension button again based on the priority ranking if the control which can respond to the operation of the user exists in the adjustment positions, so as to carry out position adjustment processing on the suspension button again until the suspension button completes position adjustment.
Optionally, the alternative positions include a drag position where the hover button is dragged by a user and determined;
The adjustment unit further includes:
the acquisition subunit is used for acquiring the dragging position with the highest utilization rate of the suspension button in the past preset time period and determining whether a control capable of responding to the user operation exists at the dragging position with the highest utilization rate;
and the display subunit is used for displaying the suspension button at the dragging position with the highest utilization rate if the dragging position with the highest utilization rate does not have the control which can respond to the operation of the user.
Optionally, the adjusting device for the position of the suspension button further includes:
and the restoring module is used for restoring the position of the suspension button after the position is adjusted if the terminal is detected to update the page again.
In addition, the embodiment of the invention also provides a terminal, which comprises: the processor 110, the memory 109, and the adjustment program for the hover button position stored in the memory 109 and executable on the processor 110, which when executed by the processor 110, implement the steps of the embodiments of the hover button position adjustment method described above.
In addition, the invention also provides a computer storage medium, which stores one or more programs, and the one or more programs can be further executed by one or more processors to implement the steps of the embodiments of the method for adjusting the position of the hover button.
The expansion content of the specific implementation of the terminal and the storage medium (i.e. the computer storage medium) of the present invention is basically the same as the embodiments of the method for adjusting the position of the suspension button, and will not be described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.