SQLite Database “context” passed to adapter

后端 未结 3 1831
天命终不由人
天命终不由人 2021-01-11 16:49

I have followed this tutorial to use SQLite db in my android app. Since I am a beginner I\'m having problems understanding "context" parameter used in the example.

3条回答
  •  我在风中等你
    2021-01-11 17:26

    As you see in the example, there is a context passed to the ToDoAdapter. You can pass activity as a context or activity.getApplicationContext(). Read about context here.

提交回复
热议问题