Today, I write some simple code to implement activity. See the
following codes:
public class TestLinearView extends Activity {
        private EditText edit = null;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);

        // Set activity content from layout view
        setContentView(R.layout.relative_view);

        // change the edit text
        edit = (EditText)findViewById(R.id.entry);
        edit.setText("Mysdfsadfdsafdsf");
    }
}

However, the application crushed. After I debug into the app, I found
that the edit was null.
What is wrong with my codes? Please figure out.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to