title: Android View won't scroll with swipe gesture and won't scroll.  Using ListView with ArrayAdapter
body: <p>I'm using a custom <code>ArrayAdapter</code> for my <code>ListView</code>. I have a <code>CheckBox</code> on the left and two <code>TextView</code> items to the right of the <code>CheckBox</code>, stacked on top of each other.  I'm also using a custom <code>android:listSelector</code>.</p>
  
  <p>I insert 8 items into my custom <code>ListView</code> in <code>MyActivity</code> <code>onCreate</code> method. </p>
  
  <p>I am able to select a row of the list so that it changes color and I am also able to check and uncheck the checkbox.  However, the view doesn't respond to a vertical swipe, nor does it ever give the items focus when I hover over the items with my fingers. I can scroll if I simultaneously click the item and scroll down with my other finger, but this isn't want I want.  Have I somehow clobbered the vertical swipe gesture? </p>
  
  <p>I want to point out that there are NO <code>ScrollView</code> objects in my problem. Most of the posts out there have to do with folks putting <code>ListView</code> objects inside of <code>ScrollView</code>, visa-versa.</p>
  
  <p>My suspicion is that something is wrong in my layout and/or something is wrong with the way I'm assigning the focus in the layout and in the code.</p>
  
  <p>Here is my main Activity code:</p>
  
  <pre class="lang-java prettyprint-override"><code>import java.util.ArrayList;    
  import android.app.Activity;
  import android.content.Context;
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.AdapterView;
  import android.widget.AdapterView.OnItemClickListener;
  import android.widget.ArrayAdapter;
  import android.widget.CheckBox;
  import android.widget.ListView;
  import android.widget.TextView;
  
  
  public class MyActivity extends Activity{
      private ListView lv;
      private TextView titleDisplay;
      private TextView locationDisplay;
      private ArrayList&lt;TalkItem&gt; m_talks = null;
      private MyListView m_adapter;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.session_view);
  
          lv = (ListView) findViewById(R.id.sessionlist);    
          titleDisplay = (TextView) findViewById(R.id.sessiontitle);
          locationDisplay = (TextView) findViewById(R.id.sessionlocation);
  
          m_talks = new ArrayList&lt;TalkItem&gt;();
          this.m_adapter = new MyListView(this, R.layout.sessionlistitem, m_talks);
          lv.setAdapter(this.m_adapter); 
  
          lv.setOnItemClickListener(new OnItemClickListener() {
              public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                      int position, long id) {
                  //TODO: do something
              }
          });
  
          //set title and location display
          titleDisplay.setText("TITLE");
          locationDisplay.setText("LOCATION");
          m_talks.add(new TalkItem("first1", "last1", false));
          m_talks.add(new TalkItem("first2", "last2", false));
          m_talks.add(new TalkItem("first3", "last3", false));
          m_talks.add(new TalkItem("first4", "last4", false));
          m_talks.add(new TalkItem("first5", "last5", false));
          m_talks.add(new TalkItem("first6", "last6", false));
          m_talks.add(new TalkItem("first7", "last7", false));
          m_talks.add(new TalkItem("first8", "last8", false));
  
      }
  
      public class MyListView extends ArrayAdapter&lt;TalkItem&gt; {
  
          private ArrayList&lt;TalkItem&gt; items;
  
          public MyListView(Context context, int textViewResourceId, 
                  ArrayList&lt;TalkItem&gt; items) {
              super(context, textViewResourceId, items);
              this.items = items;
          }
  
          @Override
          public View getView(int position, View convertView, ViewGroup parent) {
  
              TalkItem talkItem = items.get(position);
              CheckBox checkBox;
              TextView topText;
              TextView bottomText;
  
              if (convertView == null) {
                  LayoutInflater vi = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                  convertView = vi.inflate(R.layout.sessionlistitem, null);
                  checkBox = (CheckBox) convertView.findViewById(R.id.icon);
                  topText =  (TextView) convertView.findViewById(R.id.toptext);
                  bottomText = (TextView) convertView.findViewById(R.id.bottomtext);
  
                  // Optimization: Tag the row with it's child views, so we don't have to 
                  // call findViewById() later when we reuse the row.
                  convertView.setTag(new TalkItemViewHolder(checkBox, topText, bottomText));
  
                  // If CheckBox is toggled, update the listitem it is tagged with.
                  checkBox.setOnClickListener( new View.OnClickListener() {
                      public void onClick(View v) {
                          CheckBox cb = (CheckBox) v ;
                          TalkItem ti = (TalkItem) cb.getTag();
                          ti.setChecked( cb.isChecked() );
                      }
                  });
              }
              // Reuse existing row view
              else {
                  // Because we use a ViewHolder, we avoid having to call findViewById().
                  TalkItemViewHolder viewHolder = (TalkItemViewHolder) convertView.getTag();
                  checkBox = viewHolder.getCheckBox();
                  topText = viewHolder.getTopText();
                  bottomText = viewHolder.getBottomText();
              }
  
  
              // Tag the CheckBox with the Planet it is displaying, so that we can
              // access the planet in onClick() when the CheckBox is toggled.
              if(talkItem!=null){
                  if(checkBox!=null){
                      checkBox.setTag(talkItem); 
                      // Display item data
                      checkBox.setChecked( talkItem.isChecked() );
                  }
                  if(topText!=null)
                      topText.setText(talkItem.getAuthor());
                  if(bottomText!=null)
                      bottomText.setText(talkItem.getTitle());
              } 
              convertView.setBackgroundResource(android.R.color.transparent);              
              return convertView;
          }     
      }
      public class TalkItemViewHolder {
          private CheckBox checkBox;
          private TextView topText;
          private TextView bottomText;
  
          public TalkItemViewHolder(){}
          public TalkItemViewHolder(CheckBox checkBox, TextView topText, TextView bottomText){
              this.checkBox = checkBox;
              this.topText = topText;
              this.bottomText = bottomText;
          }
  
          public CheckBox getCheckBox(){
              return checkBox;
          }
  
          public TextView getTopText(){
              return topText;
          }
  
          public TextView getBottomText(){
              return bottomText;
          }
  
          public void setCheckBox(CheckBox checkBox){
              this.checkBox = checkBox;
          }
  
          public void setTopText(TextView topText){
              this.topText = topText;
          }
  
          public void setBottomText(TextView bottomText){
              this.bottomText = bottomText;
          }
  
      }
  
      public class TalkItem {
          private String title;
          private String author;
          private boolean checked = false;
  
  
          public TalkItem(){
              title = "";
              author = "";
          }
          public TalkItem(String title, String author, boolean checked){
              this.title = title;
              this.author = author;
              this.checked = checked;
          }
  
          public String getTitle(){
              return title;
          }
  
          public String getAuthor(){
              return author;
          }
  
          public void setTitle(String title){
              this.title = title;
          }
  
          public void setAuthor(String author){
              this.author = author;
          }
  
          public boolean isChecked(){
              return checked;
          }
  
          public void setChecked(boolean checked){
              this.checked = checked;
          }
  
          public void toggleChecked(){
              checked = !checked;
          }
  
      }
  
  }
  </code></pre>
  
  <p>Here is my parent layout for the main view, entitled <code>session_view.xml</code></p>
  
  <pre class="lang-java prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/sessionviewlayout"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@color/white"
      android:orientation="vertical" &gt;
  
      &lt;TextView
          android:id="@+id/sessiontitle"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:gravity="center"
          android:textSize="20dp" /&gt;
  
      &lt;TextView
          android:id="@+id/sessionlocation"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/sessiontitle"
          android:gravity="center"
          android:textSize="16dp" /&gt;
  
      &lt;ListView
          android:id="@+id/sessionlist"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/sessionlocation"
          android:cacheColorHint="@color/transparent"
          android:descendantFocusability="blocksDescendants"
          android:dividerHeight="3.0sp"
          android:drawSelectorOnTop="false"
          android:listSelector="@drawable/list_selector"
          android:minHeight="1in" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Here is the layout for each item in the list, entitled <code>sessionlistitem.xml</code></p>
  
  <pre class="lang-java prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="?android:attr/listPreferredItemHeight"
      android:background="@color/white"
      android:padding="2dip" &gt;
  
      &lt;CheckBox
          android:id="@+id/icon"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center_vertical"
          android:button="@android:drawable/btn_star"
          android:focusable="false"
          android:padding="10dp" /&gt;
  
      &lt;LinearLayout
          android:layout_width="0dip"
          android:layout_height="95dp"
          android:layout_weight="0.99"
          android:clickable="false"
          android:focusable="false"
          android:orientation="vertical" &gt;
  
          &lt;TextView
              android:id="@+id/toptext"
              android:layout_width="wrap_content"
              android:layout_height="0dip"
              android:layout_weight="1"
              android:clickable="false"
              android:focusable="false"
              android:gravity="center_vertical"
              android:singleLine="false"
              android:textColor="@color/black"
              android:textSize="18dp" /&gt;
  
          &lt;TextView
              android:id="@+id/bottomtext"
              android:layout_width="wrap_content"
              android:layout_height="0dip"
              android:layout_weight="1"
              android:clickable="false"
              android:ellipsize="marquee"
              android:focusable="false"
              android:singleLine="false"
              android:textColor="@color/black"
              android:textSize="16dp" /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>My custom listSelector <code>list_selector.xml</code> is </p>
  
  <pre class="lang-java prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector
      xmlns:android="http://schemas.android.com/apk/res/android"&gt; 
      &lt;item
          android:state_pressed="true"
          android:drawable="@drawable/list_selector_pressed" /&gt;
      &lt;item
          android:state_focused="true"
          android:drawable="@drawable/list_selector_pressed" /&gt;
      &lt;item
          android:drawable="@android:color/transparent" /&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p><code>list_selector_pressed.xml</code> is </p>
  
  <pre class="lang-java prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:shape="rectangle"&gt;
      &lt;solid android:color="@color/blue"/&gt;   
  &lt;/shape&gt;
  </code></pre>
  
  <p><code>strings.xml</code> is </p>
  
  <pre class="lang-java prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;string name="hello"&gt;Hello World!&lt;/string&gt;
      &lt;string name="app_name"&gt;My APP&lt;/string&gt;
      &lt;color name="gray"&gt;#aaaaaa&lt;/color&gt;
      &lt;color name="white"&gt;#ffffff&lt;/color&gt;
      &lt;color name="blue"&gt;#5BB5D7&lt;/color&gt;
      &lt;color name="transparent"&gt;#00000000&lt;/color&gt;
      &lt;color name="black"&gt;#000000&lt;/color&gt;
  &lt;/resources&gt;
  </code></pre>