Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
3.08 Inflate view in SettingsActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
sdspikes authored and Lyla committed Mar 4, 2015
1 parent d5eebe9 commit 5204747
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -36,11 +36,11 @@ public class SettingsActivity extends PreferenceActivity
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Add 'general' preferences, defined in the XML file
// TODO: Add preferences from XML
addPreferencesFromResource(R.xml.pref_general);

// For all preferences, attach an OnPreferenceChangeListener so the UI summary can be
// updated when the preference changes.
// TODO: Add preference
bindPreferenceSummaryToValue(findPreference(getString(R.string.pref_location_key)));
}

/**
Expand Down

3 comments on commit 5204747

@FrankTub
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having troubles with the addPreferenceFromResource method, which cannot be resolved.. I have copied and pasted the SettingsActivity class and am quite sure that there are no differences between my script and this script. Anyone that knows how to resolve this problem?

@RockUncleBratt
Copy link

@RockUncleBratt RockUncleBratt commented on 5204747 May 23, 2016 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noopur1202
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you have deprecated warnings u can add @SuppressWarnings("deprecation") to your method, it solved mine.

Please sign in to comment.