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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:16:34+00:00 2026-06-10T05:16:34+00:00

I couldn’t come up with a better title for this question, so please feel

  • 0

I couldn’t come up with a better title for this question, so please feel free to amend it if you can.

So here is my question. I decided to write a small app for myself and along the way I am also trying to learn Android Development better. I know why there is a +(plus) sign in the android:id attribute as it means “creating a new id resource”. But I don’t know why Android needs to put + in the ones used for referencing such as below:

Here I have two buttons named StartButton and StopButton and as they are new resources, the android:id contains +:

  <Button
    android:id="@+id/StartButton"
    android:layout_width="150dp"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/textView1"
    android:layout_marginTop="53dp"
    android:textSize="18dp"
    android:text="Start"
    android:onClick="StartButton_OnClick" />

<Button
    android:id="@+id/StopButton"
    android:layout_width="150dp"
    android:layout_height="wrap_content"
    android:layout_alignTop="@+id/StartButton"
    android:layout_toRightOf="@+id/StartButton"
    android:text="Stop"
    android:textSize="18dp"
    tools:context=".CallerBlockerActivity"
    android:onClick="StopButton_OnClick" />

But why android:layout_alignTop contains + puzzles me since id/StartButton is defined when @id/StopButton reaches it. Can some one please explain the necessity of this syntax?

  • 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-06-10T05:16:36+00:00Added an answer on June 10, 2026 at 5:16 am

    It doesn’t matter either way — there only needs to be a + for the first reference to an ID. If the ID is already defined, the + is ignored anyway. You could place a + before every reference in the XML if you wanted to, and everything would work as expected. It’s only necessary for the first reference, though.

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

Sidebar

Related Questions

Couldn't remember better title, feel free to change it to something better :) My
(couldn't think of a better title, feel free to edit it to a title
Couldn't find a better place to ask this so I hope you guys can
Sorry couldn't think of a better title. :) Here goes, I have been pulling
I couldn't find this anywhere, so i thought I'd ask here. Can you do
Couldn't come up with a good title for this. I've got a build in
Couldn't seem to think of a good title, my apologies. Feel free to change
(Couldn't think of any simpler way to write the title for this, but the
I couldn't find a suitable title for this. I'm going to express my query
Couldn't figure out how to word the question accurately, so here's an example: Given

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.