[android-beginners] add view programmatically - crash

2010-07-12 Thread theresia freska
Hello, I am using Android API 8, AVD 2.2. I'm trying to add simple view programmatically -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagg

[android-beginners] add view programmatically - crash

2010-07-12 Thread theresia freska
Hello, I'm using Android API 8, AVD 2.2. I'm trying to add simple view programmatically, but everytime I try to run it in the simulator, the app crashes. It gives me error msg "the app xxx has stopped unexpectedly" with the "force close" button. When I comment this code, the app works fine. Can an

[android-beginners] Re: add view programmatically - crash

2010-07-12 Thread theresia freska
it: > course_main = (LinearLayout) findViewById(R.id.course_main); > > On Mon, Jul 12, 2010 at 11:13 PM, theresia freska > > > > wrote: > > Hello, > > > I'm using Android API 8, AVD 2.2. I'm trying to add simple view > > programmatically, but everyt

[android-beginners] Re: add view programmatically - crash

2010-07-13 Thread theresia freska
Yes, I re-run the app and get an error in Course.java. It is solved now. I need to put setContentView(R.layout.course) before referencing course_main as YuviDroid points out. Thanks! On Jul 13, 1:50 am, Mark Murphy wrote: > On Mon, Jul 12, 2010 at 7:48 PM, theresia freska > > wrote: &