use of com.android.settingslib.widget.SettingsSpinnerPreference in project android_packages_apps_Settings by omnirom.
the class StorageSelectionPreferenceControllerTest method setUp.
@Before
public void setUp() throws Exception {
if (Looper.myLooper() == null) {
Looper.prepare();
}
mContext = ApplicationProvider.getApplicationContext();
mStorageManager = mContext.getSystemService(StorageManager.class);
mController = new StorageSelectionPreferenceController(mContext, PREFERENCE_KEY);
final PreferenceManager preferenceManager = new PreferenceManager(mContext);
final PreferenceScreen preferenceScreen = preferenceManager.createPreferenceScreen(mContext);
final SettingsSpinnerPreference spinnerPreference = new SettingsSpinnerPreference(mContext);
spinnerPreference.setKey(PREFERENCE_KEY);
preferenceScreen.addPreference(spinnerPreference);
mController.displayPreference(preferenceScreen);
}
Aggregations