android - How to initialize context? -
this stupid question set context equal in context context = ...
just declaring sets null , need utilize context app.
you cannot instantiate context object. controlled system. however, every application has context , every activity context, have couple of obtain pointer context object:
assign pointer activity object context object pointer (i.e. using keyword)
the activity class has method called getapplicationcontext() retrieves pointer context object contained application.
android android-context
No comments:
Post a Comment