murphy wrote:
> Thanks for the explanation. I found the files there alright so the
> code is working which is great. Now I need to access the files in the
> device to display their contents in a TextView in a screen. I've been
> trying to do something like this:
> 
>               String text = new String(istr);
>               TextView tv = (TextView)findViewById(R.id.somenews);
>             tv.setText(text);
>             setContentView(R.layout.latestnews);
> 
> but I'm not really sure how to do it.

setContentView() has to be called before findViewById(), assuming the
layout you define in setContentView() has the widgets you're trying to
access in findViewById().

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

--~--~---------~--~----~------------~-------~--~----~
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