I have a problem when using DialogFragment
DialogFragment dialog = new DateDialog(this);
dialog.setTargetFragment(this,1);
dialog.show(getFragmentManager(), "tag");
Where this
caused the error. my class extends FragmentActivity
.
I'm following this answer, but so far, cannot apply on my code. what do i do wrong ?
This is my class :
import android.app.AlertDialog;
import android.app.DatePickerDialog.OnDateSetListener;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import android.view.View;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.RadioGroup;
import android.support.v4.app.Fragment;
public class RegisterActivity extends FragmentActivity implements OnDateSetListener
{
}