CN108153575B - Button control self-adaptive layout method for variable-width software interface - Google Patents
Button control self-adaptive layout method for variable-width software interface Download PDFInfo
- Publication number
- CN108153575B CN108153575B CN201810053578.1A CN201810053578A CN108153575B CN 108153575 B CN108153575 B CN 108153575B CN 201810053578 A CN201810053578 A CN 201810053578A CN 108153575 B CN108153575 B CN 108153575B
- Authority
- CN
- China
- Prior art keywords
- button control
- max
- button
- software interface
- control
- 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
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses a button control self-adaptive layout method for a variable-width software interface, which comprises the following steps: the method comprises the steps that a plurality of fixed button controls and at least one pull-down popup button control are arranged on a software interface, the fixed button controls are sequentially arranged along the width direction of the software interface, a plurality of options are arranged in the pull-down popup button controls, in the processing process, each button control is integrally combined, then the pull-down popup button controls are newly added, when the button controls cannot be placed, the button controls are placed into the pull-down popup button controls and combined to obtain a more optimized visual effect, button display in the software interface can be optimized through self-adaptive combination and arrangement of the button controls, incomplete display of characters and the like in the interface can be effectively prevented, the buttons are prevented from being hidden or deleted, and the visual effect of the software interface is improved.
Description
Technical Field
The invention relates to a button position adjusting method in a software interface, in particular to a button control self-adaptive layout method for a variable-width software interface.
Background
In the prior art, many software can involve the placement of a plurality of button controls, and how to adaptively adjust the positions of the plurality of buttons according to the size of the software is an important part related to the visual effect of the software. Currently, no good adaptive effect is achieved in this respect, but simply the controlled price is masked or covered. One of the existing technical solutions is to perform shielding processing on a control which cannot be displayed, when the size of a software interface is reduced to a size which cannot display all button controls, only shielding processing is performed on a part of control prices, and when the scheme performs shielding or covering processing on the button controls, the space is partially shielded, so that the problems of incomplete display of characters and the like are caused; in another technical scheme, a control which cannot be displayed is directly hidden or deleted, and is displayed when the size of the software is recovered, and the scheme directly hides or deletes a button which cannot be displayed, so that a user cannot timely experience the hidden or deleted control when using the software, and the use of the user is influenced.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a button control adaptive layout method for a variable width software interface, aiming at the defects of the prior art, the method can optimize the button display in the software interface by adaptively combining and arranging the button controls, can effectively prevent incomplete display of characters and the like in the interface, and can avoid the buttons from being hidden or deleted, thereby improving the visual effect of the software interface.
In order to solve the technical problems, the invention adopts the following technical scheme.
A button control self-adaptive layout method for a variable-width software interface comprises the following steps: step S1, arranging a plurality of fixed button controls and at least one pull-down pop-up window button control on a software interface, wherein the fixed button controls are sequentially arranged along the width direction of the software interface, and a plurality of options (item) are arranged in the pull-down pop-up window button control; step S2, the system is initialized, the nth fixed button control is recorded as B (n), the width of the nth fixed button control is WB(n)The maximum width direction coordinate of the position where the fixed button control can be placed is XmaxThe maximum width direction coordinate of the nth fixed button control is B (n)maxThe mth pull-down pop-up window button control is recorded as PB (m), and the width of the mth pull-down pop-up window button control is WPB(m)The maximum width direction coordinate PB (m) of the mth pull-down popup button controlmaxThe number of options (item) in the control of the pull-down popup button is PB (m)countSetting an intermediate variable i-n, j-1; step S3, when i is satisfied>Under the condition of 0, judging B (i) of a fixed button control B (i) in the software interfacemaxAnd XmaxWhether or not X is satisfiedmax>B(i)maxIf yes, go to step S7, otherwise go to step S4; step S4, when j is satisfied<m, the number of items (item) in the pop-up button control PB (j) is selected (PB (j))count+1) does not exceed the limit value L, step S5 is executed; step S5, add a item (item) in the pop-up button control pb (j), make the function of the item (item) consistent with the fixed button control b (i), and hide the fixed button control b (i); step S6, updating the maximum width direction coordinate PB (j) of the pull-down popup button control PB (j)max:PB(j)max=B((n-j)*(L-1))max+WPB(j)(ii) a And step S7, updating a software interface according to the layout positions of the fixed button control and the pull-down popup button control.
Preferably, the number of the pull-down pop-up window button controls is multiple, the fixed button controls are sequentially arranged from the left side of the software interface to the right, and the pull-down pop-up window button controls are sequentially arranged from the right side of the software interface to the left.
Preferably, in step S4, if the pop-up button control PB (j) is pulled down, the number of options (item) (PB (j))count+1) has exceeded the limit value L, let j become j +1, re-execute step S4;
preferably, after the step S4 is executed, the method further includes the step S50: judging X of fixed button control B (i)maxPB (1) of the control PB (1) of the down-draw popup buttonmaxWhether or not X is satisfiedmaxGreater than PB (1)maxIf so, step S7 is executed, otherwise, i is made to be i-1, and the process returns to step S3.
According to the button control self-adaptive layout method for the variable-width software interface, the arrangement of buttons can be self-adaptively adjusted according to the size of the current interface under the condition that the width of the software interface is randomly changed based on the self-adaptive adjustment process of the positions of the button controls, and the buttons can be reasonably matched in the corresponding software interface through the arrangement, so that the overall visual effect of the software interface is improved, the use experience of a user is enhanced, and the whole process is finished. According to the invention, firstly, each button control is integrally combined, then a pull-down popup window button control is newly added, and when the button control cannot be placed, the button control is placed into the pull-down popup window button control, so that the combination can obtain a more optimized visual effect. Compared with the prior art, the method and the device have the advantages that through the self-adaptive combination and arrangement of the button controls, the button display in the software interface can be optimized, incomplete display of characters and the like in the interface can be effectively prevented, the buttons are prevented from being hidden or deleted, and the visual effect of the software interface is greatly improved.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
FIG. 2 is a schematic diagram of the button arrangement after processing by the method of the present invention.
Fig. 3 is a schematic diagram of button arrangement according to an embodiment of the invention.
Fig. 4 is a schematic diagram of button arrangement in another embodiment of the invention.
Detailed Description
The invention is described in more detail below with reference to the figures and examples.
The invention discloses a button control self-adaptive layout method for a variable-width software interface, which is shown by combining a figure 1 and a figure 2 and comprises the following steps:
step S1, arranging a plurality of fixed button controls and at least one pull-down pop-up window button control on a software interface, wherein the fixed button controls are sequentially arranged along the width direction of the software interface, and a plurality of options (item) are arranged in the pull-down pop-up window button control;
step S2, the system is initialized, the nth fixed button control is recorded as B (n), the width of the nth fixed button control is WB(n)The maximum width direction coordinate of the position where the fixed button control can be placed is XmaxThe maximum width direction coordinate of the nth fixed button control is B (n)maxThe mth pull-down pop-up window button control is recorded as PB (m), and the width of the mth pull-down pop-up window button control is WPB(m)The maximum width direction coordinate PB (m) of the mth pull-down popup button controlmaxThe number of options (item) in the control of the pull-down popup button is PB (m)countSetting an intermediate variable i-n, j-1;
step S3, when i is satisfied>Under the condition of 0, judging B (i) of a fixed button control B (i) in the software interfacemaxAnd XmaxWhether or not X is satisfiedmax>B(i)maxIf yes, go to step S7, otherwise go to step S4;
step S4, when j is satisfied<m, the number of items (item) in the pop-up button control PB (j) is selected (PB (j))count+1) does not exceed the limit value L, step S5 is executed;
step S5, add a item (item) in the pop-up button control pb (j), make the function of the item (item) consistent with the fixed button control b (i), and hide the fixed button control b (i);
step S6, updating the maximum width direction coordinate PB (j) of the pull-down popup button control PB (j)max:
PB(j)max=B((n-j)*(L-1))max+WPB(j);
And step S7, updating a software interface according to the layout positions of the fixed button control and the pull-down popup button control.
According to the method, based on the self-adaptive adjustment process of the button control position, the arrangement of the buttons can be self-adaptively adjusted according to the size of the current interface under the condition that the width of the software interface is randomly changed, and the buttons can be reasonably matched in the corresponding software interface through the arrangement, so that the overall visual effect of the software interface is improved, the use experience of a user is enhanced, and the whole process is finished. According to the invention, firstly, each button control is integrally combined, then a pull-down popup window button control is newly added, and when the button control cannot be placed, the button control is placed into the pull-down popup window button control, so that the combination can obtain a more optimized visual effect. Compared with the prior art, the method and the device have the advantages that through the self-adaptive combination and arrangement of the button controls, the button display in the software interface can be optimized, incomplete display of characters and the like in the interface can be effectively prevented, the buttons are prevented from being hidden or deleted, and the visual effect of the software interface is greatly improved.
In this embodiment, the number of the pull-down pop-up window button controls is multiple, the multiple fixed button controls are sequentially arranged from the left side of the software interface to the right, and the multiple pull-down pop-up window button controls are sequentially arranged from the right side of the software interface to the left.
Further, in step S4, if the pop-up button control PB (j) is pulled down, the number of options (item) (PB (j))count+1) has exceeded the limit value L, let j become j +1, re-execute step S4;
as a preferable mode, after the step S4 is executed, the method further includes the step S50: judging X of fixed button control B (i)maxPB (1) of the control PB (1) of the down-draw popup buttonmaxWhether or not X is satisfiedmaxGreater than PB (1)maxIf so, step S7 is executed, otherwise, i is made to be i-1, and the process returns to step S3.
In the practical application process, the invention can be arranged according to the layout shown in fig. 3 and 4, thereby meeting the application requirements. When the user changes the size of the software, the preferred embodiment of button adaptation is as follows:
step A, initialization: i n, j 1, X when the user changes the software window sizemaxA change occurs;
step B, if i>0, maximum position of button under current interface B (i)maxAnd XmaxBy comparison, if XmaxLess than B (i)maxIf not, executing step H;
step C, if j<m at this time, the number of items of the pull-down popup button PB (j) (PB (j))count+1) whether the limit value L is exceeded;
step D, if the limit is not exceeded in the step C, adding an item in the pull-down popup button PB (j), wherein the function of the item is consistent with that of the button B (i), and hiding the button B (i);
step E, updating the maximum X coordinate of each control button: PB (j)max=B(n-j*L-1)max+WPB(j);
Step F, if step C exceeds the limit, j ═ j + 1; skipping to the step C;
step G, the maximum X coordinate X can be placedmaxComparing with X coordinate of pull-down popup button PB (1), if X ismaxGreater than PB (1)maxIf not, executing step H, otherwise, i-1, and jumping to step B;
and H, updating the visual display according to the position frame of each button.
The button control self-adaptive layout method for the variable-width software interface disclosed by the invention has the advantages that the buttons are freely combined and processed by adopting a self-adaptive logic method, so that the buttons can be optimally displayed, and the experience visual effect of software is further improved.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents or improvements made within the technical scope of the present invention should be included in the scope of the present invention.
Claims (2)
1. A button control self-adaptive layout method for a variable-width software interface is characterized by comprising the following steps:
step S1, arranging a plurality of fixed button controls and at least one drop-down pop-up window button control on a software interface, wherein the fixed button controls are sequentially arranged along the width direction of the software interface, and a plurality of options (item) are arranged in the drop-down pop-up window button control, the number of the drop-down pop-up window button controls is multiple, the fixed button controls are sequentially arranged from the left side to the right side of the software interface, and the drop-down pop-up window button controls are sequentially arranged from the right side to the left side of the software interface;
step S2, initializing the system, recording the nth fixed button control as B (n), the width of the nth fixed button control is WB (n), and the maximum width direction coordinate of the position where the fixed button control can be placed is XmaxThe maximum width direction coordinate of the nth fixed button control is B (n)maxThe mth pull-down pop-up window button control is recorded as PB (m), and the width of the mth pull-down pop-up window button control is WPB(m)The maximum width direction coordinate PB (m) of the mth pull-down popup button controlmaxThe number of options (item) in the control of the pull-down popup button is PB (m)countSetting an intermediate variable i-n, j-1;
step S3, when i is satisfied>Under the condition of 0, judging B (i) of a fixed button control B (i) in the software interfacemaxAnd XmaxWhether or not X is satisfiedmax>B(i)maxIf yes, go to step S7, otherwise go to step S4;
step S4, when j is satisfied<m, the number of items (item) in the pop-up button control PB (j) is selected (PB (j))count+1) does not exceed the limit value L, step S5 is executed; if the number of options (item) in the pop-up button control PB (j) is pulled down (PB (j))count+1) has exceeded the limit value L, let j become j +1, re-execute step S4;
step S5, add a item (item) in the pop-up button control pb (j), make the function of the item (item) consistent with the fixed button control b (i), and hide the fixed button control b (i);
step S6, updating the pull-downMaximum width direction coordinate PB (j) of popup button control PB (j)max:
PB(j)max=B(n-(j-1)*L-1)max+WPB(j);
And step S7, updating a software interface according to the layout positions of the fixed button control and the pull-down popup button control.
2. The method for adaptive layout of button controls for a variable width software interface of claim 1, further comprising, after performing said step S6, the step S50: judging X of fixed button control B (i)maxPB (1) of the control PB (1) of the down-draw popup buttonmaxWhether or not X is satisfiedmaxGreater than PB (1)maxIf so, step S7 is executed, otherwise, i is made to be i-1, and the process returns to step S3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810053578.1A CN108153575B (en) | 2018-01-19 | 2018-01-19 | Button control self-adaptive layout method for variable-width software interface |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810053578.1A CN108153575B (en) | 2018-01-19 | 2018-01-19 | Button control self-adaptive layout method for variable-width software interface |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108153575A CN108153575A (en) | 2018-06-12 |
CN108153575B true CN108153575B (en) | 2021-07-20 |
Family
ID=62461656
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810053578.1A Active CN108153575B (en) | 2018-01-19 | 2018-01-19 | Button control self-adaptive layout method for variable-width software interface |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108153575B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110599899A (en) * | 2019-09-19 | 2019-12-20 | Oppo广东移动通信有限公司 | Label display method and device, electronic equipment and storage medium |
CN116226267A (en) * | 2023-05-05 | 2023-06-06 | 北京路浩知识产权集团有限公司 | Method, device, equipment and medium for processing intellectual property data in enterprise |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102012787B (en) * | 2010-11-19 | 2012-12-05 | 互动在线(北京)科技有限公司 | Method for realizing self-adaption of nonfixed region with height/width of browser for cascading style sheet |
US9921717B2 (en) * | 2013-11-07 | 2018-03-20 | Touchtunes Music Corporation | Techniques for generating electronic menu graphical user interface layouts for use in connection with electronic devices |
CN105528200B (en) * | 2014-09-30 | 2020-06-26 | 腾讯科技(深圳)有限公司 | Display method and device of browser tab |
CN105786920B (en) * | 2014-12-26 | 2018-12-14 | 阿里巴巴集团控股有限公司 | Interface tab shows method and apparatus |
-
2018
- 2018-01-19 CN CN201810053578.1A patent/CN108153575B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108153575A (en) | 2018-06-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108153575B (en) | Button control self-adaptive layout method for variable-width software interface | |
CN103049250B (en) | The method of control inerface and terminal | |
CN104111793B (en) | system, method and apparatus for reducing display lag using image overlay | |
JP5374681B2 (en) | GAME DEVICE AND PROGRAM | |
JP2018049647A5 (en) | ||
JP6133424B2 (en) | Method and system for remotely controlling a computing device | |
JP2016528604A5 (en) | ||
EP3614660A1 (en) | Video image processing method and device | |
CN104331863B (en) | A kind of image filtering denoising method | |
US10127700B2 (en) | Generation of display overlay parameters utilizing touch inputs | |
US9921719B2 (en) | Touch display apparatus and wallpaper replacing method thereof | |
US10073543B2 (en) | Image segmentation device and image segmentation method | |
CN110018759A (en) | Interface display method, device, terminal and storage medium | |
CN105355188B (en) | Screen brightness regulation method, system and the mobile terminal of mobile terminal | |
KR102206047B1 (en) | Terminal and apparatus and method for reducing display lag | |
DE112022002985T5 (en) | METHOD, SYSTEM AND COMPUTER PROGRAM FOR TOUCH STABILIZATION | |
US8591331B1 (en) | Display control system, display control method, display control device, and computer-readable storage medium | |
US20120324382A1 (en) | User Interface Adjusting Method and Electronic Device Using the Same | |
CN112667343B (en) | Interface adjustment method, device, equipment and storage medium | |
JP2010057790A5 (en) | ||
KR100933707B1 (en) | User handwriting combination system | |
AU2015261353B2 (en) | Method of displaying images | |
CN103414823A (en) | Method and device for achieving up-and-down page-turning type operating system of cell phone | |
US20220269382A1 (en) | Command display control method, computer-readable medium and apparatus | |
Dostál et al. | Fine-grained adaptive user interface for personalization of a word processor: principles and a preliminary study |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |