I don't really get the idea behind how this whole thing works really, so if I have some class A
that need the context of a class B
which extends Activity
, how do i get that context?
I'm searching for a more efficient way than giving the context as a parameter to class A
constructor. For example if class A
is going to have millions of instances then we would end up having millions of redundant pointer to Context
while we should be able somehow to have just one somewhere and a getter function...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…