/**
* status true:隐藏
* status false:显示
*/
public static void whetherToDismiss(AlertDialog alert,boolean status){
try {
Field field = alert.getClass().getSuperclass().getDeclaredField("mShowing");
field.setAccessible(true);
field.set(alert, status);
} catch (Exception e) {
e.printStackTrace();
}
}
AlertDialog手动显示或隐藏
最新推荐文章于 2024-04-22 01:30:37 发布