【发布时间】:2013-04-22 12:23:04
【问题描述】:
嗨, 我使用了这段代码:
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);
}
用于显示文本文件。 我想改变每行的颜色(并改变行之间的颜色) 我该怎么办?
对不起,英语不好
【问题讨论】: