Android: OnItemClickListener not firing
<p>I have already checked a lot of questions out there about the same issue but none of them have helped to solve mine (tried a multitude of them).</p>

<p>Adapter class:</p>

<pre><code>import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class GameAdapter extends ArrayAdapter&lt;Games&gt;  {

    Context context; 
    int layoutResourceId;    
    Games data[] = null;

    public GameAdapter(Context context, int layoutResourceId, Games[] data) {
        super(context, layoutResourceId, data);
        this.layoutResourceId = layoutResourceId;
        this.context = context;
        this.data = data;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View row = convertView;
        GamesHolder holder = null;

        if(row == null)
        {
            LayoutInflater inflater = ((Activity)context).getLayoutInflater();
            row = inflater.inflate(layoutResourceId, parent, false);

            holder = new GamesHolder();
            holder.txtGamenumber = (TextView)row.findViewById(R.id.txtGamenumber);

            holder.txtOpponent = (TextView)row.findViewById(R.id.txtOpponent);

            row.setTag(holder);
        }
        else
        {
            holder = (GamesHolder)row.getTag();
        }

        Games games = data[position];
        holder.txtOpponent.setText(games.opponent);
        holder.txtGamenumber.setText(games.gamenumber);

        row.setOnClickListener(new OnItemClickListener(data[position].opponent));
        return row;
    }

    static class GamesHolder
    {
        TextView txtGamenumber;
        TextView txtOpponent;
    }
}
</code></pre>

<p>Now the OnItemClickListener class:</p>

<pre><code>import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;

public class OnItemClickListener implements OnClickListener {

    private static final String TAG = "MyActivity";

    String mPosition;
    OnItemClickListener(String opponent) {
        mPosition = opponent;
    }
    public void onClick(View v) {
        // TODO Auto-generated method stub
         Log.v(TAG, "onItemClick at position");
    }

}
</code></pre>

<p>Lastly, the xml file for each row:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="10dp"&gt;

     &lt;TextView android:id="@+id/txtGamenumber"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:gravity="center_vertical"
        android:layout_alignParentTop="true"
        android:layout_alignParentBottom="true"
        android:layout_marginRight="15dp"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp"
        android:focusable="false"
         /&gt;

     &lt;TextView android:id="@+id/txtOpponent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="center_vertical"
        android:layout_alignParentTop="true"
        android:layout_alignParentBottom="true"
        android:textStyle="bold"
        android:textSize="22dp"
        android:textColor="#000000"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp"
        android:focusable="false"
         /&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>I kept one of the resolutions I found previously which was to use android:focusable="false" but still can't get the onItemClickListener to fire.</p>
