I'm trying to set the text in a TextView that is found in a layout xml
file that is not the layout file used as the setContentView for my
activity. The layout file that the TextView is located in is a sub
layout file used to populate a list item with database information for
a ListView in the main layout file.

When I use the code below to call the TextView I'm getting a null
pointer error as I realise now its looking in the parent Layout file
where it doesn't exist. How do I go about calling it from the sub
layout file?

    TextView currency = (TextView) findViewById(R.id.currency);
    currency.setText(cur);

Thanks A

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

Reply via email to