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

  • SEARCH
  • Home
  • 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 7495305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:01:28+00:00 2026-05-29T18:01:28+00:00

When I use include in a layout, I have to set width and height

  • 0

When I use include in a layout, I have to set width and height both to include tag and to the layout it is linked to. Otherwards it won’t work correctly. So, it seems, that include is not a link, but a subclass of View, if it has its own width, height, id and so on. But on developer’s site there is not such class as include. Who are you, Mr. include?

  • 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-29T18:01:31+00:00Added an answer on May 29, 2026 at 6:01 pm

    The <include> tag can be thought of as a copy/paste of the internal layout. It’s part of the xml parsing that’s in the View Inflater classes. It effectively takes the layout ID, inflates the xml object you pass in, then adds it to the main layout that it’s inflating based on the attributes of the included layout. You can use it on anything that inherits from View.

    You can overwrite any of the attributes that have layout_ in them. You don’t have to overwrite the width and height attributes if they are included in the root of the layout your including. However, you do have to overwrite those parameters if you are overwriting any other attribute. It’s part of a bug in how <include> is parsed. If you want to change, say, layout_marginLeft, you would have to overwrite layout_width and layout_height to the same values that are in the layout in order for the parser to overwrite the left margin attribute.

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

Sidebar

Related Questions

I have use include ('base.php') script in my other scripts ( more.php ). Now
Is there any material about how to use #include correctly? I didn't find any
To include another file in JSP, we use the @include tag <%@ include file=NameOfFile%>
I have set up to use post formats gallery and video in addition to
I have been having this issue when I use the php include() or require()
I have a class Page() that I can use to print the (layout) header
OK, So I understand how to use the include tag but I've run into
So I know I can use #include in BIB and REG files to pull
As far as I know, there's no way to use {% include %} within
When i use php include to include a page in my website all the

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.