public void setModel ( SoundCloudTrack track ) { mModel = track ; if ( mModel != null ) { Picasso . with ( getContext ( ) ) . load ( SoundCloudArtworkHelper . getArtworkUrl ( mModel , SoundCloudArtworkHelper . XLARGE ) ) . placeholder ( R . color . grey_light ) . fit ( ) . centerInside ( ) . into ( mArtwork ) ; mArtist . setText ( mModel . getArtist ( ) ) ; mTitle . setText ( mModel . getTitle ( ) ) ; long min = mModel . getDurationInMilli ( ) / 60000 ; long sec = ( mModel . getDurationInMilli ( ) % 60000 ) / 1000 ; mDuration . setText ( String . format ( getResources ( ) . getString ( R . string . duration ) , min , sec ) ) ; } }
Set the track which must be displayed .