the program can't read the file ? and don't show err , this is my code what the problem about it
int na; ArrayList ar = new ArrayList();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Resources s = getResources();
File f = new File("dat.csv");
BufferedReader bu;
try {
bu = new BufferedReader(new FileReader("//raw/dat.cav"));
String st ;
while((st= bu.readLine()) != null){
for(int i=0 ; i<ar.size();i++){
ar.add(i,bu.readLine());
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
public void show(View view) {
Toast.makeText(getBaseContext(),ar.indexOf(0),Toast.LENGTH_LONG).show();
}
}
Comments
Post a Comment