-1
텍스트 줄을 분할하고 Edittext에 표시하는 데 약간의 문제가 있습니다.android에서 문자열 분할하기
내가 지금까지 가지고있는 것입니다.
try {
// open the file for reading
InputStream instream = new FileInputStream("/sdcard/folder/file.txt");
// if file the available for reading
if (instream != null) {
// prepare the file for reading
InputStreamReader inputreader = new InputStreamReader(instream);
BufferedReader buffreader = new BufferedReader(inputreader);
String csvRecord;
while ((csvRecord = buffreader.readLine()) != null) {
String[] csvFields = csvRecord.split(",");
String display = csvFields[0] + " " + csvFields[3] + "\r\n";
EditText results = (EditText) findViewById(R.id.results);
results.setText(toString.display);
}
}}
finally {
}
도움이 setText
를 사용하여
관련
문제는 무엇인가? – Overv