Regarding Activity.getApplicationContext()
<p>I have created a custom adapter for a list view. In the constructor of the adapter i do the following:</p>

<pre><code>public CustomListAdapter(Context context, int textViewResourceId,
        ArrayList&lt;CatalogueItemListData&gt; items,int width) {
    super(context, textViewResourceId, items);
    this.context =context;
            mInflater = LayoutInflater.from(context);
      }
</code></pre>

<p>In my activity class i call the adaper as below:</p>

<pre><code>this.m_adapter = new CustomListAdapter(this,
                    android.R.layout.simple_list_item_1, m_orders,displayMetrics.widthPixels);
            listView.setAdapter(this.m_adapter);
</code></pre>

<p>and i get the output as in the image below:
<img src="http://i.stack.imgur.com/Ol6M2.png" alt="Output when context is passed to the constructor"></p>

<p>Now when i change the constructor of my adapter as below:</p>

<pre><code> public CustomListAdapter(Activity activity, int textViewResourceId,
        ArrayList&lt;CatalogueItemListData&gt; items,int width) {
    super(activity.getApplicationContext(), textViewResourceId, items);
    this.context =activity.getApplicationContext();
            mInflater = LayoutInflater.from(context);
      }
</code></pre>

<p>I get the following output:</p>

<p><img src="http://i.stack.imgur.com/aHZIV.png" alt="Output when using activity.getApplicationContext()"></p>

<p>Could someone kindly tell me what could be the possible reason for the difference in the outputs? Thanks in advance.</p>
