Switch control should not be activated after event
happens off of the target region. - Disable the focusable and clickable features. Fix: 189079003 Test: robotest and test the switch manually Change-Id: I0fa19c132ddfd5a3e010bf8328c6b84c1087d78b
This commit is contained in:
@@ -59,6 +59,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:focusable="false"
|
||||
android:clickable="false"
|
||||
android:track="@drawable/settingslib_track_selector"
|
||||
android:thumb="@drawable/settingslib_thumb_selector"
|
||||
android:theme="@style/MainSwitch.Settingslib"/>
|
||||
|
||||
@@ -75,6 +75,14 @@ public class MainSwitchBarTest {
|
||||
assertThat(switchObj).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getSwitch_shouldNotFocusableAndClickable() {
|
||||
final Switch switchObj = mBar.getSwitch();
|
||||
|
||||
assertThat(switchObj.isFocusable()).isFalse();
|
||||
assertThat(switchObj.isClickable()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void show_shouldVisible() {
|
||||
mBar.show();
|
||||
|
||||
Reference in New Issue
Block a user