Move these radio buttons to the left

Assign new single layout to RadioButtonPreference for w/ or w/o icon
and call setIconSpaceReserved(false) in RadioButtonPreference's
constructor. In case of having icon, calling setIcon() can make
icon_frame visible.

Bug: 70850017
Test: m -j56 SettingsRoboTests RunSettingsRoboTests
Change-Id: I8b35f75b6d8114a5e4c69ec1a3287c55e764ffe0
This commit is contained in:
John Li
2018-03-27 16:16:55 +08:00
parent 85c34077d3
commit 2df5a0b322
5 changed files with 117 additions and 13 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings.widget;
import static com.google.common.truth.Truth.assertThat;
import static junit.framework.Assert.assertEquals;
import static org.mockito.Mockito.mock;
@@ -45,6 +46,16 @@ public class RadioButtonPreferenceTest {
mPreference = new RadioButtonPreference(mContext);
}
@Test
public void shouldHaveRadioPreferenceLayout() {
assertThat(mPreference.getLayoutResource()).isEqualTo(R.layout.preference_radio);
}
@Test
public void iconSpaceReservedShouldBeFalse() {
assertThat(mPreference.isIconSpaceReserved()).isFalse();
}
@Test
public void summary_containerShouldBeVisible() {
mPreference.setSummary("some summary");