/**
* 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手动显示或隐藏

最新推荐文章于 2021-05-29 02:35:13 发布
