开发者

Context in Android Programming [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

What is Context in Android?

Can anybody please tell me about the "context" term used in android. I wonder what exactly this means because this is something i used 开发者_如何学Cto see at lots of places.

I found it being a Class :- "Interface to global information about an application environment" but I am not quite clear regarding it still by now.

for Instance: public GetCurrentLocation(Context context) { this.context = context; }

Thanks, david


I have answered it here

this.context = context is written confusingly. Another way to write the same:

public class LocationClass {

private Context context_belonging_to_class = null;

// ..

public GetCurrentLocation(Context context_from_call_entity) {
  context_belonging_to_class = context_from_calling_entity; // initializing context variable
}

// ..

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