am currently messing around with DialogFragment to learn to use it. I assumed that compared to onCreateView(), onCreate() can do this:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
testTextView.setText("SUCCESS!"); //ERROR HERE
}
But I am wrong. Not sure why its not working. The error goes away when I comment out testTextView.setText("Success!"); The error is a NullPointerException, and then it just flags line 39 which is where the offending line of code is. Any clarifications much appreciated.
where you initalzed testTextView. ? you should do that………
and also as per fragment life cycle
so you should handle this work either in onCreateView or after this…
http://android-developers.blogspot.in/2012/05/using-dialogfragments.html