Explorar el Código

Unify enable/enabled options

In some places “enable” was used to control certain options. This commit adds backwards compatible support
for “enabled” property which should be used from now on.
Guy Carmeli hace 6 años
padre
commit
01b378df14

+ 5
- 0
docs/docs/styling.md Ver fichero

287
 Navigation.setDefaultOptions({
287
 Navigation.setDefaultOptions({
288
   animations: {
288
   animations: {
289
     setRoot: {
289
     setRoot: {
290
+      enabled: 'true' | 'false', // Optional, used to enable/disable the animation
290
       alpha: {
291
       alpha: {
291
         from: 0,
292
         from: 0,
292
         to: 1,
293
         to: 1,
315
 ```js
316
 ```js
316
 animations: {
317
 animations: {
317
   push: {
318
   push: {
319
+    enabled: 'true' | 'false', // Optional, used to enable/disable the animation
318
     topBar: {
320
     topBar: {
319
       id: 'TEST', // Optional, id of the TopBar we'd like to animate.
321
       id: 'TEST', // Optional, id of the TopBar we'd like to animate.
320
       alpha: {
322
       alpha: {
334
         to: 1
336
         to: 1
335
       }
337
       }
336
     }
338
     }
339
+  },
340
+  pop: {
341
+    ...
337
   }
342
   }
338
 }
343
 }
339
 ```
344
 ```

+ 6
- 5
lib/android/app/src/main/java/com/reactnativenavigation/parse/AnimationOptions.java Ver fichero

33
                     options.id = TextParser.parse(json, key);
33
                     options.id = TextParser.parse(json, key);
34
                     break;
34
                     break;
35
                 case "enable":
35
                 case "enable":
36
-                    options.enable = BoolParser.parse(json, key);
36
+                case "enabled":
37
+                    options.enabled = BoolParser.parse(json, key);
37
                     break;
38
                     break;
38
                 case "waitForRender":
39
                 case "waitForRender":
39
                     options.waitForRender = BoolParser.parse(json, key);
40
                     options.waitForRender = BoolParser.parse(json, key);
47
     }
48
     }
48
 
49
 
49
     public Text id = new NullText();
50
     public Text id = new NullText();
50
-    public Bool enable = new NullBool();
51
+    public Bool enabled = new NullBool();
51
     public Bool waitForRender = new NullBool();
52
     public Bool waitForRender = new NullBool();
52
     private HashSet<ValueAnimationOptions> valueOptions = new HashSet<>();
53
     private HashSet<ValueAnimationOptions> valueOptions = new HashSet<>();
53
 
54
 
54
     void mergeWith(AnimationOptions other) {
55
     void mergeWith(AnimationOptions other) {
55
         if (other.id.hasValue()) id = other.id;
56
         if (other.id.hasValue()) id = other.id;
56
-        if (other.enable.hasValue()) enable = other.enable;
57
+        if (other.enabled.hasValue()) enabled = other.enabled;
57
         if (other.waitForRender.hasValue()) waitForRender = other.waitForRender;
58
         if (other.waitForRender.hasValue()) waitForRender = other.waitForRender;
58
         if (!other.valueOptions.isEmpty()) valueOptions = other.valueOptions;
59
         if (!other.valueOptions.isEmpty()) valueOptions = other.valueOptions;
59
     }
60
     }
60
 
61
 
61
     void mergeWithDefault(AnimationOptions defaultOptions) {
62
     void mergeWithDefault(AnimationOptions defaultOptions) {
62
         if (!id.hasValue()) id = defaultOptions.id;
63
         if (!id.hasValue()) id = defaultOptions.id;
63
-        if (!enable.hasValue()) enable = defaultOptions.enable;
64
+        if (!enabled.hasValue()) enabled = defaultOptions.enabled;
64
         if (!waitForRender.hasValue()) waitForRender = defaultOptions.waitForRender;
65
         if (!waitForRender.hasValue()) waitForRender = defaultOptions.waitForRender;
65
         if (valueOptions.isEmpty()) valueOptions = defaultOptions.valueOptions;
66
         if (valueOptions.isEmpty()) valueOptions = defaultOptions.valueOptions;
66
     }
67
     }
67
 
68
 
68
     public boolean hasValue() {
69
     public boolean hasValue() {
69
-        return id.hasValue() || enable.hasValue() || waitForRender.hasValue();
70
+        return id.hasValue() || enabled.hasValue() || waitForRender.hasValue();
70
     }
71
     }
71
 
72
 
72
     public AnimatorSet getAnimation(View view) {
73
     public AnimatorSet getAnimation(View view) {

+ 4
- 4
lib/android/app/src/main/java/com/reactnativenavigation/parse/NestedAnimationsOptions.java Ver fichero

15
         options.content = AnimationOptions.parse(json.optJSONObject("content"));
15
         options.content = AnimationOptions.parse(json.optJSONObject("content"));
16
         options.bottomTabs = AnimationOptions.parse(json.optJSONObject("bottomTabs"));
16
         options.bottomTabs = AnimationOptions.parse(json.optJSONObject("bottomTabs"));
17
         options.topBar = AnimationOptions.parse(json.optJSONObject("topBar"));
17
         options.topBar = AnimationOptions.parse(json.optJSONObject("topBar"));
18
-        options.enable = BoolParser.parse(json, "enable");
18
+        options.enabled = BoolParser.parseFirst(json, "enabled", "enable");
19
         options.waitForRender = BoolParser.parse(json, "waitForRender");
19
         options.waitForRender = BoolParser.parse(json, "waitForRender");
20
 
20
 
21
         return options;
21
         return options;
22
     }
22
     }
23
 
23
 
24
-    public Bool enable = new NullBool();
24
+    public Bool enabled = new NullBool();
25
     public Bool waitForRender = new NullBool();
25
     public Bool waitForRender = new NullBool();
26
     public AnimationOptions content = new AnimationOptions();
26
     public AnimationOptions content = new AnimationOptions();
27
     public AnimationOptions bottomTabs = new AnimationOptions();
27
     public AnimationOptions bottomTabs = new AnimationOptions();
31
         topBar.mergeWith(other.topBar);
31
         topBar.mergeWith(other.topBar);
32
         content.mergeWith(other.content);
32
         content.mergeWith(other.content);
33
         bottomTabs.mergeWith(other.bottomTabs);
33
         bottomTabs.mergeWith(other.bottomTabs);
34
-        if (other.enable.hasValue()) enable = other.enable;
34
+        if (other.enabled.hasValue()) enabled = other.enabled;
35
         if (other.waitForRender.hasValue()) waitForRender = other.waitForRender;
35
         if (other.waitForRender.hasValue()) waitForRender = other.waitForRender;
36
     }
36
     }
37
 
37
 
39
         content.mergeWithDefault(defaultOptions.content);
39
         content.mergeWithDefault(defaultOptions.content);
40
         bottomTabs.mergeWithDefault(defaultOptions.bottomTabs);
40
         bottomTabs.mergeWithDefault(defaultOptions.bottomTabs);
41
         topBar.mergeWithDefault(defaultOptions.topBar);
41
         topBar.mergeWithDefault(defaultOptions.topBar);
42
-        if (!enable.hasValue()) enable = defaultOptions.enable;
42
+        if (!enabled.hasValue()) enabled = defaultOptions.enabled;
43
         if (!waitForRender.hasValue()) waitForRender = defaultOptions.waitForRender;
43
         if (!waitForRender.hasValue()) waitForRender = defaultOptions.waitForRender;
44
     }
44
     }
45
 
45
 

+ 11
- 2
lib/android/app/src/main/java/com/reactnativenavigation/parse/parsers/BoolParser.java Ver fichero

5
 
5
 
6
 import org.json.JSONObject;
6
 import org.json.JSONObject;
7
 
7
 
8
+import java.util.Arrays;
9
+
10
+import static com.reactnativenavigation.utils.CollectionUtils.first;
11
+
8
 public class BoolParser {
12
 public class BoolParser {
9
-    public static Bool parse(JSONObject json, String bool) {
10
-        return json.has(bool) ? new Bool(json.optBoolean(bool)) : new NullBool();
13
+    public static Bool parse(JSONObject json, String key) {
14
+        return json.has(key) ? new Bool(json.optBoolean(key)) : new NullBool();
15
+    }
16
+
17
+    public static Bool parseFirst(JSONObject json, String... keys) {
18
+        String first = first(Arrays.asList(keys), json::has);
19
+        return first != null ? new Bool(json.optBoolean(first)) : new NullBool();
11
     }
20
     }
12
 }
21
 }

+ 3
- 3
lib/android/app/src/main/java/com/reactnativenavigation/presentation/StackPresenter.java Ver fichero

226
 
226
 
227
     private void applyTopBarVisibility(TopBarOptions options, AnimationsOptions animationOptions, Options componentOptions) {
227
     private void applyTopBarVisibility(TopBarOptions options, AnimationsOptions animationOptions, Options componentOptions) {
228
         if (options.visible.isFalse()) {
228
         if (options.visible.isFalse()) {
229
-            if (options.animate.isTrueOrUndefined() && componentOptions.animations.push.enable.isTrueOrUndefined()) {
229
+            if (options.animate.isTrueOrUndefined() && componentOptions.animations.push.enabled.isTrueOrUndefined()) {
230
                 topBar.hideAnimate(animationOptions.pop.topBar);
230
                 topBar.hideAnimate(animationOptions.pop.topBar);
231
             } else {
231
             } else {
232
                 topBar.hide();
232
                 topBar.hide();
233
             }
233
             }
234
         }
234
         }
235
         if (options.visible.isTrueOrUndefined()) {
235
         if (options.visible.isTrueOrUndefined()) {
236
-            if (options.animate.isTrueOrUndefined() && componentOptions.animations.push.enable.isTrueOrUndefined()) {
236
+            if (options.animate.isTrueOrUndefined() && componentOptions.animations.push.enabled.isTrueOrUndefined()) {
237
                 topBar.showAnimate(animationOptions.push.topBar);
237
                 topBar.showAnimate(animationOptions.push.topBar);
238
             } else {
238
             } else {
239
                 topBar.show();
239
                 topBar.show();
301
 
301
 
302
     public void onChildWillAppear(Options appearing, Options disappearing) {
302
     public void onChildWillAppear(Options appearing, Options disappearing) {
303
         if (disappearing.topBar.visible.isTrueOrUndefined() && appearing.topBar.visible.isFalse()) {
303
         if (disappearing.topBar.visible.isTrueOrUndefined() && appearing.topBar.visible.isFalse()) {
304
-            if (disappearing.topBar.animate.isTrueOrUndefined() && disappearing.animations.pop.enable.isTrueOrUndefined()) {
304
+            if (disappearing.topBar.animate.isTrueOrUndefined() && disappearing.animations.pop.enabled.isTrueOrUndefined()) {
305
                 topBar.hideAnimate(disappearing.animations.pop.topBar);
305
                 topBar.hideAnimate(disappearing.animations.pop.topBar);
306
             } else {
306
             } else {
307
                 topBar.hide();
307
                 topBar.hide();

+ 8
- 0
lib/android/app/src/main/java/com/reactnativenavigation/utils/CollectionUtils.java Ver fichero

75
         }
75
         }
76
     }
76
     }
77
 
77
 
78
+    public static @Nullable <T> T first(@Nullable Collection<T> items, Filter<T> by) {
79
+        if (isNullOrEmpty(items)) return null;
80
+        for (T item : items) {
81
+            if (by.filter(item)) return item;
82
+        }
83
+        return null;
84
+    }
85
+
78
     private static @NonNull <T> Collection<T> get(@Nullable Collection<T> t) {
86
     private static @NonNull <T> Collection<T> get(@Nullable Collection<T> t) {
79
         return t == null ? Collections.EMPTY_LIST : t;
87
         return t == null ? Collections.EMPTY_LIST : t;
80
     }
88
     }

+ 2
- 2
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/modal/ModalPresenter.java Ver fichero

38
         Options options = toAdd.resolveCurrentOptions(defaultOptions);
38
         Options options = toAdd.resolveCurrentOptions(defaultOptions);
39
         toAdd.setWaitForRender(options.animations.showModal.waitForRender);
39
         toAdd.setWaitForRender(options.animations.showModal.waitForRender);
40
         modalsContainer.addView(toAdd.getView());
40
         modalsContainer.addView(toAdd.getView());
41
-        if (options.animations.showModal.enable.isTrueOrUndefined()) {
41
+        if (options.animations.showModal.enabled.isTrueOrUndefined()) {
42
             if (options.animations.showModal.waitForRender.isTrue()) {
42
             if (options.animations.showModal.waitForRender.isTrue()) {
43
                 toAdd.setOnAppearedListener(() -> animateShow(toAdd, toRemove, listener, options));
43
                 toAdd.setOnAppearedListener(() -> animateShow(toAdd, toRemove, listener, options));
44
             } else {
44
             } else {
83
             listener.onError("Can not dismiss modal before activity is created");
83
             listener.onError("Can not dismiss modal before activity is created");
84
             return;
84
             return;
85
         }
85
         }
86
-        if (toDismiss.options.animations.dismissModal.enable.isTrueOrUndefined()) {
86
+        if (toDismiss.options.animations.dismissModal.enabled.isTrueOrUndefined()) {
87
             animator.dismiss(toDismiss.getView(), toDismiss.options.animations.dismissModal, new AnimatorListenerAdapter() {
87
             animator.dismiss(toDismiss.getView(), toDismiss.options.animations.dismissModal, new AnimatorListenerAdapter() {
88
                 @Override
88
                 @Override
89
                 public void onAnimationEnd(Animator animation) {
89
                 public void onAnimationEnd(Animator animation) {

+ 2
- 2
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackController.java Ver fichero

144
         addChildToStack(child, child.getView(), resolvedOptions);
144
         addChildToStack(child, child.getView(), resolvedOptions);
145
 
145
 
146
         if (toRemove != null) {
146
         if (toRemove != null) {
147
-            if (resolvedOptions.animations.push.enable.isTrueOrUndefined()) {
147
+            if (resolvedOptions.animations.push.enabled.isTrueOrUndefined()) {
148
                 if (resolvedOptions.animations.push.waitForRender.isTrue()) {
148
                 if (resolvedOptions.animations.push.waitForRender.isTrue()) {
149
                     child.getView().setAlpha(0);
149
                     child.getView().setAlpha(0);
150
                     child.setOnAppearedListener(() -> animator.push(child.getView(), resolvedOptions.animations.push, resolvedOptions.transitions, toRemove.getElements(), child.getElements(), () -> {
150
                     child.setOnAppearedListener(() -> animator.push(child.getView(), resolvedOptions.animations.push, resolvedOptions.transitions, toRemove.getElements(), child.getElements(), () -> {
218
             getView().addView(appearingView, 0);
218
             getView().addView(appearingView, 0);
219
         }
219
         }
220
         presenter.onChildWillAppear(appearing.options, disappearing.options);
220
         presenter.onChildWillAppear(appearing.options, disappearing.options);
221
-        if (disappearing.options.animations.pop.enable.isTrueOrUndefined()) {
221
+        if (disappearing.options.animations.pop.enabled.isTrueOrUndefined()) {
222
             animator.pop(disappearing.getView(), resolvedOptions.animations.pop, () -> finishPopping(disappearing, listener));
222
             animator.pop(disappearing.getView(), resolvedOptions.animations.pop, () -> finishPopping(disappearing, listener));
223
         } else {
223
         } else {
224
             finishPopping(disappearing, listener);
224
             finishPopping(disappearing, listener);

+ 4
- 4
lib/android/app/src/test/java/com/reactnativenavigation/BaseTest.java Ver fichero

56
 
56
 
57
     protected void disablePushAnimation(ViewController... controllers) {
57
     protected void disablePushAnimation(ViewController... controllers) {
58
         for (ViewController controller : controllers) {
58
         for (ViewController controller : controllers) {
59
-            controller.options.animations.push.enable = new Bool(false);
59
+            controller.options.animations.push.enabled = new Bool(false);
60
         }
60
         }
61
     }
61
     }
62
 
62
 
63
     protected void disablePopAnimation(ViewController... controllers) {
63
     protected void disablePopAnimation(ViewController... controllers) {
64
         for (ViewController controller : controllers) {
64
         for (ViewController controller : controllers) {
65
-            controller.options.animations.pop.enable = new Bool(false);
65
+            controller.options.animations.pop.enabled = new Bool(false);
66
         }
66
         }
67
     }
67
     }
68
 
68
 
73
 
73
 
74
     protected void disableShowModalAnimation(ViewController... modals) {
74
     protected void disableShowModalAnimation(ViewController... modals) {
75
         for (ViewController modal : modals) {
75
         for (ViewController modal : modals) {
76
-            modal.options.animations.showModal.enable = new Bool(false);
76
+            modal.options.animations.showModal.enabled = new Bool(false);
77
         }
77
         }
78
     }
78
     }
79
 
79
 
80
     protected void disableDismissModalAnimation(ViewController... modals) {
80
     protected void disableDismissModalAnimation(ViewController... modals) {
81
         for (ViewController modal : modals) {
81
         for (ViewController modal : modals) {
82
-            modal.options.animations.dismissModal.enable = new Bool(false);
82
+            modal.options.animations.dismissModal.enabled = new Bool(false);
83
         }
83
         }
84
     }
84
     }
85
 
85
 

+ 28
- 0
lib/android/app/src/test/java/com/reactnativenavigation/parse/parsers/BoolParserTest.java Ver fichero

1
+package com.reactnativenavigation.parse.parsers;
2
+
3
+import com.reactnativenavigation.BaseTest;
4
+
5
+import org.json.JSONException;
6
+import org.json.JSONObject;
7
+import org.junit.Test;
8
+
9
+import static org.assertj.core.api.Java6Assertions.assertThat;
10
+
11
+public class BoolParserTest extends BaseTest {
12
+
13
+    @Test
14
+    public void parse() throws JSONException {
15
+        JSONObject json = new JSONObject();
16
+        json.put("value", true);
17
+        assertThat(BoolParser.parse(json, "value").get()).isTrue();
18
+    }
19
+
20
+    @Test
21
+    public void parseFirst() throws JSONException {
22
+        JSONObject json = new JSONObject();
23
+        json.put("value1", true);
24
+        json.put("value2", false);
25
+        assertThat(BoolParser.parseFirst(json, "value1", "value2").get()).isTrue();
26
+        assertThat(BoolParser.parseFirst(json, "value2", "value1").get()).isFalse();
27
+    }
28
+}

+ 1
- 1
lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalPresenterTest.java Ver fichero

89
     @Test
89
     @Test
90
     public void showModal_resolvesDefaultOptions() throws JSONException {
90
     public void showModal_resolvesDefaultOptions() throws JSONException {
91
         Options defaultOptions = new Options();
91
         Options defaultOptions = new Options();
92
-        JSONObject disabledShowModalAnimation = new JSONObject().put("enable", false);
92
+        JSONObject disabledShowModalAnimation = new JSONObject().put("enabled", false);
93
         defaultOptions.animations.showModal = AnimationOptions.parse(disabledShowModalAnimation);
93
         defaultOptions.animations.showModal = AnimationOptions.parse(disabledShowModalAnimation);
94
 
94
 
95
         uut.setDefaultOptions(defaultOptions);
95
         uut.setDefaultOptions(defaultOptions);

+ 3
- 3
lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/NavigatorTest.java Ver fichero

433
 
433
 
434
     @Test
434
     @Test
435
     public void pushedStackCanBePopped() {
435
     public void pushedStackCanBePopped() {
436
-        child1.options.animations.push.enable = new Bool(false);
437
-        child2.options.animations.push.enable = new Bool(false);
436
+        child1.options.animations.push.enabled = new Bool(false);
437
+        child2.options.animations.push.enabled = new Bool(false);
438
         StackController spy = spy(parentController);
438
         StackController spy = spy(parentController);
439
         StackController parent = newStack();
439
         StackController parent = newStack();
440
         parent.ensureViewIsCreated();
440
         parent.ensureViewIsCreated();
577
         disablePushAnimation(child1);
577
         disablePushAnimation(child1);
578
 
578
 
579
         StackController spy = spy(parentController);
579
         StackController spy = spy(parentController);
580
-        spy.options.animations.setRoot.enable = new Bool(false);
580
+        spy.options.animations.setRoot.enabled = new Bool(false);
581
         uut.setRoot(spy, new CommandListenerAdapter());
581
         uut.setRoot(spy, new CommandListenerAdapter());
582
         spy.push(child1, new CommandListenerAdapter());
582
         spy.push(child1, new CommandListenerAdapter());
583
         activityController.destroy();
583
         activityController.destroy();

+ 14
- 14
lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackControllerTest.java Ver fichero

402
 
402
 
403
         child1.options.topBar.visible = new Bool(false);
403
         child1.options.topBar.visible = new Bool(false);
404
         child1.options.topBar.animate = new Bool(false);
404
         child1.options.topBar.animate = new Bool(false);
405
-        child1.options.animations.push.enable = new Bool(false);
405
+        child1.options.animations.push.enabled = new Bool(false);
406
 
406
 
407
         uut.push(child1, new CommandListenerAdapter());
407
         uut.push(child1, new CommandListenerAdapter());
408
         uut.push(child2, new CommandListenerAdapter() {
408
         uut.push(child2, new CommandListenerAdapter() {
433
 
433
 
434
     @Test
434
     @Test
435
     public void pop_appearingChildHasCorrectLayoutParams() {
435
     public void pop_appearingChildHasCorrectLayoutParams() {
436
-        child2.options.animations.pop.enable = new Bool(false);
436
+        child2.options.animations.pop.enabled = new Bool(false);
437
         child1.options.topBar.drawBehind = new Bool(false);
437
         child1.options.topBar.drawBehind = new Bool(false);
438
 
438
 
439
         StackController uut = createStack(Arrays.asList(child1, child2));
439
         StackController uut = createStack(Arrays.asList(child1, child2));
514
 
514
 
515
     @Test
515
     @Test
516
     public void popToRoot_PopsEverythingAboveFirstController() {
516
     public void popToRoot_PopsEverythingAboveFirstController() {
517
-        child1.options.animations.push.enable = new Bool(false);
518
-        child2.options.animations.push.enable = new Bool(false);
517
+        child1.options.animations.push.enabled = new Bool(false);
518
+        child2.options.animations.push.enabled = new Bool(false);
519
 
519
 
520
         uut.push(child1, new CommandListenerAdapter());
520
         uut.push(child1, new CommandListenerAdapter());
521
         uut.push(child2, new CommandListenerAdapter());
521
         uut.push(child2, new CommandListenerAdapter());
538
 
538
 
539
     @Test
539
     @Test
540
     public void popToRoot_onlyTopChildIsAnimated() {
540
     public void popToRoot_onlyTopChildIsAnimated() {
541
-        child1.options.animations.push.enable = new Bool(false);
542
-        child2.options.animations.push.enable = new Bool(false);
541
+        child1.options.animations.push.enabled = new Bool(false);
542
+        child2.options.animations.push.enabled = new Bool(false);
543
 
543
 
544
         uut.push(child1, new CommandListenerAdapter());
544
         uut.push(child1, new CommandListenerAdapter());
545
         uut.push(child2, new CommandListenerAdapter());
545
         uut.push(child2, new CommandListenerAdapter());
558
 
558
 
559
     @Test
559
     @Test
560
     public void popToRoot_topChildrenAreDestroyed() {
560
     public void popToRoot_topChildrenAreDestroyed() {
561
-        child1.options.animations.push.enable = new Bool(false);
562
-        child2.options.animations.push.enable = new Bool(false);
563
-        child3.options.animations.push.enable = new Bool(false);
561
+        child1.options.animations.push.enabled = new Bool(false);
562
+        child2.options.animations.push.enabled = new Bool(false);
563
+        child3.options.animations.push.enabled = new Bool(false);
564
 
564
 
565
         uut.push(child1, new CommandListenerAdapter());
565
         uut.push(child1, new CommandListenerAdapter());
566
         uut.push(child2, new CommandListenerAdapter());
566
         uut.push(child2, new CommandListenerAdapter());
633
 
633
 
634
     @Test
634
     @Test
635
     public void pop_callWillAppearWillDisappear() {
635
     public void pop_callWillAppearWillDisappear() {
636
-        child1.options.animations.push.enable = new Bool(false);
637
-        child2.options.animations.push.enable = new Bool(false);
636
+        child1.options.animations.push.enabled = new Bool(false);
637
+        child2.options.animations.push.enabled = new Bool(false);
638
         child1 = spy(child1);
638
         child1 = spy(child1);
639
         child2 = spy(child2);
639
         child2 = spy(child2);
640
         uut.push(child1, new CommandListenerAdapter());
640
         uut.push(child1, new CommandListenerAdapter());
649
         uut.ensureViewIsCreated();
649
         uut.ensureViewIsCreated();
650
 
650
 
651
         child1.options.topBar.visible = new Bool(false);
651
         child1.options.topBar.visible = new Bool(false);
652
-        child1.options.animations.push.enable = new Bool(false);
653
-        child2.options.animations.push.enable = new Bool(true);
652
+        child1.options.animations.push.enabled = new Bool(false);
653
+        child2.options.animations.push.enabled = new Bool(true);
654
         uut.push(child1, new CommandListenerAdapter() {
654
         uut.push(child1, new CommandListenerAdapter() {
655
             @Override
655
             @Override
656
             public void onSuccess(String childId) {
656
             public void onSuccess(String childId) {
678
 
678
 
679
         child1.options.topBar.visible = new Bool(false);
679
         child1.options.topBar.visible = new Bool(false);
680
         child1.options.topBar.animate = new Bool(false);
680
         child1.options.topBar.animate = new Bool(false);
681
-        child2.options.animations.push.enable = new Bool(false);
681
+        child2.options.animations.push.enabled = new Bool(false);
682
         child2.options.topBar.animate = new Bool(false);
682
         child2.options.topBar.animate = new Bool(false);
683
 
683
 
684
         child1.ensureViewIsCreated();
684
         child1.ensureViewIsCreated();