Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
532
Issue boards
Milestones
Wiki
Code
Merge requests
12
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
6b18f175
Commit
6b18f175
authored
9 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Set keep screen flag to video player root view
parent
47299f73
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vlc-android/res/layout/player.xml
+4
-3
4 additions, 3 deletions
vlc-android/res/layout/player.xml
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+6
-4
6 additions, 4 deletions
...d/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
with
10 additions
and
7 deletions
vlc-android/res/layout/player.xml
+
4
−
3
View file @
6b18f175
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/player_root"
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
>
android:layout_height=
"fill_parent"
android:keepScreenOn=
"true"
>
<!--
the double FrameLayout is necessary here to do cropping on the bottom right
...
...
@@ -25,8 +27,7 @@
<SurfaceView
android:id=
"@+id/player_surface"
android:layout_width=
"1dp"
android:layout_height=
"1dp"
android:keepScreenOn=
"true"
/>
android:layout_height=
"1dp"
/>
<SurfaceView
android:id=
"@+id/subtitles_surface"
...
...
This diff is collapsed.
Click to expand it.
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+
6
−
4
View file @
6b18f175
...
...
@@ -158,6 +158,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
private
final
PlaybackServiceActivity
.
Helper
mHelper
=
new
PlaybackServiceActivity
.
Helper
(
this
,
this
);
private
PlaybackService
mService
;
private
View
mRootView
;
private
SurfaceView
mSurfaceView
=
null
;
private
SurfaceView
mSubtitlesSurfaceView
=
null
;
private
FrameLayout
mSurfaceFrame
;
...
...
@@ -360,6 +361,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mActionBar
.
setCustomView
(
R
.
layout
.
player_action_bar
);
mActionBarView
=
(
ViewGroup
)
mActionBar
.
getCustomView
();
mRootView
=
findViewById
(
R
.
id
.
player_root
);
mTitle
=
(
TextView
)
mActionBarView
.
findViewById
(
R
.
id
.
player_overlay_title
);
mSysTime
=
(
TextView
)
findViewById
(
R
.
id
.
player_overlay_systime
);
...
...
@@ -733,7 +735,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mSurfacesAttached
=
true
;
vlcVout
.
addCallback
(
this
);
vlcVout
.
attachViews
();
m
Surface
View
.
setKeepScreenOn
(
true
);
m
Root
View
.
setKeepScreenOn
(
true
);
loadMedia
();
...
...
@@ -766,7 +768,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
vlcVout
.
removeCallback
(
this
);
if
(
mSurfacesAttached
)
vlcVout
.
detachViews
();
m
Surface
View
.
setKeepScreenOn
(
false
);
m
Root
View
.
setKeepScreenOn
(
false
);
mHandler
.
removeCallbacksAndMessages
(
null
);
...
...
@@ -2537,7 +2539,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
*/
private
void
play
()
{
mService
.
play
();
m
Surface
View
.
setKeepScreenOn
(
true
);
m
Root
View
.
setKeepScreenOn
(
true
);
}
/**
...
...
@@ -2545,7 +2547,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
*/
private
void
pause
()
{
mService
.
pause
();
m
Surface
View
.
setKeepScreenOn
(
false
);
m
Root
View
.
setKeepScreenOn
(
false
);
}
/*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment