CN106484219B - Icon moving method based on grid algorithm - Google Patents
Icon moving method based on grid algorithm Download PDFInfo
- Publication number
- CN106484219B CN106484219B CN201610832855.XA CN201610832855A CN106484219B CN 106484219 B CN106484219 B CN 106484219B CN 201610832855 A CN201610832855 A CN 201610832855A CN 106484219 B CN106484219 B CN 106484219B
- Authority
- CN
- China
- Prior art keywords
- icon
- icons
- main interface
- page
- grid
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/04817—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
Abstract
The invention relates to the technical field of computer application, and provides an icon moving method based on a grid algorithm, which comprises the following steps: adding new icon in main interface to make main interface exist originallyThe icon of (2) is at the moving position of the page; deleting the icons from the main interface, and prompting the rest icons to move positions on the page; and moving the icon on the same page of the main interface, and exchanging the icon position. Preferably, before the main interface adds a new icon, the main interface recalculates the number of the added or deleted icons; divide the main interface equally intonOrNA grid of a plurality of grids, each grid having a grid,norNThe value of (2) is equal to the number of icons, and the position of each grid is calculated; and calculating the sequence of a new icon list and the new position of each icon according to the existing icon sequence of the page and the positions of the newly added or deleted icons, and moving each icon to the corresponding grid position. The method and the device solve the problems that in the prior art, the position of each page of the icon of the main interface is fixed, and the number of the icons is limited.
Description
Technical Field
The invention relates to the technical field of computer application, in particular to an icon moving method based on a grid algorithm.
Background
For mobile operating systems including tablet computers and mobile phones, due to the openness of Android, most domestic mobile phone and tablet computer manufacturers adopt a secondary-development operating system based on the Android operating system.
At present, a large amount of application software is often installed on a smart phone, and a user can adjust the position of an icon according to personal preference, use habits and the like. The current Android version adopts a method of reserving a position in advance, waiting for a user to add an icon into the empty position, and if the icon is not added, the position is blank. The method has the defects that the positions of the icons are preset in advance, the number of the icons placed on each page is determined, and a user cannot add and set the number of the icons on each page at will according to the needs of the user.
Therefore, there is a need in the field of computer application technology for an icon moving method based on a grid algorithm, which can recalculate the number of grids, the position of each grid and the corresponding placement of each icon to a new grid position after adding or deleting icons on the same page through the grid algorithm, thereby solving the problems of the prior art that the position of each icon on each page of a main interface is fixed and the number of icons is limited.
Disclosure of Invention
In order to solve the above problems, the present invention provides an icon moving method based on a grid algorithm, and the technical scheme is as follows:
an icon moving method based on a grid algorithm comprises the following steps:
1) adding a new icon in the main interface to enable the icon which originally exists in the main interface to move in the position of the page;
2) deleting the icons from the main interface, and prompting the rest icons to move positions on the page;
3) and moving the icon on the same page of the main interface, and exchanging the icon position.
Preferably, in the above method for moving an icon based on a grid algorithm, 1) adding a new icon into the main interface, and causing the icon originally existing in the main interface to move to the current page includes:
a) before the main interface adds a new icon, recalculating the number of icons after the addition of the new icon by the main interface;
b) prompting the rest icons to move positions on the page according to the icon number calculated by the a).
Preferably, in the above method for moving icons based on a grid algorithm, the step b) of prompting the remaining icons to move positions on the page based on the number of icons calculated in the step a) includes:
c) dividing the main interface into n grids equally according to the number of the icons calculated in the step a), wherein the value of n is equal to the number of the icons, and calculating the position of each grid;
d) calculating the sequence of a new icon list according to the existing icon sequence of the page and the position of the newly added icon;
e) and calculating the new position of each icon of the page according to the c) position of each grid and the d) sequence of the new icon list, and moving each icon of the page to the corresponding grid position.
Preferably, in the above method for moving icons based on a grid algorithm, c) dividing the main interface equally into n grids according to the number of icons calculated in a), where the value of n is equal to the number of icons, and the specific formula for calculating the position of each grid is as follows:
assuming that the width of the main interface is x and needs to be divided into n grids, the central point of each grid is calculated by the following specific formula:
x(i)=x/n×i+x/(n×2)
wherein x is(i)Represents the ithThe value of the central point of the grid, i, is 1, 2 … n, and n is a positive integer.
Preferably, in the above method for moving icons based on a grid algorithm, 2) deleting icons from the main interface, and causing the remaining icons to move to the position on the page includes:
A) before the icons are deleted on the main interface, recalculating the number of the icons after the icons are deleted on the main interface;
B) prompting the rest icons to move positions on the page according to the icon number calculated by A).
Preferably, in the above method for moving icons based on a grid algorithm, B) prompting the remaining icons to move positions on the page based on the number of icons calculated by a) includes:
C) dividing the main interface into N grids equally according to the number of the icons calculated by the A), wherein the value of N is equal to the number of the icons, and calculating the position of each grid;
D) calculating the sequence of a new icon list according to the existing icon sequence of the page and the position of the deleted icon;
E) and calculating the new position of each icon of the page according to the C) position of each grid and the D) sequence of the new icon list, and moving each icon of the page to the corresponding grid position.
The invention has the beneficial effects that:
according to the invention, through a grid algorithm, after the icons are added or deleted on the same page, the number of grids and the position of each grid can be recalculated, and each icon is correspondingly placed at a new grid position, so that the problems that the position of each page of icon of a main interface is fixed and the number of icons is limited in the prior art are solved.
Drawings
The invention is described in detail below with reference to the following figures and detailed description:
fig. 1 is a flowchart of a method for adding new icon movement based on a grid algorithm according to the present invention.
Detailed Description
In order to make the measures, features, objectives and functions of the present invention easy to be understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying 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, 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.
Example 1:
an icon moving method based on a grid algorithm comprises the following steps:
1) adding a new icon in the main interface to enable the icon which originally exists in the main interface to move in the position of the page;
2) deleting the icons from the main interface, and prompting the rest icons to move positions on the page;
3) and moving the icon on the same page of the main interface, and exchanging the icon position.
Example 2:
an icon moving method based on a grid algorithm comprises the following steps:
fig. 1 is a flowchart of a method for adding new icon movement based on a grid algorithm according to the present invention.
As shown in fig. 1, 1) adding a new icon into the main interface to cause the icon that originally exists in the main interface to move to the position on the page specifically includes:
a) before the main interface adds a new icon, recalculating the number of icons after the addition of the new icon by the main interface;
b) prompting the rest icons to move positions on the page according to the icon number calculated by the a), which specifically comprises the following steps:
c) dividing the main interface into n grids equally according to the number of the icons calculated by the a), wherein the value of n is equal to the number of the icons, and the position of each grid is calculated by the following specific formula:
firstly, assuming that the width of the main interface is x and the main interface needs to be divided into n grids, the central point of each grid is calculated, and the specific formula is as follows:
x(i)=x/n×i+x/(n×2)
wherein x is(i)Representing the central point of the ith grid, wherein the value of i is 1, 2 … n, and n is a positive integer;
d) calculating the sequence of a new icon list according to the existing icon sequence of the page and the position of the newly added icon;
e) calculating the new position of each icon of the page according to the c) position of each grid and the d) sequence of the new icon list, and moving each icon of the page to the corresponding grid position;
2) deleting the icons from the main interface, and prompting the rest icons to move positions on the page, wherein the method specifically comprises the following steps:
A) before the icons are deleted on the main interface, recalculating the number of the icons after the icons are deleted on the main interface;
B) prompting the rest icons to move positions on the page according to the icon number calculated by A), which specifically comprises the following steps:
C) dividing the main interface into N grids equally according to the number of the icons calculated by the A), wherein the value of N is equal to the number of the icons, and calculating the position of each grid;
D) calculating the sequence of a new icon list according to the existing icon sequence of the page and the position of the deleted icon;
E) calculating a new position of each icon of the page according to the position of each grid in C) and the sequence of the new icon list in D), and moving each icon of the page to the corresponding grid position;
3) and moving the icon on the same page of the main interface, and exchanging the icon position.
According to the invention, through a grid algorithm, after the icons are added or deleted on the same page, the number of grids and the position of each grid can be recalculated, and each icon is correspondingly placed at a new grid position, so that the problems that the position of each page of icon of a main interface is fixed and the number of icons is limited in the prior art are solved.
The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are given by way of illustration of the principles of the present invention, and that various changes and modifications may be made without departing from the spirit and scope of the invention as defined by the appended claims. The scope of the invention is defined by the appended claims and equivalents thereof.
Claims (5)
1. An icon moving method based on a grid algorithm is characterized by comprising the following steps:
1) adding a new icon in the main interface to enable the icon which originally exists in the main interface to move in the position of the page; the method comprises the following steps: a) before the main interface adds a new icon, recalculating the number of icons after the addition of the new icon by the main interface;
b) prompting the rest icons to move positions on the page according to the number of the icons calculated in the step a);
2) deleting the icons from the main interface, and prompting the rest icons to move positions on the page;
3) and moving the icon on the same page of the main interface, and exchanging the icon position.
2. The method of claim 1, wherein b) prompting the remaining icons to move positions on the page according to the number of icons calculated by a) comprises:
c) dividing the main interface into n grids equally according to the number of the icons calculated in the step a), wherein the value of n is equal to the number of the icons, and calculating the position of each grid;
d) calculating the sequence of a new icon list according to the existing icon sequence of the page and the position of the newly added icon;
e) and calculating a new position of each icon of the page according to the position of each grid of the c) and the sequence of the new icon list of the d), and moving each icon of the page to the corresponding grid position.
3. The icon moving method based on the grid algorithm as claimed in claim 2, wherein c) dividing the main interface into n grids according to the number of icons calculated by a), wherein the value of n is equal to the number of icons, and the specific formula for calculating the position of each grid is as follows:
assuming that the width of the main interface is x and needs to be divided into n grids, the central point of each grid is calculated by the following specific formula:
x(i)=x/n×i+x/(n×2)
wherein x is(i)The central point of the ith grid is shown, the value of i is 1, 2 … n, and n is a positive integer.
4. The method of claim 1, wherein 2) deleting icons from the main interface and causing the remaining icons to move to the position on the page comprises:
A) before the icons are deleted on the main interface, recalculating the number of the icons after the icons are deleted on the main interface;
B) prompting the rest icons to move positions on the page according to the icon number calculated by the A).
5. The method of claim 4, wherein B) prompting the remaining icons to move to the current page according to the number of icons calculated by A) comprises:
C) dividing the main interface into N grids equally according to the number of the icons calculated by the A), wherein the value of N is equal to the number of the icons, and calculating the position of each grid;
D) calculating the sequence of a new icon list according to the existing icon sequence of the page and the position of the deleted icon;
E) and calculating a new position of each icon of the page according to the position of each grid in the step C) and the sequence of the new icon list in the step D), and moving each icon of the page to the corresponding grid position.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610832855.XA CN106484219B (en) | 2016-09-19 | 2016-09-19 | Icon moving method based on grid algorithm |
PCT/CN2016/105743 WO2018049723A1 (en) | 2016-09-19 | 2016-11-14 | Method of moving icon based on grid algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610832855.XA CN106484219B (en) | 2016-09-19 | 2016-09-19 | Icon moving method based on grid algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106484219A CN106484219A (en) | 2017-03-08 |
CN106484219B true CN106484219B (en) | 2021-02-26 |
Family
ID=58268742
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610832855.XA Active CN106484219B (en) | 2016-09-19 | 2016-09-19 | Icon moving method based on grid algorithm |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106484219B (en) |
WO (1) | WO2018049723A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107179873B (en) * | 2017-06-13 | 2020-02-11 | 中科创达软件科技(深圳)有限公司 | One-hand operation method and device based on application program interface |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833418A (en) * | 2010-04-28 | 2010-09-15 | 华为终端有限公司 | Method and device for adding icon in interface and mobile terminal |
CN102789353A (en) * | 2011-05-20 | 2012-11-21 | 腾讯科技(深圳)有限公司 | Method and device for operating desktop objects on touch screen mobile devices |
CN104423841A (en) * | 2013-09-11 | 2015-03-18 | 中兴通讯股份有限公司 | Method and device for dragging icon |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104834430A (en) * | 2014-02-12 | 2015-08-12 | 宇龙计算机通信科技(深圳)有限公司 | Method and apparatus for moving icons |
-
2016
- 2016-09-19 CN CN201610832855.XA patent/CN106484219B/en active Active
- 2016-11-14 WO PCT/CN2016/105743 patent/WO2018049723A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833418A (en) * | 2010-04-28 | 2010-09-15 | 华为终端有限公司 | Method and device for adding icon in interface and mobile terminal |
CN102789353A (en) * | 2011-05-20 | 2012-11-21 | 腾讯科技(深圳)有限公司 | Method and device for operating desktop objects on touch screen mobile devices |
CN104423841A (en) * | 2013-09-11 | 2015-03-18 | 中兴通讯股份有限公司 | Method and device for dragging icon |
Also Published As
Publication number | Publication date |
---|---|
CN106484219A (en) | 2017-03-08 |
WO2018049723A1 (en) | 2018-03-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11301126B2 (en) | Icon control method and terminal | |
CN110069219B (en) | Data storage method and system, electronic equipment and storage medium | |
US9070120B2 (en) | Identifying and displaying a set of high priority contacts on a display device | |
TW201222405A (en) | Method for configuring view of city in weather forecast application | |
WO2013189224A1 (en) | Cursor display position determination method and device | |
CN112214142B (en) | Application information display method and device, electronic equipment and storage medium | |
EP3001290A1 (en) | Data reporting method, apparatus and terminal device | |
EP3495950A1 (en) | Method and device for managing background applications of terminal | |
WO2016183918A1 (en) | Method and device for processing storage space | |
CN104503668A (en) | Method, system and terminal for generating menu shortcuts | |
CN106250180B (en) | A kind of ODEX optimal control method and mobile terminal | |
WO2019149058A1 (en) | Information pushing method, apparatus and device | |
CN106484219B (en) | Icon moving method based on grid algorithm | |
CN110555086A (en) | Method and device for attributing resource points in grid | |
US11656761B2 (en) | Touch hotspot adjustment method, apparatus, and device, and touchscreen terminal device | |
CN102520857A (en) | Mobile phone screen unlocking device and unlocking method thereof | |
CN111045561A (en) | Display method and device of function keys, terminal equipment and storage medium | |
CN109150370B (en) | Method for determining size of transmission block and communication equipment | |
CN105700827A (en) | Android APP migration method and system | |
CN104468972A (en) | Incoming call processing method | |
CN110019538B (en) | Data table switching method and device | |
CN104461354B (en) | A kind of terminal | |
CN104636041A (en) | Multi-file quick selection method and system based on touch screen | |
CN111885614B (en) | CORS base station networking method, device and storage medium | |
CN110134361B (en) | Volume adjusting method of device, computer device and computer-readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: Room 3001, building 22, No. 500 Jiajian Road, Jiading District, Shanghai Patentee after: Shanghai brocade Technology Group Co.,Ltd. Address before: Room 3001, building 22, No. 500 Jiajian Road, Jiading District, Shanghai Patentee before: SHANGHAI PUTAO TECHNOLOGY Co.,Ltd. |
|
CP01 | Change in the name or title of a patent holder |