|
|
|
|
|
|
private float navigationBarHeight; |
|
|
|
|
|
|
|
private void setup() { |
|
|
|
//Log.i("tag", "On Setup 2"); |
|
|
|
|
|
|
|
keyboardOpen = false; |
|
|
|
viewMetrics = new UIWidgetsViewMetrics(); |
|
|
|
setupHeights(); |
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
//Log.i("UIWidgetsDebug", " hasBar: " + hasBar); |
|
|
|
return hasBar; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
unityView.getWindowVisibleDisplayFrame(rect); |
|
|
|
|
|
|
|
//Log.i("UIWidgetsDebug", "calculation: " + unityView.getRootView().getHeight() + " " + rect.bottom + " " + rect.top); |
|
|
|
|
|
|
|
rect.bottom = unityView.getRootView().getHeight() - (rect.bottom - rect.top) - rect.top; |
|
|
|
// rect.right = unityView.getRootView().getWidth() - (rect.right - rect.left) - rect.left; |
|
|
|
|
|
|
viewMetrics.insets_bottom -= navigationBarHeight; |
|
|
|
// viewMetrics.padding_top -= statusHeight; |
|
|
|
|
|
|
|
//Log.i("UIWidgetsDebug", "checks: " + navigationBarHidden + " " + rect.bottom); |
|
|
|
//Log.i("UIWidgetsDebug", " padding: " + viewMetrics.padding_top + " " + viewMetrics.padding_right + " " + viewMetrics.padding_bottom + " " + viewMetrics.padding_left); |
|
|
|
//Log.i("UIWidgetsDebug", " insets: " + viewMetrics.insets_top + " " + viewMetrics.insets_right + " " + viewMetrics.insets_bottom + " " + viewMetrics.insets_left); |
|
|
|
} |
|
|
|
|
|
|
|
public void setupViewMetricsChangedListener() { |
|
|
|