Android pass Fragment parameter instead of List into ListView [closed]

The problem is that you are passing a list as argument to replace() and it is expecting a Fragment as parameter.

public abstract FragmentTransaction replace (int containerViewId, Fragment fragment)

You have passed a list as an argument instead of passing a Fragment.

Try passing ReceivedSMS ( which extends ListFragment) instead of ListSMS which is a list (List<ReceiveFields> ListSMS)

Leave a Comment