This commit is contained in:
2020-07-14 22:04:03 +08:00
parent e54411e2c2
commit a47cabede2
119 changed files with 5115 additions and 1061 deletions

View File

@@ -291,4 +291,25 @@ public class ApplicationChrome
}
}
}
public const int ADJUST_RESIZE = 0x10;
public const int ADJUST_PAN = 0x20;
public const int ADJUST_NOTHING= 0x30;
public const int ADJUST_UNSPECIFIED = 0x00;
public static void setSoftInputMode(int mode)
{
#if USE_ANDROID
//Debug.Log("FLAGS: " + flagsValue);
using (var unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
{
using (var activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity"))
{
using (var window = activity.Call<AndroidJavaObject>("getWindow"))
{
window.Call("setSoftInputMode", mode); // (int)0x7FFFFFFF
}
}
}
#endif
}
}