Moved HTML info decoding in its own static class

This commit is contained in:
CappielloAntonio 2021-08-01 19:08:40 +02:00
parent 02e68f7ba7
commit 5f0427598f
25 changed files with 71 additions and 40 deletions

View file

@ -1,5 +1,7 @@
package com.cappielloantonio.play.util;
import android.text.Html;
import com.cappielloantonio.play.App;
import com.cappielloantonio.play.R;
import com.cappielloantonio.play.glide.CustomGlideRequest;
@ -47,6 +49,14 @@ public class MusicUtil {
}
}
public static String getReadableInfo(String info) {
if (info != null) {
return Html.fromHtml(info, Html.FROM_HTML_MODE_COMPACT).toString();
}
return "";
}
public static int getDefaultPicPerCategory(String category) {
if (category.equals(CustomGlideRequest.SONG_PIC)) {
return R.drawable.default_album_art;