use of com.android.settings.applications.LayoutPreference in project platform_packages_apps_Settings by BlissRoms.
the class EntityHeaderControllerTest method testBuildView_withContext_shouldBuildPreference.
@Test
public void testBuildView_withContext_shouldBuildPreference() {
mController = EntityHeaderController.newInstance(mActivity, mFragment, null);
Preference preference = mController.done(mActivity, mShadowContext);
assertThat(preference instanceof LayoutPreference).isTrue();
}
use of com.android.settings.applications.LayoutPreference in project platform_packages_apps_Settings by BlissRoms.
the class EntityHeaderController method done.
/**
* Done mutating entity header, rebinds everything and return a new {@link LayoutPreference}.
*/
public LayoutPreference done(Activity activity, Context uiContext) {
final LayoutPreference pref = new LayoutPreference(uiContext, done(activity));
// Makes sure it's the first preference onscreen.
pref.setOrder(-1000);
pref.setSelectable(false);
pref.setKey(PREF_KEY_APP_HEADER);
return pref;
}
use of com.android.settings.applications.LayoutPreference in project platform_packages_apps_Settings by BlissRoms.
the class BluetoothDetailsButtonsControllerTest method setUp.
@Override
public void setUp() {
super.setUp();
mController = new BluetoothDetailsButtonsController(mContext, mFragment, mCachedDevice, mLifecycle);
mLeftButton = new Button(mContext);
mRightButton = new Button(mContext);
mLayoutPreference = new LayoutPreference(mContext, R.layout.app_action_buttons);
mLayoutPreference.setKey(mController.getPreferenceKey());
mScreen.addPreference(mLayoutPreference);
mLeftButton = (Button) mLayoutPreference.findViewById(R.id.left_button);
mRightButton = (Button) mLayoutPreference.findViewById(R.id.right_button);
setupDevice(mDeviceConfig);
when(mCachedDevice.isBusy()).thenReturn(false);
}
use of com.android.settings.applications.LayoutPreference in project platform_packages_apps_Settings by BlissRoms.
the class BluetoothDetailsHeaderControllerTest method setUp.
@Override
public void setUp() {
super.setUp();
FakeFeatureFactory.setupForTest(spy(mContext));
ShadowEntityHeaderController.setUseMock(mHeaderController);
mController = new BluetoothDetailsHeaderController(mContext, mFragment, mCachedDevice, mLifecycle);
mPreference = new LayoutPreference(mContext, R.layout.settings_entity_header);
mPreference.setKey(mController.getPreferenceKey());
mScreen.addPreference(mPreference);
setupDevice(mDeviceConfig);
}
use of com.android.settings.applications.LayoutPreference in project android_packages_apps_Settings by omnirom.
the class EntityHeaderControllerTest method testBuildView_withContext_shouldBuildPreference.
@Test
public void testBuildView_withContext_shouldBuildPreference() {
mController = EntityHeaderController.newInstance(mActivity, mFragment, null);
Preference preference = mController.done(mActivity, mShadowContext);
assertThat(preference instanceof LayoutPreference).isTrue();
}
Aggregations