DialogFragmentクラスからRadioGroupを聞くことができません。enyエラーは発生しませんが、ログには何も表示されません。私を助けてください...
public class SimpleDialog extends DialogFragment{
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
LayoutInflater inflater = getActivity().getLayoutInflater();
View view = inflater.inflate(R.layout.radio, null);
builder.setTitle(R.string.dialog_name)
.setView(inflater.inflate(R.layout.radio, null))
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
}
});
RadioGroup radioGroup = (RadioGroup) view.findViewById(R.id.radioGroup);
radioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener()
{
public void onCheckedChanged(RadioGroup group, int checkedId) {
Log.v("Dialog", "checked");
}
});
return builder.create();
}
}