Post Reply Subscribe to Thread Email Thread

Settings.System strings location

28th April 2012, 09:11 PM |#1  
OP Senior Member
Thanks Meter: 42
150 posts
Join Date:Joined: Jul 2011
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.
Last edited by ZatBaloo; 29th April 2012 at 10:56 AM.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes