mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Specify a root when inflating child views
#minor-release PiperOrigin-RevId: 380655806
This commit is contained in:
parent
8287b2529b
commit
93f4e5ff85
1 changed files with 9 additions and 5 deletions
|
|
@ -677,7 +677,8 @@ public class StyledPlayerControlView extends FrameLayout {
|
||||||
settingsWindowMargin = resources.getDimensionPixelSize(R.dimen.exo_settings_offset);
|
settingsWindowMargin = resources.getDimensionPixelSize(R.dimen.exo_settings_offset);
|
||||||
settingsView =
|
settingsView =
|
||||||
(RecyclerView)
|
(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.setAdapter(settingsAdapter);
|
||||||
settingsView.setLayoutManager(new LinearLayoutManager(getContext()));
|
settingsView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
settingsWindow =
|
settingsWindow =
|
||||||
|
|
@ -1899,9 +1900,10 @@ public class StyledPlayerControlView extends FrameLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SettingViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
|
public SettingViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
View v =
|
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);
|
return new SettingViewHolder(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1989,7 +1991,8 @@ public class StyledPlayerControlView extends FrameLayout {
|
||||||
public SubSettingViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
public SubSettingViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
View v =
|
View v =
|
||||||
LayoutInflater.from(getContext())
|
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);
|
return new SubSettingViewHolder(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2203,7 +2206,8 @@ public class StyledPlayerControlView extends FrameLayout {
|
||||||
public SubSettingViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
public SubSettingViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
View v =
|
View v =
|
||||||
LayoutInflater.from(getContext())
|
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);
|
return new SubSettingViewHolder(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue