How to call an activity from a Dialogfragment in android?
问题 I want to call an activity from Dialogfragment, I have attached the code and logcat below for your reference on what I have tried.Kindly provide me your knowledge on it. Thank you. Intent intent = new Intent(getActivity(), LinkActivity.class); getActivity().startActivityForResult(intent, 0); Logcat: 02-12 13:47:17.345: E/AndroidRuntime(670): FATAL EXCEPTION: main 02-12 13:47:17.345: E/AndroidRuntime(670): java.lang.NullPointerException 02-12 13:47:17.345: E/AndroidRuntime(670): at android