This application claims priority to Chinese Patent Application No. 201310012680.4, filed on Jan. 14, 2013, which is hereby incorporated by reference in its entirety.
The present invention relates to the field of communications, and in particular, to a method for moving an interface object and an apparatus for supporting movement of an interface object.
In recent years, intelligent terminal devices have been developing rapidly. An intelligent terminal allows a user to perform personalized settings on the terminal, for example, set a desktop object that the user likes and a position of the desktop object, even perform personalized moving on the desktop object. An existing intelligent moving solution of a desktop object (including a desktop widget Widget, a desktop application shortcut Shortcut and so on) is implemented as follows: When each row of a screen is occupied by a desktop object, and when it is intended to move a certain desktop object (a moved object), the desktop object may be operated on the desktop, so as to move the desktop object to a position of another desktop object (a target object) having a height same as the desktop object and a width smaller than the desktop object. It can be seen that, the solution of the prior art meets, to a certain degree, a requirement of a user for performing personalized settings on the desktop object. However, the solution can only respond to movement in a direction from a big desktop object to a small desktop object, which presents a great limitation and cannot meet a requirement of the user for moving the desktop object to any position.
Embodiments of the present invention provide a method for moving an interface object and an apparatus for supporting movement of an interface object, which may meet a requirement of a user for moving the interface object (including a desktop widget Widget and a desktop application shortcut Shortcut and the like on the desktop and an application shortcut Shortcut and the like on an application program interface) to any position.
In a first aspect, the present invention provides a method for moving an interface object, which may include:
receiving an instruction for moving a first interface object on an interface from a first area to a second area;
updating, according to the received instruction, a display position of the first interface object on the interface to the second area;
obtaining a second interface object according to a preset rule, and searching for, in an entire interface range on the interface except the second area, a display position for the second interface object, where the second interface object is an interface object on the interface except the first interface object;
updating a display position of the second interface object according to the display position found through searching; and displaying all interface objects on the interface according to display positions of all the interface objects.
With reference to the first aspect, in a first possible implementation manner, the searching for, in an entire interface range on the interface except the second area, a display position for the second interface object may include:
taking a historical display position of the second interface object as the display position of the second interface object when the historical display position is an available display area; and
searching for, in the entire interface range on the interface except the second area, the display position for the second interface object when the historical display position of the second interface object is an occupied display area, where the display position is a remaining available display area on the interface.
With reference to the first aspect, or the first possible implementation manner of the first aspect, in a second possible implementation manner, the searching for, in an entire interface range on the interface except the second area, a display position for the second interface object may include:
searching for a position by taking a first row and a first column of the interface area as a searching starting point, and by moving in a manner of increasing a row sequence number by one sequentially or increasing a column sequence number by one sequentially, until a display area which may be used to display the second interface object is found through searching.
With reference to the first aspect, or the first possible implementation manner of the first aspect, in a third possible implementation manner, the preset rule includes:
height order from high to low; or,
width order from wide to narrow; or,
area order from big to small.
In a second aspect, an embodiment of the present invention provides an apparatus for supporting movement of an interface object, which may include:
a receiving module, configured to receive an instruction for moving a first interface object on an interface from a first area to a second area;
a first updating module, configured to update, according to the instruction received by the receiving module, a display position of the first interface object on the interface to the second area;
an obtaining module, configured to obtain a second interface object according to a preset rule;
a searching module, configured to search for, in an entire interface range on the interface except the second area, a display position for the second interface object obtained by the obtaining module, where the second interface object is an interface object on the interface except the first interface object;
a second updating module, configured to update a display position of the second interface object according to the display position found through searching by the searching module; and
a displaying module, configured to display all interface objects on the interface according to display positions of all the interface objects.
With reference to the second aspect, in a first possible implementation manner, the apparatus may further include:
a historical determining module, configured to determine whether a historical display position of the second interface object is an available display area, and
send the historical display position as the display position of the second interface object to the second updating module when the historical display position of the second interface object is an available display area; and
start the searching module when the historical display position of the second interface object is an occupied display area.
With reference to the second aspect, or the first possible implementation manner of the second aspect, in a second possible implementation manner, the searching module is specifically configured to search for a position by taking a first row and a first column of the interface area as a searching starting point, and by moving in a manner of increasing a row sequence number by one sequentially or increasing a column sequence number by one sequentially, until a display area which may be used to display the second interface object is found through searching.
With reference to the second aspect, or the first possible implementation manner of the second aspect, in a third possible implementation manner, the preset rule includes:
height order from high to low; or,
width order from wide to narrow; or,
area order from big to small.
It can be seen from the foregoing that, in some feasible implementation manners of the present invention, the instruction for moving the first interface object on the interface from the first area to the second area is received; the display position of the first interface object on the interface is updated to the second area according to the received instruction; the second interface object is obtained according to the preset rule; the display position for the second interface object is searched for in the entire interface range on the interface except the second area, where the second interface object is the interface object on the interface except the first interface object; the display position of the second interface object is updated according to the display position found through searching; and all the interface objects are displayed on the interface according to the display positions of all the interface objects. Because in the embodiments of the present invention, the display positions of the first interface object and the second interface object on the interface are both updated, a moving range of the first interface object may be not limited. Therefore, in the present invention, it is implemented that the first interface object moves to any position on the interface, which improves user experience.
To make the objectives, technical solutions, and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings.
Step S110: Receive an instruction for moving a first interface object on an interface from a first area to a second area.
In a specific implementation, the second area in the embodiment of the present invention may be any area, which may be used to display the first interface object, on the interface except the first area.
In a specific implementation, the interface object in the embodiment of the present invention includes any icon which may be displayed on the interface, where the interface may be a startup desktop or an application program interface after entering an application program; the interface object may be a desktop widget Widget on the desktop and an application shortcut Shortcut on the desktop; and the interface object may also be a widget or a shortcut on an opened application program interface.
Step S111: Update, according to the received instruction, a display position of the first interface object on the interface to the second area.
Step S112: Obtain a second interface object according to a preset rule, and search for, in an entire interface range on the interface except the second area, a display position for the second interface object.
In a specific implementation, the second interface object is an interface object on the interface except the first interface object. In some feasible implementation manners, there may be one second interface object (for example, when there are only two interface objects on the interface, one of which is a first interface object and the other of which is a second interface object). In some feasible implementation manners, there are multiple second interface objects (for example, when there are three or more interface objects on the interface, one of which is a first interface object, and any other interface object of which except the first interface object is a second interface object). Moreover, when there are multiple second interface objects, the second interface object needs to be obtained more than once according to the preset rule in step S112, and each time when the second interface object is obtained, the display position is searched for the second interface object.
In some feasible implementation manners, the preset rule includes any rule, as long as the rule may be used to appoint order of obtaining the second interface object, such as: obtaining the second interface object according to height order from high to low; or obtaining the second interface object according to width order from wide to narrow; or obtaining the second interface object according to area order from big to small; or obtaining the second interface object according to height order from low to high; or obtaining the second interface object according to width order from narrow to wide; or, according to area order from small to big; or, in a case with an equal height, obtaining the second interface object according to width order from wide to narrow; or, in a case with an equal width, obtaining the second interface object according to height order from high to low. Which kind of manner is specifically adopted should be determined according to an actual requirement, which is not specifically limited in the embodiment.
In some feasible implementation manners, the embodiment of the present invention may indicate a display position of the interface object on the interface through coordinates on the interface, where the coordinates are expressed in multiple forms, such as, according to vertex coordinates of an interface area (pixel coordinates of four vertexes of the interface area), or according to row and column coordinates occupied by an interface area (a starting row and a starting column of the interface area, a height in a row direction (the number of rows extending from the starting row), and a width in a column direction (the number of columns extending from the starting column)).
The following takes the row and column coordinates occupied by the interface area as an example, to describe an expression manner of the display position of the interface object on the interface. For example, referring to
In some feasible implementation manners, in step S112, a position is specifically searched for by taking the first row and the first column of the interface area as a searching starting point, and by moving in a manner of increasing a row sequence number by one sequentially or increasing a column sequence number by one sequentially, until the display area which may be used to display the second interface object is found through searching. Certainly, in a specific implementation, in step S112, any other position on the interface may also be taken as the searching starting point. Certainly, in addition, in step S112, an idle area in a historical record may be further searched for according to a set rule (the rule may be similar to the rule for obtaining the second interface object, and details are not repeatedly described herein), until the display area which may be used to display the second interface object is found through searching.
Step S113: Update a display position of the second interface object according to the display position found through searching.
It should be noted that, display positions of all interface objects are saved in preset positions, for example: the display positions of all the interface objects may be saved in a preset XML file; or may also be saved in a preset data sheet. As for a storage manner, reference may be made to a specific implementation of the prior art, and details are not repeatedly described herein.
Step S114: Display all the interface objects on the interface according to the display positions of all the interface objects.
When the interface object is displayed on the interface, the display positions of all the interface objects on the interface may be read from the foregoing preset positions, and all the interface objects are displayed on the interface. As for a specific reading and displaying manner, reference may be made to a specific implementation of the prior art, and details are not repeatedly described herein.
With reference to
Referring to (a1) of
In a specific implementation, because according to the embodiment of the present invention, the display positions of the first interface object and the second interface object on the interface are both updated, a moving range of the first interface object may be not limited. Therefore, in the present invention, it is implemented that the first interface object moves to any position on the interface. Specifically, reference may be made to a moving display effect diagram of a first interface object in other scenarios of
It can be seen from the foregoing that, in some feasible implementation manners of the present invention, the instruction for moving the first interface object on the interface from the first area to the second area is received; the display position of the first interface object on the interface is updated to the second area according to the received instruction; the second interface object is obtained according to the preset rule; the display position for the second interface object is searched for in the entire interface range on the interface except the second area, where the second interface object is the interface object on the interface except the first interface object; the display position of the second interface object is updated according to the display position found through searching; and all the interface objects are displayed on the interface according to the display positions of all the interface objects. Because in the embodiment of the present invention, the display positions of the first interface object and the second interface object on the interface are both updated, a moving range of the first interface object may be not limited. Therefore, in the present invention, it is implemented that the first interface object moves to any position on the interface, which improves user experience.
Step S210: Receive an instruction for moving a first interface object on an interface from a first area to a second area.
In a specific implementation, the second area in the embodiment of the present invention may be any area, which may be used to display the first interface object, on the interface except the first area.
In a specific implementation, the interface object in the embodiment of the present invention includes any icon which may be displayed on the interface, where the interface may be a startup desktop or an application program interface after entering an application program; the interface object may be a desktop widget Widget on the desktop and an application shortcut Shortcut on the desktop; and the interface object may also be a widget or a shortcut on an opened application program interface.
Step S211: Update, according to the received instruction, a display position of the first interface object on the interface to the second area.
Step S212: Obtain a second interface object according to a preset rule, and take a historical display position as a display position of the second interface object when the historical display position of the second interface object is an available display area; and search for, in an entire interface range on the interface except the second area, the display position for the second interface object when the historical display position of the second interface object is an occupied display area, where the display position is a remaining available display area on the interface.
In a specific implementation, the second interface object is an interface object on the interface except the first interface object. In some feasible implementation manners, there may be one second interface object (for example, when there are only two interface objects on the interface, one of which is a first interface object and the other of which is a second interface object). In some feasible implementation manners, there are multiple second interface objects (for example, when there are three or more interface objects on the interface, one of which is a first interface object, and any other interface object of which except the first interface object is a second interface object). Moreover, when there are multiple second interface objects, the second interface object needs to be obtained more than once according to the preset rule in step S112, and each time when the second interface object is obtained, the display position is searched for the second interface object.
In some feasible implementation manners, the preset rule includes any rule, as long as the rule may be used to appoint order of obtaining the second interface object, such as: obtaining the second interface object according to height order from high to low; or obtaining the second interface object according to width order from wide to narrow; or obtaining the second interface object according to area order from big to small; or obtaining the second interface object according to height order from low to high; or obtaining the second interface object according to width order from narrow to wide; or, according to area order from small to big; or, in a case with an equal height, obtaining the second interface object according to width order from wide to narrow; or, in a case with an equal width, obtaining the second interface object according to height order from high to low.
In some feasible implementation manners, the embodiment of the present invention may indicate the display position of the interface object on the interface through coordinates on the interface, where the coordinates are expressed in multiple forms, such as, according to vertex coordinates of the interface area (pixel coordinates of four vertexes of the interface area), or according to row and column coordinates occupied by the interface area (a starting row and a starting column of the interface area, a height in the row direction (the number of rows extending from the starting row), and a width in the column direction (the number of columns extending from the starting column)).
The following takes the row and column coordinates occupied by the interface area as an example, to describe an expression manner of the display position of the interface object on the interface. For example, referring to
In some feasible implementation manners, in step S212, when the historical display position of the second interface object is the occupied display area, and when the display position is searched for the second interface object in the entire interface range on the interface except the second area, specifically, a position is searched for by taking a first row and a first column of the interface area as a searching starting point, and by moving in a manner of increasing a row sequence number by one sequentially or increasing a column sequence number by one sequentially, until a display area which may be used to display the second interface object is found through searching. Certainly, in a specific implementation, in step S212, any other position on the interface may also be taken as the searching starting point. Certainly, in addition, in step S212, an idle area in a historical record may be further searched for according to a set rule (the rule may be similar to the rule for obtaining the second interface object, and details are not repeatedly described herein), until the display area which may be used to display the second interface object is found through searching.
In the embodiment of the present invention, in step S212, when the historical display position of the second interface object is the available display area, the historical display position is taken as the display position of the second interface object, which thereby saves a procedure for searching for the display position for the second interface object, and improves efficiency of moving the first interface object.
Step S213: Update a display position of the second interface object according to the display position found through searching.
It should be noted that, display positions of all interface objects are saved in preset positions, for example: the display positions of all the interface objects may be saved in a preset XML file; or may also be saved in a preset data sheet. As for a storage manner, reference may be made to a specific implementation of the prior art, and details are not repeatedly described herein.
Step S214: Display all the interface objects on the interface according to the display positions of all the interface objects.
When the interface object is displayed on the interface, the display positions of all the interface objects on the interface may be read from the foregoing preset positions, and all the interface objects are displayed on the interface. As for a specific reading and displaying manner, reference may be made to a specific implementation of the prior art, and details are not repeatedly described herein.
With reference to
Referring to (a1) of
In a specific implementation, because according to the embodiment of the present invention, the display positions of the first interface object and the second interface object on the interface are both updated, a moving range of the first interface object may be not limited. Therefore, in the present invention, it is implemented that the first interface object moves to any position on the interface. Specifically, reference may be made to a moving display effect diagram of a first interface object in other scenarios of
It can be seen from the foregoing that, in some feasible implementation manners of the present invention, the instruction for moving the first interface object on the interface from the first area to the second area is received; the display position of the first interface object on the interface is updated to the second area according to the received instruction; the second interface object is obtained according to the preset rule; the display position for the second interface object is searched for in the entire interface range on the interface except the second area, where the second interface object is the interface object on the interface except the first interface object; the display position of the second interface object is updated according to the display position found through searching; and all the interface objects are displayed on the interface according to the display positions of all the interface objects. Because in the embodiment of the present invention, the display positions of the first interface object and the second interface object on the interface are both updated, a moving range of the first interface object may be not limited. Therefore, in the present invention, it is implemented that the first interface object moves to any position on the interface, which improves user experience.
The receiving module 31 is configured to receive an instruction for moving a first interface object on an interface from a first area to a second area.
In a specific implementation, the second area in the embodiment of the present invention may be any area, which may be used to display the first interface object, on the interface except the first area.
In a specific implementation, the interface object in the embodiment of the present invention includes any icon which may be displayed on the interface, where the interface may be a startup desktop or an application program interface after entering an application program; the interface object may be a desktop widget Widget on the desktop and an application shortcut Shortcut on the desktop; and the interface object may also be a widget or a shortcut on an opened application program interface.
The first updating module 32 is configured to update, according to the instruction received by the receiving module 31, a display position of the first interface object on the interface to the second area.
The obtaining module 33 is configured to obtain a second interface object according to a preset rule.
The searching module 34 is configured to search for, in an entire interface range on the interface except the second area, a display position for the second interface object obtained by the obtaining module 33.
In a specific implementation, the second interface object is an interface object on the interface except the first interface object. In some feasible implementation manners, there may be one second interface object (for example, when there are only two interface objects on the interface, one of which is a first interface object and the other of which is a second interface object). In some feasible implementation manners, there are multiple second interface objects (for example, when there are three or more interface objects on the interface, one of which is a first interface object, and any other interface object of which except the first interface object is a second interface object). Moreover, when there are multiple second interface objects, the obtaining module 33 needs to obtain the second interface object more than once according to the preset rule, and the searching module 34 needs to search for the display position for the second interface object each time when the obtaining module 33 obtains the second interface object.
In some feasible implementation manners, the preset rule includes any rule, as long as the rule may be used to appoint order of obtaining the second interface object, such as: obtaining the second interface object according to height order from high to low; or obtaining the second interface object according to width order from wide to narrow; or obtaining the second interface object according to area order from big to small; or obtaining the second interface object according to height order from low to high; or obtaining the second interface object according to width order from narrow to wide; or, according to area order from small to big; or, in a case with an equal height, obtaining the second interface object according to width order from wide to narrow; or, in a case with an equal width, obtaining the second interface object according to height order from high to low.
In some feasible implementation manners, the embodiment of the present invention may indicate the display position of the interface object on the interface through coordinates on the interface, where the coordinates are expressed in multiple forms, such as, according to vertex coordinates of the interface area (pixel coordinates of four vertexes of the interface area), or according to row and column coordinates occupied by the interface area (a starting row and a starting column of the interface area, a height in the row direction (the number of rows extending from the starting row), and a width in the column direction (the number of columns extending from the starting column)).
The following takes the row and column coordinates occupied by the interface area as an example, to describe an expression manner of the display position of the interface object on the interface. For example, referring to
In some feasible implementation manners, the searching module 34 specifically searches for a position by taking the first row and the first column of the interface area as a searching starting point, and by moving in a manner of increasing a row sequence number by one sequentially or increasing a column sequence number by one sequentially, until the display area which may be used to display the second interface object is found through searching. Certainly, in a specific implementation, the searching module 34 may also take any other position on the interface as the searching starting point. Certainly, in addition, the searching module 34 may further search for an idle area in a historical record according to a set rule (the rule may be similar to the rule for obtaining the second interface object, and details are not repeatedly described herein), until the display area which may be used to display the second interface object is found through searching.
The second updating module 35 is configured to update a display position of the second interface object according to the display position found through searching by the searching module 34.
It should be noted that, display positions of all interface objects are saved in preset positions, for example: the display positions of all the interface objects may be saved in a preset XML file; or may also be saved in a preset data sheet. As for a storage manner, reference may be made to a specific implementation of the prior art, and details are not repeatedly described herein. Therefore, the first updating module and the second updating module are configured to update the display positions of the first interface object and the second interface object in a preset saving position of the display positions.
The displaying module 36 is configured to display all the interface objects on the interface according to the display positions of all the interface objects.
When the interface object is displayed on the interface, the displaying module 36 may read the display positions of all the interface objects on the interface from the foregoing preset positions, and all the interface objects are displayed on the interface. As for a specific reading and displaying manner, reference may be made to a specific implementation of the prior art, and details are not repeatedly described herein.
With reference to
Referring to (a1) of
In a specific implementation, because according to the embodiment of the present invention, the display positions of the first interface object and the second interface object on the interface are both updated, a moving range of the first interface object may be not limited. Therefore, in the present invention, it is implemented that the first interface object moves to any position on the interface. Specifically, reference may be made to a moving display effect diagram of a first interface object in other scenarios of
It can be seen from the foregoing that, in some feasible implementation manners of the present invention, the instruction for moving the first interface object on the interface from the first area to the second area is received; the display position of the first interface object on the interface is updated to the second area according to the received instruction; the second interface object is obtained according to the preset rule; the display position for the second interface object is searched for in the entire interface range on the interface except the second area, where the second interface object is the interface object on the interface except the first interface object; the display position of the second interface object is updated according to the display position found through searching; and all the interface objects are displayed on the interface according to the display positions of all the interface objects. Because in the embodiment of the present invention, the display positions of the first interface object and the second interface object on the interface are both updated, a moving range of the first interface object may be not limited. Therefore, in the present invention, it is implemented that the first interface object moves to any position on the interface, which improves user experience.
The receiving module 41 is configured to receive an instruction for moving a first interface object on an interface from a first area to a second area.
In a specific implementation, the second area in the embodiment of the present invention may be any area, which may be used to display the first interface object, on the interface except the first area.
In a specific implementation, the interface object in the embodiment of the present invention includes any icon which may be displayed on the interface, where the interface may be a startup desktop or an application program interface after entering an application program; the interface object may be a desktop widget Widget on the desktop and an application shortcut Shortcut on the desktop; and the interface object may also be a widget or a shortcut on an opened application program interface.
The first updating module 42 is configured to update, according to the instruction received by the receiving module 41, a display position of the first interface object on the interface to the second area.
The obtaining module 43 is configured to obtain a second interface object according to a preset rule.
The historical determining module 44 is configured to determine whether a historical display position of the second interface object obtained by the obtaining module 43 is an available display area, send the historical display position as the display position of the second interface object to the second updating module 46 when the historical display position of the second interface object is the available display area; and start the searching module 45 when the historical display position of the second interface object is an occupied display area.
The searching module 45 is configured to search for, in an entire interface range on the interface except the second area, a display position for the second interface object obtained by the obtaining module 43.
In a specific implementation, the second interface object is an interface object on the interface except the first interface object. In some feasible implementation manners, there may be one second interface object (for example, when there are only two interface objects on the interface, one of which is a first interface object and the other of which is a second interface object). In some feasible implementation manners, there are multiple second interface objects (for example, when there are three or more interface objects on the interface, one of which is a first interface object, and any other interface object of which except the first interface object is a second interface object). Moreover, when there are multiple second interface objects, the obtaining module 43 needs to obtain the second interface object more than once according to the preset rule, and each time when the obtaining module 43 obtains the second interface object, the historical determining module 44 needs to determine whether the historical display position of the second interface object is the available display area; and send, when a determining result is yes, the historical display position taken as the display position of the second interface object to the second updating module 46; or otherwise, notify the searching module 45 to search for, in an entire interface range on the interface except the second area, the display position for the second interface object.
In some feasible implementation manners, the preset rule includes any rule, as long as the rule may be used to appoint order of obtaining the second interface object, such as: obtaining the second interface object according to height order from high to low; or obtaining the second interface object according to width order from wide to narrow; or obtaining the second interface object according to area order from big to small; or obtaining the second interface object according to height order from low to high; or obtaining the second interface object according to width order from narrow to wide; or, according to area order from small to big; or, in a case with an equal height, obtaining the second interface object according to width order from wide to narrow; or, in a case with an equal width, obtaining the second interface object according to height order from high to low.
In some feasible implementation manners, the embodiment of the present invention may indicate the display position of the interface object on the interface through coordinates on the interface, where the coordinates are expressed in multiple forms, such as, according to vertex coordinates of the interface area (pixel coordinates of four vertexes of the interface area), or according to row and column coordinates occupied by the interface area (a starting row and a starting column of the interface area, a height in the row direction (the number of rows extending from the starting row), and a width in the column direction (the number of columns extending from the starting column)).
The following takes the row and column coordinates occupied by the interface area as an example, to describe an expression manner of the display position of the interface object on the interface. For example, referring to
In some feasible implementation manners, the searching module 45 specifically searches for a position by taking the first row and the first column of the interface area as a searching starting point, and by moving in a manner of increasing a row sequence number by one sequentially or increasing a column sequence number by one sequentially, until the display area which may be used to display the second interface object is found through searching. Certainly, in a specific implementation, the searching module 45 may also take any other position on the interface as the searching starting point. Certainly, in addition, the searching module 45 may further search for an idle area in a historical record according to a set rule (the rule may be similar to the rule for obtaining the second interface object, and details are not repeatedly described herein), until the display area which may be used to display the second interface object is found through searching.
In the embodiment of the present invention, when the historical display position of the second interface object is the available display area, the historical determining module 44 takes the historical display position as the display position of the second interface object, which thereby saves a procedure for searching for the display position for the second interface object, and improves efficiency of moving the first interface object.
The second updating module 46 is configured to update a display position of the second interface object according to the display position found by the searching module 45.
It should be noted that, display positions of all interface objects are saved in preset positions, for example: the display positions of all the interface objects may be saved in a preset XML file; or may also be saved in a preset data sheet. As for a storage manner, reference may be made to a specific implementation of the prior art, and details are not repeatedly described herein. Therefore, the first updating module and the second updating module are configured to update the display positions of the first interface object and the second interface object in a preset saving position of the display positions.
The displaying module 47 is configured to display all interface objects on the interface according to display positions of all the interface objects.
When the interface object is displayed on the interface, the displaying module 36 may read the display positions of all the interface objects on the interface from the foregoing preset positions, and all the interface objects are displayed on the interface. As for a specific reading and displaying manner, reference may be made to a specific implementation of the prior art, and details are not repeatedly described herein.
With reference to
Referring to (a1) of
In a specific implementation, because according to the embodiment of the present invention, the display positions of the first interface object and the second interface object on the interface are both updated, a moving range of the first interface object may be not limited. Therefore, in the present invention, it is implemented that the first interface object moves to any position on the interface. Specifically, reference may be made to a moving display effect diagram of a first interface object in other scenarios of
It can be seen from the foregoing that, in some feasible implementation manners of the present invention, the instruction for moving the first interface object on the interface from the first area to the second area is received; the display position of the first interface object on the interface is updated to the second area according to the received instruction; the second interface object is obtained according to the preset rule; the display position for the second interface object is searched for in the entire interface range on the interface except the second area, where the second interface object is the interface object on the interface except the first interface object; the display position of the second interface object is updated according to the display position found through searching; and all the interface objects are displayed on the interface according to the display positions of all the interface objects. Because in the embodiment of the present invention, the display positions of the first interface object and the second interface object on the interface are both updated, a moving range of the first interface object may be not limited. Therefore, in the present invention, it is implemented that the first interface object moves to any position on the interface, which improves user experience.
The receiving apparatus 51 is configured to receive an instruction for moving a first interface object on an interface from a first area to a second area.
In a specific implementation, the second area in the embodiment of the present invention may be any area, which may be used to display the first interface object, on the interface except the first area.
In a specific implementation, the interface object in the embodiment of the present invention includes any icon which may be displayed on the interface, where the interface may be a startup desktop or an application program interface after entering an application program; the interface object may be a desktop widget Widget on the desktop and an application shortcut Shortcut on the desktop; and the interface object may also be a widget or a shortcut on an opened application program interface.
The processor 52 is configured to update, according to the instruction received by the receiving apparatus 51, a display position of the first interface object on the interface to the second area; obtain a second interface object according to a preset rule; search for, in an entire interface range on the interface except the second area, the display position for the second interface object; and update the display position of the second interface object according to the display position found through searching, where the second interface object is an interface object on the interface except the first interface object.
In a specific implementation, the second interface object is an interface object on the interface except the first interface object. In some feasible implementation manners, there may be one second interface object (for example, when there are only two interface objects on the interface, one of which is a first interface object and the other of which is a second interface object). In some feasible implementation manners, there are multiple second interface objects (for example, when there are three or more interface objects on the interface, one of which is a first interface object, and any other interface object of which except the first interface object is a second interface object). Moreover, when there are multiple second interface objects, the processor 52 needs to obtain the second interface object more than once according to the preset rule, and search for the display position for the second interface object each time when the second interface object is obtained.
In some feasible implementation manners, the preset rule includes any rule, as long as the rule may be used to appoint order of obtaining the second interface object: obtaining the second interface object according to height order from high to low; or obtaining the second interface object according to width order from wide to narrow; or obtaining the second interface object according to area order from big to small; or obtaining the second interface object according to height order from low to high; or obtaining the second interface object according to width order from narrow to wide; or, according to area order from small to big; or, in a case with an equal height, obtaining the second interface object according to width order from wide to narrow; or, in a case with an equal width, obtaining the second interface object according to height order from high to low. Which kind of manner is specifically adopted should be determined according to an actual requirement, which is not specifically limited in the embodiment.
In some feasible implementation manners, the embodiment of the present invention may indicate the display position of the interface object on the interface through coordinates on the interface, where the coordinates are expressed in multiple forms, such as, according to vertex coordinates of the interface area (pixel coordinates of four vertexes of the interface area), or according to row and column coordinates occupied by the interface area (a starting row and a starting column of the interface area, a height in the row direction (the number of rows extending from the starting row), and a width in the column direction (the number of columns extending from the starting column)).
The following takes the row and column coordinates occupied by the interface area as an example, to describe an expression manner of the display position of the interface object on the interface. For example, referring to
In some feasible implementation manners, the processor 52 specifically searches for a position by taking the first row and the first column of the interface area as a searching starting point, and by moving in a manner of increasing a row sequence number by one sequentially or increasing a column sequence number by one sequentially, until the display area which may be used to display the second interface object is found through searching. Certainly, in a specific implementation, the processor 52 may also take any other position on the interface as the searching starting point. Certainly, in addition, the processor 52 may further search for an idle area in a historical record according to a set rule (the rule may be similar to the rule for obtaining the second interface object, and details are not repeatedly described herein), until the display area which may be used to display the second interface object is found through searching.
In some feasible implementation manners, after obtaining the second interface object according to the preset rule, the processor 52 is further configured to determine whether a historical display position of the second interface object is an available display area, and when the historical display position of the second interface object is the available display area, take the historical display position as the display position of the second interface object; and when the historical display position of the second interface object is an occupied display area, search for, in the entire interface range on the interface except the second area, the display position for the second interface object. When the historical display position of the second interface object is the occupied display area, a manner of searching for, in the entire interface range on the interface except the second area, the display position for the second interface object may also be that: The processor 52 specifically searches for a position by taking a first row and a first column of the interface area as a searching starting point, and by moving in a manner of increasing a row sequence number by one sequentially or increasing a column sequence number by one sequentially, until a display area which may be used to display the second interface object is found through searching. Certainly, in a specific implementation, the processor 52 may also take any other position on the interface as the searching starting point. Certainly, in addition, the processor 52 may further search for an idle area in a historical record according to a set rule (the rule may be similar to the rule for obtaining the second interface object, and details are not repeatedly described herein), until the display area which may be used to display the second interface object is found through searching. In this case, when the historical display position of the second interface object is the available display area, the processor 52 takes the historical display position as the display position of the second interface object, which thereby saves a procedure for searching for the display position for the second interface object, and improves efficiency of moving the first interface object.
The display 53 is configured to display all interface objects on the interface according to display positions of all the interface objects which are processed by the processor 52.
It should be noted that, the display positions of all the interface objects are saved in preset positions, for example: the display positions of all the interface objects may be saved in a preset XML file; or may also be saved in a preset data sheet. As for a storage manner, reference may be made to a specific implementation of the prior art, and details are not repeatedly described herein. Therefore, the first updating module and the second updating module are configured to update the display positions of the first interface object and the second interface object in a preset saving position of the display positions.
When the interface object is displayed on the interface, the display 53 may read the display positions of all the interface objects on the interface from the foregoing preset positions, and all the interface objects are displayed on the interface. As for a specific reading and displaying manner, reference may be made to a specific implementation of the prior art, and details are not repeatedly described herein.
With reference to
Referring to (a1) of
In some feasible implementation manners, when obtaining the second interface object according to height order from high to low, the processor 52 obtains the B3 first (“2*2” indicates that the B3 has “a width of two columns and a height of two rows”), or may also directly search for the position by taking the first row and the first column of the interface area as the searching starting point, and by moving in the manner of increasing the row sequence number by one sequentially or increasing the column sequence number by one sequentially, until a display area which may be used to display the B3 (that is, a display area as shown in (a3)) is found through searching without the need of determining whether the historical display position of the B3 is the available display area. Certainly, the processor 52 may also find the display area shown in (a3), which is taken as the display position of the B3, in a manner of searching for a historical idle area. As for other second interface objects (B1, B2, C1, C2, D1, D2, D3, D4) on the interface, display positions may be searched for in a same manner of searching for the display position of the B3, and details are not repeatedly described herein.
In a specific implementation, the receiving apparatus 51 of the embodiment may perform a function of the receiving module in
What are listed in the foregoing are only exemplary embodiments of the present invention, but are not intended to limit the scope of the claims of the present invention. Therefore, any equivalent variation made according to the claims of the present invention shall still fall within the scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
201310012680.4 | Jan 2013 | CN | national |