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 7445447
In Process

The Archive Base Latest Questions

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

Is it possible to find a view by id if it’s an ?: <LinearLayout

  • 0

Is it possible to find a view by id if it’s an ?:

<LinearLayout
  android:layout_width="fill_parent"
  android:layout_height="fill_parent" >

    <include
      android:id="@+id/foo"
      layout="@layout/test" />

  ...

View view = findViewById(R.id.foo);

What is “view” in this case? Is it a view? Does it resolve to whatever the top-level element of “layout/test” is?

Thanks

  • 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-29T11:49:29+00:00Added an answer on May 29, 2026 at 11:49 am

    You’re essentially overwriting the ID of the top-parent view in the layout your including, so what you’ll get is the top-view of the entire layout and it’s contents. The <include> tag is, in effect, a copy-and-paste of the contained layout. You can override the id tag and any attribute with layout_.

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

Sidebar

Related Questions

Why is this so hard to find out? public boolean onTouch(View v, MotionEvent event)
Is it possible to get the width of a linear/relative layout, if the layout_width
I've fairly sure this isnt possible but cannot find a yes or no answer.
Possible Duplicate: how to change the font on the text view in android? I
I'm not sure if this is possible, and I couldn't find a topic based
Is it possible to find a view by its name rather than its id.
Is it possible with the StarTeam Client to find files in the current server/project/view?
Possible Duplicate: how to set shadow to a View in android? In my Android
I am not able to find a way around this. Is it possible to
is it possible to find the View that is displayed at a given absolute

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.