如果项目project_name已经存在,我有一个Activity来启动DialogFragment。覆盖或取消。
if (newdir.exists()) {
android.app.FragmentManager fm = getFragmentManager();
overWriteDirectoryDialog = new OverWriteDirectoryDialogFragment();
// set up the bundle to pass to the DialogFragment
Bundle args = new Bundle();
args.putString("file_name", file_name);
overWriteDirectoryDialog.setArguments(args);
overWriteDirectoryDialog.setRetainInstance(true);
overWriteDirectoryDialog.show(fm, "fragment_name");
}
如果用户选择" OverWrite",DialogFragment关闭,允许项目在Activity中进行,但半透明视图或某些内容涵盖Activity,并且不允许与活动,直到按下后退按钮,此时半透明视图消失,一切正常。
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
try {
((FrameSliderActivity) getActivity()).deleteDirectory();
dismiss();
} catch (NumberFormatException ex) {
((FrameSliderActivity) getActivity()).tToast("Something has gone horribly Wrong!");
//((FrameSliderActivity) getActivity()).createProject();
}
}
})
知道造成这种情况的原因是什么?
我需要超过10个声望点来上传mor而不是2个链接。
After the back button is pressed, I have the expected behavior.