Removed animation

main
h4h13 2019-10-28 22:38:09 +05:30
parent 6b59c2f77f
commit 6d0b511c52
4 changed files with 6 additions and 11 deletions

View File

@ -1,6 +1,5 @@
package code.name.monkey.retromusic.adapter.album package code.name.monkey.retromusic.adapter.album
import android.app.ActivityOptions
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
@ -96,8 +95,8 @@ class AlbumCoverPagerAdapter(fm: FragmentManager, private val dataSet: ArrayList
val view = inflater.inflate(finalLayout, container, false) val view = inflater.inflate(finalLayout, container, false)
albumCover = view.findViewById(R.id.player_image) albumCover = view.findViewById(R.id.player_image)
albumCover.setOnClickListener { albumCover.setOnClickListener {
val options = ActivityOptions.makeSceneTransitionAnimation(requireActivity(), it, getString(R.string.transition_lyrics))
NavigationUtil.goToLyrics(requireActivity(), options) NavigationUtil.goToLyrics(requireActivity())
} }
return view return view
} }

View File

@ -109,7 +109,7 @@ abstract class AbsPlayerFragment : AbsMusicServiceFragment(),
return true return true
} }
R.id.action_show_lyrics -> { R.id.action_show_lyrics -> {
NavigationUtil.goToLyrics(requireActivity(), null) NavigationUtil.goToLyrics(requireActivity())
return true return true
} }
R.id.action_equalizer -> { R.id.action_equalizer -> {

View File

@ -14,7 +14,6 @@
package code.name.monkey.retromusic.fragments.player.peak package code.name.monkey.retromusic.fragments.player.peak
import android.app.ActivityOptions
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
@ -50,8 +49,7 @@ class PeakPlayerFragment : AbsPlayerFragment() {
setUpSubFragments() setUpSubFragments()
title.isSelected = true title.isSelected = true
playerImage.setOnClickListener { playerImage.setOnClickListener {
val options = ActivityOptions.makeSceneTransitionAnimation(requireActivity(), it, getString(R.string.transition_lyrics)) NavigationUtil.goToLyrics(requireActivity())
NavigationUtil.goToLyrics(requireActivity(), options)
} }
} }

View File

@ -23,7 +23,6 @@ import android.media.audiofx.AudioEffect;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat; import androidx.core.app.ActivityCompat;
@ -117,10 +116,9 @@ public class NavigationUtil {
ActivityCompat.startActivity(activity, intent, null); ActivityCompat.startActivity(activity, intent, null);
} }
public static void goToLyrics(@NonNull Activity activity, public static void goToLyrics(@NonNull Activity activity) {
@Nullable ActivityOptions activityOptions) {
Intent intent = new Intent(activity, LyricsActivity.class); Intent intent = new Intent(activity, LyricsActivity.class);
ActivityCompat.startActivity(activity, intent, activityOptions != null ? activityOptions.toBundle() : null); ActivityCompat.startActivity(activity, intent, null);
} }
public static void goToGenre(@NonNull Activity activity, @NonNull Genre genre) { public static void goToGenre(@NonNull Activity activity, @NonNull Genre genre) {