And in main activity I have this
public void showTimePickerDialog(View v) {
DialogFragment newFragment = new uSharedUtility.TimePickerFragment();
newFragment.show(getSupportFragmentManager(), "timePicker");
}
But I am getting this error:
Error:(566, 26) error: cannot find symbol method getSupportFragmentManager()
After searching I find out that I can make this go away by extending from FragmentActivity
But currently my MainActivity is extending from public class Main extends ListActivity due to some earlier requirements.
Is there any other way I can solve this issue excepting for changing extending classes.?
getSupportFragmentManager() is method of FragmentActivity. Your Parent activity should have extends FragmentActivity
Check this
http://developer.android.com/reference/android/support/v4/app/FragmentActivity.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With