こんにちは、私はこのコードを使用しました:
String displayText = "";
try {
InputStream fileStream = getResources().openRawResource(
R.raw.t);
int fileLen = fileStream.available();
// Read the entire resource into a local byte buffer.
byte[] fileBuffer = new byte[fileLen];
fileStream.read(fileBuffer);
fileStream.close();
displayText = new String(fileBuffer);
} catch (IOException e) {
// exception handling
}
TextView tv=(TextView) findViewById(R.id.textView1);
tv.setText(displayText);
}
テキストファイルを表示するためのものです。各行の色を変更したい (および行間の行の色を変更したい) どうすればよいですか?
英語が下手でごめんなさい