I'm trying to get the individual values from an ArrayList but I haven't had any luck. It appears that when I go through the loop, it's overwriting the i Integer variable being used in the for loop.
public ArrayList<Integer> getTests()
{
return tests;
}
// Go through all the tests downloaded from the bluetooth module
for (Integer i :ma.mOpacityTestResult.getTests())
{
View row = inflater.inflate(R.layout.test_report_row, (ViewGroup) container, false);
TextView left = (TextView) row.findViewById(R.id.rowLeft);
TextView right = (TextView) row.findViewById(R.id.rowRight);
// This is the checkbox we want shown but to only worth with counter
CheckBox check = (CheckBox) row.findViewById(R.id.checkBox);
check.setVisibility(View.VISIBLE);
check.setChecked(true);
String testResultString = getString(R.string.TestNumber) + String.valueOf(counter++);
// Load getTest Results into a list
List<Object> list = new ArrayList<>();
list.add(i); // Trying to seperate each value of i download from bluetooth here but failing
}