SimpleCursorAdapter的构造方法过期了,怎么用CursorLoader替代啊
我的代码如下
public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { //... } public void btnShowByCursorAdapter(View v) { Cursor c = service.getScrollCursor(0, 20); SimpleCursorAdapter sa = new SimpleCursorAdapter(this, R.layout.item, c, new String[]{"name","sex","phone","email"}, new int[]{R.id.name,R.id.sex,R.id.phone,R.id.email}); listViewShowItem.setAdapter(sa); } public void btnShowBySimpleAdapter(View v) { //... } //....还有很多方法 }
最好新建一个类,然后在这个方法内部使用。请问怎么做 -。-
SimpleCursorAdapter 有2个构造方法,另一个没过期 0.0