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
package com.codename1.test.bgfetch; | |
import com.codename1.background.BackgroundFetch; | |
import com.codename1.components.SpanLabel; | |
import com.codename1.ui.Display; | |
import com.codename1.ui.Form; | |
import com.codename1.ui.Dialog; | |
import com.codename1.ui.Label; | |
import com.codename1.ui.plaf.UIManager; |
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 f = new Form("Accordion", new BorderLayout()); | |
Accordion accr = new Accordion(); | |
accr.addContent("Item1", new SpanLabel("The quick brown fox jumps over the lazy dog\n" | |
+ "The quick brown fox jumps over the lazy dog")); | |
accr.addContent("Item2", new SpanLabel("The quick brown fox jumps over the lazy dog\n" | |
+ "The quick brown fox jumps over the lazy dog\n " | |
+ "The quick brown fox jumps over the lazy dog\n " | |
+ "The quick brown fox jumps over the lazy dog\n " | |
+ "")); |
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("ToastBarDemo", BoxLayout.y()); | |
Button basic = new Button("Basic"); | |
Button progress = new Button("Progress"); | |
Button expires = new Button("Expires"); | |
Button delayed = new Button("Delayed"); | |
hi.add(basic).add(progress).add(expires).add(delayed); | |
basic.addActionListener(e -> { | |
ToastBar.Status status = ToastBar.getInstance().createStatus(); |
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
Painter p = new Painter(cmp) { | |
public void paint(Graphics g, Rectangle rect) { | |
boolean antiAliased = g.isAntiAliased(); | |
g.setAntiAliased(true); | |
int r = Math.min(rect.getWidth(), rect.getHeight())/2; | |
int x = rect.getX() + rect.getWidth()/2 - r; | |
int y = rect.getY() + rect.getHeight()/2 - r; | |
switch (style) { | |
case CircleButtonStrokedDark: | |
case CircleButtonStrokedLight: { |
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
public void showForm() { | |
Form hi = new Form("Hi World"); | |
hi.addComponent(new Label("Hi World")); | |
Location loc = new Location(); | |
loc.setLatitude(51.5033630); | |
loc.setLongitude(-0.1276250); | |
Geofence gf = new Geofence("test", loc, 100, 100000); | |