Search in sources :

Example 61 with LayoutPreference

use of com.android.settingslib.widget.LayoutPreference in project android_packages_apps_Settings by omnirom.

the class EntityHeaderControllerTest method testBuildView_withContext_shouldBuildPreferenceAllowedBelowDivider.

@Test
public void testBuildView_withContext_shouldBuildPreferenceAllowedBelowDivider() {
    mController = EntityHeaderController.newInstance(mActivity, mFragment, null);
    Preference preference = mController.done(mActivity, mShadowContext);
    assertThat(preference instanceof LayoutPreference).isTrue();
    assertThat(((LayoutPreference) preference).isAllowDividerBelow()).isTrue();
}
Also used : LayoutPreference(com.android.settingslib.widget.LayoutPreference) LayoutPreference(com.android.settingslib.widget.LayoutPreference) Preference(androidx.preference.Preference) Test(org.junit.Test)

Aggregations

LayoutPreference (com.android.settingslib.widget.LayoutPreference)61 Before (org.junit.Before)10 Preference (androidx.preference.Preference)8 Activity (android.app.Activity)5 View (android.view.View)5 Button (android.widget.Button)5 Lifecycle (com.android.settingslib.core.lifecycle.Lifecycle)5 Test (org.junit.Test)5 ImageView (android.widget.ImageView)3 PreferenceManager (androidx.preference.PreferenceManager)3 PreferenceScreen (androidx.preference.PreferenceScreen)3 Intent (android.content.Intent)2 UserInfo (android.content.pm.UserInfo)2 Resources (android.content.res.Resources)2 Bundle (android.os.Bundle)2 RemoteException (android.os.RemoteException)2 UserManager (android.os.UserManager)2 TextView (android.widget.TextView)2 PreferenceFragmentCompat (androidx.preference.PreferenceFragmentCompat)2 WifiDataUsageSummaryPreferenceController (com.android.settings.datausage.WifiDataUsageSummaryPreferenceController)2