CN109298808A - A kind of method and server for realizing that icon icon is rationally shown in terminal - Google Patents
A kind of method and server for realizing that icon icon is rationally shown in terminal Download PDFInfo
- Publication number
- CN109298808A CN109298808A CN201810709801.3A CN201810709801A CN109298808A CN 109298808 A CN109298808 A CN 109298808A CN 201810709801 A CN201810709801 A CN 201810709801A CN 109298808 A CN109298808 A CN 109298808A
- Authority
- CN
- China
- Prior art keywords
- icon
- columns
- default
- displaying
- total quantity
- 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.)
- Pending
Links
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
-
- 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/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04847—Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the present invention provides a kind of method and server for realizing that icon icon is rationally shown in terminal, this method comprises: obtaining the first default columns and the second default columns;The total quantity of the icon icon shown needed for obtaining, the total quantity of the icon icon shown needed for more described and the first default columns, and obtain comparison result;According to the comparison result, optimal displaying columns is obtained according to the total quantity of the icon icon of the required displaying and the first default columns or the second default columns;Realize icon icon in the reasonable displaying of terminal according to the total quantity of the icon icon of the required displaying and the optimal displaying columns.The embodiment of the present invention automatically configures line number and columns according to the total quantity of the icon icon of required displaying in a program;When the total quantity of the icon icon of required displaying changes, change line number and columns that can be adaptive carry out most reasonable show;And it can be to avoid the problem for being easy to cause mistake by human configuration.
Description
Technical field
The present embodiments relate to interface display technical fields, and in particular to a kind of realization icon icon is rationally opened up in terminal
The method and server shown.
Background technique
Due to the terminals such as smart phone present content limited by screen size, so on specific screen how
More natural, more reasonably displaying content, needs are designed.For example, when needing to show multiple icon figures in a module
When mark, need to design how these icons are put according to the sum of icon icon, can more rationally, be more in line with user's
Demand.Solve the problems, such as that this scheme mainly has at present: the line number and columns or front end fixation that backend arrangement icon icon is shown are write
The line number and columns that dead icon icon is shown.
In the prior art, the line number and columns or front end fixation that no matter backend arrangement icon icon is shown write dead icon
The line number and columns that icon is shown, all have and lack flexibility and insecure defect.For example, work as the icon of certain modules exhibit
It when quantity changes, requires to be reconfigured every time or code revision, increases development amount, inefficiency;And
And due to be by developer's manual configuration, if developer's configuration error, the body of user on line will be directly affected
It tests, causes reliability poor.In addition, if front end is fixed to write the line number and columns that dead icon icon is shown, if intelligence is eventually
The application program etc. at end is not updated, also can not be at end even if then front end changes the line number and columns of icon icon displaying
End is responded in time.
Summary of the invention
To solve the problems, such as that icon icon shows flexibility, poor reliability in the prior art, the embodiment of the present invention provides one
Kind realizes the method and system that icon icon is rationally shown in terminal.
In a first aspect, the embodiment of the present invention provides a kind of method realizing icon icon and rationally showing in terminal, this method
It include: to obtain the first default columns and the second default columns;Wherein, the described first default columns is indicated according to the big of icon icon
Small identified, icon icon shown in terminal a line maximum quantity;The second default columns indicates to work as required displaying
The total quantity of icon icon when being less than or equal to the first default columns, really according to the size of icon icon institute
Fixed, icon icon shown in terminal a line maximum quantity;The total quantity of the icon icon shown needed for obtaining, compares institute
The total quantity of the icon icon shown needed for stating and the first default columns, and obtain comparison result;It is relatively tied according to described
Fruit, when the total quantity of the icon icon of the required displaying is greater than the first default columns, according to the required displaying
The total quantity of icon icon and the first default columns obtain optimal displaying columns;When the icon icon of the required displaying
When total quantity is less than or equal to the first default columns, according to the total quantity of the icon icon of the required displaying and described the
Two default columns obtain optimal displaying columns;According to the total quantity of the icon icon of the required displaying and the optimal displaying column
Number realizes icon icon in the reasonable displaying of terminal.
Second aspect, the embodiment of the present invention provide a kind of server realizing icon icon and rationally showing in terminal, the clothes
Business device includes: configuration parameter acquiring unit, is specifically used for: obtaining the first default columns and the second default columns;Wherein, described
One default columns is indicated according to determined by the size of icon icon, the maximum quantity of icon icon shown in terminal a line;
The second default columns indicates to be less than or equal to the described first default column when the total quantity of the icon icon of required displaying
When number, according to determined by the size of the icon icon, the maximum quantity of icon icon shown in terminal a line;Compare list
Member is specifically used for: the total quantity of the icon icon shown needed for obtaining, the total quantity of the icon icon shown needed for more described
With the described first default columns, and comparison result is obtained;Computing unit is specifically used for: according to the comparison result, when the institute
When the total quantity for the icon icon that need to be shown is greater than the first default columns, according to the total of the icon icon of the required displaying
Quantity and the first default columns obtain optimal displaying columns;Be less than when the total quantity of the icon icon of the required displaying or
When equal to the first default columns, obtained according to the total quantity of the icon icon of the required displaying and the second default columns
Take optimal displaying columns;It shows control unit, is specifically used for: according to the total quantity of the icon icon of the required displaying and described
It is optimal to show that columns realizes icon icon in the reasonable displaying of terminal.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, including memory and processor, the processor and
The memory completes mutual communication by bus;The memory, which is stored with, to be referred to by the program that the processor executes
It enables, the processor calls described program instruction to be able to carry out following method: obtaining the first default columns and the second default columns;
Wherein, the described first default columns is indicated according to determined by the size of icon icon, icon icon shown in terminal a line
Maximum quantity;The second default columns is indicated when the total quantity of the icon icon of required displaying is less than or equal to described
When the first default columns, according to determined by the size of the icon icon, the maximum of icon icon shown in terminal a line
Quantity;The total quantity of the icon icon shown needed for obtaining, the total quantity of icon icon shown needed for more described and described
First default columns, and obtain comparison result;According to the comparison result, when the total quantity of the icon icon of the required displaying
When greater than the first default columns, obtained according to the total quantity of the icon icon of the required displaying and the first default columns
Take optimal displaying columns;When the total quantity of the icon icon of the required displaying is less than or equal to the first default columns,
Optimal displaying columns is obtained according to the total quantity of the icon icon of the required displaying and the second default columns;According to described
The total quantity of the icon icon of required displaying and the optimal displaying columns realize icon icon in the reasonable displaying of terminal.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, are stored thereon with computer program,
The computer program realizes following method when being executed by processor: obtaining the first default columns and the second default columns;Wherein, institute
Stating the first default columns indicates according to determined by the size of icon icon, the maximum number of icon icon shown in terminal a line
Amount;The second default columns indicates to preset when the total quantity of the icon icon of required displaying is less than or equal to described first
When columns, according to determined by the size of the icon icon, the maximum quantity of icon icon shown in terminal a line;It obtains
The total quantity of the icon icon of required displaying, the total quantity of the icon icon shown needed for more described and the first default column
Number, and obtain comparison result;According to the comparison result, when the total quantity of the icon icon of the required displaying is greater than described the
When one default columns, optimal displaying is obtained according to the total quantity of the icon icon of the required displaying and the first default columns
Columns;When the total quantity of the icon icon of the required displaying is less than or equal to the first default columns, according to the institute
The total quantity for the icon icon that need to be shown and the second default columns obtain optimal displaying columns;According to the required displaying
The total quantity of icon icon and the optimal displaying columns realize icon icon in the reasonable displaying of terminal.
The embodiment of the present invention can automatically configure line number according to the total quantity of the icon icon of required displaying in a program
And columns;When the total quantity of the icon icon of required displaying changes, change line number and columns that can be adaptive be carried out
It is most reasonable to show;And it can be to avoid the problem for being easy to cause mistake by human configuration.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.
Fig. 1 is the method flow diagram that realization icon icon provided in an embodiment of the present invention is rationally shown in terminal;
Fig. 2 is the server architecture schematic diagram that realization icon icon provided in an embodiment of the present invention is rationally shown in terminal;
Fig. 3 is the structural schematic diagram of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, the technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
The embodiment of the present invention can be realized by server, wherein the server includes front-end server or rear end clothes
Business device.When being realized by front-end server, front-end server needs the icon shown needed for obtaining from back-end server to scheme
Target total quantity;When by back-end server to realize, back-end server finally realizes the displaying of terminal by front-end server
Control.Wherein, back-end server matches the exhibition for realizing the icon icon of terminal by front-end server or with front-end server
Show and belongs to the prior art.In the description of following embodiment, front-end server and back-end server will not be distinguished, and will directly be referred to as
For server.
In addition, being the particular display module progress for the display interface of terminal due in terminal display icon icon
The particular display module reduction of terminal is described as " terminal " for convenience of describing by control and displaying.
Fig. 1 is the method flow diagram that realization icon icon provided in an embodiment of the present invention is rationally shown in terminal.Such as Fig. 1 institute
Show, which comprises
Step 101 obtains the first default columns and the second default columns;Wherein, the described first default columns indicates basis
Determined by the size of icon icon, the maximum quantity of icon icon shown in terminal a line;The second default columns table
Show when the total quantity of the icon icon of required displaying is less than or equal to the first default columns, is schemed according to the icon
Determined by target size, the maximum quantity of icon icon shown in terminal a line;
Server obtains the first default columns and the second default columns, the first default columns are that preset configuration is good,
The second default columns is also possible to pre-configured.
Wherein, the described first default columns is indicated according to determined by the size of icon icon, shown in terminal a line
The maximum quantity of icon icon.Due to the limitation of screen size, the quantity of icon icon shown in terminal a line cannot nothing
Limit increases, for example in android system, the quantity with icon icon increases, and icon icon is caused to become smaller or icon
Interval between icon becomes smaller, and it is unreasonable that this all will lead to icon icon displaying in interface.So will multirow displaying icon figure
Mark, and to make the compact displaying in interface of icon icon, it is more reasonable show icon icon.According to icon icon itself
Size, be capable of determining that and at most show that several icon icons are reasonable in a row, it is possible thereby to which it is pre- to configure described first
If the value of columns.
The second default columns indicates to preset when the total quantity of the icon icon of required displaying is less than described first
When columns, according to determined by the size of the icon icon, the maximum quantity of icon icon shown in terminal a line.Work as exhibition
It when the total quantity of the icon icon shown is not more than the first default columns, for example is 5 when the first default columns, then
A line shows 5, and just not as good as being divided into two lines to show, a line shows 3, and a line shows 2, can seem more in this way in interface
Step up to gather, it is more friendly.Therefore, the icon icon for working as required displaying can be configured according to the size of the icon icon
Total quantity when being less than or equal to the first default columns, the maximum quantity of icon icon shown in terminal a line, i.e. institute
The second default columns is stated, if columns more default than described second is set as 3, then when the total quantity of the icon icon of required displaying
When less than the first default columns, the quantity of the icon icon shown in every row is up to 3.
The second default columns is less than or equal to the described first default columns;Since the described second default columns is in institute
When the total quantity for the icon icon that need to be shown is less than or equal to the first default columns, according to the big of the icon icon
Small identified, icon icon shown in terminal a line maximum quantity, therefore, the second default columns is necessarily not more than
The first default columns.
Step 102, obtain needed for show icon icon total quantity, it is more described needed for show icon icon it is total
Quantity and the first default columns, and obtain comparison result;
The total quantity of the icon icon shown needed for obtaining, for example the total quantity of the required icon icon shown is 6, if
The first default columns is 5, then the total quantity of the required icon icon shown and the first default columns, can
Know, the total quantity of the icon icon shown needed for described is greater than the described first default columns.
Step 103, according to the comparison result, when the total quantity of the icon icon of the required displaying is greater than described first
When default columns, obtains optimal displaying according to the total quantity of the icon icon of the required displaying and the first default columns and arrange
Number;When the total quantity of the icon icon of the required displaying is less than or equal to the first default columns, according to described required
The total quantity of the icon icon of displaying and the second default columns obtain optimal displaying columns;
According to the comparison result, when the total quantity of the icon icon of the required displaying is greater than the described first default columns
When, optimal displaying columns is obtained according to the total quantity of the icon icon of the required displaying and the first default columns;For example,
The optimal displaying columns can be the described first default columns.
According to the comparison result, when the total quantity of the icon icon of the required displaying is less than or equal to described first in advance
If when columns, obtaining optimal displaying according to the total quantity of the icon icon of the required displaying and the second default columns and arranging
Number;For example, the optimal displaying columns can be the described second default columns.
Step 104 realizes icon according to the total quantity and the optimal displaying columns of the icon icon of the required displaying
Reasonable displaying of the icon in terminal.
It is then that the optimal displaying columns shows the required displaying according to columns after the optimal displaying columns determines
Icon icon.Since the total quantity of the icon icon of required displaying determines, the columns of displaying determines that the line number then shown can be true
It is fixed.
If the total quantity of the icon icon of required displaying is N, the optimal displaying columns is n, then the line number shown is (N/
n)+1。
The displaying of every row can be carried out according to method in the prior art, such as successively show icon icon from left to right.By
This, can realize icon icon in terminal according to the total quantity and the optimal displaying columns of the icon icon of the required displaying
Reasonable displaying.
The embodiment of the present invention can automatically configure line number according to the total quantity of the icon icon of required displaying in a program
And columns;When the total quantity of the icon icon of required displaying changes, change line number and columns that can be adaptive be carried out
It is most reasonable to show;And it can be to avoid the problem for being easy to cause mistake by human configuration.
Further, based on the above embodiment, the total quantity of the icon icon according to the required displaying and described
First default columns obtains optimal displaying columns, realizes especially by following formula (1):
GetColumn=(N+ (N-1) //MAX_COLUMN) // (1+ (N-1) //MAX_COLUMN) (1)
Wherein, getColumn indicates that the optimal displaying columns, N indicate the sum of the required icon icon shown
Amount, MAX_COLUMN indicate the first default columns, // indicate to do quotient rounding operation.
According to the comparison result of the total quantity of the icon icon of the required displaying and the first default columns, when described
When the total quantity of the icon icon of required displaying is greater than the first default columns, according to the icon icon of the required displaying
Total quantity and the first default columns obtain optimal displaying columns.The optimal result for showing columns can specifically pass through formula
(1) it is calculated.
For example, the total quantity of the icon icon shown needed for described is 12, at this time institute if the first default columns is 5
The total quantity of the icon icon shown needed for stating is greater than the described first default columns, then needs to be calculated by formula (1) described
Optimal displaying columns, can be calculated the optimal result for showing columns is 4.Obviously, the arrangement of (4,4,4) is than (5,5,2)
It is more compact, more reasonable to arrange.
On the basis of the above embodiments, the embodiment of the present invention is greater than first in the total quantity of the icon icon of required displaying
It, can be by giving formula using the total quantity of the icon icon of required displaying and the first default columns as independent variable when default columns
The optimal displaying columns adapted to therewith is acquired, the flexibility and reasonability of the displaying of icon icon are effectively increased.
Further, based on the above embodiment, the total quantity of the icon icon according to the required displaying and described
Second default columns obtains optimal displaying columns, realizes especially by following formula (2):
GetColumn=(N+ (N-1) //MIN_COLUMN) // (1+ (N-1) //MIN_COLUMN) (2)
Wherein, getColumn indicates that the optimal displaying columns, N indicate the sum of the required icon icon shown
Amount, MIN_COLUMN indicate the second default columns, // indicate to do quotient rounding operation.
According to the comparison result of the total quantity of the icon icon of the required displaying and the first default columns, when described
When the total quantity of the icon icon of required displaying is less than or equal to the first default columns, according to the icon of the required displaying
The total quantity of icon and the second default columns obtain optimal displaying columns.The optimal result for showing columns can specifically lead to
Formula (2) is crossed to be calculated.
For example, the second default columns is 3 if the first default columns is 5, the icon icon shown needed for described
Total quantity 4, it is described at this time needed for show icon icon total quantity be less than the described first default columns, then need to pass through formula
(2) the optimal displaying columns is calculated, can be calculated the optimal result for showing columns is 2.Obviously, the row of (2,2)
Column show that 4 icons are more compact and reasonable than direct a line.
On the basis of the above embodiments, the embodiment of the present invention is less than or waits in the total quantity of the icon icon of required displaying
It, can be by giving using the total quantity of the icon icon of required displaying and the second default columns as independent variable when the first default columns
Determine formula and acquire the optimal displaying columns adapted to therewith, effectively increases the flexibility and reasonability of the displaying of icon icon.
The optimal calculation formula for showing columns can be with unified representation are as follows:
GetColumn=(N+ (N-1) //column) // (1+ (N-1) //column)
Wherein, getColumn indicates that the optimal displaying columns, N indicate the sum of the required icon icon shown
Amount, column indicate calculating parameter, // indicate to do quotient rounding operation.
Wherein, when the total quantity of the icon icon of the required displaying is greater than the described first default columns MAX_COLUMN
When, column=MAX_COLUMN;It is preset when the total quantity of the icon icon of the required displaying is less than or equal to described first
When columns MAX_COLUMN, column=MIN_COLUMN.
Table 1 be the described first default columns MAX_COLUMN=5, the second default columns MIN_COLUMN=3, it is described
The obtained optimal list for showing columns when being [1,20] of the total quantity of the icon icon of required displaying.
Table 1
Icon total quantity | Optimal displaying columns | Icon total quantity | Optimal displaying columns |
1 | 1 | 11 | 4 |
2 | 2 | 12 | 4 |
3 | 3 | 13 | 5 |
4 | 2 | 14 | 5 |
5 | 3 | 15 | 5 |
6 | 3 | 16 | 4 |
7 | 4 | 17 | 5 |
8 | 4 | 18 | 5 |
9 | 5 | 19 | 5 |
10 | 5 | 20 | 5 |
The embodiment of the present invention in program code by carrying out a data configuration, according to the icon icon of required displaying
Total quantity can dynamically configure the line number and columns of the displaying of icon icon, reduce the modification of front-end code and avoid the people of rear end
Work configuration, improves the working efficiency of developer;Optimal, most reasonable icon icon exhibition can be obtained according to given formula
Show columns, put icon icon more compact and reasonable, improves user experience.
Further, based on the above embodiment, in the first default columns of the acquisition and the second default columns, if judgement
Know that the described second default columns is not configured, then the described second default columns is equal to the described first default columns.
The first default columns and the second default columns can be pre-configured with simultaneously, can also only be matched in advance
The described first default columns is set, and the second default columns is not configured without configuration in the described second default columns
When, it is equal with the described first default columns to default the second default columns.
Because the second default columns is the total quantity in the icon icon when required displaying less than or equal to institute
When stating the first default columns, according to determined by the size of the icon icon, icon icon shown in terminal a line most
Big quantity;The value of the second default columns is less than or equal to the described first default columns.Described second default column are set
Number can to avoid the total quantity of the icon icon of the required displaying be less than or equal to the first default columns when, one
Row shows all icons, so that the displaying of icon icon is more beautiful and compact.
The second default columns presets columns and the first default columns phase without setting, system default second
Deng.In the first default columns of the acquisition and the second default columns, if judgement knows that the described second default columns is not matched
It sets, then the described second default columns is equal to the described first default columns.At this point, only need to be according to the icon of the required displaying
The total quantity of icon and the first default columns obtain optimal displaying columns.
On the basis of the above embodiments, the default when embodiment of the present invention is not configured by setting the second default columns
Equal with the first default columns, so that the realization process that icon icon is shown is more convenient, efficient, icon icon shows more clever
It is living.
Fig. 2 is the server architecture schematic diagram that realization icon icon provided in an embodiment of the present invention is rationally shown in terminal.
As shown in Fig. 2, the server includes configuration parameter acquiring unit 10, comparing unit 20, computing unit 30 and shows that control is single
Member 40, in which:
Configuration parameter acquiring unit 10 is specifically used for: obtaining the first default columns and the second default columns;Wherein, described
One default columns is indicated according to determined by the size of icon icon, the maximum quantity of icon icon shown in terminal a line;
The second default columns indicates to be less than or equal to the described first default column when the total quantity of the icon icon of required displaying
When number, according to determined by the size of the icon icon, the maximum quantity of icon icon shown in terminal a line;
Configuration parameter acquiring unit 10 obtains the first default columns and the second default columns, and the first default columns is pre-
If configured, the second default columns is also possible to pre-configured.Wherein, the described first default columns indicates basis
Determined by the size of icon icon, the maximum quantity of icon icon shown in terminal a line.According to icon icon itself
Size is capable of determining that and at most shows that several icon icons are reasonable in a row, it is possible thereby to which it is default to configure described first
The value of columns.The second default columns indicates to preset when the total quantity of the icon icon of required displaying is less than described first
When columns, according to determined by the size of the icon icon, the maximum quantity of icon icon shown in terminal a line.Work as exhibition
The total quantity of the icon icon shown be not more than the first default columns when, can according to the size of the icon icon,
The maximum quantity of icon icon shown in configurating terminal a line, i.e., the described second default columns.The second default columns is small
In or equal to the described first default columns.
Comparing unit 20 is specifically used for: the total quantity of the icon icon shown needed for obtaining, shows needed for more described
The total quantity of icon icon and the first default columns, and obtain comparison result;
The total quantity for the icon icon that comparing unit 20 is shown needed for obtaining, such as the sum of the required icon icon shown
Amount is 4, if the first default columns is 5, the total quantity and described first of the icon icon shown needed for more described
Default columns, it is known that, the total quantity of the icon icon shown needed for described is less than the described first default columns.
Computing unit 30 is specifically used for: according to the comparison result, when the total quantity of the icon icon of the required displaying
When greater than the first default columns, obtained according to the total quantity of the icon icon of the required displaying and the first default columns
Take optimal displaying columns;When the total quantity of the icon icon of the required displaying is less than or equal to the first default columns,
Optimal displaying columns is obtained according to the total quantity of the icon icon of the required displaying and the second default columns;
Computing unit 30 is according to the comparison result, when the total quantity of the icon icon of the required displaying is greater than described the
When one default columns, optimal displaying is obtained according to the total quantity of the icon icon of the required displaying and the first default columns
Columns;For example, the optimal displaying columns can be the described first default columns.
Computing unit 30 is according to the comparison result, when the total quantity of the icon icon of the required displaying is less than or equal to
When the first default columns, obtained most according to the total quantity of the icon icon of the required displaying and the second default columns
Excellent displaying columns;For example, the optimal displaying columns can be the described second default columns.
Show that control unit 40 is specifically used for: according to the total quantity of the icon icon of the required displaying and the optimal exhibition
Show that columns realizes icon icon in the reasonable displaying of terminal.
It is then that the optimal displaying columns shows the required displaying according to columns after the optimal displaying columns determines
Icon icon.Since the total quantity of icon icon determines, the columns of displaying determines that the line number then shown can determine.It opens up as a result,
Show that control unit 40 can realize icon according to the total quantity and the optimal displaying columns of the icon icon of the required displaying
Reasonable displaying of the icon in terminal.
The embodiment of the present invention can automatically configure line number according to the total quantity of the icon icon of required displaying in a program
And columns;When the total quantity of the icon icon of required displaying changes, change line number and columns that can be adaptive be carried out
It is most reasonable to show;And it can be to avoid the problem for being easy to cause mistake by human configuration.
Further, based on the above embodiment, the computing unit 30 according to the icon of the required displaying for scheming
When target total quantity and the first default columns obtain optimal displaying columns, realized especially by following formula (1):
GetColumn=(N+ (N-1) //MAX_COLUMN) // (1+ (N-1) //MAX_COLUMN) (1)
Wherein, getColumn indicates that the optimal displaying columns, N indicate the sum of the required icon icon shown
Amount, MAX_COLUMN indicate the first default columns, // indicate to do quotient rounding operation.
According to the comparison result of the total quantity of the icon icon of the required displaying and the first default columns, when described
When the total quantity of the icon icon of required displaying is greater than the first default columns, computing unit 30 is according to the required displaying
The total quantity of icon icon and the first default columns obtain optimal displaying columns.The optimal result for showing columns is specific
It can be calculated by formula (1).
On the basis of the above embodiments, the embodiment of the present invention is greater than first in the total quantity of the icon icon of required displaying
It, can be by giving formula using the total quantity of the icon icon of required displaying and the first default columns as independent variable when default columns
The optimal displaying columns adapted to therewith is acquired, the flexibility and reasonability of the displaying of icon icon are effectively increased.
Further, based on the above embodiment, the computing unit 30 according to the icon of the required displaying for scheming
When target total quantity and the second default columns obtain optimal displaying columns, realized especially by following formula (2):
GetColumn=(N+ (N-1) //MIN_COLUMN) // (1+ (N-1) //MIN_COLUMN) (2)
Wherein, getColumn indicates that the optimal displaying columns, N indicate the sum of the required icon icon shown
Amount, MIN_COLUMN indicate the second default columns, // indicate to do quotient rounding operation.
According to the comparison result of the total quantity of the icon icon of the required displaying and the first default columns, when described
When the total quantity of the icon icon of required displaying is less than or equal to the first default columns, computing unit 30 is according to described required
The total quantity of the icon icon of displaying and the second default columns obtain optimal displaying columns.The optimal knot for showing columns
Fruit can specifically be calculated by formula (2).
On the basis of the above embodiments, the embodiment of the present invention is less than or waits in the total quantity of the icon icon of required displaying
It, can be by giving using the total quantity of the icon icon of required displaying and the second default columns as independent variable when the first default columns
Determine formula and acquire the optimal displaying columns adapted to therewith, effectively increases the flexibility and reasonability of the displaying of icon icon.
Further, based on the above embodiment, the configuration parameter acquiring unit 10 is for obtaining the first default columns
When with the second default columns, if judgement knows that the described second default columns is not configured, the second default columns is equal to
The first default columns.
The first default columns and the second default columns can be pre-configured with simultaneously, can also only be matched in advance
The described first default columns is set, and the second default columns is not configured without configuration in the described second default columns
When, it is equal with the described first default columns to default the second default columns.
On the basis of the above embodiments, the default when embodiment of the present invention is not configured by setting the second default columns
Equal with the first default columns, so that the realization process that icon icon is shown is more convenient, efficient, icon icon shows more clever
It is living.
Server provided in an embodiment of the present invention is for the above method, and concrete function can refer to above method process,
Details are not described herein again.
Fig. 3 is the structural schematic diagram of electronic equipment provided in an embodiment of the present invention.As shown in figure 3, the electronic equipment packet
Include processor 301, memory 302 and bus 303.Wherein, the processor 301 and the memory 302 pass through the bus
303 complete mutual communication;The processor 301 is used to call the program instruction in the memory 302, above-mentioned to execute
Method provided by each method embodiment, for example, obtain the first default columns and the second default columns;Wherein, described
One default columns is indicated according to determined by the size of icon icon, the maximum quantity of icon icon shown in terminal a line;
The second default columns indicates to be less than or equal to the described first default column when the total quantity of the icon icon of required displaying
When number, according to determined by the size of the icon icon, the maximum quantity of icon icon shown in terminal a line;Obtain institute
The total quantity for the icon icon that need to be shown, the total quantity of the icon icon shown needed for more described and the first default column
Number, and obtain comparison result;According to the comparison result, when the total quantity of the icon icon of the required displaying is greater than described the
When one default columns, optimal displaying is obtained according to the total quantity of the icon icon of the required displaying and the first default columns
Columns;When the total quantity of the icon icon of the required displaying is less than or equal to the first default columns, according to the institute
The total quantity for the icon icon that need to be shown and the second default columns obtain optimal displaying columns;According to the required displaying
The total quantity of icon icon and the optimal displaying columns realize icon icon in the reasonable displaying of terminal.
The embodiment of the present invention discloses a kind of computer program product, and the computer program product is non-transient including being stored in
Computer program on computer readable storage medium, the computer program include program instruction, when described program instructs quilt
When computer executes, computer is able to carry out method provided by above-mentioned each method embodiment, for example, it is default to obtain first
Columns and the second default columns;Wherein, the described first default columns is indicated according to determined by the size of icon icon, terminal one
The maximum quantity of icon icon shown in row;The second default columns indicates the total of the icon icon for working as required displaying
When quantity is less than or equal to the first default columns, opened up according to determined by the size of the icon icon, in terminal a line
The maximum quantity of the icon icon shown;The total quantity of the icon icon shown needed for obtaining, the icon shown needed for more described
The total quantity of icon and the first default columns, and obtain comparison result;According to the comparison result, when the required displaying
The total quantity of icon icon when being greater than the first default columns, according to the total quantity of the icon icon of the required displaying and
The first default columns obtains optimal displaying columns;When the total quantity of the icon icon of the required displaying is less than or equal to institute
When stating the first default columns, obtained according to the total quantity of the icon icon of the required displaying and the second default columns optimal
Show columns;Realize icon icon at end according to the total quantity of the icon icon of the required displaying and the optimal displaying columns
The reasonable displaying at end.
The embodiment of the present invention provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage
Medium storing computer instruction, the computer instruction make the computer execute side provided by above-mentioned each method embodiment
Method, for example, obtain the first default columns and the second default columns;Wherein, the described first default columns is indicated according to icon
Determined by the size of icon, the maximum quantity of icon icon shown in terminal a line;The second default columns expression is worked as
When the total quantity of the icon icon of required displaying is less than or equal to the first default columns, according to the icon icon
Determined by size, the maximum quantity of icon icon shown in terminal a line;The sum of the icon icon shown needed for obtaining
Amount, the total quantity of the icon icon shown needed for more described and the first default columns, and obtain comparison result;According to institute
Comparison result is stated, when the total quantity of the icon icon of the required displaying is greater than the first default columns, according to the institute
The total quantity for the icon icon that need to be shown and the first default columns obtain optimal displaying columns;When the required displaying
When the total quantity of icon icon is less than or equal to the first default columns, according to the sum of the icon icon of the required displaying
Amount and the described second default columns obtain optimal displaying columns;According to the total quantity of the icon icon of the required displaying and described
It is optimal to show that columns realizes icon icon in the reasonable displaying of terminal.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through
The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer readable storage medium, the program
When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light
The various media that can store program code such as disk.
The embodiments such as electronic equipment described above are only schematical, wherein it is described as illustrated by the separation member
Unit may or may not be physically separated, and the component shown as unit may or may not be object
Manage unit, it can it is in one place, or may be distributed over multiple network units.It can select according to the actual needs
Some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying wound
In the case where the labour for the property made, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should
Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers
It enables and using so that an electronic equipment (can be personal computer, server or the network equipment etc.) executes each embodiment
Or method described in certain parts of embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used
To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;
And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and
Range.
Claims (10)
1. a kind of method realizing icon icon and rationally being shown in terminal characterized by comprising
Obtain the first default columns and the second default columns;Wherein, the described first default columns is indicated according to the big of icon icon
Small identified, icon icon shown in terminal a line maximum quantity;The second default columns indicates to work as required displaying
The total quantity of icon icon when being less than or equal to the first default columns, really according to the size of icon icon institute
Fixed, icon icon shown in terminal a line maximum quantity;
The total quantity of the icon icon shown needed for obtaining, the total quantity of the icon icon shown needed for more described and described the
One default columns, and obtain comparison result;
According to the comparison result, when the total quantity of the icon icon of the required displaying is greater than the first default columns,
Optimal displaying columns is obtained according to the total quantity of the icon icon of the required displaying and the first default columns;When the institute
When the total quantity for the icon icon that need to be shown is less than or equal to the first default columns, schemed according to the icon of the required displaying
Target total quantity and the second default columns obtain optimal displaying columns;
Realize icon icon in terminal according to the total quantity of the icon icon of the required displaying and the optimal displaying columns
Rationally show.
2. the method according to claim 1, wherein the sum of the icon icon according to the required displaying
Amount and the described first default columns obtain optimal displaying columns, realize especially by following formula:
GetColumn=(N+ (N-1) //MAX_COLUMN) // (1+ (N-1) //MAX_COLUMN)
Wherein, getColumn indicates that the optimal displaying columns, N indicate the total quantity of the required icon icon shown,
MAX_COLUMN indicates the first default columns, // indicate to do quotient rounding operation.
3. the method according to claim 1, wherein the sum of the icon icon according to the required displaying
Amount and the described second default columns obtain optimal displaying columns, realize especially by following formula:
GetColumn=(N+ (N-1) //MIN_COLUMN) // (1+ (N-1) //MIN_COLUMN)
Wherein, getColumn indicates that the optimal displaying columns, N indicate the total quantity of the required icon icon shown,
MIN_COLUMN indicates the second default columns, // indicate to do quotient rounding operation.
4. the method according to claim 1, wherein in the first default columns of the acquisition and the second default columns
When, if judgement knows that the described second default columns is not configured, the second default columns is equal to the described first default column
Number.
5. a kind of server realizing icon icon and rationally being shown in terminal characterized by comprising
Configuration parameter acquiring unit, is specifically used for: obtaining the first default columns and the second default columns;Wherein, described first is pre-
If columns is indicated according to determined by the size of icon icon, the maximum quantity of icon icon shown in terminal a line;It is described
Second default columns indicates when the total quantity of the icon icon of required displaying is less than or equal to the first default columns,
According to determined by the size of the icon icon, the maximum quantity of icon icon shown in terminal a line;
Comparing unit is specifically used for: the total quantity of the icon icon shown needed for obtaining, the icon figure shown needed for more described
Target total quantity and the first default columns, and obtain comparison result;
Computing unit is specifically used for: according to the comparison result, when the total quantity of the icon icon of the required displaying is greater than institute
When stating the first default columns, obtained according to the total quantity of the icon icon of the required displaying and the first default columns optimal
Show columns;When the total quantity of the icon icon of the required displaying is less than or equal to the first default columns, according to institute
The total quantity of the icon icon shown needed for stating and the second default columns obtain optimal displaying columns;
It shows control unit, is specifically used for: being arranged according to the total quantity of the icon icon of the required displaying and the optimal displaying
Number realizes icon icon in the reasonable displaying of terminal.
6. server according to claim 5, which is characterized in that the computing unit is for according to the required displaying
Icon icon total quantity and first default columns when obtaining optimal displayings columns, especially by the realization of following formula:
GetColumn=(N+ (N-1) //MAX_COLUMN) // (1+ (N-1) //MAX_COLUMN)
Wherein, getColumn indicates that the optimal displaying columns, N indicate the total quantity of the required icon icon shown,
MAX_COLUMN indicates the first default columns, // indicate to do quotient rounding operation.
7. server according to claim 5, which is characterized in that the computing unit is for according to the required displaying
Icon icon total quantity and second default columns when obtaining optimal displayings columns, especially by the realization of following formula:
GetColumn=(N+ (N-1) //MIN_COLUMN) // (1+ (N-1) //MIN_COLUMN)
Wherein, getColumn indicates that the optimal displaying columns, N indicate the total quantity of the required icon icon shown,
MIN_COLUMN indicates the second default columns, // indicate to do quotient rounding operation.
8. server according to claim 5, which is characterized in that the configuration parameter acquiring unit is for obtaining first
When default columns and the second default columns, if judgement knows that the described second default columns is not configured, described second is default
Columns is equal to the described first default columns.
9. a kind of electronic equipment, which is characterized in that including memory and processor, the processor and the memory pass through always
Line completes mutual communication;The memory is stored with the program instruction that can be executed by the processor, the processor tune
The method as described in Claims 1-4 is any is able to carry out with described program instruction.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt
The method as described in Claims 1-4 is any is realized when processor executes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810709801.3A CN109298808A (en) | 2018-07-02 | 2018-07-02 | A kind of method and server for realizing that icon icon is rationally shown in terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810709801.3A CN109298808A (en) | 2018-07-02 | 2018-07-02 | A kind of method and server for realizing that icon icon is rationally shown in terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109298808A true CN109298808A (en) | 2019-02-01 |
Family
ID=65167852
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810709801.3A Pending CN109298808A (en) | 2018-07-02 | 2018-07-02 | A kind of method and server for realizing that icon icon is rationally shown in terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109298808A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023092343A1 (en) * | 2021-11-24 | 2023-06-01 | 深圳传音控股股份有限公司 | Icon area management method, intelligent terminal and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040179026A1 (en) * | 2003-03-14 | 2004-09-16 | Malcolm Rix | Method for laying out arbitrary shape images in a given space |
CN104407779A (en) * | 2014-12-15 | 2015-03-11 | 北京国双科技有限公司 | Arrangement display method and device for graphical interface |
CN105068779A (en) * | 2015-08-18 | 2015-11-18 | 北京恒华伟业科技股份有限公司 | Display control method and apparatus |
CN106055197A (en) * | 2016-05-26 | 2016-10-26 | 深圳市金立通信设备有限公司 | Display method and terminal for application icons |
CN106100897A (en) * | 2016-07-19 | 2016-11-09 | 珠海格力电器股份有限公司 | A kind of device and method monitoring data autoplacement |
CN107247540A (en) * | 2017-06-26 | 2017-10-13 | 上海与德科技有限公司 | The method of adjustment and device of application icon |
-
2018
- 2018-07-02 CN CN201810709801.3A patent/CN109298808A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040179026A1 (en) * | 2003-03-14 | 2004-09-16 | Malcolm Rix | Method for laying out arbitrary shape images in a given space |
CN104407779A (en) * | 2014-12-15 | 2015-03-11 | 北京国双科技有限公司 | Arrangement display method and device for graphical interface |
CN105068779A (en) * | 2015-08-18 | 2015-11-18 | 北京恒华伟业科技股份有限公司 | Display control method and apparatus |
CN106055197A (en) * | 2016-05-26 | 2016-10-26 | 深圳市金立通信设备有限公司 | Display method and terminal for application icons |
CN106100897A (en) * | 2016-07-19 | 2016-11-09 | 珠海格力电器股份有限公司 | A kind of device and method monitoring data autoplacement |
CN107247540A (en) * | 2017-06-26 | 2017-10-13 | 上海与德科技有限公司 | The method of adjustment and device of application icon |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023092343A1 (en) * | 2021-11-24 | 2023-06-01 | 深圳传音控股股份有限公司 | Icon area management method, intelligent terminal and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110399420B (en) | Export method, electronic equipment and medium of configurable Excel format | |
US11551067B2 (en) | Neural network processor and neural network computation method | |
CN105204927B (en) | For the application collating unit of terminal device and using aligning method | |
CN106201241A (en) | The multi-screen display method of terminal screen, device and terminal | |
CN105573577B (en) | Long-distance monitoring method, apparatus and system | |
CN106843828A (en) | interface display, loading method and device | |
CN106126009A (en) | Method, device and the terminal of a kind of application icon management | |
CN107396199A (en) | Barrage method for exhibiting data and device, computer-readable recording medium | |
CN106658142A (en) | Interface configuration method and device | |
CN110209579A (en) | Test method and electronic device | |
CN106900034A (en) | A kind of method of connection WIFI, device and electronic equipment | |
CN110704045A (en) | Method and device for constructing decision flow and storage medium | |
CN109298808A (en) | A kind of method and server for realizing that icon icon is rationally shown in terminal | |
CN108875048A (en) | Report form generation method, device, electronic equipment and readable storage medium storing program for executing | |
CN106155486A (en) | A kind of task call method and terminal | |
CN112416195A (en) | Method and device for generating device control function | |
CN108874666A (en) | Automatic generation of test data, device, computer equipment and storage medium | |
CN114662689A (en) | Pruning method, device, equipment and medium for neural network | |
CN110134867A (en) | Corporation information query method and Related product | |
CN112198840B (en) | Robot task scheduling method and device | |
CN109257643B (en) | Live broadcast room display method, terminal equipment and storage medium | |
CN108845740B (en) | The implementation method of E-book reader operation mode, electronic equipment | |
CN111737372A (en) | Map data generation method and device | |
CN114108227A (en) | Control method and device of washing machine, washing machine and storage medium | |
CN111967702A (en) | Data processing method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190201 |