add
This commit is contained in:
32
Assets/CoolapeFrame/Plugins/Android/ProcSoftInputMode.java
Normal file
32
Assets/CoolapeFrame/Plugins/Android/ProcSoftInputMode.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package com.coolape;
|
||||
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.unity3d.player.UnityPlayer;
|
||||
|
||||
public class ProcSoftInputMode {
|
||||
public static void setAdjustNothing() {
|
||||
UnityPlayer.currentActivity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UnityPlayer.currentActivity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
|
||||
}
|
||||
});
|
||||
}
|
||||
public static void setAdjustPan() {
|
||||
UnityPlayer.currentActivity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UnityPlayer.currentActivity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
||||
}
|
||||
});
|
||||
}
|
||||
public static void setAdjustResize() {
|
||||
UnityPlayer.currentActivity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UnityPlayer.currentActivity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user