Fix bottom bar lag on first start. Fixes #255
This commit is contained in:
parent
ff5f24b628
commit
b8e608816a
1 changed files with 7 additions and 1 deletions
|
|
@ -119,7 +119,13 @@ public abstract class AbsSlidingMusicPanelActivity extends AbsMusicServiceActivi
|
|||
public void onServiceConnected() {
|
||||
super.onServiceConnected();
|
||||
if (!MusicPlayerRemote.getPlayingQueue().isEmpty()) {
|
||||
hideBottomBar(false);
|
||||
slidingUpPanelLayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
slidingUpPanelLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
hideBottomBar(false);
|
||||
}
|
||||
});
|
||||
} // don't call hideBottomBar(true) here as it causes a bug with the SlidingUpPanelLayout
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue