Boozel wrote:
> I'm trying to change the text in the text view section of a custom
> layout.
> I Just get a null pointer exception for some reason. Here is my code:
> 
> package com.example.easychef;
> 
> import android.app.Activity;
> import android.os.Bundle;
> import android.util.Log;
> import android.widget.TextView;
> 
> 
> public class Infomation extends Activity {
>     /** Called when the activity is first created.
>      * @param database */
>       private TextView mInfo;
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         //String []recipe=getIntent().getExtras().getStringArray
> ("db");
>         Log.i("EasyChef","Info: Ito info");
>         setContentView(R.layout.layout_i);
>        mInfo = ((TextView) findViewById(R.string.infomation));

Widgets are identified as R.id.*, not R.string.*.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android 1.5 Programming Books: http://commonsware.com/books.html

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