0

I presume this will be a bit of a noob question so please bear with me but i am wondering how the values Shown In Blue are generated for the different source files within R.Java file as shown? Thanks!

enter image description here

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
  • R u looking for values ? if yes please dont worry and dont depend on it. It getting generated automatically. https://www.javatpoint.com/R-java-file-in-android – Sush Jul 07 '17 at 18:57
  • @Sush Oh fair thanks man , Guess this leads to my next question.... so if you look at the attached picture you will see that there is a source called "do_junk_clean" which is used as this ` android:layout_above="@id/do_junk_clean">` I was wondering how do i make a different id that says "@id/do_Process_kill" – Thomas Mortell Jul 07 '17 at 19:01
  • 1
    Make/assign an androidWidget in your xml file with `android:id="@+id/do_Process_kill"` – Firoz Memon Jul 07 '17 at 19:06

1 Answers1

0

As it's been mentioned in previous answers, R file is being generated every single time during the application build. Every value must be public and static. This file should be never edited manually.

You can compare this file with some kind of a "manifest" for the app that defines what property name is responsible for what. And in order to navigate to the R.x.x value usage - simply click on the property while holding CTRL.

Now to the more "in-depth" answer. To my mind here is the most accurate explanation of the generation process, if that's what you were looking for: 'Deep' answer.

Good luck!

Stepan Mazokha
  • 459
  • 1
  • 5
  • 22