How many types of context in android and what is better to use

前端 未结 2 1088
后悔当初
后悔当初 2021-02-05 12:20

I just wanted to know how many ways to get the context, which method used in which situation. Which one better to use, and what is the main and key deference between them.

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-05 12:47

    For Your better understands you should read android official blog. an also look at HackBod Answer.

    There are some references URL which help you more about the context

    1. What exactly does using the Application Context mean?
    2. Difference between Activity Context and Application Context
    3. http://android-developers.blogspot.de/2009/01/avoiding-memory-leaks.html

    Thanks

提交回复
热议问题