mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 18:31:40 +00:00
Force replace html dirty text from biography
This commit is contained in:
parent
522323073a
commit
0edd09569e
4 changed files with 38 additions and 20 deletions
|
|
@ -1,8 +1,10 @@
|
|||
package com.cappielloantonio.play.ui.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.graphics.BlendMode;
|
||||
import android.graphics.BlendModeColorFilter;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
@ -110,13 +112,23 @@ public class ArtistPageFragment extends Fragment {
|
|||
}
|
||||
|
||||
private void initArtistInfo() {
|
||||
|
||||
artistPageViewModel.getArtistInfo(artistPageViewModel.getArtist().getId()).observe(requireActivity(), artist -> {
|
||||
if (bind != null) bind.artistPageBioSector.setVisibility(artist.getBio() != null ? View.VISIBLE : View.GONE);
|
||||
if (bind != null) bind.bioMoreTextViewClickable.setVisibility(artist.getLastfm() != null ? View.VISIBLE : View.GONE);
|
||||
|
||||
CustomGlideRequest.Builder
|
||||
.from(requireContext(), null, CustomGlideRequest.ARTIST_PIC, artist.getImageUrl())
|
||||
.build()
|
||||
.into(bind.artistBackdropImageView);
|
||||
|
||||
bind.bioTextView.setText(MusicUtil.HTMLParser(artist.getBio()));
|
||||
bind.bioTextView.setText(MusicUtil.forceReadableString(artist.getBio()));
|
||||
|
||||
bind.bioMoreTextViewClickable.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(artist.getLastfm()));
|
||||
startActivity(intent);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue