Search in sources :

Example 1 with SeekBarPreference

use of com.android.settings.widget.SeekBarPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class SettingsSliderPreferenceControllerTest method setUp.

@Before
public void setUp() {
    mPreference = new SeekBarPreference(RuntimeEnvironment.application);
    mSliderController = new FakeSliderPreferenceController(RuntimeEnvironment.application, "key");
    mPreference.setContinuousUpdates(true);
    mPreference.setMin(mSliderController.getMin());
    mPreference.setMax(mSliderController.getMax());
}
Also used : SeekBarPreference(com.android.settings.widget.SeekBarPreference) Before(org.junit.Before)

Example 2 with SeekBarPreference

use of com.android.settings.widget.SeekBarPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class AutoBrightnessMinPreferenceController method displayPreference.

@Override
public void displayPreference(PreferenceScreen screen) {
    super.displayPreference(screen);
    final SeekBarPreference preference = screen.findPreference(getPreferenceKey());
    preference.setContinuousUpdates(true);
    preference.setMax(getMax());
    preference.setMin(getMin());
}
Also used : SeekBarPreference(com.android.settings.widget.SeekBarPreference)

Example 3 with SeekBarPreference

use of com.android.settings.widget.SeekBarPreference in project android_packages_apps_Settings by omnirom.

the class SettingsSliderPreferenceControllerTest method setUp.

@Before
public void setUp() {
    mPreference = new SeekBarPreference(ApplicationProvider.getApplicationContext());
    mSliderController = new FakeSliderPreferenceController(ApplicationProvider.getApplicationContext(), "key");
    mPreference.setContinuousUpdates(true);
    mPreference.setMin(mSliderController.getMin());
    mPreference.setMax(mSliderController.getMax());
}
Also used : SeekBarPreference(com.android.settings.widget.SeekBarPreference) Before(org.junit.Before)

Example 4 with SeekBarPreference

use of com.android.settings.widget.SeekBarPreference in project android_packages_apps_Settings by omnirom.

the class NightDisplayIntensityPreferenceController method displayPreference.

@Override
public void displayPreference(PreferenceScreen screen) {
    super.displayPreference(screen);
    final SeekBarPreference preference = screen.findPreference(getPreferenceKey());
    preference.setContinuousUpdates(true);
    preference.setMax(getMax());
    preference.setMin(getMin());
    preference.setHapticFeedbackMode(SeekBarPreference.HAPTIC_FEEDBACK_MODE_ON_ENDS);
}
Also used : SeekBarPreference(com.android.settings.widget.SeekBarPreference)

Example 5 with SeekBarPreference

use of com.android.settings.widget.SeekBarPreference in project android_packages_apps_Settings by omnirom.

the class RemoteVolumeGroupControllerTest method displayPreference_withActiveSession_checkSeekBarCurrentVolume.

@Test
public void displayPreference_withActiveSession_checkSeekBarCurrentVolume() {
    mController.displayPreference(mScreen);
    final SeekBarPreference preference = mPreferenceCategory.findPreference(TEST_SESSION_1_ID);
    assertThat(preference.getProgress()).isEqualTo(CURRENT_VOLUME);
}
Also used : SeekBarPreference(com.android.settings.widget.SeekBarPreference) Test(org.junit.Test)

Aggregations

SeekBarPreference (com.android.settings.widget.SeekBarPreference)12 Test (org.junit.Test)3 SettingsEnums (android.app.settings.SettingsEnums)2 ActivityNotFoundException (android.content.ActivityNotFoundException)2 ContentResolver (android.content.ContentResolver)2 Context (android.content.Context)2 Intent (android.content.Intent)2 Bundle (android.os.Bundle)2 TTS_DEFAULT_PITCH (android.provider.Settings.Secure.TTS_DEFAULT_PITCH)2 TTS_DEFAULT_RATE (android.provider.Settings.Secure.TTS_DEFAULT_RATE)2 TTS_DEFAULT_SYNTH (android.provider.Settings.Secure.TTS_DEFAULT_SYNTH)2 TextToSpeech (android.speech.tts.TextToSpeech)2 EngineInfo (android.speech.tts.TextToSpeech.EngineInfo)2 TtsEngines (android.speech.tts.TtsEngines)2 UtteranceProgressListener (android.speech.tts.UtteranceProgressListener)2 TextUtils (android.text.TextUtils)2 Log (android.util.Log)2 Pair (android.util.Pair)2 AlertDialog (androidx.appcompat.app.AlertDialog)2 ListPreference (androidx.preference.ListPreference)2