I need to notify an image inside the Gridlayout is changed. Using the GridView it is easy:
adapterForImage.notifyDataSetChanged();
gridview.setAdapter(adapterForImage);
How can I do with the GridLayout? Thanks
I need to notify an image inside the Gridlayout is changed. Using the GridView it is easy:
adapterForImage.notifyDataSetChanged();
gridview.setAdapter(adapterForImage);
How can I do with the GridLayout? Thanks
Copyright © 2021 Jogjafile Inc.
GridLayout isn't tied to an adapter like GridView is. My suspicion is that you just want to use something like a CursorLoader, which will automatically register a content observer. When the content associated with the provider changes, you can invalidate the whole GridLayout --- or you can invalidate just the views that you know need to be updated.