로드하는 오디오 축소판에서 url 을 활지
Glide
.with(this)
.load("http://api.boleiachain.com/upload/musictest.mp3")
.apply(options)
.centerCrop()
.placeholder(R.drawable.ic_loading)
.into(civ_image);
가 이
public Bitmap coverpicture(String path) {
Bitmap bitmap=null;
MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever();
mediaMetadataRetriever.setDataSource(path, new HashMap<String, String>());
try {
final byte[] coverImage = mediaMetadataRetriever.getEmbeddedPicture();
bitmap= BitmapFactory.decodeByteArray(coverImage, 0, coverImage.length);
} catch (Exception e) {
e.printStackTrace();
}
return bitmap;
}
Glide
.with(this)
.load(coverpicture("http://api.boleiachain.com/upload/musictest.mp3"))
.apply(options)
.centerCrop()
.placeholder(R.drawable.ic_loading)
.into(civ_image);
그것은 작동하지만 함께 지연,좋지 않은 연습에 recyclerView 어댑터