Here is the code of the fragment in which I am setting a custom adapter to the list.
There no errors but the ListView is empty. I have implemented
What you have been doing is
In your adapter
public CarListAdapter(Context context , ArrayList items) {
this.context = context;
this.items = items;
}
in your Fragment
adapter = new CarListAdapter(getActivity(),ServiceCarListFragment.this.carDetailList);
I hope you will be using FragmentActivity
You need to call
adapter = new CarListAdapter(YOUR_ACTIVITY_CONTEXT, carDetailList);
where YOUR_ACTIVITY_CONTEXT will be your FragmentActivity