所以我在片段中创建对话框时出错
这是代码:
public Dialog onCreateDialog(Bundle savedInstanceState) {
int title = getArguments().getInt("title");
return new AlertDialog.Builder(getActivity())
.setIcon(R.drawable.logo)
.setTitle(R.string.groupDetails_rename)
.setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {
((GroupDetailsFragment) getSupportFragmentManager())
.doPositiveClick();
}
}).create();
}
我((GroupDetailsFragment) getSupportFragmentManager())
应该写什么而不是getSupportFragmentManager()
?