How to get file read line by line
问题 I have a file containing text in separate line. I want to display line first, and then if I press a button, the second line should be displayed in the TextView and the first line should disappear. Then, if I press it again, the third line should be displayed and so on. Should I have to use TextSwitcher or anything else? How can I do that? 回答1: You tagged it as "android-assets" so I'm going to assume your file is in the assets folder. Here: InputStream in; BufferedReader reader; String line;