Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
1c0a2d3a
Commit
1c0a2d3a
authored
Apr 07, 2015
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display volume/brightness levels in %
parent
43f09992
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
vlc-android/res/layout/player.xml
vlc-android/res/layout/player.xml
+1
-1
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
...d/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+4
-3
No files found.
vlc-android/res/layout/player.xml
View file @
1c0a2d3a
...
...
@@ -93,7 +93,7 @@
android:layout_margin=
"7dp"
android:background=
"@drawable/verticalbar_border"
android:orientation=
"vertical"
android:weightSum=
"1
5
"
android:weightSum=
"1
00
"
android:gravity=
"bottom"
>
<View
android:id=
"@+id/verticalbar_progress"
...
...
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
View file @
1c0a2d3a
...
...
@@ -1867,7 +1867,8 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
mAudioManager
.
setStreamVolume
(
AudioManager
.
STREAM_MUSIC
,
vol
,
AudioManager
.
FLAG_SHOW_UI
);
mTouchAction
=
TOUCH_VOLUME
;
showInfoWithVerticalBar
(
getString
(
R
.
string
.
volume
)
+
'\
u00A0
'
+
Integer
.
toString
(
vol
),
1000
,
vol
);
vol
=
vol
*
100
/
15
;
showInfoWithVerticalBar
(
getString
(
R
.
string
.
volume
)
+
'\
u00A0
'
+
Integer
.
toString
(
vol
)
+
'%'
,
1000
,
vol
);
}
private
void
mute
(
boolean
mute
)
{
...
...
@@ -1925,8 +1926,8 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
lp
.
screenBrightness
=
Math
.
min
(
Math
.
max
(
lp
.
screenBrightness
+
delta
,
0.01f
),
1
);
// Set Brightness
getWindow
().
setAttributes
(
lp
);
int
brightness
=
Math
.
round
(
lp
.
screenBrightness
*
1
5
);
showInfoWithVerticalBar
(
getString
(
R
.
string
.
brightness
)
+
'\
u00A0
'
+
brightness
,
1000
,
brightness
);
int
brightness
=
Math
.
round
(
lp
.
screenBrightness
*
1
00
);
showInfoWithVerticalBar
(
getString
(
R
.
string
.
brightness
)
+
'\
u00A0
'
+
brightness
+
'%'
,
1000
,
brightness
);
}
/**
...
...
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