Spacing between two LinearLayouts - How to achieve it with XML?

by Romain Guy » Thu, 29 Jan 2009 01:11:11 GMT

Sponsored Links

You need to set android:layout_marginTop="10dip" on the second child,
not on the parent.

On Wed, Jan 28, 2009 at 2:18 AM, code_android_festival_way

Romain Guy
Android framework engineer

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them


Other Threads

1. Persistent Service and Screen Rotations

When I rotated the screen on the emulator (^F11) to test an app's
layout I got a surprise.  A different app I am working on crashed.
This other app had never been launched since booting the emulator but
it does have a service that starts on boot_completed, and which was
sitting there quietly in the background doing nothing.

The reason for the crash, from the log, is that it couldn't find the
layout resource for one of the app's launchable activities that does
have a UI.  That isn't surprising since I haven't yet provided a
landscape layout for for that UI activity.  But I had not launched
it.  Then when I went looking for the service component, I found that
it had quit as well.

Is this normal behavior?  Why did the onCreate of the UI activity get
called when it had never been launched?  And, does this sort of crash
always take out everything running in the same process, including


2. Resolutions on new phones

Hi, question for Dianne or anyone who can respond...

The dual-boot phone discussed here...

appears to have a smaller screen than the G1:

"yes, granted, Android runs -- but in its default layout, it's clearly
designed for a few more pixels both horizontally and vertically."

I'm just curious if this is an exception to the rule that we should
expect at least 480 x 320, or what's going on here?

3. taking picture from emulator, if pc having webcam

4. Learn Android Programming Courses

5. App Copy Protection

6. HTC Magic is HTC Sapphire

7. Local communication with a service from another APK that runs in the same process