android getItemViewType on onItemClick
<p>I want to use getItemViewType in onItemClick event to determine current item type (1 or 2 in my case). I override <code>getItemViewType</code> and <code>getViewTypeCount</code>:</p>

<pre><code>  @Override
    public int getItemViewType(int position) {
        //not last item 
        if (position != getCount() - 1)
            return 0;
        else
            return 1;   

    }

    @Override
    public int getViewTypeCount() {
        return 2;
    }
</code></pre>

<p>For <code>onItemClick</code> :</p>

<pre><code>                @Override
            public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1,
                    int arg2, long arg3) {
                Integer curItemType = arg0.getAdapter().getItemViewType(arg2);
                Log.i("curItemType",Integer.toString(curItemType));

            }
</code></pre>

<p>For curItemType in <code>onItemClick</code> I get values 2 and 3 (not my 0 or 1 ) can some explain my why? 
In <code>getView</code> method <code>curItemType</code> is correct (0 or 1)</p>

<p>Thanks</p>
