Search in sources :

Example 16 with SettingsActivity

use of com.android.settings.SettingsActivity in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class ToggleBackupSettingFragment method onViewCreated.

@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    SettingsActivity activity = (SettingsActivity) getActivity();
    mSwitchBar = activity.getSwitchBar();
    mToggleSwitch = mSwitchBar.getSwitch();
    // not mention full data backup
    if (Settings.Secure.getInt(getContentResolver(), USER_FULL_DATA_BACKUP_AWARE, 0) != 0) {
        mSummaryPreference.setSummary(R.string.fullbackup_data_summary);
    } else {
        mSummaryPreference.setSummary(R.string.backup_data_summary);
    }
    try {
        boolean backupEnabled = mBackupManager == null ? false : mBackupManager.isBackupEnabled();
        mSwitchBar.setCheckedInternal(backupEnabled);
    } catch (RemoteException e) {
        // The world is aflame, turn it off.
        mSwitchBar.setEnabled(false);
    }
    getActivity().setTitle(R.string.backup_data_title);
}
Also used : RemoteException(android.os.RemoteException) SettingsActivity(com.android.settings.SettingsActivity)

Example 17 with SettingsActivity

use of com.android.settings.SettingsActivity in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class UserDictionaryAddWordFragment method onItemSelected.

@Override
public void onItemSelected(final AdapterView<?> parent, final View view, final int pos, final long id) {
    final LocaleRenderer locale = (LocaleRenderer) parent.getItemAtPosition(pos);
    if (locale.isMoreLanguages()) {
        SettingsActivity sa = (SettingsActivity) getActivity();
        sa.startPreferenceFragment(new UserDictionaryLocalePicker(this), true);
    } else {
        mContents.updateLocale(locale.getLocaleString());
    }
}
Also used : LocaleRenderer(com.android.settings.inputmethod.UserDictionaryAddWordContents.LocaleRenderer) SettingsActivity(com.android.settings.SettingsActivity)

Example 18 with SettingsActivity

use of com.android.settings.SettingsActivity in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class BluetoothSettings method onActivityCreated.

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    /* Don't auto start scan if screen reconstructs due to frozen screen*/
    mInitialScanStarted = (savedInstanceState != null);
    mInitiateDiscoverable = true;
    final SettingsActivity activity = (SettingsActivity) getActivity();
    mSwitchBar = activity.getSwitchBar();
    mBluetoothEnabler = new BluetoothEnabler(activity, mSwitchBar);
    mBluetoothEnabler.setupSwitchBar();
}
Also used : SettingsActivity(com.android.settings.SettingsActivity)

Example 19 with SettingsActivity

use of com.android.settings.SettingsActivity in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class AppOpsDetails method setIntentAndFinish.

private void setIntentAndFinish(boolean finish, boolean appChanged) {
    Intent intent = new Intent();
    intent.putExtra(ManageApplications.APP_CHG, appChanged);
    SettingsActivity sa = (SettingsActivity) getActivity();
    sa.finishPreferencePanel(this, Activity.RESULT_OK, intent);
}
Also used : Intent(android.content.Intent) SettingsActivity(com.android.settings.SettingsActivity)

Example 20 with SettingsActivity

use of com.android.settings.SettingsActivity in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class ZenModeRuleSettingsBase method onActivityCreated.

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    final SettingsActivity activity = (SettingsActivity) getActivity();
    mSwitchBar = activity.getSwitchBar();
    mSwitchBar.addOnSwitchChangeListener(this);
    mSwitchBar.show();
}
Also used : SettingsActivity(com.android.settings.SettingsActivity)

Aggregations

SettingsActivity (com.android.settings.SettingsActivity)28 Bundle (android.os.Bundle)10 Intent (android.content.Intent)4 TextView (android.widget.TextView)4 ContentResolver (android.content.ContentResolver)3 View (android.view.View)3 AdapterView (android.widget.AdapterView)2 ImageView (android.widget.ImageView)2 ListView (android.widget.ListView)2 SearchView (android.widget.SearchView)2 LinkifyUtils (com.android.settings.LinkifyUtils)2 FragmentTransaction (android.app.FragmentTransaction)1 ComponentName (android.content.ComponentName)1 Context (android.content.Context)1 DialogInterface (android.content.DialogInterface)1 SendIntentException (android.content.IntentSender.SendIntentException)1 SharedPreferences (android.content.SharedPreferences)1 UserInfo (android.content.pm.UserInfo)1 Resources (android.content.res.Resources)1 Cursor (android.database.Cursor)1