问一下SimpleCursorAdapter()最后一个参数具体写什么

Android 码拜 8年前 (2016-05-01) 1104次浏览
SimpleCursorAdapter (Context context, int layout, Cursor c, String[] from, int[] to),这个构造函数被弃用了,推荐用这个:
SimpleCursorAdapter (Context context, int layout, Cursor c, String[] from, int[] to,int flags)
也就是比原来多了一个int flags,可问题是在具体的例子里,这个int flags究竟写什么?如下图
问一下SimpleCursorAdapter()最后一个参数具体写什么
这是网上找来的:
flags               这个标志用来决定该适配器的行为。(译者注:Android3.0推荐我们传递CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER。设置标志用来添加一个监听器,监听着参数cursor的数据能否有更变。)
看不清楚,难不成flags这个位置直接写“CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER”?
业余新手,英文差,求指点。
解决方案

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明问一下SimpleCursorAdapter()最后一个参数具体写什么
喜欢 (0)
[1034331897@qq.com]
分享 (0)