android中有多少种类型的上下文,以及使用哪种更好 [英] How many types of context in android and what is better to use

查看:81
本文介绍了android中有多少种类型的上下文,以及使用哪种更好的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道获取上下文的方法有多少种,在哪种情况下使用了哪种方法. 哪一种更好使用,它们之间的主要和主要区别是什么?

解决方案

为了更好地理解您应该阅读android官方博客.另请参见 HackBod答案./p>

有些参考URL可以帮助您更多地了解上下文

  1. 使用应用程序上下文到底是什么意思?
  2. 活动上下文与应用程序上下文之间的差异
  3. http://android-developers.blogspot.de/2009/01/avoiding-memory-leaks.html

谢谢

I just wanted to know how many ways to get the context, which method used in which situation. Which one better to use, and what is the main and key deference between them.

解决方案

For Your better understands you should read android official blog. an also look at HackBod Answer.

There are some references URL which help you more about the context

  1. What exactly does using the Application Context mean?
  2. Difference between Activity Context and Application Context
  3. http://android-developers.blogspot.de/2009/01/avoiding-memory-leaks.html

Thanks

这篇关于android中有多少种类型的上下文,以及使用哪种更好的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