Clover Coverage Report - Subsonic-Android Coverage Report
Coverage timestamp: ven dic 19 2014 17:57:13 EST
../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
9   55   3   4,5
2   26   0,33   2
2     1,5  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  AlbumView       Line # 34 9 3 92,3% 0.9230769
 
No Tests
 
1    /*
2    This file is part of Subsonic.
3   
4    Subsonic is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8   
9    Subsonic is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12    GNU General Public License for more details.
13   
14    You should have received a copy of the GNU General Public License
15    along with Subsonic. If not, see <http://www.gnu.org/licenses/>.
16   
17    Copyright 2009 (C) Sindre Mehus
18    */
19    package net.sourceforge.subsonic.androidapp.util;
20   
21    import android.content.Context;
22    import android.view.LayoutInflater;
23    import android.view.View;
24    import android.widget.LinearLayout;
25    import android.widget.TextView;
26    import net.sourceforge.subsonic.androidapp.R;
27    import net.sourceforge.subsonic.androidapp.domain.MusicDirectory;
28   
29    /**
30    * Used to display albums in a {@code ListView}.
31    *
32    * @author Sindre Mehus
33    */
 
34    public class AlbumView extends LinearLayout {
35   
36    private TextView titleView;
37    private TextView artistView;
38    private View coverArtView;
39   
 
40  30 toggle public AlbumView(Context context) {
41  30 super(context);
42  30 LayoutInflater.from(context).inflate(R.layout.album_list_item, this, true);
43   
44  30 titleView = (TextView) findViewById(R.id.album_title);
45  30 artistView = (TextView) findViewById(R.id.album_artist);
46  30 coverArtView = findViewById(R.id.album_coverart);
47    }
48   
 
49  30 toggle public void setAlbum(MusicDirectory.Entry album, ImageLoader imageLoader) {
50  30 titleView.setText(album.getTitle());
51  30 artistView.setText(album.getArtist());
52  30 artistView.setVisibility(album.getArtist() == null ? View.GONE : View.VISIBLE);
53  30 imageLoader.loadImage(coverArtView, album, false, true);
54    }
55    }