@@ -35,7 +35,7 @@ public static UIWidgetsViewController getInstance() {
35
35
private boolean keyboardOpen ;
36
36
37
37
private void setup () {
38
- Log .i ("tag" , "On Setup" );
38
+ // Log.i("tag", "On Setup 2 ");
39
39
40
40
keyboardOpen = false ;
41
41
viewMetrics = new UIWidgetsViewMetrics ();
@@ -111,7 +111,7 @@ private boolean hasNavigationBar() {
111
111
} catch (Exception e ) {
112
112
e .printStackTrace ();
113
113
}
114
-
114
+ //Log.i("UIWidgetsDebug", " hasBar: " + hasBar);
115
115
return hasBar ;
116
116
}
117
117
@@ -120,6 +120,8 @@ public void updateViewMetrics() {
120
120
Rect rect = new Rect ();
121
121
unityView .getWindowVisibleDisplayFrame (rect );
122
122
123
+ //Log.i("UIWidgetsDebug", "calculation: " + unityView.getRootView().getHeight() + " " + rect.bottom + " " + rect.top);
124
+
123
125
rect .bottom = unityView .getRootView ().getHeight () - (rect .bottom - rect .top ) - rect .top ;
124
126
rect .right = unityView .getRootView ().getWidth () - (rect .right - rect .left ) - rect .left ;
125
127
@@ -129,9 +131,6 @@ public void updateViewMetrics() {
129
131
ZeroSides zeroSides = ZeroSides .NONE ;
130
132
if (navigationBarHidden ) {
131
133
zeroSides = calculateShouldZeroSides (unityView );
132
- } else {
133
- rect .bottom -= getNavigationBarHeight ();
134
- rect .bottom = rect .bottom > 0 ? rect .bottom : 0 ;
135
134
}
136
135
137
136
viewMetrics .padding_top = rect .top ;
@@ -143,6 +142,10 @@ public void updateViewMetrics() {
143
142
viewMetrics .insets_right = 0 ;
144
143
viewMetrics .insets_bottom = navigationBarHidden ? calculateBottomKeyboardInset (rect ) : rect .bottom ;
145
144
viewMetrics .insets_left = 0 ;
145
+
146
+ //Log.i("UIWidgetsDebug", "checks: " + navigationBarHidden + " " + rect.bottom);
147
+ //Log.i("UIWidgetsDebug", " padding: " + viewMetrics.padding_top + " " + viewMetrics.padding_right + " " + viewMetrics.padding_bottom + " " + viewMetrics.padding_left);
148
+ //Log.i("UIWidgetsDebug", " insets: " + viewMetrics.insets_top + " " + viewMetrics.insets_right + " " + viewMetrics.insets_bottom + " " + viewMetrics.insets_left);
146
149
}
147
150
148
151
public void setupViewMetricsChangedListener () {
0 commit comments