Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

280518_1116AM_addingChangeFromCn1 #16

Merged
merged 71 commits into from
May 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
a5c5497
Fixed squareShadow effect.
shannah May 2, 2018
3854460
Added a remove method to the list property
shai-almog May 3, 2018
97a095a
Fixed no shadow drawn in roundrectborder
shannah May 3, 2018
4ccf305
Removed debugging code
shannah May 3, 2018
0f93424
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shai-almog May 3, 2018
e02dbf1
Removed debugging code
shannah May 7, 2018
ab32343
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah May 7, 2018
722cde9
Updated density and padding to make iPhone X more usable by default
shai-almog May 8, 2018
4f7e592
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shai-almog May 8, 2018
c92850c
Changed CSS watcher to output CSS at src/theme.res instead of src/the…
shannah May 9, 2018
7b493cc
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah May 9, 2018
485bedb
Added ability to override the picker instance
shai-almog May 10, 2018
0513685
Fixed bug where picker component was ignored by the validator
shai-almog May 10, 2018
18d0f28
Fixed issue with floating action buttons setting and background trans…
shai-almog May 10, 2018
2565746
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shai-almog May 10, 2018
2af567e
Attempting to fix hanging travis
shannah May 10, 2018
060ea0c
Another attempt to fix hanging travis
shannah May 10, 2018
1dcf2dd
Fixed syntax error in travis script
shannah May 10, 2018
e797385
Fixed issue with device rotation on iOS while text editing is in prog…
shannah May 10, 2018
ff40435
Fixed bug with floating action button that didn't ignore the gap. Upd…
shai-almog May 10, 2018
517835c
Main focus of this commit is to add a lightweight mode flag to the Pi…
shannah May 15, 2018
b2c31b9
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah May 15, 2018
f13ed7d
Fixed issue with orphan ResourceEditorApp processes hanging around af…
shannah May 16, 2018
17bfb9a
Added support for tablets with Picker lightweight mode.
shannah May 16, 2018
801a4cf
Add a means to synchronize multiple 'input devices' such as virtual k…
shannah May 16, 2018
4710998
Fixed parsing of JSON for an edge case of nested properties
shai-almog May 17, 2018
84a6c08
Added shorthand syntax for material icon setting
shai-almog May 17, 2018
c681c48
Updated version
shai-almog May 17, 2018
3e11050
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shai-almog May 17, 2018
d51f2df
Fixed on-device support for lightweight picker mode. Tested in simul…
shannah May 17, 2018
0936180
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah May 17, 2018
4d9eaaf
Provided a shorthand method for the exclude property method
shai-almog May 17, 2018
d3d727e
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shai-almog May 17, 2018
9ed405a
Change the way CN1 handle device resolution to use device PPI
May 17, 2018
d365423
Added support for duration picker type for picker in lightweight mode…
shannah May 17, 2018
16be1cf
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah May 17, 2018
be2603d
Changed the name of the internal ISpinner3D interface to make it more…
shannah May 17, 2018
afb3057
Added type PICKER_CALENDAR for the picker widget to display a calendar.
shannah May 17, 2018
80ac519
Add SetProperty as a new type of property and add the addAll() and re…
May 18, 2018
92018b7
Add SetProperty as a new type of property and add the addAll() and re…
May 18, 2018
a73be40
Fixed #2420 I have no idea how that functioned until now...
shai-almog May 19, 2018
bdd1898
Merge pull request #2417 from ramsestom/propertiesCollection
shai-almog May 19, 2018
1a38b4d
Disabled Form.setCurrentInputDevice from stopping editing when both t…
shannah May 19, 2018
c2ba25d
Fixed JavaDoc for issue #2413
shai-almog May 21, 2018
38723e3
Durank
DurankGts May 21, 2018
c1a88d7
Merge pull request #2424 from DurankGts/210518_1006PM_customBackGroun…
shai-almog May 22, 2018
7596047
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shai-almog May 22, 2018
d398a91
Fixed the accordion PR to match conventions and keep compatibility
shai-almog May 22, 2018
f6d0f79
Some changes to keep full back compatibility with the old CN1 screen …
May 22, 2018
4dda3c8
Changed so that theme.res files are backed up in the css/.backups dir…
shannah May 22, 2018
f086cca
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah May 22, 2018
25ef3fd
Merge pull request #2414 from ramsestom/deviceResolutionRefactor
shai-almog May 23, 2018
206bbe1
Fixed non-ascii character in code
shai-almog May 23, 2018
4660ec1
Fixed popup styling regression in the iOS theme
shai-almog May 23, 2018
28035af
Fixed issue with autcomplete text field not hiding when losing focus.…
shannah May 23, 2018
39de6ad
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah May 23, 2018
7d4b36d
Added javadocs for new public methods.
shannah May 23, 2018
85844fc
Fixed issue with capturePhoto() and captureVideo() on Android 7. htt…
shannah May 23, 2018
b0eb6ef
Reverted incorrect fix for #2409
shai-almog May 24, 2018
0a283f8
Fixed issue with Capture permission failure on Android 6+ when app in…
shannah May 24, 2018
c8c8cf4
Changed set/getLightweightMode() to is/setUseLightweightPopup() becau…
shannah May 24, 2018
cba5ce3
Updated version number and updated iOS theme
shai-almog May 25, 2018
c9c76b5
Revert "Fixed non-ascii character in code"
shai-almog May 25, 2018
dbec1c9
Revert "Merge pull request #2414 from ramsestom/deviceResolutionRefac…
shai-almog May 25, 2018
ea79fce
Initial implementation of new component traversal API for improving e…
shannah May 25, 2018
4d50714
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah May 25, 2018
4763894
Minor performance tuning
shai-almog May 26, 2018
b57e704
Minor improvements to the UI of the media player
shai-almog May 27, 2018
2bf8a46
General improvements to collection properties:
shai-almog May 27, 2018
9774dc0
Updated version number
shai-almog May 27, 2018
9cc4705
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shai-almog May 27, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,11 @@ elif [[ -n ${CN1_RUNTESTS_IOS_SIMULATOR} ]]; then
trap stop_appium EXIT
ant test-ios
fi

