|
@@ -27,7 +27,7 @@ public class OptionsPresenter {
|
27
|
27
|
public void applyChildOptions(Options options, Component child) {
|
28
|
28
|
applyOrientation(options.orientationOptions);
|
29
|
29
|
applyButtons(options.topBarOptions.leftButtons, options.topBarOptions.rightButtons);
|
30
|
|
- applyTopBarOptions(options.topBarOptions, child, options.animationsOptions);
|
|
30
|
+ applyTopBarOptions(options.topBarOptions, options.animationsOptions, child);
|
31
|
31
|
applyTopTabsOptions(options.topTabsOptions);
|
32
|
32
|
applyTopTabOptions(options.topTabOptions);
|
33
|
33
|
}
|
|
@@ -36,7 +36,7 @@ public class OptionsPresenter {
|
36
|
36
|
((Activity) topBar.getContext()).setRequestedOrientation(options.getValue());
|
37
|
37
|
}
|
38
|
38
|
|
39
|
|
- private void applyTopBarOptions(TopBarOptions options, Component component, AnimationsOptions animationOptions) {
|
|
39
|
+ private void applyTopBarOptions(TopBarOptions options, AnimationsOptions animationOptions, Component component) {
|
40
|
40
|
if (options.title.text.hasValue()) topBar.setTitle(options.title.text.get());
|
41
|
41
|
if (options.title.component.hasValue())
|
42
|
42
|
topBar.setComponent(options.title.component.get(), options.title.alignment);
|
|
@@ -107,7 +107,7 @@ public class OptionsPresenter {
|
107
|
107
|
public void mergeChildOptions(Options options, Component child) {
|
108
|
108
|
mergeOrientation(options.orientationOptions);
|
109
|
109
|
mergeButtons(options.topBarOptions.leftButtons, options.topBarOptions.rightButtons);
|
110
|
|
- mergeTopBarOptions(options.topBarOptions, child);
|
|
110
|
+ mergeTopBarOptions(options.topBarOptions, options.animationsOptions, child);
|
111
|
111
|
mergeTopTabsOptions(options.topTabsOptions);
|
112
|
112
|
mergeTopTabOptions(options.topTabOptions);
|
113
|
113
|
}
|
|
@@ -121,7 +121,7 @@ public class OptionsPresenter {
|
121
|
121
|
if (rightButtons != null) topBar.setRightButtons(rightButtons);
|
122
|
122
|
}
|
123
|
123
|
|
124
|
|
- private void mergeTopBarOptions(TopBarOptions options, Component component) {
|
|
124
|
+ private void mergeTopBarOptions(TopBarOptions options, AnimationsOptions animationsOptions, Component component) {
|
125
|
125
|
if (options.title.text.hasValue()) topBar.setTitle(options.title.text.get());
|
126
|
126
|
if (options.title.component.hasValue()) topBar.setComponent(options.title.component.get(), options.title.alignment);
|
127
|
127
|
if (options.background.color.hasValue()) topBar.setBackgroundColor(options.background.color);
|
|
@@ -131,10 +131,18 @@ public class OptionsPresenter {
|
131
|
131
|
|
132
|
132
|
if (options.title.fontFamily != null) topBar.setTitleTypeface(options.title.fontFamily);
|
133
|
133
|
if (options.visible.isFalse()) {
|
134
|
|
- topBar.hide(options.animate);
|
|
134
|
+ if (options.animate.isTrueOrUndefined()) {
|
|
135
|
+ topBar.hideAnimate(animationsOptions.pop.topBar);
|
|
136
|
+ } else {
|
|
137
|
+ topBar.hide();
|
|
138
|
+ }
|
135
|
139
|
}
|
136
|
140
|
if (options.visible.isTrue()) {
|
137
|
|
- topBar.show(options.animate);
|
|
141
|
+ if (options.animate.isTrueOrUndefined()) {
|
|
142
|
+ topBar.showAnimate(animationsOptions.push.topBar);
|
|
143
|
+ } else {
|
|
144
|
+ topBar.show();
|
|
145
|
+ }
|
138
|
146
|
}
|
139
|
147
|
if (options.drawBehind.isTrue()) {
|
140
|
148
|
component.drawBehindTopBar();
|