0

I am beginning to learn how to make an android app. And I am very curious about one thing of android programming. Why symbol R is chosen? why not other symbol? can we change it to other one we want? is there any special about symbol R?

Cheer :)

Jota
  • 17,281
  • 7
  • 63
  • 93
Rock Rach
  • 39
  • 4
  • 1
    I believe `R` stands for Resource. Nothing special about it besides that. – Emmanuel Apr 20 '15 at 01:26
  • 3
    Do not confuse this abbreviation on Android and the programming language http://en.wikipedia.org/wiki/R_%28programming_language%29 as they have nothing in common. Thus, your 'R' tag for this question is being removed. – Cœur Apr 20 '15 at 01:32
  • Check this link : http://stackoverflow.com/questions/4953077/android-what-is-r-why-is-it-so-cryptic – N Kaushik Apr 20 '15 at 03:37

2 Answers2

3

I believe that R stands for "Resources". They shortened it to "R" so that you don't have to type all those characters every single time.

It is a handle to the various resources such as images, text, ect in your application. It allows you to easily utilize these resources from within the application.

I don't know of any way to change it and I would advise against trying. This is a standard Android pattern, so you should just learn to use it. Fighting it is only going to cause you problems in the long run.

All of the Android guides out there will explain R. Read the documentation and you'll see that it is really pretty simple.

This link explains how it works: http://developer.android.com/guide/topics/resources/providing-resources.html

Jon
  • 3,212
  • 32
  • 35
-1

It's a shortcut for Resources.

developer.android.com

poss
  • 1,759
  • 1
  • 12
  • 27
  • 6
    This should be a comment. – Emmanuel Apr 20 '15 at 01:28
  • 1
    That provides no further value than my comment above. – Emmanuel Apr 20 '15 at 01:32
  • 3
    @Emmanuel I didn't see your comment at the time of posting. Besides that, there is no reason to provide answer in a comment instead of dedicated answer field. – poss Apr 20 '15 at 01:34
  • 2
    @Emmanuel - a question with only comments remains in the unanswered category. Just because an answer is *brief* doesn't mean it's not enough to get the question out of the unanswered queue. – Chris Stratton Apr 20 '15 at 01:36
  • 1
    1. You are asking a question in your answer. 2. do you really think that this question merits an answer (a 3 line, link to the guid, answer)? rather than a comment, or you are just doing it for the rep? – Emmanuel Apr 20 '15 at 01:36
  • @Emmanuel - although there is a supplemental question, there is a clear and complete answer here, and that makes this an answer. Please take time to understand how things work on this site before attacking others. – Chris Stratton Apr 20 '15 at 01:37
  • 1
    I guess we just differ in this matter. A 3 line "answer" that also asks a question is not really an answer to me. – Emmanuel Apr 20 '15 at 01:38
  • 1
    I agree with Emmanuel as far as the question part is concerned. An answer should be just that, not a request for clarification from the author. If anything, your question would be better used as a comment on OP's question. Otherwise, I do believe you have answered the question that was asked. – AdamMc331 Apr 20 '15 at 01:47