title: Highlight a pressed card item : using CardView from cardslib
body: <p>I'm using CardView in a CardListView. 
  I would like to know how to highlight a card item when it's pressed just like in the "CardsLibDemo Extras" application, precisely in the "Card and Weather List" fragment when you press on a card from the "You may know" list ?
  P.S. : I'm using API 15 (Android 4.0.4 Ice Cream sandwich) to test this application.</p>
  
  <p>This is my fragment layout :</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="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;!-- You can customize this layout.
       You need to have in your layout a `CardView` with the ID `list_cardId` --&gt;
      &lt;it.gmariotti.cardslib.library.view.CardListView
          xmlns:card="http://schemas.android.com/apk/res-auto"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/rent_list"
          android:foreground="?android:attr/selectableItemBackground"
          card:list_card_layout_resourceID="@layout/card_row_layout_rent_list" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is the <strong>card_row_layout_rent_list.xml</strong> :</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="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;it.gmariotti.cardslib.library.view.CardView
          xmlns:card="http://schemas.android.com/apk/res-auto"
          android:id="@+id/list_cardId"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          card:card_layout_resourceID="@layout/card_layout"
          style="@style/list_card.base"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is the <strong>card_layout.xml</strong> :</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="vertical"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;!-- Card visible layout --&gt;
      &lt;LinearLayout
          android:orientation="horizontal"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/card_main_layout"
          style="@style/card.main_layout"&gt;
  
              &lt;it.gmariotti.cardslib.library.view.component.CardThumbnailView
                  xmlns:card="http://schemas.android.com/apk/res-auto"    
                  style="@style/card_thumbnail_outer_layout"
                  android:id="@+id/card_thumbnail_layout"
                  android:layout_gravity="center_vertical"
                  android:layout_width="wrap_content"                
                  android:layout_height="wrap_content"
                  card:card_thumbnail_layout_resourceID="@layout/card_image" /&gt;
  
              &lt;FrameLayout                
                  android:id="@+id/card_main_content_layout"
                  android:layout_gravity="right"
                  style="@style/card.content_outer_layout"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content" /&gt;    
  
      &lt;/LinearLayout&gt;
  
      &lt;!-- Compound view for Shadow
             If you want to customize this element use attr card:card_shadow_layout_resourceID --&gt;
      &lt;it.gmariotti.cardslib.library.view.component.CardShadowView
          style="@style/card.shadow_outer_layout"
          android:id="@+id/card_shadow_layout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" /&gt;
  
      &lt;FrameLayout
          android:id="@+id/card_content_expand_layout"
          style="@style/card.main_contentExpand"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is the <strong>card_inner_layout_rent_list.xml</strong> :</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="vertical"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;!-- This is the base Inner View inside a CardHeader.
          You can customize it with your layout xml file and your CardHeader.
          You can popolate your elements with CardHeader#setupInnerViewElements(android.view.ViewGroup, android.view.View) method --&gt;
  
      &lt;TextView
          android:id="@+id/textViewPrix"
          style="@style/card.header_simple_title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="left"
          android:layout_marginTop="2dp"
          android:text="@string/card_txtPrix"
          android:textColor="@color/blue"
          android:textStyle="bold" /&gt;
  
      &lt;TextView
          android:id="@+id/textViewAdr"
          style="@style/card.expand_simple_title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="left"
          android:layout_marginTop="2dp"
          android:text="@string/card_txtAdr"
          android:textColor="@color/black"
          android:textSize="@dimen/card_expend_simple_title_text_size_16sp"
          android:textStyle="bold" /&gt;
  
      &lt;TextView
          android:id="@+id/textViewType"
          style="@style/card.expand_simple_title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="left"
          android:layout_marginTop="2dp"
          android:text="@string/card_txtType"
          android:textColor="@color/black"
          android:textSize="@dimen/card_expand_simple_title_text_size_12sp" /&gt;
  
      &lt;TextView
          android:id="@+id/textViewSup"
          style="@style/card.expand_simple_title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="left"
          android:layout_marginTop="1dp"
          android:text="@string/card_txtSup"
          android:textColor="@color/black"
          android:textSize="@dimen/card_expand_simple_title_text_size_12sp" /&gt;
  
      &lt;TextView
          android:id="@+id/textViewHonor"
          style="@style/card.expand_simple_title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="right"
          android:layout_marginTop="0dp"        
          android:text="@string/card_txtHonor"
          android:textSize="@dimen/card_expand_simple_title_text_size_12sp" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is the <strong>card_image.xml</strong> :</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ImageView
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/card_thumbnail_image"
      android:layout_width="100dp"
      android:layout_height="100dp"
      android:layout_margin="1dp"
      android:layout_weight="0"
      android:layout_gravity="center"
      android:contentDescription="@string/imageview_desc" 
      android:orientation="vertical"/&gt;
  </code></pre>
  
  <p>Finally, here's where I fill CardList (extracted from the fragment class) :</p>
  
  <pre><code>private void initColorCard() {
  
          int listImages[] = new int[]{R.drawable.angry_1, R.drawable.angry_2,
                  R.drawable.angry_3, R.drawable.angry_4, R.drawable.angry_5};
  
          ArrayList&lt;Card&gt; cards = new ArrayList&lt;Card&gt;();
  
          for (int i = 0; i&lt;5; i++) {
              // Create a Card
              ColorCard card = new ColorCard(getActivity());
  
              //Set onClick listener
              card.setOnClickListener(new Card.OnCardClickListener() {
                  @Override
                  public void onClick(Card card, View view) {                                     
                      Toast.makeText(getActivity(), "Clickable card : " + card.getCardHeader().getTitle(), Toast.LENGTH_SHORT).show();
                  }
              });
  
              // Create a CardHeader
              CardHeader header = new CardHeader(getActivity());
  
              // Add Header to card
              header.setTitle("" + i);
              card.addCardHeader(header);
  
              CardThumbnail thumb = new CardThumbnail(getActivity());
              thumb.setDrawableResource(listImages[i]);
              card.addCardThumbnail(thumb);
  
              cards.add(card);
          }
  
          CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(getActivity(), cards);
  
          CardListView listView = (CardListView) getActivity().findViewById(R.id.rent_list);
  
          if (listView != null) {
              listView.setAdapter(mCardArrayAdapter);
          }
      }
  </code></pre>
  
  <p>Any idea what's missing in this code so any pressed card become highlighted ?</p>