Android Context相关

Android Context 相关

Context 基本上就是Activity + Service + Application

Class Overview
Interface to global information about an application environment. This is an abstract class whose implementation is provided by the Android system. It allows access to application-specific resources and classes, as well as up-calls for application-level operations such as launching activities, broadcasting and receiving intents, etc.

Context是用于访问应用资源,类同时也进行application层的操作:启动activity广播以及接收广播

api文档上关于

再看看Context相关的子类.因为Context的父类就直接是java.lang.Object了。

Context的子类有

  • ContextWrapper
  • MockContext
  • 版权声明: 本博客所有文章除特别声明外,均采用 Apache License 2.0 许可协议。转载请注明出处!
  • © 2020 Kfdykme
  • Powered by Hexo Theme Ayer
  • PV: UV:

请我喝杯咖啡吧~

支付宝
微信