请解释一下我的Andr​​oid Context类我的、Andr、Context、oid

2023-09-07 15:27:42 作者:心若香茗ゞ静听花开

我是新来的Andr​​oid。有人可以解释我Context类/对象的概念。这是什么?它会被用来做什么?为什么Context类?

解决方案

在编程Android应用程序,你将几乎不需要直接(不可能使用上下文类,因为上下文是抽象的),但你将需要从中获得像活动服务等子类你可能想看看这些了。

I'm new to Android. Can someone explain me the concept of Context class/Object. What it is? What it will be used for? Why Context class?

解决方案

In programming Android applications, you will hardly ever need to use the Context class directly (not possible at all since Context is abstract), but you will need the child classes that derive from it like Activity, Service etc. You might want to look these up.