프로그램/Java - Android / / 2017. 6. 15. 10:27

Context Capabilities

반응형

Context Capabilities

The common actions you can safely take with a given Context object depends on where it came from originally. Below is a table of the common places an application will receive a Context, and in each case what it is useful for:

enter image description here

  1. An application CAN start an Activity from here, but it requires that a new task be created. This may fit specific use cases, but can create non-standard back stack behaviors in your application and is generally not recommended or considered good practice.
  2. This is legal, but inflation will be done with the default theme for the system on which you are running, not what’s defined in your application.
  3. Allowed if the receiver is null, which is used for obtaining the current value of a sticky broadcast, on Android 4.2 and above.


반응형

'프로그램 > Java - Android' 카테고리의 다른 글

CardView 그림자 제거  (0) 2017.10.08
android xml id 생성시 접미사  (0) 2017.06.21
content uri로 만들기  (0) 2017.04.18
Fragment LifeCycle  (0) 2017.04.13
Fragment 데이터 전달  (0) 2017.04.13
  • 네이버 블로그 공유
  • 네이버 밴드 공유
  • 페이스북 공유
  • 카카오스토리 공유