Back to project page VisEQ.
The source code is released under:
Copyright (c) 2012, Spotify AB All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:...
If you think the Android project VisEQ 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 com.lsu.vizeq; /*www. ja v a2 s . c o m*/ import android.content.Context; import android.graphics.Color; import android.graphics.Typeface; import android.widget.LinearLayout; import android.widget.TableRow; import android.widget.TextView; public class TrackRow extends TableRow { public String mTrack; public String mAlbum; public String mArtist; public String mUri; public String mThumbnail; public String mRequester; public int originalColor; public static int color1 = Color.rgb(200, 200, 200); public static int color2 = Color.WHITE; public LinearLayout trackRowLayout; public TextView trackView; public TextView artistView; private Context context; public TrackRow(Context context, String track, String album, String artist, String uri) { super(context); mTrack = track; mAlbum = album; mArtist = artist; mUri = uri; trackView = new TextView(context); artistView = new TextView(context); trackRowLayout = new LinearLayout(context); this.context = context; this.setPadding(4, 4, 0, 4); init(); } private void init() { Typeface font = Typeface.createFromAsset(context.getAssets(), "Mission Gothic Regular.otf"); trackView.setTypeface(font); artistView.setTypeface(font); trackRowLayout.setOrientation(LinearLayout.VERTICAL); trackView.setText(mTrack); artistView.setText(mArtist); trackView.setTextSize(20); trackView.setTextColor(Color.BLACK); artistView.setTextColor(Color.DKGRAY); trackRowLayout.addView(trackView); trackRowLayout.addView(artistView); this.addView(trackRowLayout); } public TrackRow(Context context) { super(context); } public String getSpotifyUri() { return mUri; } public String getTrackInfo() { return mAlbum + " - " + mArtist; } public CharSequence getTrackName() { return mTrack; } public Track getTrack() { Track tempTrack = new Track(mTrack, mAlbum, mArtist, mUri, mThumbnail, 0); return tempTrack; } }