mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
Fix html suggestions visualization
This commit is contained in:
parent
de4e25a86b
commit
61b3e413c9
27 changed files with 65 additions and 48 deletions
|
|
@ -8,6 +8,8 @@ import com.cappielloantonio.play.glide.CustomGlideRequest;
|
|||
import com.cappielloantonio.play.model.Song;
|
||||
import com.google.android.exoplayer2.MediaItem;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -49,14 +51,28 @@ public class MusicUtil {
|
|||
}
|
||||
}
|
||||
|
||||
public static String getReadableInfo(String info) {
|
||||
if (info != null) {
|
||||
return Html.fromHtml(info, Html.FROM_HTML_MODE_COMPACT).toString();
|
||||
public static String getReadableString(String string) {
|
||||
if (string != null) {
|
||||
return Html.fromHtml(string, Html.FROM_HTML_MODE_COMPACT).toString();
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static List<String> getReadableStrings(List<String> strings) {
|
||||
List<String> readableStrings = new ArrayList<>();
|
||||
|
||||
if (strings.size() > 0) {
|
||||
for (String string : strings) {
|
||||
if (string != null) {
|
||||
readableStrings.add(Html.fromHtml(string, Html.FROM_HTML_MODE_COMPACT).toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return readableStrings;
|
||||
}
|
||||
|
||||
public static int getDefaultPicPerCategory(String category) {
|
||||
if (category.equals(CustomGlideRequest.SONG_PIC)) {
|
||||
return R.drawable.default_album_art;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue