public class KeyboardUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
KeyboardUtils.OnKeyboardChangeListener |
| Constructor and Description |
|---|
KeyboardUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
close(Activity activity)
隐藏软键盘
|
static void |
close(View view)
隐藏软键盘
|
static boolean |
isOpen() |
static boolean |
isOpen(View view) |
static ViewTreeObserver.OnGlobalLayoutListener |
observerKeyboardChange(Activity act,
KeyboardUtils.OnKeyboardChangeListener onKeyboardChangeListener) |
static ViewTreeObserver.OnGlobalLayoutListener |
observerKeyboardWithView(View target) |
static void |
open(Context context)
显示软键盘
|
static void |
open(View view)
显示软键盘
|
static void |
open(View view,
long delayMillis)
多少时间后显示软键盘
|
public static void open(View view)
public static void open(Context context)
public static void open(View view, long delayMillis)
public static void close(Activity activity)
public static void close(View view)
public static boolean isOpen()
public static boolean isOpen(View view)
public static ViewTreeObserver.OnGlobalLayoutListener observerKeyboardWithView(View target)
public static ViewTreeObserver.OnGlobalLayoutListener observerKeyboardChange(Activity act, KeyboardUtils.OnKeyboardChangeListener onKeyboardChangeListener)