Skip to content

Commit

Permalink
Merge pull request #9323 from jquick-axway/TIMOB-12734
Browse files Browse the repository at this point in the history
[TIMOB-12734] Android: Added ability to change layout dynamically via "layout" property like iOS.
  • Loading branch information
Lokesh Choudhary committed Aug 17, 2017
2 parents 8f0fd94 + 383cc1e commit 220d265
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,13 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP
layoutParams.optionWidth = null;
}
layoutNativeView();
} else if (key.equals(TiC.PROPERTY_LAYOUT)) {
String layout = TiConvert.toString(newValue);
if (nativeView instanceof TiCompositeLayout) {
resetPostAnimationValues();
((TiCompositeLayout)nativeView).setLayoutArrangement(layout);
layoutNativeView();
}
} else if (key.equals(TiC.PROPERTY_ZINDEX)) {
if (newValue != null) {
layoutParams.optionZIndex = TiConvert.toInt(newValue);
Expand Down Expand Up @@ -1091,7 +1098,8 @@ public void processProperties(KrollDict d)
}
}

// TODO dead code? @Override
// TODO dead code?
@Override
public void propertiesChanged(List<KrollPropertyChange> changes, KrollProxy proxy)
{
for (KrollPropertyChange change : changes) {
Expand Down

0 comments on commit 220d265

Please sign in to comment.