浏览代码

android keyboard metrics change

/siyaoH-1.17-PlatformMessage
siyao 4 年前
当前提交
8d8d72a9
共有 3 个文件被更改,包括 25 次插入2 次删除
  1. 2
      com.unity.uiwidgets/Runtime/Plugins/Android/UIWidgetsViewController.java
  2. 7
      com.unity.uiwidgets/Runtime/engine2/DisplayMetrics.cs
  3. 18
      com.unity.uiwidgets/Runtime/engine2/UIWidgetsPanel.cs

2
com.unity.uiwidgets/Runtime/Plugins/Android/UIWidgetsViewController.java


public void onViewMetricsChanged() {
updateViewMetrics();
UIWidgetsMessageManager.getInstance().UIWidgetsMethodMessage("ViewportMatricsChanged", "UIWidgetViewController.keyboardChanged",
UIWidgetsMessageManager.getInstance().UIWidgetsMethodMessage("ViewportMetricsChanged", "UIWidgetViewController.keyboardChanged",
Arrays.asList(""));
}
}

7
com.unity.uiwidgets/Runtime/engine2/DisplayMetrics.cs


};
}
#else
this._viewMetrics = new viewMetrics {
_viewMetrics = new viewMetrics {
insets_bottom = 0,
insets_left = 0,
insets_right = 0,

#endif
return _viewMetrics.Value;
}
}
public void onViewMetricsChanged() {
//view metrics marks dirty
_viewMetrics = null;
}
#if UNITY_ANDROID

18
com.unity.uiwidgets/Runtime/engine2/UIWidgetsPanel.cs


using System.Collections.Generic;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.engine2;
using Unity.UIWidgets.external.simplejson;
using Unity.UIWidgets.widgets;
using RawImage = UnityEngine.UI.RawImage;
namespace Unity.UIWidgets.engine2 {
public enum UIWidgetsWindowType {

_ShowDebugLog = value;
}
}
bool _viewMetricsCallbackRegistered;
void _handleViewMetricsChanged(string method, List<JSONNode> args) {
_wrapper.displayMetrics.onViewMetricsChanged();
Window.instance.onMetricsChanged?.Invoke();
}
if (!_viewMetricsCallbackRegistered) {
_viewMetricsCallbackRegistered = true;
UIWidgetsMessageManager.instance?.AddChannelMessageDelegate("ViewportMetricsChanged",
_handleViewMetricsChanged);
}
Input_Update();
}

正在加载...
取消
保存