Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
531
Issue boards
Milestones
Wiki
Code
Merge requests
14
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
e003fb5c
Commit
e003fb5c
authored
8 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Prevent audio player to hide view content
parent
4ef8fe43
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
+10
-0
10 additions, 0 deletions
...rc/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
with
10 additions
and
0 deletions
vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
+
10
−
0
View file @
e003fb5c
...
...
@@ -37,6 +37,7 @@ import android.support.annotation.NonNull;
import
android.support.annotation.Nullable
;
import
android.support.design.widget.AppBarLayout
;
import
android.support.design.widget.BottomSheetBehavior
;
import
android.support.design.widget.CoordinatorLayout
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.FragmentManager
;
import
android.support.v7.app.ActionBar
;
...
...
@@ -46,6 +47,7 @@ import android.support.v7.widget.Toolbar;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.FrameLayout
;
import
android.widget.TextView
;
import
org.videolan.medialibrary.Medialibrary
;
...
...
@@ -85,6 +87,7 @@ public class AudioPlayerContainerActivity extends AppCompatActivity implements P
private
final
PlaybackServiceActivity
.
Helper
mHelper
=
new
PlaybackServiceActivity
.
Helper
(
this
,
this
);
protected
PlaybackService
mService
;
protected
BottomSheetBehavior
mBottomSheetBehavior
;
private
FrameLayout
mFragmentContainer
;
protected
boolean
mPreventRescan
=
false
;
...
...
@@ -121,6 +124,7 @@ public class AudioPlayerContainerActivity extends AppCompatActivity implements P
@Override
protected
void
onPostCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onPostCreate
(
savedInstanceState
);
mFragmentContainer
=
(
FrameLayout
)
findViewById
(
R
.
id
.
fragment_placeholder
);
}
@Override
...
...
@@ -229,6 +233,9 @@ public class AudioPlayerContainerActivity extends AppCompatActivity implements P
mBottomSheetBehavior
.
setState
(
BottomSheetBehavior
.
STATE_COLLAPSED
);
mActionBar
.
collapseActionView
();
mAppBarLayout
.
setExpanded
(
false
,
true
);
CoordinatorLayout
.
LayoutParams
lp
=
(
CoordinatorLayout
.
LayoutParams
)
mFragmentContainer
.
getLayoutParams
();
lp
.
bottomMargin
=
mBottomSheetBehavior
.
getPeekHeight
();
mFragmentContainer
.
setLayoutParams
(
lp
);
}
}
...
...
@@ -260,6 +267,9 @@ public class AudioPlayerContainerActivity extends AppCompatActivity implements P
public
void
hideAudioPlayer
()
{
mBottomSheetBehavior
.
setHideable
(
true
);
mBottomSheetBehavior
.
setState
(
BottomSheetBehavior
.
STATE_HIDDEN
);
CoordinatorLayout
.
LayoutParams
lp
=
(
CoordinatorLayout
.
LayoutParams
)
mFragmentContainer
.
getLayoutParams
();
lp
.
bottomMargin
=
0
;
mFragmentContainer
.
setLayoutParams
(
lp
);
}
private
final
BroadcastReceiver
messageReceiver
=
new
BroadcastReceiver
()
{
...
...
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