[android-beginners] Re: setContentView fails when creating a new activity

2010-01-21 Thread RNekic
I find that exceptions triggered by setContentView are often simple oversights in the layout file. Often, it is caused by a missing layout_width or layout_height on one of my view declarations in the xml. On Jan 19, 9:37 am, Walt Armour waltarm...@gmail.com wrote: That looks like the content

[android-beginners] Re: setContentView fails when creating a new activity

2010-01-21 Thread RNekic
I find that exceptions triggered by setContentView are usually caused by something simple in the layout file; often a missing layout_width or layout_height on one of my View declarations. On Jan 19, 9:37 am, Walt Armour waltarm...@gmail.com wrote: That looks like the content of the stack from

[android-beginners] Re: setContentView fails when creating a new activity

2010-01-21 Thread Robert Nekic
The opening RelativeLayout tag is closed in the middle of your attributes declarations. The exception is probably coming from the lack of the layout_width and layout_height attributes since they fall outside your tag at the moment. RelativeLayout

[android-beginners] Re: setContentView fails when creating a new activity

2010-01-19 Thread oregonduckman
It appears that the order attribute declaration matters for layout declarations, for example the following causes an exception to be thrown that says that the layout_width should be in line 2 of the XML but if the id attribute is placed at the bottom of the list of attributes the exception goes

Re: [android-beginners] Re: setContentView fails when creating a new activity

2010-01-19 Thread Temitope Akinwande
Looking at the code, you have a closing tag after @+id/MyRelativeLayout that's the issue. The closing tag should be at android:layout_height=fill_parent So your XML should be ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android