您的位置:首页 > 移动开发 > Android开发

android中上下文Context的意义

2015-09-19 23:55 337 查看

在安卓开发中经常用到Context这个类,源码解释如下—上下文是一个可以获取应用环境的接口,通过Context可以获取到项目中的工作属性等等

/**
* 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.
*/
public abstract class Context {
/**
* File creation mode: the default mode, where the created file can only
* be accessed by the calling application (or all applications sharing the
* same user ID).
* @see #MODE_WORLD_READABLE
* @see #MODE_WORLD_WRITEABLE
*/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  context