title: Android ListView slide animation when item is selected
body: <p>I have this ListView:</p>
  
  <pre><code>    @Override
          public void onComplete(List&lt;Profile&gt; friends) {
  
              runOnUiThread(new Runnable() {
                  @Override
                  public void run() {
                      mSpinner.setVisibility(View.GONE);
                      mSpinner.clearAnimation();
                  }
                  });
  
              // populate list
              List&lt;String&gt; values = new ArrayList&lt;String&gt;();
              for (Profile profile : friends) {
                  //profile.getInstalled();
                  values.add(profile.getName());
              }
  
  
  
              ArrayAdapter&lt;String&gt; friendsListAdapter = new ArrayAdapter&lt;String&gt;(getApplicationContext(), R.layout.list_items2, values);
              friendsListAdapter.sort(new Comparator&lt;String&gt;() {
                  @Override
                  public int compare(String lhs, String rhs) {
                      return lhs.compareTo(rhs);    
                  }
              });
              mFriendsList.setAdapter(friendsListAdapter);
          }
      };
  </code></pre>
  
  <p>And in xml:</p>
  
  <pre><code>&lt;ListView
      android:id="@+id/list"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_below="@+id/imageView9"
      android:divider="#8A8A8A"
      android:cacheColorHint="#00000000"
      android:dividerHeight="0.9dp"
      android:listSelector="#ccc"
      android:choiceMode="singleChoice"
      android:layout_marginBottom="50dp"
      android:background="#fff"
      &gt;
  
  &lt;/ListView&gt;
  </code></pre>
  
  <p>I have tried looking for solutions for this or similar effects but i couldn't really find any helpul ones.</p>
  
  <p>The ListView loads friends from facebook, when a friend is selected in the ListView, what it does now is that it changes the selected item to a grey color, but what i would want it to do is to create a "sliding" animation, with the color. Like this:</p>
  
  <p>Here is ListView before the item is selected:</p>
  
  <p><img src="https://i.stack.imgur.com/NC9L0.png" alt="Here is listview before item is selected:"></p>
  
  <p>When the item has been selected, the color slides in from right to left:</p>
  
  <p><img src="https://i.stack.imgur.com/X8AO4.png" alt="enter image description here"></p>
  
  <p>And when finished it should look something like this:</p>
  
  <p><img src="https://i.stack.imgur.com/rB88j.png" alt="enter image description here"></p>
  
  <p>How could i create this effect?</p>