Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/208.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 使用MatrixCursor时刷新ListView中特定行的最佳方式_Android_Android Listview_Refresh_Matrixcursor - Fatal编程技术网

Android 使用MatrixCursor时刷新ListView中特定行的最佳方式

Android 使用MatrixCursor时刷新ListView中特定行的最佳方式,android,android-listview,refresh,matrixcursor,Android,Android Listview,Refresh,Matrixcursor,我有一个列表视图,其中有一个自定义游标适配器提要,来自MatrixCursor。ListView中的每一行都有一个异步加载的映像,当映像加载完成时,我想通知适配器重新绘制有问题的行。我已经对ContentProvider中的数据执行了类似的操作,在这里我调用getContentResolver().notifyChange来重画特定的行。对于MatrixCursor,我可以调用notifyDataSetChanged,但这不是最佳选择,因为它会刷新每一行 所以我的问题是,从临时源重新绘制List

我有一个
列表视图
,其中有一个自定义
游标适配器
提要,来自
MatrixCursor
ListView
中的每一行都有一个异步加载的映像,当映像加载完成时,我想通知适配器重新绘制有问题的行。我已经对
ContentProvider
中的数据执行了类似的操作,在这里我调用
getContentResolver().notifyChange
来重画特定的行。对于
MatrixCursor
,我可以调用
notifyDataSetChanged
,但这不是最佳选择,因为它会刷新每一行


所以我的问题是,从临时源重新绘制
ListView
中的特定行的最佳方法是什么?有没有一种方法可以设置“临时的”
ContentUri
s,或者请求适配器仅使特定行无效?

我可以通过使用
matrixceror
上的
setNotificationUri
和任意URI,然后使用
getContentResolver.notifyChange()
发出重画信号来实现同样的效果。虽然这对我有效,但我很想知道这是否是要求重新绘制特定项目的建议方式