Mike,

The contents of <merge> file is simply, um, merged at the point where it's <include>'d.

If you use the <include> inside a relative layout, then the views inside the <merge> can use realtive layout-specific attributes, and same for other layout types.

To position one view between two others, you can use android:layout_below and android:layout_above at the same time. What also works well is a linear layout with the middle view having a non-zero android:layout_weight.

-- Kostya

05.03.2011 17:26, Mike пишет:
I have a merge layout that has a few includes in it . I need to be
able to position relatively. The top and bottom ones are easy because
you can use android:layout_gravity="bottom"   OR
android:layout_gravity="top". Now, is there a way to positing a third
include relative to the one at the top (right below it)? . I read you
can wrap the includes in a RelativeLayout but doesn't that defeat the
purpose of using Merge?

<merge
     xmlns:android="http://schemas.android.com/apk/res/android";>


      <com.testmerge.TitleBar
         id="@+id/titlebar"
         android:layout_width="fill_parent"
         android:layout_height="35dip"
         android:layout_gravity="top"
                android:paddingTop="0dip"
         android:background="@drawable/title_bar"
      />

     <com.testmerge.StatusBar
         android:layout_width="fill_parent"
         android:layout_height="35dip"
         android:paddingTop="0dip"
         android:background="@drawable/title_bar"
     />

     <com.testmerge.OkCancelBar
         android:layout_width="fill_parent"
         android:layout_height="60dip"
         android:layout_gravity="bottom"
                android:paddingTop="0dip"
         android:background="@drawable/header_bkgrnd"
     />

     <!--"#AA000000"-->
</merge>



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to