public final class DialogUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
DialogUtils.IWindowShower
窗口显示接口
|
| Modifier and Type | Method and Description |
|---|---|
static android.app.Activity |
findActivity(android.content.Context context)
根据上下文获取Activity
|
static void |
hideSoftInput(android.view.View view)
动态隐藏软键盘
|
static boolean |
isShouldHideInput(android.view.Window window,
android.view.MotionEvent event)
根据用户点击的坐标获取用户在窗口上触摸到的View,判断这个View是否是EditText来判断是否需要隐藏键盘
|
static boolean |
showWindow(android.app.Activity activity,
android.view.Window window,
DialogUtils.IWindowShower iWindowShower)
显示窗口【同步窗口系统view的可见度, 解决全屏下显示窗口导致界面退出全屏的问题】
|
static boolean |
syncSystemUiVisibility(android.app.Activity original,
android.view.Window target)
同步窗口的系统view的可见度【解决全屏下显示窗口导致界面退出全屏的问题】
|
static boolean |
syncSystemUiVisibility(android.view.Window original,
android.view.Window target)
同步两个窗口的系统view的可见度【解决全屏下显示窗口导致界面退出全屏的问题】
|
public static boolean showWindow(android.app.Activity activity,
android.view.Window window,
DialogUtils.IWindowShower iWindowShower)
activity - 活动窗口window - 需要显示的窗口iWindowShower - 窗口显示接口public static boolean syncSystemUiVisibility(android.app.Activity original,
android.view.Window target)
original - 活动窗口target - 目标窗口public static boolean syncSystemUiVisibility(android.view.Window original,
android.view.Window target)
original - 原始窗口target - 目标窗口public static android.app.Activity findActivity(android.content.Context context)
context - 上下文public static boolean isShouldHideInput(android.view.Window window,
android.view.MotionEvent event)
window - 窗口event - 用户点击事件public static void hideSoftInput(android.view.View view)
view - 视图