Friday, October 8, 2010

[android-developers] Creating a vertical spacer

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?

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate