我有自定义的DialogFragment,它从另一个片段调用:
final CustomCalendarDialogFragment newFragment = new CustomCalendarDialogFragment("CHOOSE_WEEK");
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (newFragment.isAdded()){
newFragment.getDialog().show();
} else {
newFragment.show(getFragmentManager(), "CUSTOM_CALENDAR");
}
}
});
按下CustomCalendarDialogFragment" OK":
getDialog().hide();
按下" OK" DialogFragment是隐藏的,但是当我解锁屏幕时,会显示DialogFragment。 如何消除它?