function killjobs () {
JOBS="$(jobs -p)";
if [ -n "${JOBS}" ]; then
kill -KILL ${JOBS};
fi
}
killjobs
exit 0
2 changes: 1 addition & 1 deletion CodenameOne/src/cn1-version-numbers
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d94dca87abfcfbb507f9705f03c4fd46f20a31c5
dbec1c950b0372dd8b678f3325b50dba33769f92
91 changes: 73 additions & 18 deletions CodenameOne/src/com/codename1/components/Accordion.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,19 @@ public class Accordion extends Container {

private Image closeIcon;
private Image openIcon;
private boolean autoClose = true;
private final EventDispatcher listeners = new EventDispatcher();
private boolean autoClose = true;
private String uiidBackGroundItem = "AccordionItem";
private String uiidHeader = "AccordionArrow";
private String uiidOpenCloseIcon = "AccordionArrow";
private final EventDispatcher listeners = new EventDispatcher();

/**
* Empty Constructor
*/
public Accordion() {
super.setLayout(BoxLayout.y());
this.closeIcon = FontImage.createMaterial(FontImage.MATERIAL_KEYBOARD_ARROW_RIGHT, UIManager.getInstance().getComponentStyle("AccordionArrow"));
this.openIcon = FontImage.createMaterial(FontImage.MATERIAL_KEYBOARD_ARROW_DOWN, UIManager.getInstance().getComponentStyle("AccordionArrow"));
this.closeIcon = FontImage.createMaterial(FontImage.MATERIAL_KEYBOARD_ARROW_RIGHT, UIManager.getInstance().getComponentStyle(uiidOpenCloseIcon));
this.openIcon = FontImage.createMaterial(FontImage.MATERIAL_KEYBOARD_ARROW_DOWN, UIManager.getInstance().getComponentStyle(uiidOpenCloseIcon));
setScrollableY(true);
}

Expand All @@ -97,8 +100,8 @@ public Accordion(Image openIcon, Image closeIcon) {
*/
public Accordion(char openIcon, char closeIcon) {
super.setLayout(BoxLayout.y());
this.closeIcon = FontImage.createMaterial(openIcon, UIManager.getInstance().getComponentStyle("AccordionArrow"));
this.openIcon = FontImage.createMaterial(closeIcon, UIManager.getInstance().getComponentStyle("AccordionArrow"));
this.closeIcon = FontImage.createMaterial(openIcon, UIManager.getInstance().getComponentStyle(uiidOpenCloseIcon));
this.openIcon = FontImage.createMaterial(closeIcon, UIManager.getInstance().getComponentStyle(uiidOpenCloseIcon));
setScrollableY(true);
}

Expand All @@ -110,6 +113,7 @@ public Accordion(char openIcon, char closeIcon) {
*/
public Accordion(char openIcon, char closeIcon, String openCloseUIID) {
super.setLayout(BoxLayout.y());
this.uiidOpenCloseIcon = openCloseUIID;
this.closeIcon = FontImage.createMaterial(openIcon, UIManager.getInstance().getComponentStyle(openCloseUIID));
this.openIcon = FontImage.createMaterial(closeIcon, UIManager.getInstance().getComponentStyle(openCloseUIID));
setScrollableY(true);
Expand All @@ -122,7 +126,7 @@ public Accordion(char openIcon, char closeIcon, String openCloseUIID) {
* @param body the item Component to hide/show
*/
public void addContent(String header, Component body) {
addContent(new Label(header), body);
addContent(new Label(header, uiidHeader), body);
}

/**
Expand Down Expand Up @@ -234,15 +238,15 @@ public void setOpenIcon(Image openIcon) {
* @param closeIcon the close icon (e.g. {@code FontImage.MATERIAL_KEYBOARD_ARROW_DOWN})
*/
public void setCloseIcon(char closeIcon) {
this.closeIcon = FontImage.createMaterial(closeIcon, UIManager.getInstance().getComponentStyle("AccordionArrow"));
this.closeIcon = FontImage.createMaterial(closeIcon, UIManager.getInstance().getComponentStyle(uiidOpenCloseIcon));
}

/**
* Sets the open icon using material image
* @param openIcon the open icon (e.g. {@code FontImage.MATERIAL_KEYBOARD_ARROW_RIGHT})
*/
public void setOpenIcon(char openIcon) {
this.openIcon = FontImage.createMaterial(openIcon, UIManager.getInstance().getComponentStyle("AccordionArrow"));
this.openIcon = FontImage.createMaterial(openIcon, UIManager.getInstance().getComponentStyle(uiidOpenCloseIcon));
}

/**
Expand All @@ -251,7 +255,7 @@ public void setOpenIcon(char openIcon) {
* @param size the size in millimeters for the arrow
*/
public void setCloseIcon(char closeIcon, float size) {
this.closeIcon = FontImage.createMaterial(closeIcon, UIManager.getInstance().getComponentStyle("AccordionArrow"), size);
this.closeIcon = FontImage.createMaterial(closeIcon, UIManager.getInstance().getComponentStyle(uiidOpenCloseIcon), size);
}

/**
Expand All @@ -260,7 +264,7 @@ public void setCloseIcon(char closeIcon, float size) {
* @param size the size in millimeters for the arrow
*/
public void setOpenIcon(char openIcon, float size) {
this.openIcon = FontImage.createMaterial(openIcon, UIManager.getInstance().getComponentStyle("AccordionArrow"), size);
this.openIcon = FontImage.createMaterial(openIcon, UIManager.getInstance().getComponentStyle(uiidOpenCloseIcon), size);
}

/**
Expand Down Expand Up @@ -294,23 +298,21 @@ public void setAutoClose(boolean autoClose) {
class AccordionContent extends Container {

private boolean closed = true;

private final Button arrow = new Button();

private Component body;
Component header;
private Component header;

public AccordionContent(Component header, final Component body) {
setUIID("AccordionItem");
setUIID(uiidBackGroundItem);
setLayout(new BorderLayout());
this.body = body;
this.header = header;
header.setSelectedStyle(header.getUnselectedStyle());
header.setPressedStyle(header.getUnselectedStyle());
Container top = new Container(new BorderLayout());
top.add(BorderLayout.CENTER, header);
top.setUIID("AccordionHeader");
arrow.setUIID("AccordionArrow");
top.setUIID(uiidHeader);
arrow.setUIID(uiidOpenCloseIcon);
arrow.setIcon(closeIcon);
arrow.addActionListener(new ActionListener() {

Expand All @@ -336,7 +338,7 @@ public void actionPerformed(ActionEvent evt) {
body.setHidden(true);
add(BorderLayout.CENTER, body);
}

public boolean isClosed() {
return closed;
}
Expand Down Expand Up @@ -372,5 +374,58 @@ public void removeOnClickItemListener(ActionListener a) {
private void fireEvent(ActionEvent ev) {
listeners.fireActionEvent(ev);
}

/**
* Default UIID for the content item within the accordion
*
* @param uiidBackGroundItem to custom the background in the accordion component
*/
public void setBackgroundItemUIID(String uiidBackGroundItem) {
this.uiidBackGroundItem = uiidBackGroundItem;
}

/**
* Default UIID for the content item within the accordion
*
* @return the uiid
*/
public String getBackgroundItemUIID() {
return uiidBackGroundItem;
}

/**
* UIID for the header component
*
* @param uiidHeader to custom the header in the accordion component
*/
public void setHeaderUIID(String uiidHeader) {
this.uiidHeader = uiidHeader;
}

/**
* UIID for the header component
*
* @retrun the uiid
*/
public String getHeaderUIID() {
return uiidHeader;
}

/**
* UIID for the arrow icon for expanding/collapsing
*
* @param uiidOpenCloseIcon to custom the background of the Open/Close icon
*/
public void setOpenCloseIconUIID(String uiidOpenCloseIcon) {
this.uiidOpenCloseIcon = uiidOpenCloseIcon;
}

/**
* UIID for the arrow icon for expanding/collapsing
*
* @return the UIID
*/
public String getOpenCloseIconUIID() {
return uiidOpenCloseIcon;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import com.codename1.ui.Display;
import com.codename1.ui.FontImage;
import com.codename1.ui.Form;
import com.codename1.ui.Graphics;
import com.codename1.ui.Label;
import com.codename1.ui.animations.CommonTransitions;
import com.codename1.ui.events.ActionEvent;
Expand Down Expand Up @@ -112,11 +111,13 @@ protected FloatingActionButton(char icon, String text, float size) {
*
* @param icon one of the FontImage.MATERIAL_* constants
* @param text the text of the sub FloatingActionButton
* @string uiid the uiid of the FAB
* @param uiid the uiid of the FAB
* @param size the size in millimeters
*/
protected FloatingActionButton(char icon, String text, String uiid, float size) {
FontImage image = FontImage.createMaterial(icon, uiid, size);
setGap(0);
image.setBgTransparency(0);
sizeMm = size;
setIcon(image);
setText("");
Expand All @@ -140,6 +141,7 @@ public void setUIID(String id) {
all.setAlignment(CENTER);
updateBorder();
FontImage image = FontImage.createMaterial(i.getText().charAt(0), id, sizeMm);
image.setBgTransparency(0);
setIcon(image);
}
}
Expand Down Expand Up @@ -181,6 +183,7 @@ public void styleChanged(String propertyName, Style source) {
if(getIcon() instanceof FontImage && propertyName.equals(Style.FG_COLOR)) {
FontImage i = (FontImage)getIcon();
FontImage image = FontImage.createMaterial(i.getText().charAt(0), "FloatingActionButton", sizeMm);
image.setBgTransparency(0);
setIcon(image);
}
}
Expand Down
Loading