Remove All Ads from XDA

Settings.System strings location

150 posts
Thanks Meter: 42
By ZatBaloo, Senior Member on 28th April 2012, 09:11 PM
Post Reply Email Thread
Hi, I'm building CM 9 from source. I'm adding some features. I need to add a string to the class settings because I want to store a preference. It's just a simple checkbox.
I've seen at that I have to assign the value 0 or 1.
This is the method I'm interested in:
public boolean onPreferenceChange(Preference preference, Object newValue) {
        if (preference == mPowerWidgetHapticFeedback) {
            int intValue = Integer.parseInt((String) newValue);
                    Settings.System.EXPANDED_HAPTIC_FEEDBACK, intValue);
            return true;
        return false;
It's exactly what I want to do, but I need to add a string to Setting.System, for example Settings.System.X_Y_Z, Where do I have to write X_Y_Z? I know there is a class called Settings that has written all these strings, but it's in the "out" folder and the settings app doesn't compile beacuse the variable X_Y_Z can not be found. Anybody knows where should I add the string X_Y_Z?

EDIT: Solved.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes