// Path: src/com/elefher/tab/Voltages.java
// public class Voltages extends Activity {
// 
// 	/** Called when the activity is first created. */
// 
// 	String[] freqs, volts;
// 	public static ArrayList<SetCpuVoltage> setCpuVoltsList;
// 	public static int lengthObj;
// 	
// 	@Override
// 	public void onCreate(Bundle savedInstanceState) {
// 		super.onCreate(savedInstanceState);
// 		setContentView(R.layout.voltages);
// 		
// 		getActionBar().setDisplayHomeAsUpEnabled(true);
// 
// 		setCpuVoltagesSeparate();
// 		
// 		setCpuVoltsList = new ArrayList<SetCpuVoltage>();
// 		
// 		// Length of cpuVolts objects
// 		lengthObj = volts.length;
// 		
// 		for(int i = 0; i < lengthObj; i++){
// 			setCpuVoltsList.add(new SetCpuVoltage(this));
// 			setCpuVoltsList.get(i).setValue(volts[i]);
// 			setCpuVoltsList.get(i).setTitle(freqs[i]);
// 			setCpuVoltsList.get(i).createReachEditText(R.id.voltagesEdit);
// 		}
// 
// 		SetVoltagesButton setVoltBtn = new SetVoltagesButton(this, "Set Volts");
// 		setVoltBtn.positionButton(R.id.voltagesEdit);
// 		setVoltBtn.enableButton();
// 		
// 		UpDownVoltageButtons upDownOffsetBtns = new UpDownVoltageButtons(this);
// 	}
// 
// 	private void setCpuVoltagesSeparate() {
// 		ArrayList<String> cpuFreqsVolts = CpuGpuFreqVoltages.getCpuVoltages(this);
// 		int size = cpuFreqsVolts.size();
// 		freqs = new String[size];
// 		volts = new String[size];
// 		
// 		/*
// 		 *  Trim spaces at the end and start of string and after that
// 		 *  split string. Separate to freqs and volts
// 		 */		
// 		for(int i = 0; i < size; i++){
// 			String[] str = cpuFreqsVolts.get(i).trim().split("\\s+");
// 			freqs[i] = str[0];
// 			volts[i] = str[1];
// 		}
// 	}
// 	
// 	@Override
// 	public boolean onOptionsItemSelected(MenuItem item) {
// 	    switch (item.getItemId()) {
// 	    // Respond to the action bar's Up/Home button
// 	    case android.R.id.home:
// 	        NavUtils.navigateUpFromSameTask(this);
// 	        return true;
// 	    }
// 	    return super.onOptionsItemSelected(item);
// 	}
// }


