diff --git a/libraries/ui/src/main/java/androidx/media3/ui/PlayerControlView.java b/libraries/ui/src/main/java/androidx/media3/ui/PlayerControlView.java index 8ec6d27498..c124097b24 100644 --- a/libraries/ui/src/main/java/androidx/media3/ui/PlayerControlView.java +++ b/libraries/ui/src/main/java/androidx/media3/ui/PlayerControlView.java @@ -256,11 +256,23 @@ public class PlayerControlView extends FrameLayout { private static final int SETTINGS_PLAYBACK_SPEED_POSITION = 0; private static final int SETTINGS_AUDIO_TRACK_SELECTION_POSITION = 1; + private final PlayerControlViewLayoutManager controlViewLayoutManager; + private final Resources resources; private final ComponentListener componentListener; @SuppressWarnings("deprecation") // Using the deprecated type for now. private final CopyOnWriteArrayList visibilityListeners; + private final RecyclerView settingsView; + private final SettingsAdapter settingsAdapter; + private final PlaybackSpeedAdapter playbackSpeedAdapter; + private final TextTrackSelectionAdapter textTrackSelectionAdapter; + private final AudioTrackSelectionAdapter audioTrackSelectionAdapter; + // TODO(insun): Add setTrackNameProvider to use customized track name provider. + private final TrackNameProvider trackNameProvider; + private final PopupWindow settingsWindow; + private final int settingsWindowMargin; + @Nullable private final View previousButton; @Nullable private final View nextButton; @Nullable private final View playPauseButton; @@ -271,6 +283,12 @@ public class PlayerControlView extends FrameLayout { @Nullable private final ImageView repeatToggleButton; @Nullable private final ImageView shuffleButton; @Nullable private final View vrButton; + @Nullable private final ImageView subtitleButton; + @Nullable private final ImageView fullScreenButton; + @Nullable private final ImageView minimalFullScreenButton; + @Nullable private final View settingsButton; + @Nullable private final View playbackSpeedButton; + @Nullable private final View audioTrackButton; @Nullable private final TextView durationView; @Nullable private final TextView positionView; @Nullable private final TimeBar timeBar; @@ -319,27 +337,7 @@ public class PlayerControlView extends FrameLayout { private boolean[] extraPlayedAdGroups; private long currentWindowOffset; - private PlayerControlViewLayoutManager controlViewLayoutManager; - private Resources resources; - - private RecyclerView settingsView; - private SettingsAdapter settingsAdapter; - private PlaybackSpeedAdapter playbackSpeedAdapter; - private PopupWindow settingsWindow; private boolean needToHideBars; - private int settingsWindowMargin; - - private TextTrackSelectionAdapter textTrackSelectionAdapter; - private AudioTrackSelectionAdapter audioTrackSelectionAdapter; - // TODO(insun): Add setTrackNameProvider to use customized track name provider. - private TrackNameProvider trackNameProvider; - - @Nullable private ImageView subtitleButton; - @Nullable private ImageView fullScreenButton; - @Nullable private ImageView minimalFullScreenButton; - @Nullable private View settingsButton; - @Nullable private View playbackSpeedButton; - @Nullable private View audioTrackButton; public PlayerControlView(Context context) { this(context, /* attrs= */ null);