Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for changing the icon position of an application menu, which meet the habit of using function items of a user and improve the experience of the user by changing the icon position of the function items of the application menu. The specific technical scheme is as follows:
the embodiment of the invention discloses a method for changing the icon position of an application menu, which comprises the following steps:
detecting a click operation of a first position in an application menu on a display screen;
if the continuous clicking time of the clicking operation at the first position exceeds a preset time threshold, continuing to detect the dragging operation from the first position to a second position in an application menu on the display screen;
and when the click operation on the second position is detected to be finished, exchanging the display position of a first icon closest to the first position and a second icon closest to the second position in the application menu on the display screen.
Preferably, if the click operation continues to be performed at the first position for a click time exceeding a preset time threshold, the step of continuously detecting a dragging operation from the first position to a second position in an application menu on the display screen includes:
if the distance between the first position and the first icon is smaller than a preset distance threshold value, and the continuous clicking time of the clicking operation at the first position exceeds a preset time threshold value, continuing to detect the dragging operation from the first position to a second position in an application menu on the display screen;
when it is detected that the click operation on the second position is finished, exchanging the display positions of a first icon closest to the first position and a second icon closest to the second position in the application menu on the display screen, including:
and when the click operation on the second position is detected to be finished, exchanging a first icon which is closest to the first position and is less than a preset distance threshold value in the application menu on the display screen with the display position of a second icon which is closest to the second position.
Preferably, when it is detected that the click operation on the second position is finished, exchanging a first icon in the application menu on the display screen, which is closest to the first position and whose distance is smaller than a preset distance threshold, with a display position of a second icon closest to the second position includes:
and when the click operation on the second position is detected to be finished, exchanging a first icon which is closest to the first position and is less than a preset distance threshold value with a display position of a second icon which is closest to the second position and is less than the preset distance threshold value in the application menu on the display screen.
Preferably, after the continuously detecting the dragging operation from the first position to the second position in the application menu on the display screen if the clicking time of the clicking operation at the first position exceeds a preset time threshold, the method further includes:
and if the dragging operation from the first position to the second position in the application menu on the display screen is detected, controlling the first icon to move along the track of the dragging operation in the application menu on the display screen.
Preferably, if the display screen is a touch screen, the detecting a click operation of a first position in an application menu on the display screen includes:
detecting a touch operation on the touch screen;
if the display screen is a display, the detecting a click operation of a first position in an application menu on the display screen includes:
detecting a cursor click operation on the display.
The embodiment of the invention also discloses a device for changing the icon position of the application menu, which comprises:
the click operation detection module is used for detecting the click operation of a first position in an application menu on a display screen;
the dragging operation detection module is used for continuously detecting dragging operation from the first position to a second position in an application menu on the display screen if the continuous clicking time of the clicking operation at the first position exceeds a preset time threshold;
and the display position exchange module is used for exchanging the display position of a first icon closest to the first position and a second icon closest to the second position in the application menu on the display screen when the click operation on the second position is detected to be finished.
Preferably, the dragging operation detection module is further configured to:
if the distance between the first position and the first icon is smaller than a preset distance threshold value, and the continuous clicking time of the clicking operation at the first position exceeds a preset time threshold value, continuing to detect the dragging operation from the first position to a second position in an application menu on the display screen;
the display position exchanging module is further configured to:
and when the click operation on the second position is detected to be finished, exchanging a first icon which is closest to the first position and is less than a preset distance threshold value in the application menu on the display screen with the display position of a second icon which is closest to the second position.
Preferably, the display position exchanging module is further configured to:
and when the click operation on the second position is detected to be finished, exchanging a first icon which is closest to the first position and is less than a preset distance threshold value with a display position of a second icon which is closest to the second position and is less than the preset distance threshold value in the application menu on the display screen.
Preferably, after the dragging operation detecting module, the method further includes:
and the first icon moving module is used for controlling the first icon to move along the track of the dragging operation in the application menu on the display screen if the dragging operation from the first position to the second position in the application menu on the display screen is detected.
Preferably, if the display screen is a touch screen, the click operation detection module is further configured to:
detecting a touch operation on the touch screen;
if the display screen is a display, the click operation detection module is further configured to:
detecting a cursor click operation on the display.
According to the method and the device for changing the icon position of the application menu, provided by the embodiment of the invention, the click operation of the first position in the application menu on the display screen is detected, the dragging operation from the first position to the second position in the application menu on the display screen is continuously detected when the click operation duration of the first position exceeds the preset time threshold, and when the click operation on the second position is detected to be finished, the display position of the first icon closest to the first position and the display position of the second icon closest to the second position in the application menu on the display screen are exchanged. According to the method and the device, the positions of the icons of the function items in the application program menu are changed by long-time pressing and dragging, so that the habit of using the function items in the application menu by a user can be met, and the experience of the user can be improved. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a method and a device for changing icon positions of an application menu, which can change the icon positions of function items in the application menu, meet the habit of using the function items of a user and improve the experience of the user.
First, a method for changing an icon position of an application menu according to an embodiment of the present invention will be described below.
In the modern society where internet and mobile communication technology are rapidly developed, users widely use various types of application programs in mobile phones or other computers, an internal menu of the application programs contains a plurality of function items to provide different functions of the application programs for the users, each function item corresponds to an icon displayed in the internal menu of the application program on a display screen, the users can enter the internal application of the function item by clicking the icon of the function item on the display screen, the existing application programs aim at providing the user with the function use experience of each function item, the development of the application programs is mainly focused on whether the type and the number of the function items meet the requirements of the users, the spatial layout of the application menus is limited, developers of the application programs set the icon positions of each function item according to the system setting positions for simplifying the development difficulty, but operate the icons of the function items at fixed positions, the use habit of each user cannot be met, the inconvenience in use of the user is easily caused, and the user experience is poor. According to the scheme, the click operation at the first position is detected in the menu of the application program on the display screen, when the time for continuously clicking the operation exceeds the preset time threshold, the dragging operation from the first position to the second position in the application menu on the display screen is continuously detected, and when the click operation at the second position is detected to be finished, the display positions of the first icon closest to the first position and the second icon closest to the second position are exchanged, so that the icon position of the function item is changed by long-time pressing of the dragging operation, the icon position can be changed according to the habit of using the function item by a user, and the use feeling of the user can be improved.
Referring to fig. 1, fig. 1 is a flowchart of a method for changing an icon position of an application menu according to an embodiment of the present invention, including the following steps:
step 101, detecting a click operation of a first position in an application menu on a display screen.
The method comprises the steps that a plurality of application programs are distributed on a display screen of a mobile phone or a computer, each application program is clicked to enter the inside of the application program, a menu of the application programs can be viewed, icons corresponding to a plurality of function items are arranged in the menu of the application programs, each function item has different functions, and if the icon of one function item is clicked, the function of the function item can be executed.
And detecting the click operation of a first position in an application menu on a display screen, wherein the click operation is used for acquiring a click position and click operation information, the click position at least comprises an icon position of a function item, and the click operation information at least comprises an icon of the click function item so as to request to execute a request of the function item.
Taking a touch screen mobile phone as an example for explanation, the display screen, i.e. the touch screen, is composed of a touch detection component and a touch screen controller, and the touch detection component is installed in front of the display screen of the mobile phone and used for detecting a touch position. When a user clicks a position on a screen by using a finger or other objects, the touch detection component can detect the occurrence of touch and transmit the detected touch position to the touch screen controller, the touch screen controller converts the touch position into touch point coordinates and transmits the touch point coordinates to a mobile phone CPU (Central Processing Unit), and the touch screen controller receives and executes commands returned by the CPU.
And 102, if the continuous clicking time of the clicking operation at the first position exceeds a preset time threshold, continuing to detect the dragging operation from the first position to the second position in the application menu on the display screen.
The click operation is continued in the first position for a click time exceeding a preset time threshold, which is a value set according to the mobile phone or the computer system, such as 2 seconds, and is understood as a long-time click operation in the general sense.
When the long-press operation occurs at the first position, the system recognizes that the long-press operation at the moment is different from the short-time clicking operation on the function item icon, judges that the change operation of the icon position is possible to occur after the judgment, does not execute other operations, but continues to detect the dragging operation from the first position to the second position in the application menu on the display screen, and if the dragging operation from the first position to the second position occurs, confirms the change operation of the icon position.
The click operation is judged to be the long-time click operation according to the exceeding of the preset time threshold, so that the change operation of other non-icon positions corresponding to the click operation after the click operation occurs can be reduced, and the occurrence probability of misoperation can be reduced.
And 103, when the click operation on the second position is detected to be finished, exchanging the display positions of the first icon closest to the first position and the second icon closest to the second position in the application menu on the display screen.
The click operation at the second position ends, understood as the drag operation is stopped at the second position and the touch source has left the display screen, indicating that the change route of the icon position has been determined, from the first position to the second position.
At this time, the first icon closest to the first position and the second icon closest to the second position are searched, and the display positions of the first icon and the second icon are exchanged, so that the first icon originally at the first position can be changed to the second position.
It can be seen that, in the method for changing the icon position of the application menu provided in the embodiment of the present invention, by detecting that a click operation occurs at a first position in the application menu on the display screen, and when the duration of the click operation at the first position exceeds a preset time threshold, a drag operation from the first position to a second position in the application menu on the display screen is continuously detected, and when it is detected that the click operation at the second position is completed, a display position of a first icon closest to the first position and a display position of a second icon closest to the second position in the application menu on the display screen are exchanged. According to the method and the device, the positions of the icons of the function items in the application program menu are changed by long-time pressing and dragging, so that the habit of using the function items in the application menu by a user can be met, and the experience of the user can be improved.
Referring to fig. 2, fig. 2 is another flowchart of a method for changing an icon position of an application menu according to an embodiment of the present invention, including the following steps:
step 201, detecting a click operation of a first position in an application menu on a display screen.
If the display screen is a touch screen, detecting a click operation of a first position in an application menu on the display screen, including: and detecting touch operation on the touch screen.
If the display screen is a display, detecting a click operation of a first position in an application menu on the display screen, including: a cursor click operation on the display is detected.
Referring to fig. 5, fig. 5 is a schematic diagram of an original position of an icon of an application menu on a display screen according to an embodiment of the present invention, which is exemplified by a mobile phone with a touch screen as the display screen, where the menu of the application program of fig. 5 includes a plurality of icons of function items, an arrow represents a finger of a user, the position of the arrow is a first position, and when the finger of the user performs a click operation on the icon of the function item "screen normally bright" at the first position, a touch detection component of the mobile phone detects that the click operation occurs at the first position.
Step 202, if the distance between the first position and the first icon is smaller than a preset distance threshold and the continuous click time of the click operation at the first position exceeds a preset time threshold, continuing to detect the dragging operation from the first position to the second position in the application menu on the display screen.
If the distance between the first position and the first icon is smaller than the preset distance threshold, it can be understood with reference to fig. 5 that, among the plurality of icons around the arrow, the first icon is closest to the first position where the arrow is located, and if fig. 5 is the icon with "normal screen light", the distance between the first position and the position where the icon with "normal screen light" is located is determined, and if the distance is smaller than the preset distance threshold, it indicates that the user has clicked the icon with "normal screen light", that is, the icon that has been clicked in the normal sense is valid, and on the premise that the click is valid, the subsequent icon position changing operation can be performed. If the distance is larger than or equal to the preset distance threshold value, the click of the icon with the normally-on screen by the user is invalid, and the mobile phone system does not change the position of the subsequent icon. The distance between the first position and the first icon is judged to be smaller than the preset distance threshold, the situation that the position of the icon is changed due to the fact that the user touches the icon unintentionally can be avoided, and the probability of misoperation can be effectively reduced.
The preset distance threshold is set according to a distance, such as 1 mm, of icon positions of each function item in the application menu on the display screen.
The click operation continues to be performed at the first position for a click time exceeding a preset time threshold, as understood from fig. 5, the continuous touch time of the finger of the user on the icon "screen is always on" exceeds a preset time threshold, that is, a long-time icon pressing operation in the general sense occurs, wherein the preset time threshold is a value set according to a mobile phone or a computer system, such as 2 seconds, and different values can be set according to requirements. When the 'normally bright screen' icon is subjected to long-time pressing operation, the mobile phone system detects that the operation is not short-time clicking operation on the 'normally bright screen' icon, the 'normally bright screen' icon is not opened according to a subsequent execution command of the short-time clicking operation to run the 'normally bright screen' function, and the mobile phone system waits for the subsequent execution command. And detecting that the continuous click time of the click operation at the first position exceeds a preset time threshold, so that the function corresponding to the icon can be prevented from being operated by clicking, and the occurrence probability of misoperation can be effectively reduced.
If the distance between the first position and the first icon is smaller than a preset distance threshold value and the continuous clicking time of the clicking operation at the first position exceeds a preset time threshold value, the system indicates that the clicking operation of the icon by the user is confirmed to be effective and does not belong to the operation of the function corresponding to the icon, the system does not operate the function corresponding to the icon and other operations, at the moment, whether the dragging operation from the first position to the second position in the application menu on the display screen occurs or not is detected, so that whether the changing operation of the icon position exists or not is confirmed, and if the dragging operation exists, the changing operation of the icon position is confirmed to exist. Referring to fig. 6, fig. 6 is a schematic diagram illustrating the icon position movement of the application menu on the display screen according to the embodiment of the present invention, where the user intends to drag the "normally bright screen" icon from the first position to the second position, as shown by the direction of the dotted arrow, which is the track of the dragging operation. Detecting a drag operation from a first position to a second position within an application menu on a display screen can acquire a change route of the icon position.
Step 203, if a dragging operation from a first position to a second position in the application menu on the display screen is detected, controlling the first icon to move along a track of the dragging operation in the application menu on the display screen.
Referring to fig. 6, if a dragging operation of a "normally bright screen" icon in an application menu on a display screen from a first position to a second position is detected, the "normally bright screen" icon is controlled to move along a track of the dragging operation indicated by a dotted arrow in the application menu on the display screen, and compared with the situation that the icon is moved to the second position after the second position is determined, the scheme is preferable.
Step 204, when the end of the click operation on the second position is detected, exchanging the display position of a first icon which is closest to the first position and is less than the preset distance threshold value with the display position of a second icon which is closest to the second position and is less than the preset distance threshold value in the application menu on the display screen.
When it is detected that the click operation on the second location is finished, referring to fig. 7, fig. 7 is a schematic diagram after the icon of the application menu on the display screen changes location according to the embodiment of the present invention, and referring to fig. 7, it is understood that the user's finger drags the "screen normally-bright" icon to the second location, and when the finger leaves the screen, the change operation of the icon location is finished, and the target location of the "screen normally-bright" icon is determined to be the second location.
The first icon closest to the first position and less than the preset distance threshold is understood as that, if there are a plurality of icons near the first position, the system cannot identify which of the plurality of icons that are the same distance from the first position is the icon that the user needs to change the icon position, in which case, the system rejects the operation of changing the icon position.
Referring to fig. 5, among the icons near the first position, the icon closest to the first position is determined to be a "normally bright screen" icon, the system recognizes that the "normally bright screen" icon is an icon that the user needs to change the icon position, and then determines whether the distance between the first position and the "normally bright screen" icon is smaller than a preset distance threshold, when the distance is smaller than the preset distance threshold, it indicates that the user clicks the "normally bright screen" icon effectively, so that the first icon that the icon position needs to be changed can be clearly determined by performing determination for multiple times, and misoperation of other icons caused by icon position change is reduced.
Similarly, the second icon closest to the second position and less than the preset distance threshold is understood as that, if there are a plurality of icons in the vicinity of the second position, the system cannot identify which icon among the plurality of icons in the same distance from the second position is the destination position of the icon position change performed by the user, and in this case, the system rejects the operation of the icon position change by the user.
Referring to fig. 5, in the plurality of icons near the second position, it is determined that the icon closest to the second position is the "voice reading" icon, and it is determined whether the distance between the second position and the "voice reading" icon is smaller than a preset distance threshold, and when the distance is smaller than the preset distance threshold, the target position of the icon position change performed by the user is the position where the "voice reading" icon is located, so that the second icon needing to be displayed in position exchange with the first icon can be clearly determined by performing determination many times, and misoperation of icon position change of other icons is reduced.
And exchanging the display position of a first icon which is closest to the first position and is less than the preset distance threshold value with the display position of a second icon which is closest to the second position and is less than the preset distance threshold value in the application menu on the display screen. It can be understood by referring to fig. 7 that the display position of the "normally bright screen" icon closest to the first position and less than the preset distance threshold is exchanged with the display position of the "speech reading" icon closest to the second position and less than the preset distance threshold, so that the position of the "normally bright screen" icon is changed from the first position to the second position, the user is convenient to use the "normally bright screen" function at the second position, the icon position of the application menu is changed according to the user habit, and the user experience can be improved.
It can be seen that the method for changing the icon position of an application menu provided in the embodiments of the present invention detects a click operation on a first position in the application menu on a display screen, including detecting a touch operation on a touch screen or detecting a cursor click operation on the display screen, if a distance between the first position and a first icon is less than a preset distance threshold and a continuous click time of the click operation on the first position exceeds a preset time threshold, continues to detect a drag operation from the first position to a second position in the application menu on the display screen, if a drag operation from the first position to the second position in the application menu on the display screen is detected, controls the first icon to move along a track of the drag operation in the application menu on the display screen, and when the click operation on the second position is detected to be completed, moves the first icon closest to the first position and less than the preset distance threshold in the application menu on the display screen, and exchanging the display position of the second icon which is closest to the second position and is less than the preset distance threshold value. According to the embodiment of the invention, when the effective clicking operation of one icon in the application menu is detected, the long-time icon pressing operation is confirmed, the icon position changing operation is confirmed when the dragging operation from the first position to the second position of the icon is detected, the icon can move along the dragging track when the dragging operation is detected, and when the long-time icon pressing operation at the second position is detected to be finished, the positions of the first icon effectively clicked at the first position and the second icon at the second position are exchanged, so that the icon position is changed according to the habit of using the corresponding function item of the icon at different positions of a user, and the experience feeling of the user is improved.
Referring to fig. 3, fig. 3 is a structural diagram of an apparatus for changing an icon position of an application menu according to an embodiment of the present invention, including:
the clickoperation detection module 301 is configured to detect a click operation at a first location in an application menu on a display screen.
The draggingoperation detecting module 302 is configured to continue to detect a dragging operation from a first location to a second location in an application menu on a display screen if a continuous clicking time of the clicking operation at the first location exceeds a preset time threshold.
And the displayposition exchanging module 303 is configured to, when it is detected that the click operation at the second position is completed, exchange the display position of a first icon closest to the first position and a second icon closest to the second position in the application menu on the display screen.
It can be seen that, in the apparatus for changing the icon position of the application menu provided in the embodiment of the present invention, by detecting that a click operation occurs at a first position in the application menu on the display screen, and when the duration of the click operation at the first position exceeds a preset time threshold, a drag operation from the first position to a second position in the application menu on the display screen is continuously detected, and when it is detected that the click operation at the second position is completed, a display position of a first icon closest to the first position in the application menu on the display screen is exchanged with a display position of a second icon closest to the second position. According to the method and the device, the positions of the icons of the function items in the application program menu are changed by long-time pressing and dragging, so that the habit of using the function items in the application menu by a user can be met, and the experience of the user can be improved.
It should be noted that, the apparatus according to the embodiment of the present invention is an apparatus applying the method for changing the icon position of the application menu, and all embodiments of the method for changing the icon position of the application menu are applicable to the apparatus and can achieve the same or similar beneficial effects.
Referring to fig. 4, fig. 4 is another structural diagram of an apparatus for changing an icon position of an application menu according to an embodiment of the present invention, including:
the clickoperation detection module 401 is configured to detect a click operation at a first location in an application menu on a display screen.
The draggingoperation detecting module 402 is configured to continue to detect a dragging operation from a first position to a second position in an application menu on a display screen if a distance between the first position and the first icon is smaller than a preset distance threshold and a continuous clicking time of the clicking operation at the first position exceeds a preset time threshold.
The firsticon moving module 403 is configured to, if a dragging operation from a first position to a second position in an application menu on the display screen is detected, control the first icon to move along a track of the dragging operation in the application menu on the display screen.
The displayposition exchanging module 404 is configured to, when it is detected that the click operation on the second position is completed, exchange a display position of a first icon, which is closest to the first position and whose distance is smaller than a preset distance threshold, and a display position of a second icon, which is closest to the second position and whose distance is smaller than the preset distance threshold, in the application menu on the display screen.
It can be seen that the apparatus for changing icon positions of an application menu provided in the embodiments of the present invention detects a click operation on a first position in the application menu on a display screen, which may be a touch operation on a touch screen or a cursor click operation on the display, and if a distance between the first position and the first icon is smaller than a preset distance threshold and a continuous click time of the click operation on the first position exceeds a preset time threshold, continues to detect a drag operation from the first position to a second position in the application menu on the display screen, and if a drag operation from the first position to the second position in the application menu on the display screen is detected, controls the first icon to move along a track of the drag operation in the application menu on the display screen, and when the click operation on the second position is detected to be completed, controls the first icon closest to the first position and having a distance smaller than the preset distance threshold in the application menu on the display screen, and exchanging the display position of the second icon which is closest to the second position and is less than the preset distance threshold value. According to the embodiment of the invention, when the effective clicking operation of one icon in the application menu is detected, the long-time icon pressing operation is confirmed, the operation of changing the position of the icon is confirmed when the dragging operation from the first position to the second position of the icon is detected, the icon can move along the dragging track when the dragging operation is detected, and when the long-time icon pressing operation at the second position is detected to be finished, the positions of the first icon effectively clicked at the first position and the second icon effectively clicked at the second position are exchanged, so that the positions of the icons are changed according to the habit of using the corresponding function items of the icon at different positions of a user, and the experience feeling of the user is improved.
It should be noted that, the apparatus according to the embodiment of the present invention is an apparatus applying the above method, and all the above embodiments are applicable to the apparatus and can achieve the same or similar beneficial effects.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.