참조 : https://stackoverflow.com/questions/16996600/diferrence-between-r-android-r-class
안드로이드에는 R 클래스가 객체를 static 으로 제공한다.
R.java 객체는 안드로이드 리소스(레이아웃, 이미지, 문자열 등)를 식별하기 위한 변수들을 관리하는 R 클래스이다.
예를 들어 res/drawable 경로에 test.jpg 파일을 추가하면 R.java에는 test 객체가 자동으로 생성되어
다른 자바코드에서 “R.test“으로 해당 이미지 리소스를 참조할 수 있게 된다.
그러면 안드로이드에 사용한느 android.R.파일명 은 무엇일까?
Stackoverflow 에서 그 답을 찾을 수 있었다.
R.layout.*, R.id.*
,in fact anyR.something
without theandroid.
- part in front of it refers to some resource in your resources folders, e.g. drawables, strings, layouts, ids of widgets etc.android.R.*
refers to standard android items that come shipped with your SDK
R.layout.*, R.id.*
객체들은 리소스 폴더를 참조한다. 그러나 android.R.*
은 SDK가 지니고 있는 안드로이드 아이템을 참조한다.