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 <treking...@gmail.com> wrote:
> On Wed, Sep 15, 2010 at 1:53 PM, Mystique <joven.ch...@gmail.com> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to