// Path: src/com/crossbowffs/quotelock/modules/brainyquote/consts/BrainyQuotePrefKeys.java
// public static final String PREF_BRAINY = "brainy";
// 
// Path: src/com/crossbowffs/quotelock/modules/brainyquote/consts/BrainyQuotePrefKeys.java
// public static final String PREF_BRAINY_TYPE_STRING = "pref_quotes_brainy_type_string";
// 
// Path: src/com/crossbowffs/quotelock/modules/brainyquote/consts/BrainyQuotePrefKeys.java
// public static final String PREF_BRAINY_TYPE_INT = "pref_quotes_brainy_type_int";


import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import com.crossbowffs.quotelock.R;
import static com.crossbowffs.quotelock.modules.brainyquote.consts.BrainyQuotePrefKeys.PREF_BRAINY;
import static com.crossbowffs.quotelock.modules.brainyquote.consts.BrainyQuotePrefKeys.PREF_BRAINY_TYPE_STRING;
import static com.crossbowffs.quotelock.modules.brainyquote.consts.BrainyQuotePrefKeys.PREF_BRAINY_TYPE_INT;
package com.crossbowffs.quotelock.modules.brainyquote.app;



public class BrainyQuoteConfigActivity extends Activity implements RadioGroup.OnCheckedChangeListener {
    private SharedPreferences mBrainyquotePreferences;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mBrainyquotePreferences = getSharedPreferences(PREF_BRAINY, Context.MODE_PRIVATE);
        setContentView(R.layout.radio_brainy_quote);

        RadioGroup radioGroup = (RadioGroup)findViewById(R.id.module_brainy_activity_radiogroup);
        int queryValueIndex = mBrainyquotePreferences.getInt(PREF_BRAINY_TYPE_INT, 0);
        RadioButton button = (RadioButton)radioGroup.getChildAt(queryValueIndex);
        button.setChecked(true);

        radioGroup.setOnCheckedChangeListener(this);
    }

    @Override
    public void onCheckedChanged(RadioGroup group, int checkedId) {
        String[] queryValueArray = getResources().getStringArray(R.array.brainy_quote_type_values);
        int queryValueIndex = group.indexOfChild(findViewById(checkedId));
        String queryValue = queryValueArray[queryValueIndex];

        mBrainyquotePreferences.edit()
// Path: src/com/crossbowffs/quotelock/modules/brainyquote/consts/BrainyQuotePrefKeys.java
// public static final String PREF_BRAINY = "brainy";
// 
// Path: src/com/crossbowffs/quotelock/modules/brainyquote/consts/BrainyQuotePrefKeys.java
// public static final String PREF_BRAINY_TYPE_STRING = "pref_quotes_brainy_type_string";
// 
// Path: src/com/crossbowffs/quotelock/modules/brainyquote/consts/BrainyQuotePrefKeys.java
// public static final String PREF_BRAINY_TYPE_INT = "pref_quotes_brainy_type_int";


// Path: src/com/crossbowffs/quotelock/modules/brainyquote/app/BrainyQuoteConfigActivity.java
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import com.crossbowffs.quotelock.R;
import static com.crossbowffs.quotelock.modules.brainyquote.consts.BrainyQuotePrefKeys.PREF_BRAINY;
import static com.crossbowffs.quotelock.modules.brainyquote.consts.BrainyQuotePrefKeys.PREF_BRAINY_TYPE_STRING;
import static com.crossbowffs.quotelock.modules.brainyquote.consts.BrainyQuotePrefKeys.PREF_BRAINY_TYPE_INT;

package com.crossbowffs.quotelock.modules.brainyquote.app;



public class BrainyQuoteConfigActivity extends Activity implements RadioGroup.OnCheckedChangeListener {
    private SharedPreferences mBrainyquotePreferences;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mBrainyquotePreferences = getSharedPreferences(PREF_BRAINY, Context.MODE_PRIVATE);
        setContentView(R.layout.radio_brainy_quote);

        RadioGroup radioGroup = (RadioGroup)findViewById(R.id.module_brainy_activity_radiogroup);
        int queryValueIndex = mBrainyquotePreferences.getInt(PREF_BRAINY_TYPE_INT, 0);
        RadioButton button = (RadioButton)radioGroup.getChildAt(queryValueIndex);
        button.setChecked(true);

        radioGroup.setOnCheckedChangeListener(this);
    }

    @Override
    public void onCheckedChanged(RadioGroup group, int checkedId) {
        String[] queryValueArray = getResources().getStringArray(R.array.brainy_quote_type_values);
        int queryValueIndex = group.indexOfChild(findViewById(checkedId));
        String queryValue = queryValueArray[queryValueIndex];

        mBrainyquotePreferences.edit()
            .putInt(PREF_BRAINY_TYPE_INT, queryValueIndex)