Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6be3a593
authored
Mar 02, 2021
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #8546 from TadejZupancic:dev-v2
PiperOrigin-RevId: 360433358
parents
70f831a6
50a11886
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java
library/ui/src/main/res/values/ids.xml
library/ui/src/main/res/values/styles.xml
library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java
View file @
6be3a593
...
@@ -453,6 +453,8 @@ public class StyledPlayerControlView extends FrameLayout {
...
@@ -453,6 +453,8 @@ public class StyledPlayerControlView extends FrameLayout {
@Nullable
private
ImageView
fullScreenButton
;
@Nullable
private
ImageView
fullScreenButton
;
@Nullable
private
ImageView
minimalFullScreenButton
;
@Nullable
private
ImageView
minimalFullScreenButton
;
@Nullable
private
View
settingsButton
;
@Nullable
private
View
settingsButton
;
@Nullable
private
View
playbackSpeedButton
;
@Nullable
private
View
audioTrackButton
;
public
StyledPlayerControlView
(
Context
context
)
{
public
StyledPlayerControlView
(
Context
context
)
{
this
(
context
,
/* attrs= */
null
);
this
(
context
,
/* attrs= */
null
);
...
@@ -571,6 +573,16 @@ public class StyledPlayerControlView extends FrameLayout {
...
@@ -571,6 +573,16 @@ public class StyledPlayerControlView extends FrameLayout {
settingsButton
.
setOnClickListener
(
componentListener
);
settingsButton
.
setOnClickListener
(
componentListener
);
}
}
playbackSpeedButton
=
findViewById
(
R
.
id
.
exo_playback_speed
);
if
(
playbackSpeedButton
!=
null
)
{
playbackSpeedButton
.
setOnClickListener
(
componentListener
);
}
audioTrackButton
=
findViewById
(
R
.
id
.
exo_audio_track
);
if
(
audioTrackButton
!=
null
)
{
audioTrackButton
.
setOnClickListener
(
componentListener
);
}
TimeBar
customTimeBar
=
findViewById
(
R
.
id
.
exo_progress
);
TimeBar
customTimeBar
=
findViewById
(
R
.
id
.
exo_progress
);
View
timeBarPlaceholder
=
findViewById
(
R
.
id
.
exo_progress_placeholder
);
View
timeBarPlaceholder
=
findViewById
(
R
.
id
.
exo_progress_placeholder
);
if
(
customTimeBar
!=
null
)
{
if
(
customTimeBar
!=
null
)
{
...
@@ -1849,6 +1861,12 @@ public class StyledPlayerControlView extends FrameLayout {
...
@@ -1849,6 +1861,12 @@ public class StyledPlayerControlView extends FrameLayout {
}
else
if
(
settingsButton
==
view
)
{
}
else
if
(
settingsButton
==
view
)
{
controlViewLayoutManager
.
removeHideCallbacks
();
controlViewLayoutManager
.
removeHideCallbacks
();
displaySettingsWindow
(
settingsAdapter
);
displaySettingsWindow
(
settingsAdapter
);
}
else
if
(
playbackSpeedButton
==
view
)
{
controlViewLayoutManager
.
removeHideCallbacks
();
displaySettingsWindow
(
playbackSpeedAdapter
);
}
else
if
(
audioTrackButton
==
view
)
{
controlViewLayoutManager
.
removeHideCallbacks
();
displaySettingsWindow
(
audioTrackSelectionAdapter
);
}
else
if
(
subtitleButton
==
view
)
{
}
else
if
(
subtitleButton
==
view
)
{
controlViewLayoutManager
.
removeHideCallbacks
();
controlViewLayoutManager
.
removeHideCallbacks
();
displaySettingsWindow
(
textTrackSelectionAdapter
);
displaySettingsWindow
(
textTrackSelectionAdapter
);
...
...
library/ui/src/main/res/values/ids.xml
View file @
6be3a593
...
@@ -43,6 +43,8 @@
...
@@ -43,6 +43,8 @@
<item
name=
"exo_vr"
type=
"id"
/>
<item
name=
"exo_vr"
type=
"id"
/>
<item
name=
"exo_subtitle"
type=
"id"
/>
<item
name=
"exo_subtitle"
type=
"id"
/>
<item
name=
"exo_fullscreen"
type=
"id"
/>
<item
name=
"exo_fullscreen"
type=
"id"
/>
<item
name=
"exo_playback_speed"
type=
"id"
/>
<item
name=
"exo_audio_track"
type=
"id"
/>
<item
name=
"exo_settings"
type=
"id"
/>
<item
name=
"exo_settings"
type=
"id"
/>
<item
name=
"exo_controls_background"
type=
"id"
/>
<item
name=
"exo_controls_background"
type=
"id"
/>
<item
name=
"exo_basic_controls"
type=
"id"
/>
<item
name=
"exo_basic_controls"
type=
"id"
/>
...
...
library/ui/src/main/res/values/styles.xml
View file @
6be3a593
...
@@ -192,6 +192,16 @@
...
@@ -192,6 +192,16 @@
<item
name=
"android:contentDescription"
>
@string/exo_controls_settings_description
</item>
<item
name=
"android:contentDescription"
>
@string/exo_controls_settings_description
</item>
</style>
</style>
<style
name=
"ExoStyledControls.Button.Bottom.PlaybackSpeed"
>
<item
name=
"android:src"
>
@drawable/exo_styled_controls_speed
</item>
<item
name=
"android:contentDescription"
>
@string/exo_controls_playback_speed
</item>
</style>
<style
name=
"ExoStyledControls.Button.Bottom.AudioTrack"
>
<item
name=
"android:src"
>
@drawable/exo_styled_controls_audiotrack
</item>
<item
name=
"android:contentDescription"
>
@string/exo_track_selection_title_audio
</item>
</style>
<style
name=
"ExoStyledControls.TimeBar"
>
<style
name=
"ExoStyledControls.TimeBar"
>
<item
name=
"bar_height"
>
@dimen/exo_styled_progress_bar_height
</item>
<item
name=
"bar_height"
>
@dimen/exo_styled_progress_bar_height
</item>
<item
name=
"bar_gravity"
>
bottom
</item>
<item
name=
"bar_gravity"
>
bottom
</item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment