Commit 3d3ac623 by olly Committed by Oliver Woodman

Specify a root when inflating child views

#minor-release

PiperOrigin-RevId: 380655806
parent 6f686be7
......@@ -675,7 +675,8 @@ public class StyledPlayerControlView extends FrameLayout {
settingsWindowMargin = resources.getDimensionPixelSize(R.dimen.exo_settings_offset);
settingsView =
(RecyclerView)
LayoutInflater.from(context).inflate(R.layout.exo_styled_settings_list, null);
LayoutInflater.from(context)
.inflate(R.layout.exo_styled_settings_list, /* root= */ null);
settingsView.setAdapter(settingsAdapter);
settingsView.setLayoutManager(new LinearLayoutManager(getContext()));
settingsWindow =
......@@ -1880,9 +1881,10 @@ public class StyledPlayerControlView extends FrameLayout {
}
@Override
public SettingViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
public SettingViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v =
LayoutInflater.from(getContext()).inflate(R.layout.exo_styled_settings_list_item, null);
LayoutInflater.from(getContext())
.inflate(R.layout.exo_styled_settings_list_item, parent, /* attachToRoot= */ false);
return new SettingViewHolder(v);
}
......@@ -1970,7 +1972,8 @@ public class StyledPlayerControlView extends FrameLayout {
public SubSettingViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v =
LayoutInflater.from(getContext())
.inflate(R.layout.exo_styled_sub_settings_list_item, null);
.inflate(
R.layout.exo_styled_sub_settings_list_item, parent, /* attachToRoot= */ false);
return new SubSettingViewHolder(v);
}
......@@ -2184,7 +2187,8 @@ public class StyledPlayerControlView extends FrameLayout {
public SubSettingViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v =
LayoutInflater.from(getContext())
.inflate(R.layout.exo_styled_sub_settings_list_item, null);
.inflate(
R.layout.exo_styled_sub_settings_list_item, parent, /* attachToRoot= */ false);
return new SubSettingViewHolder(v);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment