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
e4eb6b7e
authored
Sep 03, 2019
by
bachinger
Committed by
Toni
Sep 05, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
move transparency values of buttons to resources to make it accessible for customization
PiperOrigin-RevId: 266880069
parent
64829a03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java
library/ui/src/main/res/values/constants.xml
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java
View file @
e4eb6b7e
...
@@ -258,6 +258,8 @@ public class PlayerControlView extends FrameLayout {
...
@@ -258,6 +258,8 @@ public class PlayerControlView extends FrameLayout {
private
final
String
repeatAllButtonContentDescription
;
private
final
String
repeatAllButtonContentDescription
;
private
final
Drawable
shuffleOnButtonDrawable
;
private
final
Drawable
shuffleOnButtonDrawable
;
private
final
Drawable
shuffleOffButtonDrawable
;
private
final
Drawable
shuffleOffButtonDrawable
;
private
final
float
buttonAlphaEnabled
;
private
final
float
buttonAlphaDisabled
;
@Nullable
private
Player
player
;
@Nullable
private
Player
player
;
private
com
.
google
.
android
.
exoplayer2
.
ControlDispatcher
controlDispatcher
;
private
com
.
google
.
android
.
exoplayer2
.
ControlDispatcher
controlDispatcher
;
...
@@ -405,7 +407,14 @@ public class PlayerControlView extends FrameLayout {
...
@@ -405,7 +407,14 @@ public class PlayerControlView extends FrameLayout {
}
}
vrButton
=
findViewById
(
R
.
id
.
exo_vr
);
vrButton
=
findViewById
(
R
.
id
.
exo_vr
);
setShowVrButton
(
false
);
setShowVrButton
(
false
);
Resources
resources
=
context
.
getResources
();
Resources
resources
=
context
.
getResources
();
buttonAlphaEnabled
=
(
float
)
resources
.
getInteger
(
R
.
integer
.
exo_media_button_opacity_percentage_enabled
)
/
100
;
buttonAlphaDisabled
=
(
float
)
resources
.
getInteger
(
R
.
integer
.
exo_media_button_opacity_percentage_disabled
)
/
100
;
repeatOffButtonDrawable
=
resources
.
getDrawable
(
R
.
drawable
.
exo_controls_repeat_off
);
repeatOffButtonDrawable
=
resources
.
getDrawable
(
R
.
drawable
.
exo_controls_repeat_off
);
repeatOneButtonDrawable
=
resources
.
getDrawable
(
R
.
drawable
.
exo_controls_repeat_one
);
repeatOneButtonDrawable
=
resources
.
getDrawable
(
R
.
drawable
.
exo_controls_repeat_one
);
repeatAllButtonDrawable
=
resources
.
getDrawable
(
R
.
drawable
.
exo_controls_repeat_all
);
repeatAllButtonDrawable
=
resources
.
getDrawable
(
R
.
drawable
.
exo_controls_repeat_all
);
...
@@ -959,7 +968,7 @@ public class PlayerControlView extends FrameLayout {
...
@@ -959,7 +968,7 @@ public class PlayerControlView extends FrameLayout {
return
;
return
;
}
}
view
.
setEnabled
(
enabled
);
view
.
setEnabled
(
enabled
);
view
.
setAlpha
(
enabled
?
1
f
:
0.3f
);
view
.
setAlpha
(
enabled
?
buttonAlphaEnabled
:
buttonAlphaDisabled
);
view
.
setVisibility
(
VISIBLE
);
view
.
setVisibility
(
VISIBLE
);
}
}
...
...
library/ui/src/main/res/values/constants.xml
View file @
e4eb6b7e
...
@@ -18,6 +18,9 @@
...
@@ -18,6 +18,9 @@
<dimen
name=
"exo_media_button_width"
>
71dp
</dimen>
<dimen
name=
"exo_media_button_width"
>
71dp
</dimen>
<dimen
name=
"exo_media_button_height"
>
52dp
</dimen>
<dimen
name=
"exo_media_button_height"
>
52dp
</dimen>
<integer
name=
"exo_media_button_opacity_percentage_enabled"
>
100
</integer>
<integer
name=
"exo_media_button_opacity_percentage_disabled"
>
33
</integer>
<color
name=
"exo_error_message_background_color"
>
#AA000000
</color>
<color
name=
"exo_error_message_background_color"
>
#AA000000
</color>
<color
name=
"exo_edit_mode_background_color"
>
#FFF4F3F0
</color>
<color
name=
"exo_edit_mode_background_color"
>
#FFF4F3F0
</color>
...
...
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