import java.util.ArrayList;
import com.cpu.handler.R;
import com.elefher.tab.Voltages;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.Typeface;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.Toast;
import android.widget.LinearLayout.LayoutParams;
		}
		
		return offset;
	}
	
	private void offsetDoChanges(){
		/*
		 * Check if voltages changed. Also prepare getEditOffset to arraylist
		 * in order to fit in setCpuVoltages function.
		 */
		ArrayList<String> offset = new ArrayList<String>();
		offset.add(getEditOffset());
		if(CpuGpuFreqVoltages.setCpuVoltages(offset, activity)){
			Toast.makeText(activity, "Greate the voltages has changed!!", Toast.LENGTH_LONG).show();
			UpDownVoltageButtons.offestCount = 0;
		}else{
			if("0".equals(getEditOffset())){
				Toast.makeText(activity, "You didn't change voltages!!", Toast.LENGTH_LONG).show();
			} else {
				Toast.makeText(activity, "Somithing went wrong!!",
						Toast.LENGTH_LONG).show();
			}
		}
	}
	
	/*
	 * Get all freqs and volts from edit texts
	 */
	private ArrayList<String> getChanges(){
		ArrayList<String> storeNewFreqsVolts = new ArrayList<String>();
// Path: src/com/elefher/tab/Voltages.java
// public class Voltages extends Activity {
// 
// 	/** Called when the activity is first created. */
// 
// 	String[] freqs, volts;
// 	public static ArrayList<SetCpuVoltage> setCpuVoltsList;
// 	public static int lengthObj;
// 	
// 	@Override
// 	public void onCreate(Bundle savedInstanceState) {
// 		super.onCreate(savedInstanceState);
// 		setContentView(R.layout.voltages);
// 		
// 		getActionBar().setDisplayHomeAsUpEnabled(true);
// 
// 		setCpuVoltagesSeparate();
// 		
// 		setCpuVoltsList = new ArrayList<SetCpuVoltage>();
// 		
// 		// Length of cpuVolts objects
// 		lengthObj = volts.length;
// 		
// 		for(int i = 0; i < lengthObj; i++){
// 			setCpuVoltsList.add(new SetCpuVoltage(this));
// 			setCpuVoltsList.get(i).setValue(volts[i]);
// 			setCpuVoltsList.get(i).setTitle(freqs[i]);
// 			setCpuVoltsList.get(i).createReachEditText(R.id.voltagesEdit);
// 		}
// 
// 		SetVoltagesButton setVoltBtn = new SetVoltagesButton(this, "Set Volts");
// 		setVoltBtn.positionButton(R.id.voltagesEdit);
// 		setVoltBtn.enableButton();
// 		
// 		UpDownVoltageButtons upDownOffsetBtns = new UpDownVoltageButtons(this);
// 	}
// 
// 	private void setCpuVoltagesSeparate() {
// 		ArrayList<String> cpuFreqsVolts = CpuGpuFreqVoltages.getCpuVoltages(this);
// 		int size = cpuFreqsVolts.size();
// 		freqs = new String[size];
// 		volts = new String[size];
// 		
// 		/*
// 		 *  Trim spaces at the end and start of string and after that
// 		 *  split string. Separate to freqs and volts
// 		 */		
// 		for(int i = 0; i < size; i++){
// 			String[] str = cpuFreqsVolts.get(i).trim().split("\\s+");
// 			freqs[i] = str[0];
// 			volts[i] = str[1];
// 		}
// 	}
// 	
// 	@Override
// 	public boolean onOptionsItemSelected(MenuItem item) {
// 	    switch (item.getItemId()) {
// 	    // Respond to the action bar's Up/Home button
// 	    case android.R.id.home:
// 	        NavUtils.navigateUpFromSameTask(this);
// 	        return true;
// 	    }
// 	    return super.onOptionsItemSelected(item);
// 	}
// }


// Path: src/com/elefher/customclasses/SetVoltagesButton.java
import java.util.ArrayList;
import com.cpu.handler.R;
import com.elefher.tab.Voltages;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.Typeface;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.Toast;
import android.widget.LinearLayout.LayoutParams;

		}
		
		return offset;
	}
	
	private void offsetDoChanges(){
		/*
		 * Check if voltages changed. Also prepare getEditOffset to arraylist
		 * in order to fit in setCpuVoltages function.
		 */
		ArrayList<String> offset = new ArrayList<String>();
		offset.add(getEditOffset());
		if(CpuGpuFreqVoltages.setCpuVoltages(offset, activity)){
			Toast.makeText(activity, "Greate the voltages has changed!!", Toast.LENGTH_LONG).show();
			UpDownVoltageButtons.offestCount = 0;
		}else{
			if("0".equals(getEditOffset())){
				Toast.makeText(activity, "You didn't change voltages!!", Toast.LENGTH_LONG).show();
			} else {
				Toast.makeText(activity, "Somithing went wrong!!",
						Toast.LENGTH_LONG).show();
			}
		}
	}
	
	/*
	 * Get all freqs and volts from edit texts
	 */
	private ArrayList<String> getChanges(){
		ArrayList<String> storeNewFreqsVolts = new ArrayList<String>();
		for(int i = 0; i < Voltages.lengthObj; i++){