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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:31:18+00:00 2026-05-24T07:31:18+00:00

Must the resource ID’s for views in XML layouts be unique across all layouts?

  • 0

Must the resource ID’s for views in XML layouts be unique across all layouts?

For example, I’m working on a little recipe manager app. I have a layout file for adding a new ingredient. In this layout I have an EditText for the ingredient that I’d like to call “edt_name”. But I’m afraid that this name is too general; e.g. I might also have an EditText for a recipe name, a cooking procedure name, etc in other XML layout files.

However, I also don’t want to make the labels more complex than necessary. I’d like to avoid calling the aforementioned EditText “edt_name_new_ingredient” if I could.

I’m curious as to how developers organize their resources in general. Android doesn’t support sub-directories for resources as far as I know, so naming schemes can get really messy.

  • 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-24T07:31:18+00:00Added an answer on May 24, 2026 at 7:31 am

    No, resource ID should not be unique across different xml layouts however they must be unique in a particular xml file.

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

Sidebar

Related Questions

If one must load and parse an XML resource from a user/PW-protected URL you
There must be a generic way to transform some hierachical XML such as: <element1
I have localised my app by adding the correct resource files for various European
Roy Fielding writes A REST API must not define fixed resource names or hierarchies
I need to share URL on video resource programmatically. Example of URL is http://flash.video.worldnow.com/kold/KOLD_20110714204221200AA.mp4
The cache control header no-cache, must-revalidate, private allows browsers to cache the resource but
All, I store my application settings in a resource. When my program first loads,
here is the code get an error arrayadapter - you must supply a resource
I must use jQuery for first time.... <a class=Tag Resource href=http://localhost/ resource=http://localres/ property=prop>test</a> I've
i want to embed a xml file to a resource file in my project,whenever

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.