Well, it doesn't die when I add layout_height. Doesn't do what I want (of course), but doesn't die.
On Oct 8, 4:28 pm, DanH <danhi...@ieee.org> wrote: > Curse the LogCat view on Eclipse! I see this when I export the > exception: "java.lang.RuntimeException: Binary XML file line #10: You > must supply a layout_height attribute." > > 10-08 16:24:13.603: DEBUG/AndroidRuntime(1572): Shutting down VM > 10-08 16:24:13.603: WARN/dalvikvm(1572): threadid=1: thread exiting > with uncaught exception (group=0x4001d800) > 10-08 16:24:13.622: DEBUG/FlurryAgent(1572): Ending session > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): FATAL EXCEPTION: main > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): > java.lang.RuntimeException: Unable to start activity > ComponentInfo{com.boosti.temodar.android/ > com.boosti.temodar.android.TemodarHome}: java.lang.RuntimeException: > Binary XML file line #10: You must supply a layout_height attribute. > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.app.ActivityThread.performLaunchActivity(ActivityThread.java: > 2663) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: > 2679) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.app.ActivityThread.access$2300(ActivityThread.java:125) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.os.Handler.dispatchMessage(Handler.java:99) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.os.Looper.loop(Looper.java:123) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.app.ActivityThread.main(ActivityThread.java:4627) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > java.lang.reflect.Method.invokeNative(Native Method) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > java.lang.reflect.Method.invoke(Method.java:521) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > com.android.internal.os.ZygoteInit > $MethodAndArgsCaller.run(ZygoteInit.java:868) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > dalvik.system.NativeStart.main(Native Method) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): Caused by: > java.lang.RuntimeException: Binary XML file line #10: You must supply > a layout_height attribute. > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.content.res.TypedArray.getLayoutDimension(TypedArray.java:491) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java: > 3593) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:3672) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.widget.RelativeLayout$LayoutParams.<init>(RelativeLayout.java: > 1047) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.widget.RelativeLayout.generateLayoutParams(RelativeLayout.java: > 917) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.widget.RelativeLayout.generateLayoutParams(RelativeLayout.java: > 66) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.view.LayoutInflater.rInflate(LayoutInflater.java:620) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.view.LayoutInflater.inflate(LayoutInflater.java:407) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.view.LayoutInflater.inflate(LayoutInflater.java:320) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.view.LayoutInflater.inflate(LayoutInflater.java:276) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java: > 198) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.app.Activity.setContentView(Activity.java:1647) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > com.boosti.temodar.android.TemodarHome.onCreate(TemodarHome.java:47) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: > 1047) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): at > android.app.ActivityThread.performLaunchActivity(ActivityThread.java: > 2627) > 10-08 16:24:14.142: ERROR/AndroidRuntime(1572): ... 11 more > 10-08 16:24:14.331: WARN/ActivityManager(78): Force finishing > activity com.boosti.temodar.android/.TemodarHome > > On Oct 8, 4:10 pm, Mark Murphy <mmur...@commonsware.com> wrote: > > > I'd use android:layout_marginTop="200dip" on whatever is below your > > View, instead of a separate spacer. > > > Can you post the exception associated with the "horrible death"? > > > On Fri, Oct 8, 2010 at 5:05 PM, DanH <danhi...@ieee.org> wrote: > > > Kind of an newbie question, I suppose -- I haven't done much playing > > > with layouts yet -- > > > > I want a spacer in a layout to space some text down below the "live" > > > part of a background image. I tried this: > > > > <?xml version="1.0" encoding="utf-8"?> > > > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/ > > > android" > > > android:id="@+id/CheckDeviceConnectivityView" > > > android:layout_width="fill_parent" > > > android:layout_height="fill_parent" > > > android:orientation="vertical" > > > android:background="@drawable/i_notice_background" > > > android:paddingLeft="15dip" android:paddingRight="15dip"> > > > > <View android:id="@+id/HomePageSpacer" <== This is what > > > I added > > > android:minHeight="200dip" > > > android:layout_width="fill_parent" > > > /> > > > . . . > > > > Which seems straight-forward enough. But setContentView dies a > > > horrible death when passed the layout. (And it works fine without > > > that View element.) > > > > What am I doing wrong? What's the best way to create a spacer? > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > > _Android Programming Tutorials_ Version 3.0.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en