title: Gmail style listview
body: <p>I want to create a listview that is similar in functionality to the Gmail android app. By that I mean that you can select rows by clicking an image on the left or view an email by clicking anywhere else on the row. I can come close, but it's not quite there.</p>
  
  <p>My custom row consists of an ImageView on the left and some TextViews on the right. Here's the gist of the getView on my Adapter.</p>
  
  <pre><code>    @Override
      public View getView(final int position, View convertView, ViewGroup parent) {
          View row = super.getView(position, convertView, parent);
  
          imageView.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  getListView().setItemChecked(position, !getListView().isItemChecked(position));
              }
          });
  
          row.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Toast.makeText(getActivity(), "" + position, Toast.LENGTH_SHORT).show();
              }
          });
       }
  </code></pre>
  
  <p>This comes very close! What's missing is the highlighting of the row on the row click listener.</p>