Search in sources :

Example 31 with SettingsActivity

use of com.android.settings.SettingsActivity in project android_packages_apps_Settings by AOSPA.

the class LocationSettings method onActivityCreated.

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    final SettingsActivity activity = (SettingsActivity) getActivity();
    final SettingsMainSwitchBar switchBar = activity.getSwitchBar();
    switchBar.setTitle(getContext().getString(R.string.location_settings_primary_switch_title));
    switchBar.show();
    mSwitchBarController = new LocationSwitchBarController(activity, switchBar, getSettingsLifecycle());
    mLocationEnabler = new LocationEnabler(getContext(), this, getSettingsLifecycle());
}
Also used : SettingsMainSwitchBar(com.android.settings.widget.SettingsMainSwitchBar) SettingsActivity(com.android.settings.SettingsActivity)

Example 32 with SettingsActivity

use of com.android.settings.SettingsActivity in project android_packages_apps_Settings by AOSPA.

the class UserSettings method onActivityCreated.

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    // Assume we are in a SettingsActivity. This is only safe because we currently use
    // SettingsActivity as base for all preference fragments.
    final SettingsActivity activity = (SettingsActivity) getActivity();
    final SettingsMainSwitchBar switchBar = activity.getSwitchBar();
    switchBar.setTitle(getContext().getString(R.string.multiple_users_main_switch_title));
    switchBar.show();
    mSwitchBarController = new MultiUserSwitchBarController(activity, new MainSwitchBarController(switchBar), this);
    getSettingsLifecycle().addObserver(mSwitchBarController);
}
Also used : MainSwitchBarController(com.android.settings.widget.MainSwitchBarController) SettingsMainSwitchBar(com.android.settings.widget.SettingsMainSwitchBar) SettingsActivity(com.android.settings.SettingsActivity)

Example 33 with SettingsActivity

use of com.android.settings.SettingsActivity in project packages_apps_Settings by PixelExperience.

the class AppInfoDashboardFragment method setIntentAndFinish.

private void setIntentAndFinish(boolean finish, boolean appChanged) {
    if (localLOGV)
        Log.i(TAG, "appChanged=" + appChanged);
    final Intent intent = new Intent();
    intent.putExtra(ManageApplications.APP_CHG, appChanged);
    final SettingsActivity sa = (SettingsActivity) getActivity();
    sa.finishPreferencePanel(Activity.RESULT_OK, intent);
    mFinishing = true;
}
Also used : Intent(android.content.Intent) SettingsActivity(com.android.settings.SettingsActivity)

Example 34 with SettingsActivity

use of com.android.settings.SettingsActivity in project packages_apps_Settings by PixelExperience.

the class AppInfoBase method setIntentAndFinish.

protected void setIntentAndFinish(boolean appChanged) {
    Log.i(TAG, "appChanged=" + appChanged);
    Intent intent = new Intent();
    intent.putExtra(ManageApplications.APP_CHG, appChanged);
    SettingsActivity sa = (SettingsActivity) getActivity();
    sa.finishPreferencePanel(Activity.RESULT_OK, intent);
    mFinishing = true;
}
Also used : Intent(android.content.Intent) SettingsActivity(com.android.settings.SettingsActivity)

Example 35 with SettingsActivity

use of com.android.settings.SettingsActivity in project packages_apps_Settings by PixelExperience.

the class ProfileSelectLocationFragment method onActivityCreated.

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    final SettingsActivity activity = (SettingsActivity) getActivity();
    final SettingsMainSwitchBar switchBar = activity.getSwitchBar();
    switchBar.setTitle(getContext().getString(R.string.location_settings_primary_switch_title));
    final LocationSwitchBarController switchBarController = new LocationSwitchBarController(activity, switchBar, getSettingsLifecycle());
    switchBar.show();
}
Also used : LocationSwitchBarController(com.android.settings.location.LocationSwitchBarController) SettingsMainSwitchBar(com.android.settings.widget.SettingsMainSwitchBar) SettingsActivity(com.android.settings.SettingsActivity)

Aggregations

SettingsActivity (com.android.settings.SettingsActivity)539 Bundle (android.os.Bundle)99 Intent (android.content.Intent)82 SettingsMainSwitchBar (com.android.settings.widget.SettingsMainSwitchBar)82 Preference (androidx.preference.Preference)56 AbstractPreferenceController (com.android.settingslib.core.AbstractPreferenceController)54 Lifecycle (com.android.settingslib.core.lifecycle.Lifecycle)50 Test (org.junit.Test)50 ArrayList (java.util.ArrayList)48 MainSwitchBarController (com.android.settings.widget.MainSwitchBarController)45 ApplicationInfo (android.content.pm.ApplicationInfo)44 SettingsPreferenceFragment (com.android.settings.SettingsPreferenceFragment)28 AppEntry (com.android.settingslib.applications.ApplicationsState.AppEntry)28 ContentResolver (android.content.ContentResolver)25 FooterPreference (com.android.settingslib.widget.FooterPreference)23 Context (android.content.Context)22 RemoteException (android.os.RemoteException)22 View (android.view.View)22 EngineInfo (android.speech.tts.TextToSpeech.EngineInfo)21 Activity (android.app.Activity)17