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" android:id="@+id/MyRelativeLayout" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ListView android:id="@+id/MyListView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scrollbars="vertical" android:smoothScrollbar="true" android:visibility="visible" android:layout_alignParentTop="true"> </ListView> </RelativeLayout> On Tue, Jan 19, 2010 at 2:36 PM, oregonduckman <oregonduck...@gmail.com> wrote: > 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 away. > > Does anyone know if the order of attribute declarations appears in the > Android docs anywhere? > > <?xml version="1.0" encoding="utf-8"?> > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/ > android" > android:id="@+id/MyRelativeLayout"> > android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > <ListView android:id="@+id/MyListView" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > android:scrollbars="vertical" > android:smoothScrollbar="true" > android:visibility="visible" > android:layout_alignParentTop="true"> > </ListView> > </RelativeLayout> > > On Jan 19, 6:37 am, Walt Armour <waltarm...@gmail.com> wrote: >> That looks like the content of the stack from the eclipse debug >> perspective. What's the actual exception/error? If you resume the run >> (perhaps more than once) the complete stack with error will eventually get >> dumped to the log. You can then view it in the logcat window (a tab in the >> right pane of the debug perspective). >> >> On Mon, Jan 18, 2010 at 20:05, oregonduckman <oregonduck...@gmail.com>wrote: >> >> >> >> > My code is calling setContentView(R.layout.someLayoutID); from an >> > activities' onCreate method. The activity is launched with the >> > following: >> >> > Intent myIntent = new Intent(this, myClass.class); >> > try >> > { >> > this.startActivity(myIntent); >> > } >> > catch(ActivityNotFoundException e) >> > { >> > e.toString(); >> > } >> >> > The activity is declared in the manifest file as <activity >> > android:name=".myClass"></activity> >> > The call to setContentView results in the following: (also, is it >> > possible to setup Eclipse to find the source that the VM is referring >> > to (instead of just getting the "source not found" error?? >> >> > DalvikVM[localhost:8656] >> > Thread [<3> main] (Suspended (exception RuntimeException)) >> >> > ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, >> > Intent) line: 2481 >> >> > ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, >> > Intent) line: 2497 >> > ActivityThread.access$2200(ActivityThread, ActivityThread >> > $ActivityRecord, Intent) line: 119 >> > ActivityThread$H.handleMessage(Message) line: 1848 >> > ActivityThread$H(Handler).dispatchMessage(Message) line: 99 >> > Looper.loop() line: 123 >> > ActivityThread.main(String[]) line: 4338 >> > Method.invokeNative(Object, Object[], Class, Class[], Class, >> > int, >> > boolean) line: not available [native method] [local variables >> > unavailable] >> > Method.invoke(Object, Object...) line: 521 >> > ZygoteInit$MethodAndArgsCaller.run() line: 860 >> > ZygoteInit.main(String[]) line: 618 >> > NativeStart.main(String[]) line: not available [native >> > method] >> > Thread [<13> Binder Thread #2] (Running) >> > Thread [<11> Binder Thread #1] (Running) >> > Thread [<15> Binder Thread #3] (Running) >> >> > -- >> > 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/tagged/android >> >> > To unsubscribe from this group, send email to >> > android-beginners+unsubscr...@googlegroups.com<android-beginners%2Bunsubscr >> > i...@googlegroups.com> >> > For more options, visit this group at >> >http://groups.google.com/group/android-beginners?hl=en > > -- > 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/tagged/android > > To unsubscribe from this group, send email to > android-beginners+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-beginners?hl=en > >
-- 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/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en