浏览代码

Merge pull request #267 from UnityTech/androidfix

fix issue: softinput fails to popup after pause&resume the app once
/main
GitHub 5 年前
当前提交
e8f7253a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      Runtime/Plugins/platform/android/editing/TextInputPlugin.java

2
Runtime/Plugins/platform/android/editing/TextInputPlugin.java


ViewGroup contentView = (ViewGroup)UnityPlayer.currentActivity.findViewById(android.R.id.content);
mView = new TextInputView(UnityPlayer.currentActivity);
mView.requestFocus();
contentView.addView(mView, 0, 0);
contentView.addView(mView, 1, 1);
mImm = (InputMethodManager) mView.getContext().getSystemService(
Context.INPUT_METHOD_SERVICE);
}

正在加载...
取消
保存