View.getContext()
: Returns the context the view is currently running in. Usually the currently active Activity.현재 액티비티
Activity.getApplicationContext()
: Returns the context for the entire application (the process all the Activities are running inside of). Use this instead of the current Activity context if you need a context tied to the lifecycle of the entire application, not just the current Activity.전체 애플리케이션, 생명주기에 관련되어있을때 씀.
ContextWrapper.getBaseContext()
: If you need access to a Context from within another context, you use a ContextWrapper. The Context referred to from inside that ContextWrapper is accessed via getBaseContext().다른 컨텍스트에서 접근할때 컨텍스트래퍼 씀.
| Used on classes which contains methods annotated with |
| Can be used on methods in classes annotated with |
| Single instance of this provided object is created and shared. |
| Used on an interface. This interface is used by Dagger 2 to generate code which uses the modules to fulfill the requested dependencies. |
'모바일 > Android' 카테고리의 다른 글
mpchart 창고 (0) | 2017.01.03 |
---|---|
1.1 안드로이드 깨달음 (0) | 2017.01.01 |
TOUCH_EXPLORATION_ENABLED 관련 (0) | 2016.12.29 |
getInfo from settings (0) | 2016.12.29 |
could not find method apt() for arguments.. (0) | 2016.12.28 |