Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4029966
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:24:44+00:00 2026-05-20T11:24:44+00:00

I have a merge layout that has a few includes in it . I

  • 0

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>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T11:24:45+00:00Added an answer on May 20, 2026 at 11:24 am

    Well, the merge tag was created to defeat the extra complexity that is being created in the view hierarchy for the sake of simplicity in your layout definition XML.

    If you refer to the merge explanation page, you will see how the TextView that is added before the frame layout occupies some space. The rest of the space is automatically filled with a FrameLayout, so that the available free space has concrete bounds at any point of time. If we add another Layout, that takes up that space, then the automatically created FrameLayout becomes useless. The tag solves that by adding children to the automatically created FrameLayout as if that layout has been declared in our XML. And that is the purpose of the <merge /> tag.

    In your case, you probably need a RelativeLayout, as your application obviously requires more complexity. I believe the <merge /> tag is not the solution for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the merge layout to have my TextView appear on top of
CVS and Subversion both have a handy merge feature so that when you update
I have two STL containers that I want to merge, removing any elements that
I have huge number of Word files I need to merge (join) into one
Simple idea: I have two images that I want to merge, one is 500x500
I have a merge candidate that i cannot merge to a branch from source
I have a table which has a header row and few rows for the
I have a very simple mail merge that is connected to an SQL server
I have two large MySQL databases with identical schemas that I want to merge.
I have recorded audio using AudioRecorder. I need to merge the recorded files into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.