I just created a PreferenceActivity using AndroidStudio wizard, running it threw a weird exception :
java.lang.RuntimeException: Subclasses of PreferenceActivity must override isValidFragment(String) to verify that the Fragment class is valid!
i saw suggested solutions here but i was wondering why would i have to check if my fragment classes are valid, as i dont even fully understand whats the definition of "valid", so i decided to ask the community:
a PreferenceActivity has isValidFragment(String fragmentName)
method that for some reason must be overriden, why? how could a fragment class not be valid? and what could go wrong with such an override :
@Override
protected boolean isValidFragment(String fragmentName)
{
return true;
}