Allow below divider for all EntityHeader

- Create an method in LayoutPreference let other class can
  set divider status.
- EntityHeaderController will allow to have a below divider
  by default.

Test: visual, robotest
Bug: 116346008
Change-Id: Ic041b8fef8d22ce1b7ea48eedfbe97c708c41ce7
This commit is contained in:
tmfang
2018-11-20 11:48:00 +08:00
parent 408dc883f7
commit 012b089a91
4 changed files with 18 additions and 5 deletions

View File

@@ -96,11 +96,12 @@ public class EntityHeaderControllerTest {
}
@Test
public void testBuildView_withContext_shouldBuildPreference() {
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();
}
@Test