I dont know difference between them, I sometimes use this, sometimes activityame.this, sometimes getAplicationContext() when android needs context passed.
I dont know difference between them, I sometimes use this , sometimes activityame.this ,
Share
ActivityObjectActivityObject, use it when you are working with an dynamic inner class, such as instantiating a new onClickListener() {}.Contextreference for the whole application.Activityis a Context subclass, but certain things may vary between the appliation Context and the Activity. For the most part though, using the Activity as the Context works fine, I haven’t coded anything that needs getApplicationContext() yet.