Android - setAdapter in Fragment : <p>I'm attempting to populate a list in a ListView.
The Fragment I'm using is a tab in my activity.
When I'm trying to create the adapter for the ListView, I encounter an issue.
The adapter I've created TaskItemAdapter up to this point was used in an activity in which there were no tabs, so the contractor was:</p>

<pre><code>    public TaskItemAdapter(Context context, List&lt;Task&gt; list) {
    this.itemList = list;
    this.context = context;
    inflater = LayoutInflater.from(this.context);
}
</code></pre>

<p>This is the initialization:</p>

<pre><code>list.setAdapter(new TaskItemAdapter(context, itemList));
</code></pre>

<p>But when I try this in a Fragment, I encounter an issue, as there is no Context to transfer to the contractor.
How can I resolve this?</p>
