I am not 100% sure what you are talking about here.
You do not need to create files when working with PreferenceScreens or SharedPreferences. This is handled by SharedPreferences behind the scenes. I believe this happens when you first set a value on the Preferences screen, but I'm honestly not sure.
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); String username = preferences.getString("username", "defaultvalue"); String password = preferences.getString("password", "defaultvalue");
This code will receive SharedPreferences for your PreferenceScreen after they are installed. If they were not installed, you use the default values.
source share