|
@@ -4,7 +4,7 @@ import android.app.Activity;
|
4
|
4
|
import android.graphics.Color;
|
5
|
5
|
import android.os.Build;
|
6
|
6
|
import android.view.View;
|
7
|
|
-import android.view.ViewGroup;
|
|
7
|
+import android.view.ViewGroup.MarginLayoutParams;
|
8
|
8
|
|
9
|
9
|
import com.reactnativenavigation.parse.Options;
|
10
|
10
|
import com.reactnativenavigation.parse.OrientationOptions;
|
|
@@ -40,6 +40,9 @@ public class OptionsPresenter {
|
40
|
40
|
if (options.layout.backgroundColor.hasValue()) {
|
41
|
41
|
view.setBackgroundColor(options.layout.backgroundColor.get());
|
42
|
42
|
}
|
|
43
|
+ if (options.layout.topMargin.hasValue()) {
|
|
44
|
+ ((MarginLayoutParams) view.getLayoutParams()).topMargin = options.layout.topMargin.get();
|
|
45
|
+ }
|
43
|
46
|
}
|
44
|
47
|
|
45
|
48
|
public void onViewBroughtToFront(View view, Options options) {
|
|
@@ -86,7 +89,7 @@ public class OptionsPresenter {
|
86
|
89
|
}
|
87
|
90
|
|
88
|
91
|
private void setDrawBehindStatusBar(View view, StatusBarOptions statusBar) {
|
89
|
|
- ((ViewGroup.MarginLayoutParams) view.getLayoutParams()).topMargin = statusBar.drawBehind.isFalseOrUndefined() ?
|
|
92
|
+ ((MarginLayoutParams) view.getLayoutParams()).topMargin = statusBar.drawBehind.isFalseOrUndefined() ?
|
90
|
93
|
UiUtils.getStatusBarHeight(activity) :
|
91
|
94
|
0;
|
92
|
95
|
}
|