Android onClickListener not registering clicks (I think)
<p>I'm trying to write a very basic solitaire game. I have buttons set up that are supposed to allow the player to interact with the cards.  I have listeners set on each button, but for the moment I am only working with one of the buttons to try and iron out this problem. I have the onClick() method set up, and listeners set on the button, but when I click the button nothing happens.  I'll try to extract the relevant code.</p>

<pre><code>    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.game);
      playableImage = (ImageView) this.findViewById(R.id.playableStack);
      deckButton = (Button) this.findViewById(R.id.deckButton);
      deckButton.setOnClickListener(this);

          @Override
    public void onClick(View v) {
      switch (v.getId()) {
        case R.id.deckButton:
            System.out.println(playableCards);
            dealCardsToPlayableStack();
            System.out.println(playableCards);  
            playableImage.setImageResource(getCardImageId(playableCards.peekTopCard()));
            playableImage.invalidate();
            break;
        default:
            break;
    }

}
</code></pre>

<p>As requested, here is the xml layout for the activity.</p>

<pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_height="match_parent" android:layout_width="match_parent"
      android:background="@drawable/background" android:baselineAligned="true"
      android:orientation="vertical" android:weightSum="1"&gt;
      &lt;RelativeLayout android:id="@+id/relativeLayout1"
        android:layout_width="match_parent" android:layout_height="match_parent"&gt;
        &lt;LinearLayout android:id="@+id/linearLayout1"
        android:layout_height="wrap_content" android:layout_width="wrap_content"
        android:layout_alignParentTop="true" android:layout_alignParentLeft="true"&gt;
        &lt;ImageView android:src="@drawable/cardback"
            android:layout_width="50dp" android:layout_height="62.5dp"
            android:padding="2.5dp" android:id="@+id/deckImage" /&gt;
        &lt;ImageView android:src="@drawable/cardtemplate"
            android:layout_width="50dp" android:layout_height="62.5dp"
            android:padding="2.5dp" android:id="@+id/playableStack" /&gt;
        &lt;ImageView android:src="@drawable/cardback"
            android:layout_height="62.5dp" android:layout_width="50dp"
            android:padding="2.5dp" android:id="@+id/spadesStack"&gt;&lt;/ImageView&gt;
        &lt;ImageView android:src="@drawable/cardback"
            android:layout_height="62.5dp" android:layout_width="50dp"
            android:padding="2.5dp" android:id="@+id/diamondsStack"&gt;&lt;/ImageView&gt;
        &lt;ImageView android:src="@drawable/cardback"
            android:layout_height="62.5dp" android:layout_width="50dp"
            android:padding="2.5dp" android:id="@+id/clubsStack"&gt;&lt;/ImageView&gt;
        &lt;ImageView android:src="@drawable/cardback"
            android:layout_height="62.5dp" android:layout_width="50dp"
            android:padding="2.5dp" android:id="@+id/heartsStack"&gt;&lt;/ImageView&gt;
    &lt;/LinearLayout&gt;
    &lt;LinearLayout android:id="@+id/linearLayout2"
        android:layout_height="wrap_content" android:layout_width="wrap_content"
        android:layout_below="@+id/linearLayout1" android:layout_alignLeft="@+id/linearLayout1"&gt;
        &lt;ImageView android:src="@drawable/cardtemplate"
            android:layout_height="62.5dp" android:layout_width="50dp"
            android:padding="2.5dp" android:id="@+id/stack1"
            android:layout_weight="1"&gt;&lt;/ImageView&gt;
        &lt;ImageView android:src="@drawable/cardtemplate"
            android:layout_height="62.5dp" android:layout_width="50dp"
            android:padding="2.5dp" android:id="@+id/stack2"
            android:layout_weight="1"&gt;&lt;/ImageView&gt;
        &lt;ImageView android:src="@drawable/cardtemplate"
            android:layout_height="62.5dp" android:layout_width="50dp"
            android:padding="2.5dp" android:id="@+id/stack3"
            android:layout_weight="1"&gt;&lt;/ImageView&gt;
        &lt;ImageView android:src="@drawable/cardtemplate"
            android:layout_height="62.5dp" android:layout_width="50dp"
            android:padding="2.5dp" android:id="@+id/stack4"
            android:layout_weight="1"&gt;&lt;/ImageView&gt;
        &lt;ImageView android:src="@drawable/cardtemplate"
            android:layout_height="62.5dp" android:layout_width="50dp"
            android:padding="2.5dp" android:id="@+id/stack5"
            android:layout_weight="1"&gt;&lt;/ImageView&gt;
        &lt;ImageView android:src="@drawable/cardtemplate"
            android:layout_height="62.5dp" android:layout_width="50dp"
            android:padding="2.5dp" android:id="@+id/stack6"
            android:layout_weight="1"&gt;&lt;/ImageView&gt;
        &lt;ImageView android:src="@drawable/cardtemplate"
            android:layout_height="62.5dp" android:layout_width="50dp"
            android:padding="2.5dp" android:id="@+id/stack7"
            android:layout_weight="1"&gt;&lt;/ImageView&gt;
    &lt;/LinearLayout&gt;
    &lt;LinearLayout android:id="@+id/linearLayout3"
        android:layout_height="wrap_content" android:layout_width="wrap_content"
        android:layout_below="@+id/linearLayout2" android:layout_alignLeft="@+id/linearLayout2"
        android:orientation="horizontal"&gt;
        &lt;Button android:layout_height="wrap_content"
            android:layout_width="wrap_content" android:text="@string/deck"
            android:id="@+id/deckButton"&gt;&lt;/Button&gt;
        &lt;Button android:layout_height="wrap_content" android:text="@string/playable"
            android:layout_width="wrap_content" android:id="@+id/playableButton"&gt;&lt;/Button&gt;
        &lt;Button android:layout_height="wrap_content" android:text="@string/spades"
            android:layout_width="wrap_content" android:id="@+id/spadesButton"&gt;&lt;/Button&gt;
        &lt;Button android:layout_height="wrap_content" android:text="@string/diamonds"
            android:layout_width="wrap_content" android:id="@+id/diamondsButton"&gt;&lt;/Button&gt;
        &lt;Button android:layout_height="wrap_content" android:text="@string/clubs"
            android:layout_width="wrap_content" android:id="@+id/clubsButton"&gt;&lt;/Button&gt;
        &lt;Button android:layout_height="wrap_content" android:text="@string/hearts"
            android:layout_width="wrap_content" android:id="@+id/heartsButton"&gt;&lt;/Button&gt;
    &lt;/LinearLayout&gt;
    &lt;LinearLayout android:id="@+id/linearLayout4"
        android:layout_height="wrap_content" android:layout_width="wrap_content"
        android:layout_below="@+id/linearLayout3" android:layout_alignLeft="@+id/linearLayout3"&gt;
        &lt;Button android:layout_height="wrap_content" android:text="@string/stack1"
            android:layout_weight="1" android:layout_width="0dp" android:id="@+id/stack1Button"&gt;&lt;/Button&gt;
        &lt;Button android:layout_height="wrap_content" android:text="@string/stack2"
            android:layout_weight="1" android:layout_width="0dp" android:id="@+id/stack2Button"&gt;&lt;/Button&gt;
        &lt;Button android:layout_height="wrap_content" android:text="@string/stack3"
            android:layout_weight="1" android:layout_width="0dp" android:id="@+id/stack3Button"&gt;&lt;/Button&gt;
        &lt;Button android:layout_height="wrap_content" android:text="@string/stack4"
            android:layout_weight="1" android:layout_width="0dp" android:id="@+id/stack4Button"&gt;&lt;/Button&gt;
        &lt;Button android:layout_height="wrap_content" android:text="@string/stack5"
            android:layout_weight="1" android:layout_width="0dp" android:id="@+id/stack5Button"&gt;&lt;/Button&gt;
        &lt;Button android:layout_height="wrap_content" android:text="@string/stack6"
            android:layout_weight="1" android:layout_width="0dp" android:id="@+id/stack6Button"&gt;&lt;/Button&gt;
        &lt;Button android:layout_height="wrap_content" android:text="@string/stack7"
            android:layout_weight="1" android:layout_width="0dp" android:id="@+id/stack7Button"&gt;&lt;/Button&gt;
    &lt;/LinearLayout&gt;
    &lt;LinearLayout android:id="@+id/LinearLayout5"
        android:layout_height="wrap_content" android:layout_width="wrap_content"
        android:layout_below="@+id/linearLayout4" android:layout_alignLeft="@+id/linearLayout4"&gt;
        &lt;TextView android:layout_height="wrap_content" android:id="@+id/textView1"
            android:text="@string/numCards" android:layout_width="wrap_content"&gt;
        &lt;/TextView&gt;
        &lt;EditText android:layout_height="wrap_content"
            android:inputType="number" android:id="@+id/editText1"
            android:layout_width="40dp" android:text="@string/default_number_of_cards"&gt;
            &lt;requestFocus&gt;&lt;/requestFocus&gt;
        &lt;/EditText&gt;
    &lt;/LinearLayout&gt;
&lt;/RelativeLayout&gt;
</code></pre>

<p></p>
