This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Container flowLayout = FlowLayout.encloseIn(new Label("First"), | |
new Label("Second"), | |
new Label("Third"), | |
new Label("Fourth"), | |
new Label("Fifth")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Form hi = new Form("Box Y Layout", new BoxLayout(BoxLayout.Y_AXIS)); | |
hi.add(new Label("First")). | |
add(new Label("Second")). | |
add(new Label("Third")). | |
add(new Label("Fourth")). | |
add(new Label("Fifth")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Container box = BoxLayout.encloseX(new Label("First"), | |
new Label("Second"), | |
new Label("Third"), | |
new Label("Fourth"), | |
new Label("Fifth"))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Form hi = new Form("Grid Layout 2x2", new GridLayout(2, 2)); | |
hi.add(new Label("First")). | |
add(new Label("Second")). | |
add(new Label("Third")). | |
add(new Label("Fourth")). | |
add(new Label("Fifth")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GridLayout.encloseIn(new Label("First"), | |
new Label("Second"), | |
new Label("Third"), | |
new Label("Fourth"), | |
new Label("Fifth"))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Form hi = new Form("Table Layout 2x2", new TableLayout(2, 2)); | |
hi.add(new Label("First")). | |
add(new Label("Second")). | |
add(new Label("Third")). | |
add(new Label("Fourth")). | |
add(new Label("Fifth")); | |
hi.show(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Container tl = TableLayout.encloseIn(2, new Label("First"), | |
new Label("Second"), | |
new Label("Third"), | |
new Label("Fourth"), | |
new Label("Fifth"))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TableLayout tl = new TableLayout(2, 3); | |
Form hi = new Form("Table Layout Cons", tl); | |
hi.setScrollable(false); | |
hi.add(tl.createConstraint(). | |
widthPercentage(20), | |
new Label("AAA")). | |
add(tl.createConstraint(). | |
horizontalSpan(2). | |
heightPercentage(80). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Form hi = new Form("Layered Layout"); | |
int w = Math.min(Display.getInstance().getDisplayWidth(), Display.getInstance().getDisplayHeight()); | |
Button settingsLabel = new Button(""); | |
Style settingsStyle = settingsLabel.getAllStyles(); | |
settingsStyle.setFgColor(0xff); | |
settingsStyle.setBorder(null); | |
settingsStyle.setBgColor(0xff00); | |
settingsStyle.setBgTransparency(255); | |
settingsStyle.setFont(settingsLabel.getUnselectedStyle().getFont().derive(w / 3, Font.STYLE_PLAIN)); | |
FontImage.setMaterialIcon(settingsLabel, FontImage.MATERIAL_SETTINGS); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Form hi = new Form("GroupLayout"); | |
Label label1 = new Label(); | |
Label label2 = new Label(); | |
Label label3 = new Label(); | |
Label label4 = new Label(); | |
Label label5 = new Label(); | |
Label label6 = new Label(); | |
Label label7 = new Label(); |