Added lyrics shortcut in coverOverlayPanel
This commit is contained in:
@@ -178,7 +178,10 @@ public class PlayerBottomSheetFragment extends Fragment {
|
|||||||
|
|
||||||
public void goBackToFirstPage() {
|
public void goBackToFirstPage() {
|
||||||
bind.playerBodyLayout.playerBodyBottomSheetViewPager.setCurrentItem(0, false);
|
bind.playerBodyLayout.playerBodyBottomSheetViewPager.setCurrentItem(0, false);
|
||||||
|
goToControllerPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void goToControllerPage() {
|
||||||
PlayerControllerVerticalPager playerControllerVerticalPager = (PlayerControllerVerticalPager) bind.playerBodyLayout.playerBodyBottomSheetViewPager.getAdapter();
|
PlayerControllerVerticalPager playerControllerVerticalPager = (PlayerControllerVerticalPager) bind.playerBodyLayout.playerBodyBottomSheetViewPager.getAdapter();
|
||||||
if (playerControllerVerticalPager != null) {
|
if (playerControllerVerticalPager != null) {
|
||||||
PlayerControllerFragment playerControllerFragment = (PlayerControllerFragment) playerControllerVerticalPager.getRegisteredFragment(0);
|
PlayerControllerFragment playerControllerFragment = (PlayerControllerFragment) playerControllerVerticalPager.getRegisteredFragment(0);
|
||||||
@@ -187,4 +190,14 @@ public class PlayerBottomSheetFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void goToLyricsPage() {
|
||||||
|
PlayerControllerVerticalPager playerControllerVerticalPager = (PlayerControllerVerticalPager) bind.playerBodyLayout.playerBodyBottomSheetViewPager.getAdapter();
|
||||||
|
if (playerControllerVerticalPager != null) {
|
||||||
|
PlayerControllerFragment playerControllerFragment = (PlayerControllerFragment) playerControllerVerticalPager.getRegisteredFragment(0);
|
||||||
|
if (playerControllerFragment != null) {
|
||||||
|
playerControllerFragment.goToLyricsPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import com.cappielloantonio.play.repository.SongRepository;
|
|||||||
import com.cappielloantonio.play.service.MediaManager;
|
import com.cappielloantonio.play.service.MediaManager;
|
||||||
import com.cappielloantonio.play.service.MediaService;
|
import com.cappielloantonio.play.service.MediaService;
|
||||||
import com.cappielloantonio.play.ui.dialog.PlaylistChooserDialog;
|
import com.cappielloantonio.play.ui.dialog.PlaylistChooserDialog;
|
||||||
|
import com.cappielloantonio.play.ui.fragment.pager.PlayerControllerVerticalPager;
|
||||||
import com.cappielloantonio.play.util.DownloadUtil;
|
import com.cappielloantonio.play.util.DownloadUtil;
|
||||||
import com.cappielloantonio.play.util.MappingUtil;
|
import com.cappielloantonio.play.util.MappingUtil;
|
||||||
import com.cappielloantonio.play.viewmodel.PlayerBottomSheetViewModel;
|
import com.cappielloantonio.play.viewmodel.PlayerBottomSheetViewModel;
|
||||||
@@ -129,7 +130,10 @@ public class PlayerCoverFragment extends Fragment {
|
|||||||
});
|
});
|
||||||
|
|
||||||
bind.innerButtonBottomRight.setOnClickListener(view -> {
|
bind.innerButtonBottomRight.setOnClickListener(view -> {
|
||||||
|
PlayerBottomSheetFragment playerBottomSheetFragment = (PlayerBottomSheetFragment) getActivity().getSupportFragmentManager().findFragmentByTag("PlayerBottomSheet");
|
||||||
|
if (playerBottomSheetFragment != null) {
|
||||||
|
playerBottomSheetFragment.goToLyricsPage();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user