package credit.android.dg;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.SeekBar;
import android.widget.TextView;

public class ChangePrice extends Activity implements SeekBar.OnSeekBarChangeListener {
	
	private Button SetButton;
	private SeekBar mSetPrice;
	private TextView mPrice;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
		requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
		setContentView(R.layout.change_price);
		getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.header);
		((TextView) findViewById(R.id.header_text)).setText("CHANGE PRICE");
		
		SetButton = (Button) findViewById(R.id.set_price_button);
		mSetPrice = (SeekBar) findViewById(R.id.change_price_bar);
		mPrice = (TextView) findViewById(R.id.price);
		
        mSetPrice.setOnSeekBarChangeListener(this);		
		SetButton.setOnClickListener(new View.OnClickListener() {
        	
        	public void onClick(View view){        		
        		   //doSmth(); 		
        	}
        });
	}
	
	public void doSmth(){
		/*Intent i = new Intent(this,DrugLords.class);
		startActivity(i);*/
	}

	public void onProgressChanged(SeekBar seekBar, int progress,
			boolean fromTouch) {
		// TODO Auto-generated method stub
		mPrice.setText(progress + " " + 
                "$ ");// + "=" + fromTouch);
		
	}

	public void onStartTrackingTouch(SeekBar seekBar) {
		// TODO Auto-generated method stub
		
	}

	public void onStopTrackingTouch(SeekBar seekBar) {
		// TODO Auto-generated method stub
		
	}

}
