1

我需要通知 Gridlayout 内的图像已更改。使用 GridView 很容易:

adapterForImage.notifyDataSetChanged();
gridview.setAdapter(adapterForImage);

如何使用 GridLayout?谢谢

4

1 回答 1

0

GridLayout 不像 GridView 那样绑定到适配器。我怀疑你只是想使用像 CursorLoader 这样的东西,它会自动注册一个内容观察者。当与提供程序关联的内容发生更改时,您可以使整个 GridLayout 无效——或者您可以只使您知道需要更新的视图无效。

于 2015-05-10T22:51:14.683 回答