判断DialogFragment是否已经显示

http://stackoverflow.com/questions/21352571/android-how-do-i-check-if-dialogfragment-is-showing

android: how do I check if dialogfragment is showing

if(dialogFragment!=null && dialogFragment.getDialog()!=null && dialogFragment.getDialog().isShowing()) { //dialog is showing so do something  } else { //dialog is not showing }

你可能感兴趣的:(判断DialogFragment是否已经显示)