Back to project page audioplayer.
The source code is released under:
GNU General Public License
If you think the Android project audioplayer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package fr.julien_dumortier.simplemusicplayer.item; // ww w. ja va2 s. co m import android.content.Context; import android.graphics.drawable.Drawable; import android.net.Uri; import fr.julien_dumortier.simplemusicplayer.R; public class Genre extends Item { private String mGenreName; private int mNbAlbums; private static Drawable mDefaultDrawable; public Genre(Context context, String id, String genreName, int nbAlbums, Uri picture, Item parent) { super(context, id, parent, picture); mGenreName = genreName; mNbAlbums = nbAlbums; mPicture = getDefaultDrawable();//.getConstantState().newDrawable(); } public String getGenreName() { return mGenreName; } public int getNbAlbums() { return mNbAlbums; } public Drawable getDefaultDrawable() { try{ if(mDefaultDrawable==null) mDefaultDrawable = mContext.getResources().getDrawable(R.drawable.ic_genre); }catch(Throwable e) {} return mDefaultDrawable; } }