I am getting values from a file onto listview and then if I check a radio button in listview to give a grade(a,b,c) why the other radio button of listview is checked also?
public void read(View v) {
String row;
try {
File file = new File("/sdcard/BatchData.csv");
if(!file.exists())
{
Toast.makeText(getApplicationContext(), "file Dont Exist", Toast.LENGTH_SHORT).show();
}
FileInputStream in = new FileInputStream(file);
BufferedReader myReader = new BufferedReader(new InputStreamReader(in));
Toast.makeText(getApplicationContext(), "ok", Toast.LENGTH_SHORT).show();
ArrayList<String> myStringArrayList = new ArrayList<String>();
//s= (Spinner)findViewById(R.id.spinner);
l= (ListView)findViewById(R.id.list);
try {
while((row= myReader.readLine())!=null)
{
String result= Arrays.toString(row.split(",")).replace("[", "").replace("]", "");
//Toast.makeText(getApplicationContext(), result, Toast.LENGTH_SHORT).show();
myStringArrayList.add(result);
//ArrayAdapter<String> a= new ArrayAdapter<String>(getApplicationContext(), R.layout.spinner_xml,R.id.name, myStringArrayList);
ArrayAdapter<String> adapter= new ArrayAdapter<String>(getApplicationContext(), R.layout.spinner_xml,R.id.name, myStringArrayList);
//a.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
//s.setAdapter(a);
l.setAdapter(adapter);
}
myReader.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}