Fix toggle widget can be switched under overlapped view am: 4794b798c4
am: cfffebd5c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12124562 Change-Id: I3d40e9a076e79bbf55eb81a616cfb9a583a8ea8c
This commit is contained in:
@@ -36,7 +36,8 @@ public class AppSwitchPreference extends SwitchPreference {
|
|||||||
super.onBindViewHolder(holder);
|
super.onBindViewHolder(holder);
|
||||||
final View switchView = holder.findViewById(android.R.id.switch_widget);
|
final View switchView = holder.findViewById(android.R.id.switch_widget);
|
||||||
if (switchView != null) {
|
if (switchView != null) {
|
||||||
switchView.setFilterTouchesWhenObscured(true);
|
final View rootView = switchView.getRootView();
|
||||||
|
rootView.setFilterTouchesWhenObscured(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -52,7 +52,8 @@ public class FilterTouchesRestrictedSwitchPreference extends RestrictedSwitchPre
|
|||||||
super.onBindViewHolder(holder);
|
super.onBindViewHolder(holder);
|
||||||
final View switchView = holder.findViewById(android.R.id.switch_widget);
|
final View switchView = holder.findViewById(android.R.id.switch_widget);
|
||||||
if (switchView != null) {
|
if (switchView != null) {
|
||||||
switchView.setFilterTouchesWhenObscured(true);
|
final View rootView = switchView.getRootView();
|
||||||
|
rootView.setFilterTouchesWhenObscured(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,7 +50,8 @@ public class FilterTouchesSwitchPreference extends SwitchPreference {
|
|||||||
super.onBindViewHolder(holder);
|
super.onBindViewHolder(holder);
|
||||||
final View switchView = holder.findViewById(android.R.id.switch_widget);
|
final View switchView = holder.findViewById(android.R.id.switch_widget);
|
||||||
if (switchView != null) {
|
if (switchView != null) {
|
||||||
switchView.setFilterTouchesWhenObscured(true);
|
final View rootView = switchView.getRootView();
|
||||||
|
rootView.setFilterTouchesWhenObscured(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user