Re: [android-developers] Read files to edittext

2011-02-09 Thread Kostya Vasilyev
Can't speak for size limitations, but why are putting the data into a vector, and appending to EditText one line at a time? Reading line by line and building the content in a StringBuilder seems more efficient, then you can do editText.setText() just once. And reading one line at a time is on

[android-developers] Read files to edittext

2011-02-09 Thread André
What would be the best way of reading large text files from the sdcard? Right now I'm using this in my browser activity: File f = new File(filePath); FileInputStream file = new FileInputStream(f); BufferedReader in = new BufferedReader(new InputStreamReader(file)); do { st = in.readLine()