33 lines
1.1 KiB
Java
33 lines
1.1 KiB
Java
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);
|
|
}
|
|
});
|
|
}
|
|
}
|