Add "Go to artist" button in playerBottomSheetFragment

This commit is contained in:
CappielloAntonio 2021-11-24 15:39:15 +01:00
parent 1089512983
commit b2b081947f
3 changed files with 26 additions and 3 deletions

View file

@ -230,10 +230,14 @@ public class MainActivity extends BaseActivity {
goToLogin();
}
public void collapseBottomSheet() {
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
}
@Override
public void onBackPressed() {
if (bottomSheetBehavior.getState() == BottomSheetBehavior.STATE_EXPANDED)
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
collapseBottomSheet();
else
super.onBackPressed();
}