protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); AddPreferencesFromResource(Resource.Xml.preferences); PreferenceManager.SetDefaultValues(this, Resource.Xml.preferences, false); for (int i = 0; i < PreferenceScreen.PreferenceCount; i++) { InitSummary(PreferenceScreen.GetPreference(i)); } }
public override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); AddPreferencesFromResource(Resource.Xml.preferences); for (int i = 0; i < PreferenceScreen.PreferenceCount; i++) { if (PreferenceScreen.GetPreference(i) is PreferenceCategory) { PreferenceCategory pc = (PreferenceCategory)PreferenceScreen.GetPreference(i); if (pc.Title.ToString() == "Versions") { ISharedPreferences sp = PreferenceManager.SharedPreferences; Preference p = pc.GetPreference(0); p.Summary = sp.GetString("VERSIONNUMBERSCOPE", "SCOPE VERSION NOT FOUND"); Preference p2 = pc.GetPreference(1); p2.Summary = sp.GetString("VERSIONNUMBERWIFI", "WIFI VERSION NOT FOUND"); Preference p3 = pc.GetPreference(2); p3.Summary = sp.GetString("APPVERSION", "APP VERSION NOT FOUND"); } if (pc.Title.ToString() == "Settings") { ISharedPreferences sp = PreferenceManager.SharedPreferences; Preference p = pc.GetPreference(0); p.Summary = sp.GetString("WIFINAME", "FAILED TO RETREIVE WIFINAME"); Preference p2 = pc.GetPreference(1); } if (pc.Title.ToString() == "Calibration") { ISharedPreferences sp = PreferenceManager.SharedPreferences; Preference p = pc.GetPreference(0); } } } }