Fix toggle widget can be switched under overlapped view am: 4794b798c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12124562 Change-Id: I7d6b33b80c948337b1526fd0becfbe87d535895b
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