Reputation: 5975
From the documentation: "The Android SDK tools compile your application's resources into the application binary at build time.". So it's safe to assume that all Resource ids will be the same, no matter which device is running them?
Upvotes: 1
Views: 555
Reputation: 152817
Yes, the constant values will be the same.
However, I'm not sure how this information is useful in any meaningful way. The values can change from one build to another, e.g. when you're modifying your resources and then re-building the app. Using the value to communicate something outside the app is therefore fragile.
Upvotes: 2
Reputation: 4013
No you can't trust the R
file that could change if you have such a case you should better set a Tag with your view and use it. Well that is not recommended.
Upvotes: 0