Android Open Source - VisEQ Track Row






From Project

Back to project page VisEQ.

License

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.

Java Source Code

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;
  }


}




Java Source Code List

com.lsu.vizeq.AboutActivity.java
com.lsu.vizeq.Artist.java
com.lsu.vizeq.BackableActivity.java
com.lsu.vizeq.HostActivity.java
com.lsu.vizeq.HostMenuActivity.java
com.lsu.vizeq.HostProfileActivity.java
com.lsu.vizeq.HostSoundVisualizationActivity.java
com.lsu.vizeq.Installation.java
com.lsu.vizeq.LibSpotifyWrapper.java
com.lsu.vizeq.LoginActivity.java
com.lsu.vizeq.MyApplication.java
com.lsu.vizeq.MyCanvas.java
com.lsu.vizeq.PVCircle.java
com.lsu.vizeq.PacketParser.java
com.lsu.vizeq.PlayerActivity.java
com.lsu.vizeq.PreferenceCircle.java
com.lsu.vizeq.PreferenceVisualizationActivity.java
com.lsu.vizeq.PreferenceVisualizer.java
com.lsu.vizeq.ProfileActivity.java
com.lsu.vizeq.RemoteControlReceiver.java
com.lsu.vizeq.RequestDetailsActivity.java
com.lsu.vizeq.RoleActivity.java
com.lsu.vizeq.SearchActivity.java
com.lsu.vizeq.SearchPartyActivity.java
com.lsu.vizeq.ServiceBinder.java
com.lsu.vizeq.SettingsActivity.java
com.lsu.vizeq.SoundVisualizationActivity.java
com.lsu.vizeq.SpotifyService.java
com.lsu.vizeq.TrackRow.java
com.lsu.vizeq.Track.java
com.lsu.vizeq.VisualizerView.java
com.lsu.vizeq.VizEQ.java
com.lsu.vizeq.WebService.java
com.lsu.vizeq.util.SystemPropertiesProxy.java
com.lsu.vizeq.util.SystemUiHiderBase.java
com.lsu.vizeq.util.SystemUiHiderHoneycomb.java
com.lsu.vizeq.util.SystemUiHider.java
com.lsu.vizeq.util.TunnelPlayerWorkaround.java