Update common post in different ListView with different data in adapter

后端 未结 3 1587
别跟我提以往
别跟我提以往 2021-01-27 17:47

Assume That an app Firstly List all post in a ListView in Fragment ( 1st ) with a custom adapter. and that custom adapter data is

3条回答
  •  日久生厌
    2021-01-27 18:04

    You can create the model of the data bind to your list view and populate the list view with that data.

    To have post execution of something like making like button you can use broadcast receiver(local) or can use tinyBus or otto to have call backs for any kind of event.

    After getting the callback just notify the particular list in fragments.

    Trick lies between model formation and callbacks.

提交回复
热议问题