当前位置: 代码迷 >> Android >> Context的有关问题
  详细解决方案

Context的有关问题

热度:35   发布时间:2016-04-28 07:54:16.0
Context的问题。


public void testInsert()throws Exception
{
Uri uri = Uri.parse("cn.dzr.provides.personprovider/person");
ContentResolver resolver = this.getContext().getContentResolver();
ContentValues values = new ContentValues();


这段代码,我是在测试代码里写的。

this.getContext()
获取的Context是哪儿的Context呢。

------解决方案--------------------
当前Activity的Context
  相关解决方案