I'm not sure... I've been using this in my previous app.
I change to this code instead and it is working.
---code---
TextView helpTxt = (TextView)findViewById(R.id.helptext);
helpTxt.setText(readTxt());
}
private String readTxt() {
InputStream inputStream =
getResources().openRawResource(R.raw.help);
ByteArrayOutputStream byteArrayOutputStream = new
ByteArrayOutputStream();
int i;
try {
i = inputStream.read();
while (i != -1) {
byteArrayOutputStream.write(i);
i = inputStream.read();
}
inputStream.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return byteArrayOutputStream.toString();
}
}
On Sep 16, 3:12 am, TreKing <[email protected]> wrote:
> On Wed, Sep 15, 2010 at 1:53 PM, Mystique <[email protected]> wrote:
> > while ((strLine = dataIO.readLine()) != "") {
> > sBuffer.append(strLine + "\n");
>
> This seems suspect. Shouldn't you be checking for null?
>
> ---------------------------------------------------------------------------
> ----------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en