Skip to content

Commit

Permalink
increase auto return delay
Browse files Browse the repository at this point in the history
  • Loading branch information
lictex committed Nov 13, 2019
1 parent 533a489 commit 2b5c351
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/src/main/java/pw/lictex/osuplayer/activity/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public void run() {
handler.postDelayed(this, 1000);
}
};

private Handler bottomSheetHandler = new Handler();
private BottomSheetBehavior bottomSheet;

@Override
Expand Down Expand Up @@ -150,10 +152,12 @@ protected void onCreate(Bundle savedInstanceState) {

bottomSheet.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
@Override public void onStateChanged(@NonNull View view, int i) {
if (i == BottomSheetBehavior.STATE_COLLAPSED) {
setCurrentContent(Content.Playlist);
findViewById(R.id.llcbg).requestFocus();
}
if (i == BottomSheetBehavior.STATE_COLLAPSED)
bottomSheetHandler.postDelayed(() -> {
setCurrentContent(Content.Playlist);
findViewById(R.id.llcbg).requestFocus();
}, 2000);
else bottomSheetHandler.removeCallbacksAndMessages(null);
}

@Override public void onSlide(@NonNull View view, float v) {
Expand Down

0 comments on commit 2b5c351

Please sign in to comment.