The "accademic" way to pass arguments to a DialogFragment is the newInstance method with setArguments(.). But to make things easy one can simply:
class D extends DialogFragment{
public Context ctx;
public D newInstance(Context c){
D d = new D();
d.ctx = c;
//...
return d;
}
}
Or this is possible also in the activity code
D d = new D();
d.some_data = other_data;
d.show(...);
Thus why to use the newInstance-setArgument scheme that is much more unconfortable?