Removing any special characters from the lyrics of the song

This commit is contained in:
antonio 2022-12-28 14:29:54 +01:00
parent 490cce53e5
commit a77c061bb4
2 changed files with 10 additions and 1 deletions

View file

@ -51,7 +51,7 @@ public class PlayerLyricsFragment extends Fragment {
bind.emptyDescriptionImageView.setVisibility(View.VISIBLE);
bind.titleEmptyDescriptionLabel.setVisibility(View.VISIBLE);
} else {
bind.nowPlayingSongLyricsTextView.setText(MusicUtil.getReadableString(lyrics));
bind.nowPlayingSongLyricsTextView.setText(MusicUtil.getReadableLyrics(lyrics));
bind.nowPlayingSongLyricsTextView.setVisibility(View.VISIBLE);
bind.emptyDescriptionImageView.setVisibility(View.GONE);
bind.titleEmptyDescriptionLabel.setVisibility(View.GONE);

View file

@ -1,5 +1,10 @@
package com.cappielloantonio.play.util;
import android.content.Context;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
public class UIUtil {
public static int getSpanCount(int itemCount, int maxSpan) {
int itemSize = itemCount == 0 ? 1 : itemCount;
@ -10,4 +15,8 @@ public class UIUtil {
return itemSize % maxSpan;
}
}
public static boolean isCastApiAvailable(Context context) {
return GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS;
}
}