package com.view.coverflow;

import java.util.List;

import android.util.Log;

public class Advance {
	boolean reverse = true;
    static int i=0;
    List<Float> tracks;
    List<Cover> covers;
    public Advance(List<Float> tracks,List<Cover> covers){
    	this.tracks = tracks;
    	this.covers = covers;
    	//this.setAdvance(false);
    }
       
   
	public void setAdvance(boolean reverse){
		Log.v("=============setAdvancesetAdvance", "---------------");
        int incr = 0;
        if(!reverse){
            if (i < tracks.size()-1){
            	incr = 1;
            }
        }
        else{
            if(i > 0){
            	incr = -1;
            }
        }
        i += incr;
       
        covers.get(i).focus();
        if (incr != 0){ 
        	covers.get((int) (i-incr)).unfocus(-incr);
        }
        Cover.pValueCoverTrack.setVal(tracks.get(i));
        Log.v("=============setAdvancesetAdvance", "---------------");
    }
}
