浏览代码

remove logs and test cases

/main
xingwei.zhu 5 年前
当前提交
13f4fca5
共有 3 个文件被更改,包括 11 次插入14 次删除
  1. 10
      Runtime/Plugins/platform/android/view/UIWidgetsViewController.java
  2. 3
      Runtime/engine/UIWidgetsPanel.cs
  3. 12
      Samples/UIWidgetSample/TextInput.unity

10
Runtime/Plugins/platform/android/view/UIWidgetsViewController.java


} catch (Exception e) {
e.printStackTrace();
}
Log.i("UIWidgetsDebug", " hasBar: " + hasBar);
//Log.i("UIWidgetsDebug", " hasBar: " + hasBar);
return hasBar;
}

unityView.getWindowVisibleDisplayFrame(rect);
Log.i("UIWidgetsDebug", "calculation: " + unityView.getRootView().getHeight() + " " + rect.bottom + " " + rect.top);
//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);
//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() {

3
Runtime/engine/UIWidgetsPanel.cs


protected override void updateSafeArea() {
this._padding = this._uiWidgetsPanel.viewPadding;
this._viewInsets = this._uiWidgetsPanel.viewInsets;
Debug.Log($"update safe area: padding = {this._padding.top}, {this._padding.left}, {this._padding.bottom}, {this._padding.right} ; " +
$"viewInsets = {this._viewInsets.top}, {this._viewInsets.left}, {this._viewInsets.bottom}, {this._viewInsets.right}");
}
protected override bool hasFocus() {

12
Samples/UIWidgetSample/TextInput.unity


m_GameObject: {fileID: 244594849}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.21960786, g: 0.21960786, b: 0.21960786, a: 1}
m_ClearFlags: 2
m_BackGroundColor: {r: 1, g: 1, b: 1, a: 1}
m_projectionMatrixMode: 1
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 244594849}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.3, z: -66.1}
m_LocalPosition: {x: 0, y: 0, z: -15}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}

m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 244594851}
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1

m_GameObject: {fileID: 1387978526}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 85b678a668e064f5c90ee8a9f7c13f35, type: 3}
m_Script: {fileID: 11500000, guid: 9c5c86936ca864ae684720ddcd50d759, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}

width: 1
height: 1
devicePixelRatioOverride: 0
antiAliasingOverride: 4
antiAliasingOverride: 0
--- !u!222 &1387978529
CanvasRenderer:
m_ObjectHideFlags: 0

正在加载...
取消
保存